Thursday, October 23, 2008

Nagios check_mysql_connections example

I had a little bit of trouble getting the check_mysql_connections working but once I figured it out on the command line I had to get it working in nagios.  Still being a nagios noob I had a little trouble but also got it working in nagios.

The line below will work from the command line.
[user@host libexec]# ./check_mysql_connections -w 75 -c 90 -H 555.555.555.555 -u YOUR_USER -p YOUR_PASS

In the host file I setup the service as 

define service{
        host_name                       db1.mrswi.com
        service_description             MySQL Connections
        check_command                   check_mysql_connections! -w 75 -c 90 -H 555.555.555.555 -u YOUR_USER -p YOUR_PASS
        check_period                    24x7
        max_check_attempts              2
        notification_interval           30
        notification_options            c,w
        contact_groups                  mrsitis
        }




No comments: