Page 1 of 1
Windows service monitoring on 2 servers
Posted: Tue Apr 14, 2015 3:59 pm
by snapon_admin
I have a request for a specific scenario of service monitoring. There's a windows service that lives on 2 separate servers and we need to be alerted if the service is not running on either server and if it's running on both. The only scenario that should not result in an alert is if the service is running on one server and not the other. Is that possible, and if so how?
Re: Windows service monitoring on 2 servers
Posted: Tue Apr 14, 2015 4:29 pm
by jdalrymple
XOR *sounds* simple, but I can't think of a builtin way to do it without 3 negates, 3 "dummy services" and 2 service dependencies. If you'd like me to draw that mess up for you I can, but I'd suggest avoiding it.
So... the most elegant would be to write a custom plugin.
The other alternative is to use BPI.
Sounds like we're doing MSCS? There is stuff
already written on the exchange.
Re: Windows service monitoring on 2 servers
Posted: Wed Apr 15, 2015 12:15 pm
by snapon_admin
Nah, it's not a cluster server. Apparently the way this is setup is that there are 2 servers connected to load balancers. The only reason there's 2 servers is redundancy but I guess this particular service wasn't designed with redundancy in mind

so this service running on 2 servers at once creates duplicate tasks or something. Looks like it might be more complicated than it's worth (which is what I basically told them already) so we'll just monitor the service on the "main" server and have them start the service up on the secondary when they get alerted that it's stopped on the main one. Thanks much, go ahead and lock this up.
Re: Windows service monitoring on 2 servers
Posted: Wed Apr 15, 2015 12:40 pm
by jdalrymple
I'll lock it up, just want to add this quick though:
Someone has written a quick plugin that will do what you want based on ping only. It won't check the services - and I suspect from the sounds of it ping won't work. Looking at it might give you an idea of how you could write your own plugin though:
http://exchange.nagios.org/directory/Pl ... OR/details