FSHost and FSHostSpy > Other Stuff
Monitoring FSHost with Nagios
(1/1)
Air SeaTac:
Hi all,
I'm wondering if anyone's done this & how you did it? I'm currently monitoring mine using its web port, but I don't believe that's ideal. I tried monitoring it using check_udp on port 23456 but check_udp has to send a string to the FSHost server & be told what to expect back.
I'd like to be able to check whether FSHost is in a stopped or shutdown state.
Russell Gilbert:
Actually I think monitoring it via its web port is probably the best way. Port 23456 is used by Microsoft's DirectPlay (part of DirectX) for all the connections, but FSHost doesn't actually do anything directly with that port. It just tells DirectPlay to allow incoming connections on that port, and then DirectPlay handles all the communication until the player is connected -- then FSHost takes over. So you'd have to figure out what you could send to DirectPlay on that port to make it work -- and even then, you'd really only be monitoring the DirectPlay server, not FSHost.
If you make an HTTP connection to FSHost's web port and then add /xml to the end of the URL, you'll get back all the data about the server -- version number, game settings, number of pilots connected, and a whole lot more. (try it in a browser to see) If you get data back at all, you know FSHost is running. If you specifically want to know whether or not FSHost's game servers are running (i.e. it's accepting players for an FS session), look at the GUID values. When they're running, they'll have numbers like this:
<SessionGUID2002>4BEF398E-F2FA-4095-A6-F4-B8-53-4E-9C-DD-8C</SessionGUID2002>
<SessionGUID2004>25888F87-04B4-4E4F-BB-B8-8E-D4-22-BB-1D-C7</SessionGUID2004>
When they're not running, they'll have all zeros, like this:
<SessionGUID2002>00000000-0000-0000-00-00-00-00-00-00-00-00</SessionGUID2002>
<SessionGUID2004>00000000-0000-0000-00-00-00-00-00-00-00-00</SessionGUID2004>
You may also sometimes see FS2002 running but not FS2004, or vice versa -- depending on which versions FSHost is configured to support. The FS2004 session supports FSX as well.
Let me know if you need more info.
Russell
Air SeaTac:
Thanks for the detailed response Russell
Those characters in between <SessionGUID2004> </SessionGUID2004> etc., are they fixed or will they change on an FSHost restart? If they're fixed I might be able to use them as a check that FSHost is accepting connections
Edit: I've had to reboot the server a few times today & the GUID's do change. I might still be able to check the string for anything other than all zeros
Air SeaTac:
Another thought, is there a way to lock the GUID's to a specific value in the registry or somewhere?
Navigation
[0] Message Index
Go to full version