NDOmod adn could not open data sink


#1

Hi (again)!

I have tried to google the solution, but so far without access.

Nagios 3.2.0 Core
NDOUtils 1.4b9 installed
Debian 5.0

So far tested, that I am able to login to mysql with nagios-user and run queries:

debnagios:/usr/local/nagios/etc# mysql -u nagios -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 118
Server version: 5.0.51a-24+lenny2 (Debian)

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> SELECT * FROM nagios.nagios_conninfo;
Empty set (0.00 sec)

mysql> show full processlist\G
*************************** 1. row ***************************
Id: 118
User: nagios
Host: localhost
db: NULL
Command: Query
Time: 0
State: NULL
Info: show full processlist
1 row in set (0.00 sec)

mysql>

I have correct username and passwd in ndo2db.cfg

I have started ndomod (successfully?)
/usr/local/nagios/bin/ndo2db-3x -c /usr/local/nagios/etc/ndo2db.cfg
(this does not write to any log anything? no errors, no success)

and checked it runs:
debnagios:/usr/local/nagios/etc# ps -ef |grep ndo
nagios 12832 1 0 20:50 ? 00:00:00 /usr/local/nagios/bin/ndo2db-3x -c /usr/local/nagios/etc/ndo2db.cfg

I have started nagios:
/etc/init.d/nagios start

and it fails with data sink:
Jan 3 20:51:25 debnagios nagios: Nagios 3.2.0 starting… (PID=12845)
Jan 3 20:51:25 debnagios nagios: Local time is Sun Jan 03 20:51:25 EET 2010
Jan 3 20:51:25 debnagios nagios: LOG VERSION: 2.0
Jan 3 20:51:25 debnagios nagios: ndomod: NDOMOD 1.4b9 (10-27-2009) Copyright © 2009 Nagios Core Development Team and Community Contributors
Jan 3 20:51:25 debnagios nagios: ndomod: Could not open data sink! I’ll keep trying, but some output may get lost…
Jan 3 20:51:25 debnagios nagios: Event broker module ‘/usr/local/nagios/bin/ndomod-3x.o’ initialized successfully.
Jan 3 20:51:25 debnagios nagios: Finished daemonizing… (New PID=12846)

nothing comes to DB :frowning:

I have tried to change configuration to tcp socket and back to unix socket without difference.

Any ideas, how to solve the problem?


#2

Finally I thook this case under work again, and managed to get it work. So problem solved :slight_smile:


#3

hey ,

interesting am sitting on same error.
how did you resolved it? do you remember how u fixed this error ?


#4

[quote=“svissa”]hey ,

interesting am sitting on same error.
how did you resolved it? do you remember how u fixed this error ?[/quote]

I think I just had a noob-mistake in configurations… wrong password or something.

But now I am re-installing nagios to other platform, and I am facing same problem. New version is 64-bit Ubuntu, and I cannot get it working.


#5

Hey
am trying to put nagvis and ndoutils on ubuntu 11 server. am able to set all , but ndoutils is not going through
The same error …
If you r able to fix it, please post how did you fixed it.

Thanks man.


#6

RESOLVED.

I tried different options and it worked. I dont have exact steps for the fix.

  1. mysql- Created nagios user and gave him all permissions.

  2. ndoutils -
    make clean
    ./configure --prefix=/usr/local/nagios --enable-mysql --with-ndo2db-user=naigos --with-ndo2db-group=nagios
    –with-mysql-lib=/usr/lib/mysql
    make
    cp ./src/ndomod-3x.o /usr/local/nagios/bin/ndomod.o
    cp ./src/ndo2db-3x /usr/local/nagios/bin/ndo2db
    cp ./config/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
    cp ./config/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
    sudo chmod 774 /usr/local/nagios/bin/ndo*
    sudo chown nagios:nagios /usr/local/nagios/bin/ndo*
    sudo chown nagios:nagios /usr/local/nagios/etc/ndo*

  3. start ndo2db
    /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cf

  4. start nagios.

This worked for me.


#7

ah you have add the broker config lines in nagios.