[Nagiosplug-help] Help needed.....Unable to configure check_mysqld.pl

Bijit Bhattacharjee tu.bijit at gmail.com
Thu Aug 30 18:09:01 CEST 2007


Hi all,

I have installed nagios-2.9 and nagios-plugins-1.4.9 on a RHEL 5 system.
For monitoring MySql, I downloaded check_mysqld.pl and i kept it under the directory /usr/local/nagios/libexec/

I modified the following parameters in check_mysqld.pl file to my need;
my $HOSTNAME= 'localhost';
my $PORT=     3306;
my $DATABASE= 'test';
my $USERNAME= 'username';
my $PASSWORD= 'password';

After that, in the file commands.cfg

I added the command for mysqld as

define command{
 command_name check_mysqld
 command_line $USER1$/check_mysqld.pl -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$
}

Then, in the file localhost.cfg, I added the service for mysqld as

define service {
 use                     local-service
 host_name               localhost
 service_description     MYSQLD
 check_command           check_mysqld
}


Then I restart nagios..... Nagios starts without any error.

But when I access nagios from the web interface http://localhost/nagios/

The services section shows MYSQLD is critical. Why is it so? I guess I have missed something while configuring the check_mysqld.pl plugin.
Please be informed, when i try checking the mysqld service from the command prompt using the plugin, it works well... following is the output of the same;

[root at RHEL5 libexec]# ./check_mysqld.pl
MYSQL 5.0.22 OK

Please help!!! I need the web interface of Nagios to work as well....




With Regards,

- Bijit Bhattacharjee (bijit)

-----------------------
The mailing list archive is found here:
http://www.nagiosexchange.org/nagiosplug-help.32.0.html
				




More information about the Help mailing list