Page 1 of 2

Nagios core mk-livestatus broker_module issue

Posted: Fri May 23, 2014 2:43 pm
by jsdurling
Hello,

I've installed nagios 3.3.1 on a gentoo server. Currently running fine. I wanted to install mk-livestatus for nagvis and pnp options, but have run into an issue with either nagios or mk-livestatus, and I'd like to see if someone could possibly shed some light on it.

OS: gentoo
nagios-core: 3.3.1
mk-livestatus: 1.2.2_p3
nagvis: 1.6.6
apache2

Basically nagios is failing to load the module with an error of "File Not Found". I've configured a false path in nagios and confirmed that the error I received then was "No such file exists". So I know this is related to the actual livestatus.0 module, but I can't seem to figure out what the issue is with it. I've compiled it manually, as well as via emerge etc. I can't find much information on this and could use ideas as to what to check into further. All the dependencies are installed. Permissions were verified... unless they should be something other than "nagios, apache, root", which all have access to the module (and I'd expect to see "permission denied") if it was an issue with permissions.

Code: Select all

Nagios Log Error when trying to load the module:
[1400861283] Nagios 3.3.1 starting... (PID=29457)
[1400861283] Local time is Fri May 23 12:08:03 EDT 2014
[1400861283] LOG VERSION: 2.0
[1400861283] Error: Could not load module '/usr/lib64/mk-livestatus/livestatus.o' -> file not found

Nagios Config file:  
broker_module=/usr/lib64/mk-livestatus/livestatus.o /var/nagios/rw/live
event_broker_options=-1

Location of mk-livestatus
mon1 ~ # ls -l /usr/lib64/mk-livestatus/livestatus.o [/align]
-rwxrwxrwx 1 root root 547160 May 23 11:30 /usr/lib64/mk-livestatus/livestatus.o
Thanks in advance for any insight provided.

Re: Nagios core mk-livestatus broker_module issue

Posted: Tue May 27, 2014 10:28 am
by scottwilkerson
Maybe the problem is with the path you want to place the socket

Code: Select all

ls -l /var/nagios/rw/live
ls -ld /var/nagios/rw
ls -ld /var/nagios

Re: Nagios core mk-livestatus broker_module issue

Posted: Tue May 27, 2014 11:01 am
by eloyd
You may also want to make sure your linker linked everything properly:

Code: Select all

ldd /usr/lib64/mk-livestatus/livestatus.o
And check for missing libraries.

Re: Nagios core mk-livestatus broker_module issue

Posted: Tue May 27, 2014 1:26 pm
by jsdurling
mon1 ~ # ls -ld /var/nagios/rw
drwxrwsr-x 2 nagios nagioscmd 4096 May 23 17:33 /var/nagios/rw
mon1 ~ # ls -ld /var/nagios
drwxr-xr-x 6 nagios nagios 4096 May 27 14:24 /var/nagios
mon1 ~ # ldd /usr/lib64/mk-livestatus/livestatus.o
linux-vdso.so.1 => (0x00007fff1d78e000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f85f3b8e000)
libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/libstdc++.so.6 (0x00007f85f3884000)
libm.so.6 => /lib/libm.so.6 (0x00007f85f3602000)
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/libgcc_s.so.1 (0x00007f85f33ec000)
libc.so.6 => /lib/libc.so.6 (0x00007f85f3064000)
/lib64/ld-linux-x86-64.so.2 (0x00007f85f404b000)
Is there an easy way to verify if something is missing?

Re: Nagios core mk-livestatus broker_module issue

Posted: Wed May 28, 2014 12:39 pm
by abrist
My presumption is that livestatus is having an issue creating the rw/live socket file. Can you post the full output of a nagios startup from the shell?

Re: Nagios core mk-livestatus broker_module issue

Posted: Wed May 28, 2014 2:45 pm
by jsdurling

Code: Select all

[1401295603] Caught SIGHUP, restarting...
[1401295603] Nagios 3.3.1 starting... (PID=1538)
[1401295603] Local time is Wed May 28 12:46:43 EDT 2014
[1401295603] LOG VERSION: 2.0
[1401295603] Error: Could not load module '/usr/lib/mk-livestatus/livestatus.o' -> file not found
[1401295614] HOST DOWNTIME ALERT: fs218.site.com;STARTED; Host has entered a period of scheduled downtime
[1401295614] HOST DOWNTIME ALERT: fs217.site.com;STARTED; Host has entered a period of scheduled downtime
[1401295614] HOST DOWNTIME ALERT: fs2.site.com;STARTED; Host has entered a period of scheduled downtime
[1401295614] HOST DOWNTIME ALERT: fs0.site.com;STARTED; Host has entered a period of scheduled downtime
*snippet*
Rest of the log just rolls through my polling and not another "error" related to "livestatus" shows up.

Re: Nagios core mk-livestatus broker_module issue

Posted: Wed May 28, 2014 2:53 pm
by abrist
I found your post on the nagvis forums while looking for solutions to this problem. You are in unique company, just you and yourself :(
You may want to try the newest version of livestatus: http://mathias-kettner.com/download/mk- ... 4p2.tar.gz
Some compiling required, but as a gentoo user, you will be fine :P

There was some mention on the other forums about a symlink, could you clarify?

Re: Nagios core mk-livestatus broker_module issue

Posted: Thu May 29, 2014 8:14 am
by jsdurling
Someone had questioned the output path of one of the commands, in that, I was using:

/usr/lib/mk-livestatus/livestatus.o when I ran the ldd command and:

/usr/lib64/mk-livestatus/livestatus.o in my configuration.

/lib sym linked to /lib64/

Thanks,
Jeff

Re: Nagios core mk-livestatus broker_module issue

Posted: Thu May 29, 2014 8:58 am
by jsdurling
abrist wrote:I found your post on the nagvis forums while looking for solutions to this problem. You are in unique company, just you and yourself :(
You may want to try the newest version of livestatus: http://mathias-kettner.com/download/mk- ... 4p2.tar.gz
Some compiling required, but as a gentoo user, you will be fine :P

There was some mention on the other forums about a symlink, could you clarify?
I downloaded and compiled this and have the same issue as I did with the older version. I'm genuinely at a loss. Frustration doesn't really cover this currently.

Re: Nagios core mk-livestatus broker_module issue

Posted: Thu May 29, 2014 1:35 pm
by abrist
I ma going to look into this. My main gentoo box runs unstable 64bit, but I doubt there will be many relevant differences from your install. I will create the symlink just as you have done and give it a test. Were any of the nagios related packages installed from portage, or were all source installs?