1,下载流量监测插件,上传到被监控主机的/usr/地方/nagios/libexec目录下
2,修改被监控主机的nagios配置文件
vim nrpe.cfg
命令[check_traffic]=/usr/地方/nagios/libexec/check_traffic/check_traffic。sh - v 2 c - c coocaa - h 127.0.0.1 3 - r - w - 50 - 2000, 250 - 3000 - c 20 - 3000, 100 - 3500 - k - b
3,重启nrpe进程
4,在监控服务端上修改服务监控配置文件
vim service_templates。cfg
定义服务{
,,,,,,,use ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,当天服务
,,,,,,,host_name ,,,,,,,,,,,,,,,,,,,,, adAnalyze
,,,,,,,service_description ,,,,,,,, adAnalyze_traffic_eth2
,,,,,,,check_command ,,,,,,,,,,,, check_nrpe !check_traffic
,,,,,,,}
5,重启nagios服务
附件:http://down.51cto.com/data/2365532