<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face="Courier New" color=#000080 size=2><SPAN 
class=454595107-10102007>Hi there,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#000080 size=2><SPAN 
class=454595107-10102007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#000080 size=2><SPAN 
class=454595107-10102007>A lot of monitoring of MSSQL can be achieved through 
performance counters, you may already have a selection of performance 
counters being monitored for OS performance. You will need a nagios agent 
installed on the server like ns_client, nsclient++, nc_net to collect these 
counters. Beyond these counters you may wish to consider the following 
counters:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#000080 size=2><SPAN 
class=454595107-10102007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#000080 size=2><SPAN 
class=454595107-10102007>\System\Processor Queue Length</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#000080 size=2><SPAN 
class=454595107-10102007>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007>\System\Threads</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007>\System\Context 
Switches/sec</SPAN></FONT></FONT></FONT></DIV></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#000080 size=2><SPAN 
class=454595107-10102007>\Memory\Pages/sec</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Courier New" color=#000080 size=2><SPAN 
class=454595107-10102007>\Paging File(_Total)\% Usage</SPAN></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT 
size=2>\PhysicalDisk(_Total)\Avg. Disk Queue Length<SPAN 
class=454595107-10102007>     
</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007>\SQLServer:General Statistics\User 
Connections</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007>\SQLServer:Locks(_Total)\Lock 
Waits/sec</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007>\SQLServer:Locks(_Total)\Lock Wait Time 
(ms)</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007>\SQLServer:Databases(_Total)\Log 
Growths</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007><SPAN 
class=454595107-10102007>\SQLServer:Databases(_Total)\Percent Log 
Used</SPAN></SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007><SPAN 
class=454595107-10102007>\SQLServer:Databases(_Total)\Transactions/sec</SPAN></SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007><SPAN class=454595107-10102007>\SQLServer:Memory 
Manager\Memory Grants Pending</SPAN></SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007>\SQLServer:Latches\Latch 
Waits/sec</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007>You may well need to adjust the counters to allow 
for multiple MSSQL instances and databases. Disk queue should probably be 
monitored on a per device level too.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007>Setting sensible values for warning and critical levels 
can be hit and miss. For each of the counters I set up a cron job to run a 
check_nt pull of the data at 5 minute intervals into a rrd database. 
This gave me nice graphical data to make a first guess on where to peg the 
warning and critical levels.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007>Going forward you may wish to install FreeDTS and sqsh 
on your nagios server. A small amount of scripting effort will reward you with a 
plugin which can query tables/views and run stored procedures. 
Microsoft provides extensive details on interesting views and stored 
procedures.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007>One final tip.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007>MSSQL services will often contain a $. In your nagios 
config quote the $ as follows: "$$"</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007>eg: </SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007>for service:</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007>    
MSSQL$CUSTOMERDB</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007>quote as follows:</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT color=#000080><FONT size=2><SPAN 
class=454595107-10102007>    
MSSQL"$$"CUSTOMERDB</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Courier New" color=#000080 size=2></FONT><FONT 
face="Courier New" color=#000080 size=2></FONT><FONT face="Courier New" 
color=#000080 size=2></FONT><FONT face="Courier New" color=#000080 
size=2></FONT><FONT face="Courier New" color=#000080 size=2></FONT><FONT 
face="Courier New" color=#000080 size=2></FONT><FONT face="Courier New" 
color=#000080 size=2></FONT><FONT face="Courier New" color=#000080 
size=2></FONT><FONT face="Courier New" color=#000080 size=2></FONT><FONT 
face="Courier New" color=#000080 size=2></FONT><FONT face="Courier New" 
color=#000080 size=2></FONT><FONT face="Courier New" color=#000080 
size=2></FONT><FONT face="Courier New" color=#000080 size=2></FONT><FONT 
face="Courier New" color=#000080 size=2></FONT><BR> </DIV>
<DIV><FONT face="Courier New" color=#000080 size=2><SPAN 
class=454595107-10102007>Let me know how you get on, I am currently trying to 
find the time to write up a more extensive HOWTO including recommended MSSQL 
account creation and security settings for the account.</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" color=#000080 size=2><SPAN 
class=454595107-10102007></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" color=#000080 size=2><SPAN 
class=454595107-10102007></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" color=#000080 size=2><SPAN 
class=454595107-10102007>Matthew.</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" color=#000080 size=2></FONT> </DIV>
<DIV><FONT face="Courier New" color=#000080 size=2></FONT> </DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> 
nagiosplug-help-bounces@lists.sourceforge.net 
[mailto:nagiosplug-help-bounces@lists.sourceforge.net] <B>On Behalf Of </B>Madan 
Thapa<BR><B>Sent:</B> 09 October 2007 18:20<BR><B>To:</B> 
nagiosplug-help@lists.sourceforge.net<BR><B>Subject:</B> [Nagiosplug-help] 
monitor mssql service<BR></FONT><BR></DIV>
<DIV></DIV>Hello,<BR><BR>I want to monitor mssql service on a server... I came 
to know about use of some pulgin to accomplish that.<BR><BR><A 
href="http://www.nagios.org/faqs/viewfaq.php?faq_id=156">http://www.nagios.org/faqs/viewfaq.php?faq_id=156 
</A><BR><BR><BR>However can you please advise me how to setup the following 
option ?<BR><BR>#################################################<BR><BR>One 
Option:<BR><BR>You can now find a plugin called check_mssql.sh in the contrib/ 
subdirectory of the latest plugin distribution that will check MS SQL servers. 
<BR>#################################################<BR><BR><BR>Thanks 
</BODY></HTML>