monitoring sql counter files

Phil Costelloe philc at foundation-it.com
Thu Feb 22 19:11:05 CET 2007


Rusty Hall wrote:
>     Has anyone tried accessing the performance counter files for SQL
> Server 2000 Enterprise on a Windows 2003 server. I am trying to
> access SQL Server counter files, but im running into issues with the
> following counters SQLServer:SQL Statistics Batch Requests/sec, I can
> access OS related counter files on this server.  No luck with any of
> the SQL Server Ones. I have added a few command that im trying to
> work with:      
> 
> ./check_nc_net -H $HOSTADDRESS$ -v COUNTER -l "\\SQLServer:SQL
> Statistics\\Batch Requests/sec","Batch Request per sec is %.f%%"
> ./check_nc_net -H $HOSTADDRESS$ -v COUNTER -l "\\SQLServer:General
> Statistics\\User Connections","User Connections %.f%%"  
> 
> The result I get from the command is -1, which I know is wrong.  I
> have nagios 2.5 on Redhat running with NC_NET for windows servers. 

I monitor both of those (amongst many others) and get sensible results
back (SQL Server 2000 Standard on Windows Server 2003). The counter
definitions look the same, but I use check_nt/NSCLient which may or may
not matter. Can you query those counters on the server itself? I have
seen SQL Servers where the SQL performance counters would dip in and out
of existence in a worrying way.

#SQLServer: SQL Statistics: Batch Requests/Sec - all activity including
transactions
define command{
command_name    check_nt_mssql_batchreqs
command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p $ARG1$ -v COUNTER
-l "\\SQLServer:SQL Statistics\\Batch Requests/sec","Batch requests per
second %.2f" -w $ARG2$ -c $ARG3$ -s $ARG4$
}

#Active connections - users connected
define command{
command_name    check_nt_mssql_userconns
command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p $ARG1$ -v COUNTER
-l "\\SQLServer:General Statistics\\User Connections","User connections
%.0f" -w $ARG2$ -c $ARG3$ -s $ARG4$
}

-- 
Phil Costelloe
Foundation IT, Hermitage Berkshire RG18 9SE 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list