Sidebar Window


Topics



Links





« Comment Spammers | Home | It has been a while. »

Kubuntu Server, Nagios and Mysql

By klard | June 10, 2007

In an effort to get nagios to monitor an Mysql database on a remote server I decided to try and get the command working. First off to get the Nagios plugins to work for mysql you have to install the mysql client libraries. In order to get the client libraries to install correctly you have to install XML::Parser … and of course to get XML::Parser to install from CPAN you have to install the Expat library manually. Step by stpe here is what it took.

Install Expat from here
Install the XML::Parser from CPAN like soo “cpan install XML::Parser”
Install the libmysqlclient-dev from apt “apt-get install libysqlclient-dev”
Install DBD::mysql from CPAN “cpan install DBD::mysql”

Then you have to modify the nagios commands.cfg by adding

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

And modify the localhost.cfg with the service check info

define service{
use local-service
host_name blah
check_command check_mysql!USERNAME!PASSWORD
service_description MYSQL
}

Topics: Linux, Mysql, Nagios |

Comments are closed.