Page 1 of 1

Best practices: Monitoring multiple windows services

Posted: Wed Jun 24, 2015 10:59 pm
by mhixson
I have successfully set up monitoring multiple Windows services with NRPE using the command below. We have several server "types" we group our servers in (i.e. Citrix, Web, Database, etc.) which will each have their own bag of services we want to watch. Easy enough to configure and manage with services applied to host groups for each type.

Code: Select all

./check_nrpe -H <hostname or IP> -t 30 -c check_service -a service=<service1> service=<service2>  service=<service3> 'crit=not state_is_ok()'
OK: All 3 service(s) are ok.
My questions are:

1. Is there a better way to do this? We want to stick to NRPE strictly based on what we've read and been told about it's flexibility, but we're open to suggestions. We're new! So we are probably doing things wrong! We have an environment that is a mix of Linux and Windows servers, which I believe was another reason NRPE was recommended.

2. My impression is it's better to cram all of the individual Windows services we can into one Nagios service to ultimately keep the Nagios service count down. Possibly being more efficient? Does that make sense?

3. If that does make sense, is there any way to alarm on Windows services differently (i.e. Critical vs. Warning) if all of the services are being watched by the same Nagios service? So in my command example above, can I alarm as a warning for a stopped state for service1, but as a critical for a stopped state for services 2 and 3? All while only using one Nagios service definition?

Thanks!

Re: Best practices: Monitoring multiple windows services

Posted: Thu Jun 25, 2015 1:12 am
by Box293
mhixson wrote: 1. Is there a better way to do this? We want to stick to NRPE strictly based on what we've read and been told about it's flexibility, but we're open to suggestions. We're new! So we are probably doing things wrong! We have an environment that is a mix of Linux and Windows servers, which I believe was another reason NRPE was recommended.

2. My impression is it's better to cram all of the individual Windows services we can into one Nagios service to ultimately keep the Nagios service count down. Possibly being more efficient? Does that make sense?
The way you are doing it is one of the best methods, it's a great way to ensure consistency and it is an efficient way to configure the services.

mhixson wrote:3. If that does make sense, is there any way to alarm on Windows services differently (i.e. Critical vs. Warning) if all of the services are being watched by the same Nagios service? So in my command example above, can I alarm as a warning for a stopped state for service1, but as a critical for a stopped state for services 2 and 3? All while only using one Nagios service definition?
Using NSClient++ I don't believe what you want is possible, I don't think you can be that specific with the warning and critical definitions for multiple services. I would suggest you post a question in the NSClient++ forums about this.

Re: Best practices: Monitoring multiple windows services

Posted: Thu Jun 25, 2015 7:51 am
by mhixson
Box293 wrote:Using NSClient++ I don't believe what you want is possible, I don't think you can be that specific with the warning and critical definitions for multiple services. I would suggest you post a question in the NSClient++ forums about this.
Great, thanks Box. I'll see what they say over there.

Re: Best practices: Monitoring multiple windows services

Posted: Thu Jun 25, 2015 8:57 am
by mhixson
Here's the thread on their forum for anyone interested.

Re: Best practices: Monitoring multiple windows services

Posted: Thu Jun 25, 2015 11:14 am
by lmiltchev
Thanks for the link mhixson! I will keep this topic open in case you want to post back.