With the CHECK_MK monitoring of course, the client, no nonsense to say, directly on the script, implementation of seconds 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0013.gif "alt=" j_ 0013.gif "/>
#!/bin/bash#nagios+check_mk linux Client Installation #by caffrey#2103-12-24# Note: This script requires the root user to perform the #1.linux client download wget http://mathias-kettner.de/download/check_mk-agent-1.2.0p2-1.noarch.rpm#2.windows Client Download http://mathias-kettner.de/download/check-mk-agent-1.2.0p2.exe# Following is a Linux client Installation step # step Download = install = "Modify configuration file =" Restart xinetd service path= "/home/opt/" #下载get () {cd $pathecho -e "Start download \n###########################" >> $path/.install.log 2>&1wget http://mathias-kettner.de/download/check_mk-agent-1.2.4p5-1.noarch.rpm >> $path/. Install.log 2>&1#http://mathias-kettner.com/download/check_mk-agent-1.2.5i6p4-1.noarch.rpmaa= ' Echo $? ' if [ $aa -eq 0 ];thenwget http://mathias-kettner.de/download/check_ mk-agent-logwatch-1.2.4p5-1.noarch.rpm >> $path/.INSTALL.LOG 2>&1ECHO -E "Download Complete! \n########################### " >> $path/.install.log 2>&1elseecho -e " Download failed! \n#### ####################### " >> $path/.install.log 2>&1echo -e " \e[1;31m Download Failed! \e[0m "Exitfi}install () {cd $path # Install echo -e " Install! \n################## ######### " >> $path/.install.log 2>&1rpm -ivh check_ mk-agent-1.2.0p2-1.noarch.rpm >> $path/.install.log 2>&1echo -e " Installation Complete! \n########################### " >> $path/.install.log 2>&1# Modify configuration file here the most important need to add CHECK_MK server ipecho -e "Modify Profile \n###########################" >> $path/.install.log 2>&1sed -i '/#only_from/a\\tonly_from = 127.0.0.1 ' /etc/xinetd.d/check_mkcat /etc/xinetd.d/check_mk | Grep only_fromcat /etc/xinetd.d/check_mk |grep only_from >> $path/.INSTALL.LOG 2>&1ECHO -E "Configuration file modification complete \n###########################" >> $path/.install.log 2> &1# Restart xinetd Service/etc/init.d/xinetd restart# set random start chkconfig xinetd on}true > $path/. install.logrpm -q xinetd >/dev/nullif [ "$?" -ge 1 ]thenecho "Installing xinetd, please wait ..." >> $path/.install.log 2>& 1yum -y install xinetd >> $path/.install.log 2>&1echo " XINETD installation Complete " >> $path/.install.log 2>&1fiif [ -d $pah ];thenif [ -f $path/check_mk-agent-1.2.0p2-1.noarch.rpm ];theninstallelsegetinstallfielsemkdir -p $path getinstallfi
Attention:
Before you execute the script, modify the
Depending on the environment, please modify the main changes in the script only_from corresponding IP, this IP is CHECK_MK server IP
After executing the script, make sure the firewall is off, or port 5665 is open
This article from "Deciduous" blog, reproduced please contact the author!
CHECK_MK Client Installation Configuration