Nagios 4 with Nagvis and Livestatus

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.
rcraig114
Posts: 11
Joined: Sun Jan 26, 2014 12:37 am

Re: Nagios 4 with Nagvis and Livestatus

Post by rcraig114 »

OK, I think it may have worked. How do I tell?

[root@openvzhost1 livestatus]# sudo make install
Making install in src
make[1]: Entering directory `/usr/src/livestatus/src'
make[2]: Entering directory `/usr/src/livestatus/src'
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
/usr/bin/install -c unixcat '/usr/local/bin'
test -z "/usr/local/lib/mk-livestatus" || /bin/mkdir -p "/usr/local/lib/mk-livestatus"
/usr/bin/install -c -m 644 livestatus.so '/usr/local/lib/mk-livestatus'
( cd '/usr/local/lib/mk-livestatus' && ranlib livestatus.so )
/bin/sh /usr/src/livestatus/install-sh -d /usr/local/lib/mk-livestatus
/usr/bin/install -c livestatus.o /usr/local/lib/mk-livestatus
rm -f /usr/local/lib/mk-livestatus/livestatus.so
make[2]: Leaving directory `/usr/src/livestatus/src'
make[1]: Leaving directory `/usr/src/livestatus/src'
make[1]: Entering directory `/usr/src/livestatus'
make[2]: Entering directory `/usr/src/livestatus'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/usr/src/livestatus'
make[1]: Leaving directory `/usr/src/livestatus'
[root@openvzhost1 livestatus]#
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios 4 with Nagvis and Livestatus

Post by abrist »

Sure as heck looks like it worked. Try adding the live status broker line to nagios.cfg, restart nagios, and then try to use an addon that requires livestatus (like nagvis).
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
rcraig114
Posts: 11
Joined: Sun Jan 26, 2014 12:37 am

Re: Nagios 4 with Nagvis and Livestatus

Post by rcraig114 »

I'v'e seen a few examples out there. Below is what I should put in the cfg file right?

broker_module=usr/local/lib/mk-livestatus/livestatus.o
rcraig114
Posts: 11
Joined: Sun Jan 26, 2014 12:37 am

Re: Nagios 4 with Nagvis and Livestatus

Post by rcraig114 »

OK, so this is what I put in the cfg file. Then below that are the errors I see in the log file. Any suggestions?

broker_module=/usr/local/lib/mk-livestatus/livestatus.o /usr/local/nagios/etc

[02-03-2014 04:51:46] Error: Module loading failed. Aborting.
[02-03-2014 04:51:46] Error: Failed to load module '/usr/local/lib/mk-livestatus/livestatus.o'.
[02-03-2014 04:51:46] Event broker module '/usr/local/lib/mk-livestatus/livestatus.o' deinitialized successfully.
[02-03-2014 04:51:46] Error: Function nebmodule_init() in module '/usr/local/lib/mk-livestatus/livestatus.o' returned an error. Module will be unloaded.
[02-03-2014 04:51:46] livestatus: Cannot remove in the way file /usr/local/nagios/etc: Permission denied
[02-03-2014 04:51:46] livestatus: Please visit us at http://mathias-kettner.de/
[02-03-2014 04:51:46] livestatus: Livestatus 1.2.0p3 by Mathias Kettner. Socket: '/usr/local/nagios/etc'
[02-03-2014 04:51:46] wproc: Registry request: name=Core Worker 863898;pid=863898
[02-03-2014 04:51:46] wproc: Registry request: name=Core Worker 863897;pid=863897
[02-03-2014 04:51:46] wproc: Registry request: name=Core Worker 863894;pid=863894
[02-03-2014 04:51:46] wproc: Registry request: name=Core Worker 863895;pid=863895
[02-03-2014 04:51:46] wproc: Registry request: name=Core Worker 863896;pid=863896
[02-03-2014 04:51:46] wproc: Registry request: name=Core Worker 863893;pid=863893
[02-03-2014 04:51:46] wproc: Successfully registered manager as @wproc with query handler
[02-03-2014 04:51:46] nerd: Fully initialized and ready to rock!
[02-03-2014 04:51:46] nerd: Channel opathchecks registered successfully
[02-03-2014 04:51:46] nerd: Channel servicechecks registered successfully
[02-03-2014 04:51:46] nerd: Channel hostchecks registered successfully
[02-03-2014 04:51:46] qh: core query handler registered
[02-03-2014 04:51:46] qh: Socket '/usr/local/nagios/var/rw/nagios.qh' successfully initialized
[02-03-2014 04:51:46] LOG VERSION: 2.0
[02-03-2014 04:51:46] Local time is Mon Feb 03 04:51:46 CST 2014
[02-03-2014 04:51:46] Nagios 4.0.2 starting... (PID=863892)
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios 4 with Nagvis and Livestatus

Post by abrist »

I don't think the broker live is correct, the following is from the livestatus website:

Code: Select all

broker_module=/usr/local/lib/mk-livestatus/livestatus.o /usr/local/nagios/var/rw/live
event_broker_options=-1
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
rcraig114
Posts: 11
Joined: Sun Jan 26, 2014 12:37 am

Re: Nagios 4 with Nagvis and Livestatus

Post by rcraig114 »

Interesting. The /rw/live doesn't existing in my var folder. Maybe I should create it?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios 4 with Nagvis and Livestatus

Post by slansing »

Did you add the above example line? "make sure the path is correct." That rw file should be created when the module loads, are you getting additional errors in the log when trying to start nagios?
rcraig114
Posts: 11
Joined: Sun Jan 26, 2014 12:37 am

Re: Nagios 4 with Nagvis and Livestatus

Post by rcraig114 »

Yes sir! That worked. Now just to mess with Nagvis. Thanks for the help. I owe you!

[02-06-2014 08:18:00] Successfully launched command file worker with pid 129132
Informational Message[02-06-2014 08:18:00] Event broker module '/usr/local/lib/mk-livestatus/livestatus.o' initialized successfully.
Informational Message[02-06-2014 08:18:00] livestatus: Finished initialization. Further log messages go to /usr/local/nagios/var/livestatus.log
Informational Message[02-06-2014 08:18:00] livestatus: Please visit us at http://mathias-kettner.de/
Informational Message[02-06-2014 08:18:00] livestatus: Livestatus 1.2.0p3 by Mathias Kettner. Socket: '/usr/local/nagios/var/rw/live'
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios 4 with Nagvis and Livestatus

Post by tmcdonald »

slansing is not in the office but I am sure he would say "You are very welcome!"

Gonna close up this thread now, feel free to open another if you need help with anything else.
Former Nagios employee
Locked