I am not sure how to modify the config.h script for my CentOS 4.5 box (running Nagios + NDOutils).
NDOutils seem to compile fine (./configure && make), but I'm having problems when I try to run the final command in the README file.
********* problems ***************************
ndo2db-2x -c /etc/nagios/ndo2db.cfg
Support for the specified database server is either not yet supported, or was not found on your system. ************************************************
Someone else (http://tinyurl.com/2jnef8) suggested modding the config.h file in order to eliminate that command
CHANGE
#include <mysql/mysql.h> #include <mysql/errmsg.h>
TO
#include </usr/local/mysql/include/mysql/mysql.h> #include </usr/local/mysql/include/mysql/errmsg.h>
However, when I looked for mysql.h (e.g. "locate mysql.h") I couldn't find find them (maybe b/c I installed from package?). What might I need to do in order to modify this script for CentOS so that ./configure will run properly and let me install this?
On Thu, Oct 11, 2007 at 03:06:04PM -0700, Rogelio alleged:
I am not sure how to modify the config.h script for my CentOS 4.5 box (running Nagios + NDOutils).
NDOutils seem to compile fine (./configure && make), but I'm having problems when I try to run the final command in the README file.
********* problems ***************************
ndo2db-2x -c /etc/nagios/ndo2db.cfg
Support for the specified database server is either not yet supported, or was not found on your system.
Someone else (http://tinyurl.com/2jnef8) suggested modding the config.h file in order to eliminate that command
CHANGE
#include <mysql/mysql.h> #include <mysql/errmsg.h>
TO
#include </usr/local/mysql/include/mysql/mysql.h> #include </usr/local/mysql/include/mysql/errmsg.h>
That would be silly.
However, when I looked for mysql.h (e.g. "locate mysql.h") I couldn't find find them (maybe b/c I installed from package?). What might I need to do in order to modify this script for CentOS so that ./configure will run properly and let me install this?
'yum provides mysql.h' tells you that /usr/include/mysql/mysql.h is in the mysql-devel package. 'yum install mysql-devel' will install that package. Run configure again and carefully watch the output to see if everything you want is detected.
On 10/11/07, Garrick Staples garrick@usc.edu wrote:
'yum provides mysql.h' tells you that /usr/include/mysql/mysql.h is in the mysql-devel package. 'yum install mysql-devel' will install that package. Run configure again and carefully watch the output to see if everything you want is detected.
Perfect, thank you.
After I ran "yum install mysql-devel", I was able to run "make clean && ./compile && make" again and then copy the binaries over to the /usr/bin folder
However, I get the following error now, which I suspect is a MySQL issue?
[root(at)localhost bin]# pwd /usr/bin [root(at)localhost bin]# ndo2db -c /etc/nagios/ndo2db.cfg Could not bind socket: No such file or directory [root(at)localhost bin]#
I checked my /etc/my.cnf file, and the socket looks like it's ok ("socket=/var/lib/mysql/mysql.sock")
Any suggestions?
on 10/11/2007 4:13 PM Rogelio spake the following:
On 10/11/07, Garrick Staples garrick@usc.edu wrote:
'yum provides mysql.h' tells you that /usr/include/mysql/mysql.h is in the mysql-devel package. 'yum install mysql-devel' will install that package. Run configure again and carefully watch the output to see if everything you want is detected.
Perfect, thank you.
After I ran "yum install mysql-devel", I was able to run "make clean && ./compile && make" again and then copy the binaries over to the /usr/bin folder
However, I get the following error now, which I suspect is a MySQL issue?
[root(at)localhost bin]# pwd /usr/bin [root(at)localhost bin]# ndo2db -c /etc/nagios/ndo2db.cfg Could not bind socket: No such file or directory [root(at)localhost bin]#
I checked my /etc/my.cnf file, and the socket looks like it's ok ("socket=/var/lib/mysql/mysql.sock")
Any suggestions?
Is mysql-server installed and running?
Is mysql-server installed and running?
Yeah, it is:
[root@localhost nagios]# ps -ef | grep mysql root 25630 1 0 16:22 pts/1 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid mysql 25692 25630 0 16:22 pts/1 00:00:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --socket=/var/lib/mysql/mysql.sock root 25800 9962 0 16:32 pts/1 00:00:00 grep mysql [root@localhost nagios]#
On 10/11/07, Rogelio scubacuda@gmail.com wrote:
Is mysql-server installed and running?
Yeah, it is:
[root@localhost nagios]# ps -ef | grep mysql root 25630 1 0 16:22 pts/1 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid mysql 25692 25630 0 16:22 pts/1 00:00:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --socket=/var/lib/mysql/mysql.sock root 25800 9962 0 16:32 pts/1 00:00:00 grep mysql [root@localhost nagios]#
Fixed it. It turned out to be a setting in my ndo2db.cfg file:
#socket_type=unix <---what it was
#changed to socket_type=tcp
Thanks for your help, everyone!
On 10/11/07, Rogelio scubacuda@gmail.com wrote:
I am not sure how to modify the config.h script for my CentOS 4.5 box (running Nagios + NDOutils).
For what it's worth, here a URL detailing what I was doing, and what I did to ultimately fix my problems