Compiling and using mk_livestatus on Nagios4 on Debian 10/Buster

Prerequisites (other than the nagios4 packages, of course!):

# apt install rrdtool-dev librrd-dev librrd8 libboost-dev libboost-system-dev

Get latest source from, at time of writing, and unpack

# wget
# tar -zxvf mk-livestatus-1.5.0p23.tar.gz
# cd mk-livestatus-1.5.0p23

Configure for nagios4, compile and install

# ./configure --with-nagios4 --prefix=/usr/local/nagios && make install

Enable the broker module in Nagios4 – add this to, eg, your nagios.cfg – first make sure that this is set to send all events to the broker:


Then configure the broker_module – here, telling it to create the socket for livestatus at /var/lib/nagios4/rw/livestatus

broker_module=/usr/local/lib/mk-livestatus/livestatus.o /var/lib/nagios4/rw/livestatus

Now you can restart Nagios4 and test that the livestatus socket is working

# systemctl restart nagios4

# echo "GET status" | /usr/local/bin/unixcat /var/lib/nagios4/rw/livestatus

And you should get something like this:


5 thoughts on “Compiling and using mk_livestatus on Nagios4 on Debian 10/Buster”

    1. Hi!

      Sorry – I guess I wasn’t very explicit there was I – I meant to imply that I am using the Debian 10 x64 package for nagios4, which at the time I wrote this article (and still) means the debian package version 4.3.4-3 (-3 means there are Debian backported patches to the upstream v4.3.4 for security/bug fixes – for the Debian changelog for, eg, the main nagios4 package, you can see ).

      Searching the system for installed packages containing the word “nagios” the full ‘package landscape’ on the server hosting my nagios install looks like this:
      ii libnagios-plugin-perl 0.36-1 all family of perl modules to streamline writing Nagios
      ii monitoring-plugins 2.2-6 all Plugins for nagios compatible monitoring systems (metapackage)
      ii monitoring-plugins-basic 2.2-6 amd64 Plugins for nagios compatible monitoring systems (basic)
      ii monitoring-plugins-common 2.2-6 amd64 Common files for plugins for nagios compatible monitoring
      ii monitoring-plugins-standard 2.2-6 amd64 Plugins for nagios compatible monitoring systems (standard)
      ii nagios-images 0.9.3 all Collection of images and icons for the nagios system
      ii nagios-nrpe-plugin 3.2.1-2 amd64 Nagios Remote Plugin Executor Plugin
      ii nagios-nrpe-server 3.2.1-2 amd64 Nagios Remote Plugin Executor Server
      ii nagios-plugins-basic 2.2-3 all transitional dummy package
      ii nagios-plugins-contrib 24.20190301 amd64 Plugins for nagios compatible monitoring systems
      ii nagios4 4.3.4-3 amd64 host/service/network monitoring and management system
      ii nagios4-cgi 4.3.4-3 amd64 cgi files for nagios4
      ii nagios4-common 4.3.4-3 all support files for nagios4
      ii nagios4-core 4.3.4-3 amd64 host/service/network monitoring and management system core files

  1. hey phil, thanks for this…
    one pitfall i found… i did’nt want ALL of libboost… however the configure script seems to have a problem pinpointing the exact libboost modules necessary … it does detect asio missing, but it doesn’t detect libboost-system missing, ending in a not very helpful error… took me a long time to find the right libboost module… so if it helps anyone… dependencies for me were: libasio-dev and libboost-system1.67-dev

    1. ha! it is often the case that the fastest way to find something is to tell someone else you can’t see it…. the number of times I have sent emails and then had to send another one saying “wait, nevermind”

Leave a Reply