Unable to monitoring some a windows "services"

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
michaelli
Posts: 115
Joined: Thu Jan 29, 2015 11:21 am

Unable to monitoring some a windows "services"

Post 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?
You do not have the required permissions to view the files attached to this post.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Unable to monitoring some a windows "services"

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Unable to monitoring some a windows "services"

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
michaelli
Posts: 115
Joined: Thu Jan 29, 2015 11:21 am

Re: Unable to monitoring some a windows "services"

Post by michaelli »

Thanks tgriep and jdalrymple. Its work.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Unable to monitoring some a windows "services"

Post by tmcdonald »

I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee
Locked