Page 2 of 8

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Posted: Fri Mar 21, 2014 2:16 pm
by sreinhardt
Depending on which way mysql is starting via the init system, that might have just shown us what we are looking for. Could you change ndo2db.cfg so that db_host is 127.0.0.1 instead of localhost. (Yes I know they should be the same, but some systems are picky)

Code: Select all

db_host=localhost
TO
db_host=127.0.0.1
Also run

Code: Select all

ps -ef | grep mysql

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Posted: Mon Mar 24, 2014 1:46 am
by majed

Code: Select all

root@oversun:~# ps -ef | grep mysql
mysql     8365     1  0 Mar21 ?        00:30:25 mysqld --skip-grant-tables
root     12264 11834  0 10:39 pts/3    00:00:00 /bin/sh -e /etc/init.d/mysql restart
root     12275 12264  0 10:39 pts/3    00:00:00 stop mysql
mysql    12943     1  0 10:43 ?        00:00:00 /usr/sbin/mysqld
root     13213 11834  0 10:44 pts/3    00:00:00 grep --color=auto mysql
i changed

Code: Select all

db_host=127.0.0.1
doesn't seem to have made a difference. still seems not to work.

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Posted: Mon Mar 24, 2014 12:05 pm
by abrist
Just as a test, try symlinking /etc/mysql to /etc/my.cnf:

Code: Select all

ln -s /etc/mysql /etc/my.cnf
And then restart mysql and ndo:

Code: Select all

service mysql restart
service ndo2db restart

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Posted: Mon Mar 24, 2014 12:30 pm
by majed
did

Code: Select all

ln -s /etc/mysql /etc/my.cnf
though i didn't understand what would that link as my.cnf is in /etc/mysql/my.cnf
then restarted mysql, nagios and ndoutils.
Got the following in nagios log:

Code: Select all

[1395682094] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
[1395682094] Finished daemonizing... (New PID=9956)
[1395682110] ndomod: Still unable to connect to data sink.  326 items lost, 50000 queued items to flush.
So I assume that didn't help.

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Posted: Mon Mar 24, 2014 4:53 pm
by abrist
majed wrote:though i didn't understand what would that link as my.cnf is in /etc/mysql/my.cnf
My apologies, I was under the impression that your sql config was /etc/mysql, not /etc/mysql/my.cnf. Remove the symlink and retry with:

Code: Select all

rm /etc/my.cnf
ln -s /etc/mysql/my.cnf /etc/my.cnf
For some reason ndo cannot find the mysql sock file, so we are trying to link the my.cnf config to where ndo expects as default.

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Posted: Tue Mar 25, 2014 2:41 pm
by majed
honest mistake, else apology is necessary:)
did

Code: Select all

ln -s /etc/mysql/my.cnf /etc/my.cnf
removed the previous link
still getting the following in /var/log/nagios3/nagios.log

Code: Select all

[1395776334] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
[1395776334] Finished daemonizing... (New PID=6186)
[1395776350] ndomod: Still unable to connect to data sink.  354 items lost, 50000 queued items to flush.

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Posted: Tue Mar 25, 2014 4:47 pm
by abrist
First, remove the symlink:

Code: Select all

rm /etc/my.cnf
Next, lets check the ndo log for any hints:

Code: Select all

tail -50 /var/cache/nagios3/ndo2db.debug

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Posted: Tue Mar 25, 2014 9:44 pm
by majed
root@oversun:~# tail -50 /var/cache/nagios3/ndo2db.debug
tail: cannot open `/var/cache/nagios3/ndo2db.debug' for reading: No such file or directory

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Posted: Wed Mar 26, 2014 12:54 pm
by abrist
Well, I am running out of ideas, that was the location declared in your configs. Maybe you have 2 nagios installs and the configuration is split between them? Lets do some searches, but first, install mlocate:

Code: Select all

apt-get install mlocate
updatedb
locate nagios.cfg

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Posted: Fri Mar 28, 2014 1:51 am
by majed
well mlocate is already installed on ubuntu so:
root@oversun:~# locate nagios.cfg

Code: Select all

/etc/nagios3/nagios.cfg
/usr/local/nagios/etc/nagios.cfg
/usr/local/nagios/nagiosgraph-1.4.4/examples/nagiosgraph-nagios.cfg
/usr/local/nagiosgraph/etc/nagiosgraph-nagios.cfg
/usr/local/nagiosgraph/examples/nagiosgraph-nagios.cfg
/usr/share/doc/nagios3-common/examples/nagios.cfg.gz
/var/tmp/ndoutils-2.0.0/ndoutils-2.0.0/config/nagios.cfg
/var/tmp/ndoutils-2.0.0/ndoutils-2.0.0/config/nagios.cfg.in
the file in
/usr/local/nagios/etc/nagios.cfg
is:

Code: Select all

event_broker_options=-1
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
the file in
/etc/nagios3/nagios.cfg
has the last line as follows:

Code: Select all

# ndoutils broker


broker_module=/usr/local/nagios/bin/ndomod.o config_file=/etc/nagios3/ndomod.cfg

#broker_module=/usr/local/nagios/binndomod.o config_file=/etc/nagios3/ndomod.cfg
and close to the beginning:

Code: Select all

# EVENT BROKER OPTIONS
# Controls what (if any) data gets sent to the event broker.
# Values:  0      = Broker nothing
#         -1      = Broker everything
#         <other> = See documentation

event_broker_options=-1
does it give a clue?