Page 1 of 1

MSSQL Instance availability

Posted: Tue Apr 05, 2016 4:41 am
by gselvakumar
Hi,

We are monitoring MSSQL Instance availability by installing NSclient++ in the windows servers and using MSSQLSERVER service from the windows server pulgin.But we getting unknown service for few servers from the portal but SQL service is working for server.We are getting error"Failed to open service MSSQLSERVER: 1060: The specified service does not exist as an installed service"

We are using the command as"check_xi_service_nsclient!Password7!SERVICESTATE!-l MSSQLSERVER -d SHOWALL".We even tried "check_xi_service_nsclient!Password7!SERVICESTATE!-l MSSQL$instance name -d SHOWALL" ,"check_xi_service_nsclient!Password7!SERVICESTATE!-l MSSQL/$instance name -d SHOWALL" and "check_xi_service_nsclient!Password7!SERVICESTATE!-l MSSQL$$instane name -d SHOWALL".


But the error still exist.Can any one help us.


Thanks & Regards
Gomathyshankar Selvakumar

Re: MSSQL Instance availability

Posted: Tue Apr 05, 2016 9:42 am
by rkennedy
What are you referencing here? Is this how your command looks?

Code: Select all

$instance
Same goes to this part, it doesn't look consistent -

Code: Select all

MSSQL$$instane
If it does contain a $, you may need to setup a user macro to handle this part. See this link for more information -
https://assets.nagios.com/downloads/nag ... Macros.pdf

Re: MSSQL Instance availability

Posted: Wed Apr 06, 2016 4:26 am
by gselvakumar
For most of the servers,the instance name is the default server name so most actual command below below works perfectly for it:

Code: Select all

check_xi_service_nsclient!Password7!SERVICESTATE!-l MSSQLSERVER -d SHOWALL
But few servers,the instance name is different the above mentioned does not work.So I googled and found the below mentioned command where instead MSSQLSERVER we have to use MSSQL\$(name of the instance).For some servers I am getting output using the below mentioned command.There are few servers for which I am still getting unknown error""Failed to open service MSSQLSERVER: 1060: The specified service does not exist as an installed service".

Code: Select all

check_xi_service_nsclient!Password7!SERVICESTATE!-l MSSQL\$(name of the instance) -d SHOWALL
Could u please help me with this error.

Re: MSSQL Instance availability

Posted: Wed Apr 06, 2016 2:00 pm
by rkennedy
You'll want to setup a macro to use in place of MSSQL\$(name of instance) rather than referencing it directly.

See this link for information about how to set one up.
https://assets.nagios.com/downloads/nag ... Macros.pdf

Re: MSSQL Instance availability

Posted: Fri Jun 17, 2016 1:34 am
by gselvakumar
issue sorted :)

I tried below mentioned command.It is working fine

Code: Select all

/usr/local/nagios/libexec/check_nt -H BIEPFILE00. -s "Password7" -p 12489 -v SERVICESTATE -l MSSQL\$BKUPEXEC -d SHOWALL

Re: MSSQL Instance availability

Posted: Fri Jun 17, 2016 10:49 am
by rkennedy
Awesome! Going to close this one out on that note.