Monitor MSSQLSERVER service
-
sixstringssteve
- Posts: 21
- Joined: Thu Sep 17, 2015 4:28 pm
Monitor MSSQLSERVER service
We have a Nagios4 Core deployment and it seems to be working very well with only a couple hiccups. We are having an issue with monitoring the MSSQLSERVER service on our SQL server. I am monitoring several Windows services, all successfully but this one. The console claims that MSSQLSERVER cannot be found.
Here is the service entry in the config file.....
[define service{
use generic-service
host_name <SQL Server Host Name>
service_description Microsoft SQL Server
check_command check_nt!SERVICESTATE!-d SHOWALL -l MSSQLSERVER
}
We are just, at this point, trying to monitor that the SQL database engine is running.
Any ideas on why this one service would not want to register as running?
Here is the service entry in the config file.....
[define service{
use generic-service
host_name <SQL Server Host Name>
service_description Microsoft SQL Server
check_command check_nt!SERVICESTATE!-d SHOWALL -l MSSQLSERVER
}
We are just, at this point, trying to monitor that the SQL database engine is running.
Any ideas on why this one service would not want to register as running?
Re: Monitor MSSQLSERVER service
Check to see what is the exact "Service name" and "Display name" of your service (as listed under "Services"). Is it "MSSQLSERVER"? Is there a "$" (dollar sign) in the name? At least one of them should work (service name or display name).
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
sixstringssteve
- Posts: 21
- Joined: Thu Sep 17, 2015 4:28 pm
Re: Monitor MSSQLSERVER service
I have checked that. There is no $, just MSSQLSERVER
-
sixstringssteve
- Posts: 21
- Joined: Thu Sep 17, 2015 4:28 pm
Re: Monitor MSSQLSERVER service
I even tried the display name but it has ( ) in it so it throws a Syntax error....still nothing
- Attachments
-
- Snip of the service name
- sql.JPG (19.92 KiB) Viewed 7884 times
Re: Monitor MSSQLSERVER service
Interesting, I am not able to recreate the issue. In fact, both commands work just fine for me:
What is the version of NSCLient++ that you are currently using?
Code: Select all
[root@testbox ~]# /usr/local/nagios/libexec/check_nt -H x.x.x.x -s password -p 12489 -v SERVICESTATE -d SHOWALL -l MSSQLSERVER
MSSQLSERVER: Started
[root@testbox ~]# /usr/local/nagios/libexec/check_nt -H x.x.x.x -s password -p 12489 -v SERVICESTATE -d SHOWALL -l "SQL SERVER (MSSQLSERVER)"
SQL SERVER (MSSQLSERVER): StartedCode: Select all
./check_nt -H x.x.x.x -s password -p 12489 -v CLIENTVERSIONBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitor MSSQLSERVER service
In addition to what lmitchev said, try wrapping the display name in quotes. I found an instance of where this happened if there are multiple service names..may not be the issue, and was using a different plugin but this may be all right for reference...
https://support.nagios.com/forum/viewto ... 54&p=57666
https://support.nagios.com/forum/viewto ... 54&p=57666
Former Nagios Employee.
me.
me.
-
sixstringssteve
- Posts: 21
- Joined: Thu Sep 17, 2015 4:28 pm
Re: Monitor MSSQLSERVER service
root@nagios:/etc/nagiosql/hosts# /usr/local/nagios/libexec/check_nt -H x.x.x.x -p 12489 -v SERVICESTATE -d SHOWALL -l MSSQLSERVER
MSSQLSERVER: Not found
root@nagios:/etc/nagiosql/hosts# /usr/local/nagios/libexec/check_nt -H x.x.x.x -p 12489 -v SERVICESTATE -d SHOWALL -l "SQL SERVER (MSSQLSERVER)"
SQL SERVER (MSSQLSERVER): Not found
root@nagios:/etc/nagiosql/hosts# /usr/local/nagios/libexec/check_nt -H x.x.x.x -p 12489 -v CLIENTVERSION
NSClient++ 0,4,1,73 2012-12-17
I don't get it, I have used Nagios to monitor MS SQL before and had no issues.
MSSQLSERVER: Not found
root@nagios:/etc/nagiosql/hosts# /usr/local/nagios/libexec/check_nt -H x.x.x.x -p 12489 -v SERVICESTATE -d SHOWALL -l "SQL SERVER (MSSQLSERVER)"
SQL SERVER (MSSQLSERVER): Not found
root@nagios:/etc/nagiosql/hosts# /usr/local/nagios/libexec/check_nt -H x.x.x.x -p 12489 -v CLIENTVERSION
NSClient++ 0,4,1,73 2012-12-17
I don't get it, I have used Nagios to monitor MS SQL before and had no issues.
Re: Monitor MSSQLSERVER service
Can you try PROCSTATE instead of SERVICESTATE?
Former Nagios Employee.
me.
me.
-
sixstringssteve
- Posts: 21
- Joined: Thu Sep 17, 2015 4:28 pm
Re: Monitor MSSQLSERVER service
Still a NOGO...
root@nagios:/etc/nagiosql/hosts# /usr/local/nagios/libexec/check_nt -H x.x.x.x -p 12489 -v PROCSTATE -d SHOWALL -l MSSQLSERVER
MSSQLSERVER: not running
root@nagios:/etc/nagiosql/hosts# /usr/local/nagios/libexec/check_nt -H x.x.x.x -p 12489 -v PROCSTATE -d SHOWALL -l MSSQLSERVER
MSSQLSERVER: not running
Re: Monitor MSSQLSERVER service
Can you run the following commands and show us the output?
on the Windows server:
on the nagios box:
Does the output change if you restart the service?
Note: the checks works for me just fine but I am using NSClient++ 0,4,1,90 2013-02-04. I am not sure if this makes a difference. You can try upgrading the NSClient++ agent and/or posting your question on the NSClient++ support forum. The developer of the agent may be able to help you resolve this issue faster. NSClient++ is not developed or maintained by us.
on the Windows server:
Code: Select all
tasklist | find "sqlservr.exe"Code: Select all
/etc/nagiosql/hosts# /usr/local/nagios/libexec/check_nt -H x.x.x.x -s 'password' -p 12489 -v PROCSTATE -d SHOWALL -l "sqlservr.exe"Note: the checks works for me just fine but I am using NSClient++ 0,4,1,90 2013-02-04. I am not sure if this makes a difference. You can try upgrading the NSClient++ agent and/or posting your question on the NSClient++ support forum. The developer of the agent may be able to help you resolve this issue faster. NSClient++ is not developed or maintained by us.
Be sure to check out our Knowledgebase for helpful articles and solutions!