Monday, February 27, 2012

Nagios/NRPE and MS SQL services

this is how our MSSQL services are checked. These services have a "$" (dollar sign)
in their names and is interpreted as a variable designator when
defined in Nagios.

via CLI:

/usr/lib64/nagios/plugins/check_nrpe  -H MS1560  -p 5666 -c checkServiceState -a ShowAll MSSQL$PROD

appears to work. but when in the nagios configuration files, it won't.

here's how I defined them:


define service{
        host_name               MS1560
        service_description     Central SQL
        check_command           check_Service!MSSQL$"$"PROD!SQLAgent$"$"PROD!MSOLAP$"$"PROD!msftesql$"$"PROD!ReportServer$"$"PROD
        use                     template-sql
}

hth.