Page 1 of 1

Unable to monitoring some a windows "services"

Posted: Tue May 26, 2015 4:26 am
by michaelli
Dear support,

When I configure to monitor a windows "services", the service name is "MSSQL$SQLEXPRESS"


From nagios configuration page, the command is

check_xi_service_nsclient!!SERVICESTATE!-l MSSQL$SQLEXPRESS -d SHOWALL

The check result is "Failed to open service MSSQL.

When I configure OCS Inventory service check. It also failed.

check_xi_service_nsclient!!SERVICESTATE!-l OCS Inventory Service -d SHOWALL

But success as the service name is SepMasterService

check_xi_service_nsclient!!SERVICESTATE!-l SepMasterService -d SHOWALL

Finally, Am I using wrong service name for configure the service monitoring?

Re: Unable to monitoring some a windows "services"

Posted: Tue May 26, 2015 12:11 pm
by jdalrymple
Try escaping your spaces and special characters:

Code: Select all

[jdalrymple@localhost libexec]$ ./check_nt -H winhost -v SERVICESTATE -l MSSQL$SQLEXPRESS -d SHOWALL -s secret -p 12489
 Failed to open service MSSQL: 1060: The specified service does not exist as an installed service.

[jdalrymple@localhost libexec]$ ./check_nt -H winhost -v SERVICESTATE -l MSSQL\$SQLEXPRESS -d SHOWALL -s secret -p 12489
 MSSQL$SQLEXPRESS: Stopped

Re: Unable to monitoring some a windows "services"

Posted: Tue May 26, 2015 12:13 pm
by tgriep
Special characters and spaces need to be escaped so try changing the 2 checks that you are having problems with to the following and see if they work for you.

Code: Select all

check_xi_service_nsclient!!SERVICESTATE!-l "MSSQL$"$"SQLEXPRESS" -d SHOWALL
check_xi_service_nsclient!!SERVICESTATE!-l "OCS\ Inventory\ Service" -d SHOWALL

Re: Unable to monitoring some a windows "services"

Posted: Tue May 26, 2015 9:29 pm
by michaelli
Thanks tgriep and jdalrymple. Its work.

Re: Unable to monitoring some a windows "services"

Posted: Wed May 27, 2015 9:16 am
by tmcdonald
I'll be closing this thread now, but feel free to open another if you need anything in the future!