Check Windows service if it is running

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
HaschkeD
Posts: 44
Joined: Tue Feb 02, 2016 8:35 am

Check Windows service if it is running

Post by HaschkeD »

Hi,
i use NagiosQL and i have this command to check if a service is down:

$USER1$/check_nt -t 90 -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
$ARG1$ SERVICESTATE -l "NtFrs" -d SHOWALL

Nagios go in a red state if service is down. Is it possible that i change the command that Nagios go in a red state if the service is up?

Regards
Dennis
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Check Windows service if it is running

Post by scottwilkerson »

You would need to create a negated command such as the following, and change this service to use the new command with the same arguments

Code: Select all

$USER1$/negate -s $USER1$/check_nt -t 90 -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
https://support.nagios.com/kb/article.p ... ce_stopped
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
HaschkeD
Posts: 44
Joined: Tue Feb 02, 2016 8:35 am

Re: Check Windows service if it is running

Post by HaschkeD »

Works fine...thanks…...
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Check Windows service if it is running

Post by scottwilkerson »

HaschkeD wrote:Works fine...thanks…...
Great!

Locking
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked