1. Download check_snmp_int.pl plugin (accessory download)
2. Plug-ins are developed using Perl to determine if Perl is installed
Installation: Yum install-y perl*
Use Check_snmp_int.pl-h to view help if the following issues occur:
" Can ' t locate net/snmp.pm in @INC (@INC contains:/usr/local/lib64/perl5/usr/local/share/perl5/usr/lib64/perl5/ Vendor_prl/usr/share/perl5/vendor_perl/usr/lib64/perl5/usr/share/perl5.) At./check_snmp_int.pl Line. "
Solution: perl-mcpan-e ' Install Net::snmp '
3. Define Command
Define Command{command_name check-snmp-intcommand_line $USER 1$/check_snmp_int.pl-h $HOSTADDRESS $-C $ARG 1$ $ARG 2$}
4. Define the host and service:
Define Host{usegeneric-switchhost_namecisco3560aliascisco3560address192.168.6.254hostgroupsswitches}
define service{ use generic-service host_name cisco3560 service_description GigabitEthernet0/24 check_command check-snmp-int!public!-n ' ^gigabitethernet0/24$ ' -k -f -w 20000,50000 -c 100000,200000 }define service{ use generic-service host_name cisco3560 service_description Vlan100 check_command check-snmp-int!public!-n ' ^vlan100$ ' -k -f -w 20000,50000 -c 100000,200000 }
Note: The definition service is: The max_check_attempts parameter is recommended to be modified to 6 (default is 4), because this plug-in must run at least 3 to 4 times or more to be normal, read the data once and record in the temporary file, as follows:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7F/44/wKioL1cYaiLROoWTAAEACZkTARQ563.png "title=" 1.png " alt= "Wkiol1cyailroowtaaeaczktarq563.png"/>
To check and reload the configuration file:
Service Nagios checkconfig or:/usr/local/nagios/bin/nagios-v/usr/local/nagios/etc/nagios.cfg service Nagios Reload
Check Demo:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7F/45/wKiom1cYYk_TQBWBAAFJXqbkGZU143.png "title=" 1.png " alt= "Wkiom1cyyk_tqbwbaafjxqbkgzu143.png"/>
This article is from the "retrograde person" blog, please be sure to keep this source http://lingyi.blog.51cto.com/2837715/1766186
Nagios Monitoring Series Learning--check_snmp_int.pl monitoring switch port status and traffic