Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
alexmartin
Posts: 4 Joined: Wed Oct 17, 2018 6:28 am
Post
by alexmartin » Thu Oct 18, 2018 6:07 am
Hi
i'm trying to install ndoutils with ndo2db on a Freebsd host.
the nagios.cfg files have this option
Code: Select all
temp_path=/tmp
event_broker_options=-1
broker_module=/usr/local/bin/ndomod.o config_file=/usr/local/etc/nagios/ndomod.cfg
debug_level=-1
debug_verbosity=2
if a list the file i see
Code: Select all
root@margherasv1:/usr/local/libexec # ls -l /usr/local/bin/ndo*
-r-xr-xr-x 1 root wheel 105560 Oct 12 15:18 /usr/local/bin/ndo2db
lrwxr-xr-x 1 root wheel 21 Oct 11 13:30 /usr/local/bin/ndo2db-3x -> /usr/local/bin/ndo2db
-r-xr-xr-x 1 nagios nagios 72772 Oct 12 15:18 /usr/local/bin/ndomod.o
the service ndo2db work fine but when start nagios service the log prompt this
[1539859881] Nagios 4.4.2 starting... (PID=96258)
[1539859881] Local time is Thu Oct 18 12:51:21 CEST 2018
[1539859881] LOG VERSION: 2.0
[1539859881] qh: Socket '/var/spool/nagios/rw/nagios.qh' successfully initialized
[1539859881] qh: core query handler registered
[1539859881] qh: echo service query handler registered
[1539859881] qh: help for the query handler registered
[1539859881] wproc: Successfully registered manager as @wproc with query handler
[1539859881] wproc: Registry request: name=Core Worker 96260;pid=96260
[1539859881] wproc: Registry request: name=Core Worker 96261;pid=96261
[1539859881] wproc: Registry request: name=Core Worker 96262;pid=96262
[1539859881] wproc: Registry request: name=Core Worker 96259;pid=96259
[1539859881] Error: Could not load module '/usr/local/bin/ndomod.o' -> file not found
[1539859881] Error: Failed to load module '/usr/local/bin/ndomod.o'.
[1539859881] Error: Module loading failed. Aborting.
the ndomod.cfg files contains this sock's setting
Code: Select all
output_type=unixsocket
output=/var/run/ndo2db/ndo.sock
and listing of
Code: Select all
root@margherasv1:/usr/home/martin # ls -l /var/run/ndo2db/
total 4
srwxr-xr-x 1 nagios nagios 0 Oct 18 12:15 ndo.sock
-rw-r--r-- 1 nagios nagios 0 Oct 12 11:03 ndo2db.debug
-rw-r--r-- 1 nagios nagios 6 Oct 18 12:15 ndo2db.pid
How can i debug the nagios's broker module to understand what happen?
Thanks Alex
cdienger
Support Tech
Posts: 5045 Joined: Tue Feb 07, 2017 11:26 am
Post
by cdienger » Thu Oct 18, 2018 4:48 pm
The ndo configuration file may be bad. Can you post a copy of /usr/local/etc/nagios/ndomod.cfg ?
Also check the module with "file /usr/local/bin/ndomod.o "
Enabling the debug option in nagios.cfg and trying to restart it may also give some useful information. Edit nagios.cfg and find the lines:
debug_file=/usr/local/nagios/var/nagios.debug
debug_level=0
Changing the debug level to -1 to enable debugging.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new
Privacy Policy .
alexmartin
Posts: 4 Joined: Wed Oct 17, 2018 6:28 am
Post
by alexmartin » Mon Oct 22, 2018 3:18 am
Ok i have uploaded the nagios.cfg file
Before i installed the old version 3.5, now i'm using the same cfg file.
this is the exit of file command
Code: Select all
root@margherasv1:/usr/local/etc/nagios # file /usr/local/bin/ndomod.o
/usr/local/bin/ndomod.o: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD), dynamically linked, stripped
root@margherasv1:/usr/local/etc/nagios #
nagios.cfg is already setting with dbug level to -1
this is output of nagios.log.
[1540195915] Nagios 4.4.2 starting... (PID=6788)
[1540195915] Local time is Mon Oct 22 10:11:55 CEST 2018
[1540195915] LOG VERSION: 2.0
[1540195915] qh: Socket '/var/spool/nagios/rw/nagios.qh' successfully initialized
[1540195915] qh: core query handler registered
[1540195915] qh: echo service query handler registered
[1540195915] qh: help for the query handler registered
[1540195915] wproc: Successfully registered manager as @wproc with query handler
[1540195915] wproc: Registry request: name=Core Worker 6790;pid=6790
[1540195915] wproc: Registry request: name=Core Worker 6791;pid=6791
[1540195915] wproc: Registry request: name=Core Worker 6792;pid=6792
[1540195915] wproc: Registry request: name=Core Worker 6789;pid=6789
[1540195915] Error: Could not load module '/usr/local/bin/ndomod.o' -> file not found
[1540195915] Error: Failed to load module '/usr/local/bin/ndomod.o'.
[1540195915] Error: Module loading failed. Aborting.
nagios.debug do not give other information.
thanks
Attachments
nagios.cfg
(44.22 KiB) Downloaded 213 times
cdienger
Support Tech
Posts: 5045 Joined: Tue Feb 07, 2017 11:26 am
Post
by cdienger » Mon Oct 22, 2018 2:24 pm
What version of ndoutils ? Did you receive any errors while compiling and install it?
Try running an strace when starting the nagios process:
strace /usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new
Privacy Policy .
alexmartin
Posts: 4 Joined: Wed Oct 17, 2018 6:28 am
Post
by alexmartin » Tue Oct 23, 2018 2:52 am
The version is ndoutils-2.1.3 and i have installed by ports collection command.
in
Code: Select all
/usr/ports/net-mgmt/ndoutils/make install
without problem
I have modified the directory where ndo2db write pid,log and debug files; in origin was /var/run now is /var/run/ndo2db so i can use nagios as user to run process.
The version is
root@margherasv1:/usr/home/martin # ndo2db -V
NDO2DB 2.1.3
Copyright (c) 2009 Nagios Core Development Team and Community Contributors
Copyright (c) 2005-2008 Ethan Galstad
Last Modified: 2017-04-13
License: GPL v2
and strace exit is (only the last rows )
Nagios 4.4.2 starting... (PID=9587)
Local time is Tue Oct 23 09:10:55 CEST 2018
wproc: Successfully registered manager as @wproc with query handler
wproc: Registry request: name=Core Worker 9589;pid=9589
wproc: Registry request: name=Core Worker 9590;pid=9590
wproc: Registry request: name=Core Worker 9591;pid=9591
wproc: Registry request: name=Core Worker 9588;pid=9588
Error: Could not load module '/usr/local/bin/ndomod.o' -> file not found
Error: Failed to load module '/usr/local/bin/ndomod.o'.
PIOCRUN: Input/output error
trouble opening proc file
alexmartin
Posts: 4 Joined: Wed Oct 17, 2018 6:28 am
Post
by alexmartin » Tue Oct 30, 2018 8:22 am
Hi after some day, following your instruction, i was successful to install nagios and ndoutils from source.
Now it work fine and pull the data in mysql DB
Probably the packages in Freebsd is not well configured
Thanks
Best regards.
Alex
cdienger
Support Tech
Posts: 5045 Joined: Tue Feb 07, 2017 11:26 am
Post
by cdienger » Tue Oct 30, 2018 11:00 am
Glad to hear and thanks for posting your results!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new
Privacy Policy .