how to install MKLiveStatus in Centos

MKLiveStatus is a module written by Mathias Kettner for interfacing Nagios. MKLivestatus make use of the Nagios Event Broker API and loads a binary module into the Nagios process. This plugin opens a socket by which data can be retrieved on demand.

Step1: Install depencdencies

#yum install gcc-c++

Step2: Download the latest version of mk-livestatus

#wget 'http://www.mathias-kettner.de/download/mk-livestatus-1.2.8.tar.gz'

Step3: Extract the downloaded package

#tar xzf mk-livestatus-1.2.8.tar.gz

Step4: Change the location to the extracted folder

#cd mk-livestatus-1.2.8

Step5: Compile and install the package

#./configure --with-nagios4

#make

#make install

Step6: Create new directory for mk-livestatus

#mkdir /usr/local/nagios/mk-livestatus

Step7: Correct the ownership of the folder

#chown nagios:apache /usr/local/nagios/mk-livestatus

Step8: Edit nagios config file '/usr/local/nagios/etc/nagios.cfg' and update the below lines

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

event_broker_options=-1

Step9: Restart nagios service

#service nagios restart

Step10: Verify the setup

#echo 'GET hosts' | unixcat /usr/local/nagios/mk-livestatus/live

 

That's all....

Leave a Reply

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