1,下载流量监测插件,上传到被监控主机的/usr/local/nagios/libexec/目录下

2,修改被监控主机的nagios配置文件

vim nrpe.cfg

command[check_traffic]=/usr/local/nagios/libexec/check_traffic/check_traffic.sh -V 2c -C coocaa -H 127.0.0.1 -I 3 -r -w 50-2000,250-3000 -c 20-3000,100-3500 -K -b

3,重启nrpe进程

4,在监控服务端上修改服务监控配置文件

vim service_templates.cfg

define service{
        use                                   day-service
        host_name                      adAnalyze
        service_description         adAnalyze_traffic_eth1
        check_command             check_nrpe!check_traffic
        }

5,重启nagios服务