Monitor MSSQLSERVER service

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
sixstringssteve
Posts: 21
Joined: Thu Sep 17, 2015 4:28 pm

Re: Monitor MSSQLSERVER service

Post by sixstringssteve »

C:\Windows\system32>tasklist | find "sqlservr.exe"
sqlservr.exe 1164 Services 0 2,466,572 K


root@nagios:/etc/nagiosql/hosts# /usr/local/nagios/libexec/check_nt -H x.x.x.x -p 12489 -v PROCSTATE -d SHOWALL -l sqlservr.exe
sqlservr.exe: not running

I have tried restarting it, but still does not work.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitor MSSQLSERVER service

Post by lmiltchev »

Have you tried posting your question on the NSClient++ support forum? I am at loss with this one. I would recommend upgrading/reinstalling the NSClient++ agent to see if this is going to fix your issue.
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

Post by sixstringssteve »

I upgraded to 4.3 and it still does the same thing....I opened a post on NSClient++ support page...
sixstringssteve
Posts: 21
Joined: Thu Sep 17, 2015 4:28 pm

Re: Monitor MSSQLSERVER service

Post by sixstringssteve »

Could this be a permissions issue with the NSClient because the service is running as an NT Service? Ideas anyone?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Monitor MSSQLSERVER service

Post by ssax »

Mine is just running as the local system account.

If you enable debugging on NSClient++ and then try running the command what does the nsclient.log say?
sixstringssteve
Posts: 21
Joined: Thu Sep 17, 2015 4:28 pm

Re: Monitor MSSQLSERVER service

Post by sixstringssteve »

Looks like normal start up logging. I forced a check in the nagios console and the log didn't even register activity.


2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:330: On crash: restart: nscp
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:342: Archiving crash dumps in: C:\Program Files\NSClient++/crash-dumps
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:409: booting::loading plugins
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:171: Found: CheckDisk
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:171: Found: CheckEventLog
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:171: Found: CheckExternalScripts
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:171: Found: CheckHelpers
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:171: Found: CheckNSCP
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:171: Found: CheckSystem
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:171: Found: NRPEServer
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:171: Found: NSClientServer
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:775: C:\Program Files\NSClient++/modules\CheckDisk.dll.dll
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:777: adding C:\Program Files\NSClient++/modules\CheckDisk.dll
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:775: C:\Program Files\NSClient++/modules\CheckEventLog.dll.dll
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:777: adding C:\Program Files\NSClient++/modules\CheckEventLog.dll
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:775: C:\Program Files\NSClient++/modules\CheckExternalScripts.dll.dll
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:777: adding C:\Program Files\NSClient++/modules\CheckExternalScripts.dll
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:775: C:\Program Files\NSClient++/modules\CheckHelpers.dll.dll
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:777: adding C:\Program Files\NSClient++/modules\CheckHelpers.dll
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:775: C:\Program Files\NSClient++/modules\CheckNSCP.dll.dll
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:777: adding C:\Program Files\NSClient++/modules\CheckNSCP.dll
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:775: C:\Program Files\NSClient++/modules\CheckSystem.dll.dll
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:777: adding C:\Program Files\NSClient++/modules\CheckSystem.dll
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:775: C:\Program Files\NSClient++/modules\NRPEServer.dll.dll
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:777: adding C:\Program Files\NSClient++/modules\NRPEServer.dll
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:775: C:\Program Files\NSClient++/modules\NSClientServer.dll.dll
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:777: adding C:\Program Files\NSClient++/modules\NSClientServer.dll
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:736: Loading plugin: CheckDisk
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:736: Loading plugin: CheckEventLog
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:736: Loading plugin: CheckExternalScripts
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:736: Loading plugin: CheckHelpers
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:736: Loading plugin: CheckNSCP
2015-10-01 13:47:02: debug:D:\source\nscp\modules\CheckNSCP\CheckNSCP.cpp:48: Crash folder is: C:\Program Files\NSClient++
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:736: Loading plugin: CheckSystem
2015-10-01 13:47:02: debug:D:\source\nscp\service\NSClient++.cpp:736: Loading plugin: NRPEServer
2015-10-01 13:47:02: debug:D:\source\nscp\modules\NRPEServer\NRPEServer.cpp:137: Allowed hosts definition: 10.25.168.196(255.255.255.255)
2015-10-01 13:47:03: debug:D:\source\nscp\include\socket/server.hpp:99: Binding to: [::]:5666(ipv6)
2015-10-01 13:47:03: debug:D:\source\nscp\include\socket/server.hpp:202: Attempting to bind to: [::]:5666(ipv6)
2015-10-01 13:47:03: debug:D:\source\nscp\include\socket/server.hpp:95: Binding to: 0.0.0.0:5666(ipv4), reopen: true, reuse: true
2015-10-01 13:47:03: debug:D:\source\nscp\include\socket/server.hpp:202: Attempting to bind to: 0.0.0.0:5666(ipv4)
2015-10-01 13:47:03: debug:D:\source\nscp\service\NSClient++.cpp:736: Loading plugin: NSClientServer
2015-10-01 13:47:03: debug:D:\source\nscp\modules\NSClientServer\NSClientServer.cpp:91: Allowed hosts definition: 10.25.168.196(255.255.255.255)
2015-10-01 13:47:03: debug:D:\source\nscp\include\socket/server.hpp:99: Binding to: [::]:12489(ipv6)
2015-10-01 13:47:03: debug:D:\source\nscp\include\socket/server.hpp:202: Attempting to bind to: [::]:12489(ipv6)
2015-10-01 13:47:03: debug:D:\source\nscp\include\socket/server.hpp:95: Binding to: 0.0.0.0:12489(ipv4), reopen: true, reuse: true
2015-10-01 13:47:03: debug:D:\source\nscp\include\socket/server.hpp:202: Attempting to bind to: 0.0.0.0:12489(ipv4)
2015-10-01 13:47:03: debug:D:\source\nscp\service\NSClient++.cpp:504: NSClient++ - 0.4.3.143 2015-04-29 Started!
2015-10-01 13:47:03: debug:D:\source\nscp\service\NSClient++.cpp:1356: Starting: DONE
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Monitor MSSQLSERVER service

Post by tgriep »

Can you run the following on your MSSQL server and post it here?

Code: Select all

tasklist /SVC |find  "sqlservr.exe"
What is the IP address of the nagios system?
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

Post by sixstringssteve »

C:\Windows\system32>tasklist /SVC |find "sqlservr.exe"
sqlservr.exe 3940 MSSQLSERVER
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Monitor MSSQLSERVER service

Post by tgriep »

A few post back you said
I forced a check in the nagios console and the log didn't even register activity.
Kind of points to that the check command is using the wrong IP address of your MSSQL server.
Can you verify that it is using the correct address?
What is the IP address of the Nagios server and the MSSQL server?
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

Post by sixstringssteve »

Crap.....the ultimate rookie mistake.....I have checked everything ten times over...everything except the command IP.

Wow.......
Locked