MSSQL Instance availability

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gselvakumar
Posts: 96
Joined: Wed Mar 02, 2016 4:52 am

MSSQL Instance availability

Post 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
Thanks & Regards,
Gomathyshankar Selvakumar
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: MSSQL Instance availability

Post 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
Former Nagios Employee
gselvakumar
Posts: 96
Joined: Wed Mar 02, 2016 4:52 am

Re: MSSQL Instance availability

Post 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.
Thanks & Regards,
Gomathyshankar Selvakumar
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: MSSQL Instance availability

Post 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
Former Nagios Employee
gselvakumar
Posts: 96
Joined: Wed Mar 02, 2016 4:52 am

Re: MSSQL Instance availability

Post 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
Thanks & Regards,
Gomathyshankar Selvakumar
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: MSSQL Instance availability

Post by rkennedy »

Awesome! Going to close this one out on that note.
Former Nagios Employee
Locked