Page 1 of 1

Service SQLAgent$MSSQLSERVER check_ncpa returning running$

Posted: Thu Jul 27, 2017 8:35 am
by imadc
In Nagios XI 5.4.7 and ncpa agents installed on SQL servers

We are using :check_xi_ncpa to check availability of SQL Services

$USER1$/check_ncpa.py -H $HOSTADDRESS$ $ARG1$

-M 'service/SQLAgent$MSSQLSERVER2012/running'
-M 'service/MSSQL$MSSQLSERVER2012/running'

Here is the result:

CRITICAL: SQLAgent$MSSQLSERVER2012 is running (should be running$)
CRITICAL: MSSQL$MSSQLSERVER2012 is running (should be running$)

Any ideas who resolve that using ncpa Agents check?

Re: Service SQLAgent$MSSQLSERVER check_ncpa returning runnin

Posted: Thu Jul 27, 2017 4:38 pm
by tgriep
When a service has a $ in the name, they have to be treated differently than normal checks.
Try editing the argumeny and change it like the example below and let is know if it works.

Code: Select all

-M service/MSSQL$"$"MSSQLSERVER2012/running
Notice the extra "$" and that it does not have the single quotes.

Re: Service SQLAgent$MSSQLSERVER check_ncpa returning runnin

Posted: Wed Aug 02, 2017 10:05 am
by imadc
Thanks. That worked :)
We can close this thread now

Re: Service SQLAgent$MSSQLSERVER check_ncpa returning runnin

Posted: Wed Aug 02, 2017 11:58 am
by bolson
Closing topic as resolved.

Thank you for using the Nagios Support Forum.