Page 1 of 1

Check Windows service if it is running

Posted: Tue Oct 01, 2019 6:59 am
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

Re: Check Windows service if it is running

Posted: Tue Oct 01, 2019 7:49 am
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

Re: Check Windows service if it is running

Posted: Wed Oct 02, 2019 3:16 am
by HaschkeD
Works fine...thanks…...

Re: Check Windows service if it is running

Posted: Wed Oct 02, 2019 6:31 am
by scottwilkerson
HaschkeD wrote:Works fine...thanks…...
Great!

Locking