91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

NRPE Transmit Commands and Parameters

發布時間:2020-07-04 15:06:16 來源:網絡 閱讀:419 作者:卍偽裝卍 欄目:移動開發

-------------------------------Monitoring Client-------------------------------


Add username for nagios system:
[root@FTP backup]# useradd -s /sbin/nologin nagios

Install the necessary plug-ins:
[root@FTP backup]# tar -xzf nagios-plugins-1.4.16.tar.gz
[root@FTP backup]# cd nagios-plugins-1.4.16
[root@FTP nagios-plugins-1.4.16]# ./configure --sysconfdir=/etc/nagios \
> --with-nagios-user=nagios \
> --with-nagios-group=nagios \
> --prefix=/usr/local/nagios

[root@FTP nagios-plugins-1.4.16]# make
[root@FTP nagios-plugins-1.4.16]# make install

Install the NRPE plugin:
[root@FTP backup]# tar -xzf nrpe-2.12.tar.gz
[root@FTP backup]# cd nrpe-2.12
[root@FTP nrpe-2.12]# ./configure --sysconfdir=/etc/nrpe \
> --with-nrpe-user=nagios \
> --with-nrpe-group=nagios \
> --with-nagios-user=nagios \
> --with-nagios-group=nagios \
> --enable-command-args \
> --enable-ssl

[root@FTP nrpe-2.12]# make all
[root@FTP nrpe-2.12]# make install
[root@FTP nrpe-2.12]# make install-daemon-config


Configure the service port number file:
[root@FTP nrpe-2.12]# vi /etc/services

#Add by Kingcraft
nrpe            5666/tcp                        # NRPE



Configuring the NRPE configuration file:
[root@FTP nrpe-2.12]# vi /etc/nrpe/nrpe.cfg

#Add by Kingcraft
server_address=172.17.3.98
allowed_hosts=172.17.3.4
dont_blame_nrpe=1
command[check_procs]=/usr/local/nagios/customexec/check_procs.sh -a $ARG1$ -w $ARG2$ -c $ARG3$



Monitoring plugin:
[root@FTP nrpe-2.12]# mkdir /usr/local/nagios/customexec
[root@FTP nrpe-2.12]# vi /usr/local/nagios/customexec/check_procs.sh

#!/bin/sh
#Author:zhai_kang,20131024
COUNT=`ps -ef | grep -v grep | grep $2 | wc -l`
PROC=`expr $COUNT - 2`
if [[ $PROC -ge $6 ]]
then
        line=`echo "Critical - PROC=$PROC"`
        RC=2
elif [[ $PROC -ge $4 ]]
then
        line=`echo "Warning - PROC=$PROC"`
        RC=1
elif [[ $PROC -ge 1 ]]
then
        line=`echo "OK - PROC=$PROC"`
        RC=0
else
        line=`echo "Unknown - PROC=null"`
        RC=3
fi
echo $line \| proc=$PROC
exit $RC


[root@FTP nrpe-2.12]# chown -R nagios:nagios /usr/local/nagios/customexec/
[root@FTP nrpe-2.12]# chmod +x /usr/local/nagios/customexec/*


Start the nrpe service:
[root@FTP nrpe-2.12]# /usr/local/nagios/bin/nrpe -c /etc/nrpe/nrpe.cfg -d






-------------------------------Monitoring Server-------------------------------


Install the NRPE plugin:
[root@RHEL5 backup]# tar -xzf nrpe-2.12.tar.gz
[root@RHEL5 backup]# cd nrpe-2.12
[root@RHEL5 nrpe-2.12]# ./configure --sysconfdir=/etc/nrpe \
> --with-nrpe-user=nagios \
> --with-nrpe-group=nagios \
> --with-nagios-user=nagios \
> --with-nagios-group=nagios \
> --enable-command-args \
> --enable-ssl

[root@RHEL5 nrpe-2.12]# make all
[root@RHEL5 nrpe-2.12]# make install-plugin

Define the monitoring command:
[root@RHEL5 nrpe-2.12]# cd /etc/nagios/objects/
[root@RHEL5 nrpe-2.12]# vi commands.cfg

#Add by Kingcraft
define command{
    command_name    check_nrpe
    command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$
}



Definition monitor file:
[root@RHEL5 objects]# vi /etc/nagios/Linuxhosts/CSV.cfg

#Add by Kingcraft
define host{
    use             linux-server,host-pnp
    host_name       CSV
    alias           CSV
    address         172.17.3.98
    }
define service{
    use                     local-service,srv-pnp
    host_name               CSV
    service_description     check_procs
    check_command           check_nrpe!check_procs!python!2!3
    }



Empowering for monitoring files:
[root@RHEL5 objects]# chown nagios:nagios /etc/nagios/Linuxhosts/*

Modify the nagios configuration file:
[root@RHEL5 objects]# vi /etc/nagios/nagios.cfg

#Add by Kingcraft
cfg_dir=/etc/nagios/Linuxhosts



Syntax checking:
[root@RHEL5 objects]# /usr/local/nagios/bin/nagios -v /etc/nagios/nagios.cfg

Restart nagios:
[root@RHEL5 objects]# service nagios restart




Verification

NRPE Transmit Commands and Parameters



向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

宝丰县| 桓仁| 德州市| 喜德县| 张家界市| 安乡县| 平原县| 图们市| 上虞市| 中西区| 廉江市| 抚顺县| 来宾市| 通州区| 淄博市| 林芝县| 定襄县| 闸北区| 东至县| 桃源县| 老河口市| 泾川县| 抚宁县| 宁国市| 郯城县| 应城市| 广宁县| 淄博市| 上虞市| 邯郸市| 榆社县| 叶城县| 津南区| 响水县| 宝鸡市| 岳池县| 远安县| 丹东市| 昭苏县| 彝良县| 右玉县|