installing check_mysql and check_mem nagios plugins
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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?
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
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
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.
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.
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.
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.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.