Page 1 of 1

Monitor MS SQL

Posted: Fri May 14, 2010 1:46 am
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.

Re: Monitor MS SQL

Posted: Fri May 14, 2010 1:36 pm
by mmestnik
Search the Nagios Exchange site for the plugin you wish to use. There are several available for MS-SQL.

Re: Monitor MS SQL

Posted: Tue May 18, 2010 3:54 am
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.