User Tools

Site Tools


linux:nagios:check_mssql_health

SQL Server Plugin (Suse)

Nagios plugin for SQL Server Access - check_mssql_health

Web site: http://labs.consol.de/lang/en/nagios/check_mssql_health/

Prerequisites

  • DBD::Sybase - DBI Perl's Database Interface (libdbd-sybase-perl)
  • FreeTDS - Connector for SQL Server e Sybase

DBD::Sybase - DBI Perl's Database Interface

DBD::Sybase it's a DB interface library for Perl. It's used by Perl script, like check_mssql_health.
Web site: perl-DBD-Sybase.

FreeTDS - Connector for SQL Server and Sybase

FreeTDS (http://www.freetds.org/) requires an entry in config file (/usr/local/etc/freetds.conf) for any SQL host to which you will have to access.
Every host must be defined as follow:

[MY_HOST]
    host = my_host.silverice.it
    port = 1433
    tds version = 8.0

The host name in square bracket [MY_HOST] must be the same used in check_mssql_health service definition in Nagios configuration file:

define service{
    use                    silverice-service
    host_name              MY_HOST
    service_description    Compass Replicator Queue Items Count - COMPASS_PRO_2514
    check_command          check_mssql_health! --name "SELECT count(*) AS Count FROM  Compass_Pro_2514.dbo.REPLICATORQ  WHERE FINALLOCATION = 'ABU'"  
                           -name2 "Items in Compass Replicator Queue" 
                           --warning 2000 --critical 2500 --username 'my_user' --password my_password --mode sql --encode
    }

Installation

  1. donwload the tarball in /download (for example)
  2. goto in download folder: cd /download
  3. extract the content: tar xzf check_mssql_health-versione.tar.gz
  4. go to the extracted files directory: cd check_mssql_health-version
  5. configure the package for the host system: ./configure
  6. compile the package: make
  7. install the package: make install
linux/nagios/check_mssql_health.txt · Last modified: 2013/07/11 19:17 by IperCube