2019年6月18日 星期二

05_mk

08_mk


##look DOC
參考文件
# # https://exchange.nagios.org/directory/Documentation/MK-Livestatus/details

yum install -y  gcc*

yum -y install centos-release-scl
yum -y install devtoolset-4-gcc*
scl enable devtoolset-4 bash

cd /tmp
wget https://mathias-kettner.de/download/mk-livestatus-1.2.8p18.tar.gz --no-check-certificate
tar xzf mk-livestatus-1.2.8p18.tar.gz
cd mk-livestatus-1.2.8p18
./configure --with-nagios4
make
make install

#

##test
echo 'GET hosts' | unixcat /usr/local/nagios/var/rw/livestatus

#
echo 'broker_module=/usr/local/lib/mk-livestatus/livestatus.o /usr/local/nagios/var/rw/livestatus' >> /usr/local/nagios/etc/nagios.cfg

systemctl restart nagios



yum -y install xinetd

echo 'service livestatus
{
type = UNLISTED
port = 6557
socket_type = stream
protocol = tcp
wait = no
# limit to 100 connections per second. Disable 3 secs if above.
cps = 100 3
# set the number of maximum allowed parallel instances of unixcat.
# Please make sure that this values is at least as high as
# the number of threads defined with num_client_threads in
# etc/mk-livestatus/nagios.cfg
instances = 500
# limit the maximum number of simultaneous connections from
# one source IP address
per_source = 250
# Disable TCP delay, makes connection more responsive
flags = NODELAY
user = nagios
server = /usr/local/bin/unixcat
server_args = /usr/local/nagios/var/rw/livestatus
# configure the IP address(es) of your Nagios server here:
#only_from = 172.30.6.0/24
disable = no
}
'  > /etc/xinetd.d/live


systemctl restart nagios xinetd
systemctl enable nagios xinetd

沒有留言:

RHEL install EPEL

  https://www.linuxtechi.com/install-epel-repo-on-rhel-system/ EPEL dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest...