Home Directory Plugins Databases SQLServer Check MSSQL Server Centric Status

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Check MSSQL Server Centric Status

Current Version
2.0.1
Last Release Date
2013-02-15
Compatible With
  • Nagios 3.x
  • Nagios XI
Owner
License
GPL
Hits
114401
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
MSSQL plugin that is geared more towards towards general health of the MSSQL databases as a whole.
Can monitor many metrics. Developer is very open to critcism and fixing issues. Please contact me if you find something.

I also added a doc on the exchange, please refer to it if you're connecting to instances on an MSSQL database. It says Nagios XI on it but will still apply to Nagios Core as well:

https://assets.nagios.com/downloads/nagiosxi/docs/Nagios_XI_Installing_MSSQL_Wizard_Prereqs.pdf

Examples of use are:

./check_mssql_server.py -H 192.168.0.1 -U user -P password --lazywrites -w 20 -c 30

Now keep in mind if you're going to using percentages the w and c get a little trickier. This plugin is Nagios Plugin compliant as far as the bounding goes, fully supporting the use of the : ~ and @ symbols. Here is an example of what you'd do for the warns and crits on Buffer Hit Ratio:

./check_mssql_server.py -H 192.168.0.1 -U user -P password --bufferhitratio -w 95: -c 90:

This will return warning of the percentage goes below 95% and critical if it goes below 90%.

For information the the use of ~ : and @, refer to section 2.5 of the Nagios Plugin Guidline here: http://nagiosplug.sourceforge.net/developer-guidelines.html

options:
-h, --help show this help message and exit

Required Options:
-H HOSTNAME, --hostname=HOSTNAME
Specify MSSQL Server Address
-p PORT, --port=PORT
Specify port. [Default: 1433]
-U USER, --user=USER
Specify MSSQL User Name
-P PASSWORD, --password=PASSWORD
Specify MSSQL Password

Threshold Options:
-w WARNING, --warning=WARNING
Specify min:max threshold
-c CRITICAL, --critical=CRITICAL
Specify min:max threshold

Mode Options:
--bufferhitratio Buffer Cache Hit Ratio
--pagelooks Page Lookups Per Second
--freepages Free Pages (Cumulative)
--totalpages Total Pages (Cumulative)
--targetpages Target Pages
--databasepages Database Pages
--stolenpages Stolen Pages
--lazywrites Lazy Writes / Sec
--readahead Readahead Pages / Sec
--pagereads Page Reads / Sec
--checkpoints Checkpoint Pages / Sec
--pagewrites Page Writes / Sec
--lockrequests Lock Requests / Sec
--locktimeouts Lock Timeouts / Sec
--deadlocks Deadlocks / Sec
--lockwaits Lockwaits / Sec
--lockwait Lock Wait Average Time (ms)
--averagewait Average Wait Time (ms)
--pagesplits Page Splits / Sec
--cachehit Cache Hit Ratio
--time2connect Check Time to Connect [DEFAULT]
--batchreq Batch Requests / Sec
--sqlcompilations SQL Compilations / Sec
--fullscans Full Scans / Sec
--pagelife Page Life Expectancy

################### check_mssql_database.py ####################
# Version 1.1.0
# Date : Jan 25th 2012
# Author : Nicholas Scott ( scot0357 at gmail.com )
# Help : scot0357 at gmail.com
# Licence : GPL - http://www.fsf.org/licenses/gpl.txt
# TODO : Bug Testing, Feature Adding
# Changelog :
# 1.0.2 - Fixed Uptime Counter to be based off of database
# Fixed divide by zero error in transpsec
# 1.1.0 - Fixed port bug allowing for non default ports | Thanks CBTSDon
# Added batchreq, sqlcompilations, fullscans, pagelife | Thanks mike from austria
# Added mode error checking which caused non-graceful exit | Thanks mike from austria
# 1.2.0 - Added ability to specify instances
# 2.0.0 - Complete rewrite of the structure, re-evaluated some queries
# to hopefully make them more portable | Thanks CFriese
# Updated the way averages are taken, no longer needs tempdb access
#################################################################
Reviews (2)
bygaborkiss, May 14, 2013
I imagine others might not have this experience but after going through the installation and restarting nagios using /etc/rc.d/init.d/nagios restart, I did not see the service. After awhile I tried explicitly stopping with /etc/rc.d/init.d/nagios stop
and then starting with /etc/rc.d/init.d/nagios start and that worked. It shouldn't matter but for me it did. Weird.

gaborkiss
byKJLCN, July 29, 2012
1 of 1 people found this review helpful
The parameter time2connect got error, others are all ok.
Owner's reply

Thanks for the heads up. Fixed the link as it was pointing at an older version, check out the update if you like.