Send alert if Windows service IS running?
Posted: Fri May 18, 2012 12:40 pm
Hi all, first post to this board. I've been playing with this idea for a couple of days and have yet to make a working solution. I have a Windows server that has a service that allows remote access. I want to alert the team if it IS running so there is a reminder to turn this service back off, in effect limiting remote access to only the times it is needed.
I've tried playing around with the check_nt command as follows:
Here is the service in the host which checks as normal (alert if not running):
but am just returned the service name or an OK state. Any ideas on how to basically do the reverse of what Nagios is intended to do?
Thanks in advance!
I've tried playing around with the check_nt command as follows:
Code: Select all
check_nt -H $SERVERNAME$ -p 12489 -v SERVICESTATE -l $SERVICENAME$Here is the service in the host which checks as normal (alert if not running):
Code: Select all
define service{
hosts $SERVERNAME$
service_description Apache Tomcat
check_command check_nt!$SERVICENAME$
use generic-service
notification_interval 0 ; set > 0 if you want to be renotified
contact_groups IT
}
Thanks in advance!