Retrospective IT

Adding MK Livestatus to Nagios 4

Nagios and MK Livestatus

Adding MK Livestatus to Nagios will allow you to parse data for 3rd party addons like NagVis, Thruk, etc… This post will show the process I used to include MK Livestatus with Nagios under Ubuntu 16.04.

First, we’ll need to download and untar the latest version of MK Livestatus. For me, it is version 1.4.0i1, you can find the latest version here. We only need the standalone source code for MK Livestatus.

curl -L -O https://mathias-kettner.de/download/mk-livestatus-1.4.0i1.tar.gz
tar xvzf mk-livestatus-1.4.0i1.tar.gz

Now, we’ll configure and install MK Livestatus using the following command:

cd mk-livestatus-1.4.0i1 
./configure --with-nagios4 --prefix=/usr/local/nagios && make install

Next, we’ll need to edit nagios.cfg and change/add the following lines:

broker_module=/usr/local/lib/mk-livestatus/livestatus.o /usr/local/nagios/var/rw/live
event_broker_options=-1

After restarting Nagios, check the nagios.log file and you should now see MK Livestatus as the broker.

Leave a Reply

Your email address will not be published. Required fields are marked *