LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-28-2008, 04:35 PM   #1
williebens
Member
 
Registered: Jan 2008
Posts: 88

Rep: Reputation: 16
Unhappy installing check_mysql and check_mem nagios plugins


Hello Community:

I am trying to install the nagios plugins check_mysql and check_mem nagios plugins so that I can monitor mysql servers and memory of remote servers.

I am having a hard time finding these plugins to download and install.

Is there anyone out there who can help me out on this?

Thanks.
--Willie
 
Old 07-28-2008, 07:56 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Origin is http://nagiosplugins.org/, for RHEL, CentOS and Fedora see the DAG repo? (Please fill in your distro info in your user panel)
 
Old 07-29-2008, 08:58 AM   #3
williebens
Member
 
Registered: Jan 2008
Posts: 88

Original Poster
Rep: Reputation: 16
Hello unSpawn:

Thanks for your response. I had already visited the nagios plugins site, and I followed its instructions on how to build the check_mysql plugin from the /usr/local/nagios/plugins directory, but this is what I get:

Quote:
[root@localhost plugins]# make check_mysql
.
.
.
check_mysql.c:48:19: error: mysql.h: No such file or directory
check_mysql.c:49:20: error: errmsg.h: No such file or directory
check_mysql.c:56: error: âMYSQL_PORTâ undeclared here (not in a function)
.
.
.
check_mysql.c:148: warning: passing argument 2 of âmemcpyâ makes pointer from integer without a cast
check_mysql.c:148: warning: passing argument 1 of â__strdupâ makes pointer from integer without a cast
check_mysql.c:166: error: âMYSQL_FIELDâ undeclared (first use in this function)
check_mysql.c:166: error: âfieldsâ undeclared (first use in this function)
make: *** [check_mysql-check_mysql.o] Error 1
[root@localhost plugins]#
I hope that either you or someone else has some other feedback.

Thanks.
--Willie
 
Old 07-29-2008, 09:58 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by williebens View Post
check_mysql.c:48:19: error: mysql.h: No such file or directory
Needs MySQL devel package installed?
 
Old 07-29-2008, 11:15 AM   #5
williebens
Member
 
Registered: Jan 2008
Posts: 88

Original Poster
Rep: Reputation: 16
Thanks for your response.

I already have mysql-devel installed on the nagios server as well as on the remote server:

Quote:
[root@nagiosserver libexec]# rpm -aq | grep mysql
mysql-server-5.0.45-7.el5
mysql-5.0.45-7.el5
mysql-devel-5.0.45-7.el5
php-mysql-5.1.6-15.el5
[root@nagiosserver libexec]#

[root@remote libexec]# rpm -qa | grep mysql
mysql-devel-5.0.45-7.el5
mysql-server-5.0.45-7.el5
mysql-5.0.45-7.el5
[root@remote libexec]#
I have no idea what is going on.
Thanks.
--Willie
 
Old 07-29-2008, 11:32 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Run './configure --help', see what the --includes= switch is and if running './configure' itself doesn't find them, explicitly point it to where it can find them?
 
Old 07-29-2008, 12:44 PM   #7
williebens
Member
 
Registered: Jan 2008
Posts: 88

Original Poster
Rep: Reputation: 16
Thanks again for your reply.

This is what I get when I execute ./configure --help:
Quote:
[root@remote nagios-plugins-1.4.12]# ./configure --help
.
.
.
--with-mysql=DIR Locates mysql libraries. Expects
DIR/bin/mysql_config. Default to search for
mysql_config in PATH

.
.
.
configure: WARNING: install mysql client libs to compile this plugin (see REQUIREMENTS).
.
.
.
Then I tried ./configure --with-mysql=/usr/lib/mysql/ and I got the same results. I think I have the mysql libraries installed as I ran: yum provides mysqlclient

Quote:
mysql-devel.i386 5.0.45-7.el5 installed
Matched from:
/usr/lib/mysql/libmysqlclient.a
/usr/lib/mysql/libmysqlclient.so
/usr/lib/mysql/libmysqlclient_r.a
/usr/lib/mysql/libmysqlclient_r.so



mysql.i386 5.0.45-7.el5 installed
Matched from:
/usr/lib/mysql/libmysqlclient.so.15
/usr/lib/mysql/libmysqlclient.so.15.0.0
/usr/lib/mysql/libmysqlclient_r.so.15
/usr/lib/mysql/libmysqlclient_r.so.15.0.0
libmysqlclient.so.15
libmysqlclient.so.15(libmysqlclient_15)
libmysqlclient_r.so.15
libmysqlclient_r.so.15(libmysqlclient_15)
[root@remote nagios-plugins-1.4.12]#
This is what I see when I look at the requirements:

Quote:
check_mysql, check_mysql_query:
- Requires the MySQL libraries available from
http://www.mysql.org/
Lib: libmysql, libmysqlclient
Redhat Powertools Source: mysql-3.20.32a-3.i386.rpm, mysql-devel-3.20.32a-3.i386.rpm (these seem to be broken, however)
RPMS from www.mysql.org work better
Must have mysql_config in PATH or specified with --with-mysql=DIR for DIR/bin/mysql_config

Do you have any idea as to what I am doing wrong?

Thanks.
--Willie
 
Old 07-29-2008, 03:36 PM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Awww, since you do run RPM, can't we take a shortcut and have you install the plugin package from the DAG repo instead?..
 
Old 07-29-2008, 04:19 PM   #9
williebens
Member
 
Registered: Jan 2008
Posts: 88

Original Poster
Rep: Reputation: 16
Hello unSpawn:

I will try that.
Should I uninstall the nagios plugins I installed from source first or it does not matter?

Thanks.
--Willie
 
Old 07-29-2008, 04:34 PM   #10
williebens
Member
 
Registered: Jan 2008
Posts: 88

Original Poster
Rep: Reputation: 16
Hello unSpawn:

I install nagios-plugins from

Quote:
yum -y install nagios-plugins
At least, I can now check the memory of my remote server with check_mem.pl plugin. That was one of the two problems. For some reason, I cannot still monitor the memory of my nagios server (localhost), but I think I am closer now.

Regarding the check_mysql plugin, I will configure the nrpe plugin with it now and see what happens.

Thanks.
--Willie
 
Old 07-29-2008, 04:56 PM   #11
williebens
Member
 
Registered: Jan 2008
Posts: 88

Original Poster
Rep: Reputation: 16
This is what I am getting on nagios for my remote host:

Quote:
MySQL UNKNOWN 07-29-2008 17:51:00 1d 2h 20m 53s 4/4 NRPE:Unable to read output
and for my nagios server memory check, this is what I get:

Quote:
Memory Free CRITICAL 07-29-2008 17:53:55 0d 6h 7m 16s 4/4 (Return code of 255 is out of bounds)
Thanks.
--Willie
 
Old 07-29-2008, 08:18 PM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
OK, that's Nagios output fersure but it doesn't tell us what the actual command and output was. Log excerpts, running stuff from the CLI might yield more details.
 
Old 07-30-2008, 01:34 PM   #13
williebens
Member
 
Registered: Jan 2008
Posts: 88

Original Poster
Rep: Reputation: 16
Hello unSpawn:

This is what the nagios.log file shows concerning the Return code 255 when trying to check on the localhost (nagios server) memory with the plugin check_mem.pl:

Quote:
[1217442434] Warning: Return code of 255 for check of service 'Memory Free' on host 'localhost' was out of bounds.
Regarding the monitoring of MySQL on the remote server, the nagios.log file does not report anything.

Thanks.
--Willie
 
Old 07-31-2008, 06:53 AM   #14
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Only thing I could suggest then is constructing the commandline for each component you need and then running those manually and from the commandline in verbose mode.
 
Old 07-31-2008, 12:15 PM   #15
williebens
Member
 
Registered: Jan 2008
Posts: 88

Original Poster
Rep: Reputation: 16
Hello unSpawn:

I understand the part of running the commands from the command line. What I do not know is if we are supposed to see what the, for example, check_mysql plugin is doing on the nagios web interface itself like we see a ping status?

Thanks.
--Willie
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Nagios and Oreon (Nagios web front end) installation and Configuration LXer Syndicated Linux News 1 05-31-2016 07:26 AM
Having a problem installing nagios in fadora 7? invisible381 Linux - Software 7 10-28-2007 10:52 PM
Installing Nagios on Suse 10 mineshpatel1984 Linux - Newbie 1 07-28-2007 01:31 AM
Nagios Daemon, PID not found but rc.nagios runs agentc0re Slackware 1 07-03-2007 02:47 PM
LXer: Nagios 2.5 and Oreon 1.3 (Nagios web front end) installation with screenshots LXer Syndicated Linux News 0 08-11-2006 05:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration