8.nagios use check_traffic.sh monitor card traffic (transfer)

Original Address: http://blog.sina.com.cn/s/blog_6eee53080100yed4.html plug-Download: http://www.rayfile.com/files/4d6f1bb0-e591-11e0-9847-0015c55db73d/ If you fail, the plug too easy to find and download. Mail can ask me for a [email protected]: Main Steps 1, install snmpd service pack, and set the community name, add 2 system startup, deploy check_traffic.sh to nagios plugins directory to libexec and authorization oh. 3, the card detection parameters. 4, nagios command.cfg set of Command, adding two service.cfg: 1 details the specific work to install the snmpd, content is provided to install boot snmpd yum install net-snmp * snmpd.conf vim snmpd.conf modified as follows: (Note to modify bold part) com2sec notConfigUser ip community name notConfigGroup v1 notConfigUser Group notConfigGroup Group v2c notConfigUser View View SystemView SystemView included .1.3.6.1.2.1.1 included .1.3.6.1.2.1.25.1.1 Access notConfigGroup "" the any All Exact none none noauth View All included 80 .1 53 / usr / local / nagios / libexec] $ can test whether you can properly collected data (if not eligible, the community name check snmpd, and is monitored by IP, as well as whether to close selinux) [[email protected] / usr / local / nagios / libexec] $ ./check_traffic.sh -V 2c -C community name -H 10.60.30.52 -I 2 -w 1200,1500 -c 1700,1800 -K -B OK - The Traffic In is 0.37 KB, Out is 0.75KB, Total is 1.12KB The Check Interval is 1129s | In = 0.37KB;. 1200; 1700; 0; 0 Out = 0.75KB; 1500; 1800; 0; 0 Total = 1.12KB; 2700; 3500 ; 0; 0 Interval = 1129s; 1200; 1800; 0; 0 [[email protected] / usr / local / nagios / libexec] $ explained: -V snmp protocol version -C -I community name corresponding to the above parameter output -L NIC index value. Marked monitoring the corresponding card. -c alarm warning value -w 4, nagios nagios configuration increases the command.cfg # 'check_traffic' command definition define command {command_name check_traffic command_line $ USER1 $ / check_traffic.sh -V 2c -C community name -H $ HOSTADDRESS $ -I $ ARG1 $ -w $ ARG2 $ -c $ ARG3 $ -K -B} explained: -I -K first few cards alarm parameter value is set -B KB, not MB increase service.cfg define service {use generic-service; Figure 8-1 pnp drawing case: Figure 8-1

Reproduced in: https: //my.oschina.net/766/blog/211340

Guess you like

Origin blog.csdn.net/weixin_34414650/article/details/91546945