Page 2 of 2

Re: Error: Could not load module '/usr/local/nagios/bin/ndo2

Posted: Mon Jan 07, 2013 11:24 pm
by ridder75
Hi,

I made changes in /usr/local/nagios/etc/nagios.cfg :

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

[root@xxxxxxxxxxx /]# service nagios stop
Stopping nagios (via systemctl): [ OK ]
[root@xxxxxxxxxxx /]# service ndo2db restart
Restarting ndo2db (via systemctl): [ OK ]
[root@xxxxxxxxxxx /]# service nagios start
Starting nagios (via systemctl): [ OK ]

Check File: /usr/local/nagios/var/nagios.log :

[08-01-2013 05:19:06] Finished daemonizing... (New PID=28792)
[08-01-2013 05:19:06] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
[08-01-2013 05:19:06] ndomod: Could not open data sink! I'll keep trying, but some output may get lost...
[08-01-2013 05:19:06] ndomod: NDOMOD 1.5.2 (06-08-2012) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
[08-01-2013 05:19:06] LOG VERSION: 2.0
[08-01-2013 05:19:06] Local time is Tue Jan 08 05:19:06 CET 2013
[08-01-2013 05:19:06] Nagios 3.4.3 starting... (PID=28791)
[08-01-2013 05:19:05] Successfully shutdown... (PID=23120)
[08-01-2013 05:19:05] Caught SIGTERM, shutting down...

Why i have this message :

[08-01-2013 05:19:06] ndomod: Could not open data sink! I'll keep trying, but some output may get lost...

How can i solve it please?

Thanks.

Raph :-)

Re: Error: Could not load module '/usr/local/nagios/bin/ndo2

Posted: Tue Jan 08, 2013 10:30 am
by nscott
That generally happens when you're trying to log to the database and it cannot connect to the database. Can you make sure the credentials you are supplying in the etc/ndo2db.cfg are valid. They are given under the directives db_host, db_port, db_name, db_user, db_pass, db_prefix. Can you connect to the database its attempting to connect to manually?

Re: Error: Could not load module '/usr/local/nagios/bin/ndo2

Posted: Wed Jan 09, 2013 2:24 am
by ridder75
Hi,

The problem is solve, i followed this tuto :

http://sysengineers.wordpress.com/2010/ ... rh-el-oel/

ndo2db must be started before nagios, then after a chkconfig :

nagios 0:arrêt 1:arrêt 2:marche 3:marche 4:marche 5:marche 6:arrêt
ndo2db 0:arrêt 1:arrêt 2:arrêt 3:arrêt 4:arrêt 5:arrêt 6:arrêt
ndodaemon 0:arrêt 1:arrêt 2:marche 3:marche 4:marche 5:marche 6:arrêt

Entries logs ==> /usr/local/nagios/var/archives/nagios-01-09-2013-00.log

[08-01-2013 09:19:33] Finished daemonizing... (New PID=1892)
[08-01-2013 09:19:12] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
[08-01-2013 09:19:12] ndomod: Successfully connected to data sink. 0 queued items to flush.
[08-01-2013 09:19:12] ndomod: NDOMOD 1.5.2 (06-08-2012) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
[08-01-2013 09:19:12] LOG VERSION: 2.0
[08-01-2013 09:19:12] Local time is Tue Jan 08 09:19:12 CET 2013
[08-01-2013 09:19:12] Nagios 3.4.3 starting... (PID=1703)
[08-01-2013 09:18:45] Event broker module '/usr/local/nagios/bin/ndomod.o' deinitialized successfully.
[08-01-2013 09:18:45] ndomod: Shutdown complete.
[08-01-2013 09:18:45] Successfully shutdown... (PID=1757)
[08-01-2013 09:18:45] Caught SIGTERM, shutting down...

Thanks a lot!

Raph :-)

Re: Error: Could not load module '/usr/local/nagios/bin/ndo2

Posted: Wed Jan 09, 2013 11:08 am
by slansing
Thank you for sharing your solution to this issue!