Nagios Monitoring Switch ports

Source: Internet
Author: User
Tags snmp

1. Download the Monitoring plugin


wget http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/check_snmp_int.pl



2. First look at all the ports that the switch is currently opening

For i in ' seq 1 ';d o/usr/local/nagios/libexec/check_snmp_int.pl-h 192.168.0.254 -C PU Blic -N "^gigabitethernet1/0/$i $";d One


3. Add Monitoring

------------------------------------------------------------------------------------------ 

Vim Hosts.cfg

Define host {

Use Generic-switch

HOST_NAME 3750m-port

Alias 3750m-port

Address 192.168.0.254

}

Define host {

Use Generic-switch

HOST_NAME 3750s-port

Alias 3750s-port

Address 192.168.0.253

}

Define HostGroup {

Hostgroup_name 3750-port

Alias 3750 Port

Members 3750m-port,3750s-port

}


------------------------------------------------------------------------------------------


Vim Commands.cfg


Define Command{

Command_name Check_snmp_int

Command_line $USER 1$/check_snmp_int.pl-h $HOSTADDRESS $-C $ARG 1$-n $ARG 2$

}


------------------------------------------------------------------------------------------


Vim Switch.cfg


Define Service{

Use Generic-service

Hostgroup_name 3750-port

Service_description gigabitethernet1/0/0

Contact_groups Admins

Check_command check_snmp_int!public! ' ^gigabitethernet1/0/[12456789]$ '

}


Reference Documentation:

Http://nagios.proy.org/snmp_int.html



Nagios Monitoring Switch ports

Related Article

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.