About MK Livestatus
MK Livestatus is a completely new approach for accessing status and also historic data from hosts and services in Nagios monitoring and alerting system. Livestatus does not actively write out data. Instead, it opens a socket by which data can be retrieved on demand. The socket allows you to send a request for hosts, services or other pieces of data and get an immediate answer.
MK Livestatus installation is necessary if you want to run some Nagios add-ons like NagVis or Thruk. We will be installing MK Livestatus on a CentOS 6.4 64bit minimal install.
Let’s start our MK Livestatus install!
1. Download MK Livestatus
Download latest MK-Livestatus tar from http://mathias-kettner.de and transfer it to your server
2. Install dependencies
Install C++ compiler (if you don’t already have it installed)
yum install gcc-c++ -y
3. Extract MK-Livestatus
tar -xvzf mk-livestatus-VERSION.tar.gz
4. Configure MK-Livestatus
./configure
5. Make MK-Livestatus
Use -j parameter for multi threaded compile
make -j 4 make install
6. Configure Nagios
Configure Nagios for MK Livestatus – add this to nagios.cfg (more on Nagios configuration) – find file livestatus.o on your sistem and add that path to this file to Nagios config:
broker_module=/usr/local/nagios/mk-livestatus/livestatus.o /usr/local/nagios/var/rw/live event_broker_options=-1
7. Check nagios.log
Check nagios.log file (/usr/local/nagios/var/nagios.log file) if MK Livestatus has started succesfully:
[1365069834] livestatus: Livestatus 1.2.0p4 by Mathias Kettner. Socket: '/usr/local/nagios/var/rw/live' [1365069834] livestatus: Please visit us at http://mathias-kettner.de/ [1365069834] livestatus: Hint: please try out OMD - the Open Monitoring Distribution [1365069834] livestatus: Please visit OMD at http://omdistro.org [1365069834] livestatus: Finished initialization. Further log messages go to /usr/local/nagios/var/livestatus.log [1365069834] Event broker module '/usr/local/nagios/mk-livestatus/livestatus.o' initialized successfully