Monitor MS SQL

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
alphatan
Posts: 8
Joined: Mon May 10, 2010 2:49 am

Monitor MS SQL

Post by alphatan »

What else i can monitor beside the MS SQL service is started?

I had search on the internet but couldn't found any good advice. I hope i can use NagiosXI to monitor how many users are connected to the DB.
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Monitor MS SQL

Post by mmestnik »

Search the Nagios Exchange site for the plugin you wish to use. There are several available for MS-SQL.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia

Re: Monitor MS SQL

Post by Box293 »

From what I understand, you can use almost any perfmon counter that exists on your Windows box.
Use perfmon to identify the counter you wish to monitor.

Then you can monitor it with NSClient++.

For example :
from a Windows 2008 box with SQL 2008 Enterprise

Click the + icon
Find the Counter and Add it
SQL1.png
Then right click the counter down the bottom and select Properties.
SQL2.png
Now you will be shown the properties of the counter.
SQL3.png
The counter you can see is in almost the same format that the NSClient++ command requires. The correct formatting is:

\\SQLServer:General Statistics\\User Connections

All I have done is added an extra backslash at the begining and in the middle.

To monitor this counter, just run the Windows Server Monitoring Wizard. Under the Performance Counters section add the following:
(Tick the first box and clear the existing values)
Performance Counter: \\SQLServer:General Statistics\\User Connections
Display Name: SQL User Connections
Counter Output Format: Number of user connections is %.f
No need for warning and critical values at this point.
Finish the Wizard and click Apply.

This service should now appear under your host and produce a pretty graph.

Let me know if you need any further help with this. Hopefully you can find the exact performance counter for your needs.
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.