LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem with check_mysql_health (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-check_mysql_health-783421/)

prak86 01-20-2010 03:21 AM

Problem with check_mysql_health
 
Hi,

I have installed mysql in my local machine having centos. i also installed nagios in the same machine nagios is running fine by monitoring the local host. Now i need to monitor the local MySQL database and so i installed check_mysql_health plugin and followed the steps as given in the file.

when i try to give the command

./check_mysql_health -H mysqlhost --user nagios --password wipro --mode threads-connected

i got the error like

CRITICAL - cannot connect to information_schema. install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: . /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8) at (eval 13) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: DBM, ExampleP, File, Proxy, Sponge.
at ./check_mysql_health line 1506


I dont know whats the problem is.


I installed mysql Ver 14.12 Distrib 5.0.87 after removing the version that comes along with the centos, is this things relates to my error?

pls help me out

TB0ne 01-20-2010 09:26 AM

Quote:

Originally Posted by prak86 (Post 3833198)
Hi,

I have installed mysql in my local machine having centos. i also installed nagios in the same machine nagios is running fine by monitoring the local host. Now i need to monitor the local MySQL database and so i installed check_mysql_health plugin and followed the steps as given in the file.

when i try to give the command

./check_mysql_health -H mysqlhost --user nagios --password wipro --mode threads-connected

i got the error like

CRITICAL - cannot connect to information_schema. install_driver(mysql) failed: Can't locate DBD/mysql.pm

I dont know whats the problem is.

So, the line that reads
Quote:

Can't locate DBD/mysql.pm
didn't tip you off as to what the problem is???? You're missing that Perl module, and a brief Google search would have easily found that. Either install it from repos, or download it from the CPAN site, and manually install it. The CPAN link is here:

http://search.cpan.org/~capttofu/DBD-mysql-4.013/

Download it, and follow the instructions.

chrism01 01-20-2010 05:37 PM

Actually, an easier way instead of installing from src is (as root)

Code:

perl -e shell -MCPAN
cpan> install DBD::mysql

which will also check for (other Perl modules) dependencies


All times are GMT -5. The time now is 11:01 PM.