Nagios Monitoring Series Learning--check_snmp_int.pl monitoring switch port status and traffic

Source: Internet
Author: User
Tags snmp

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.