I'd like to automatically monitor all ports on my switches and get notified whenever a port goes down. So far I have to connect to each switch manually and read out the disabled ports by hand:
show interfaces status err-disabled
I'd much prefer if ports that went down would get automatically reported to nagios. Based on my preliminary research, it appears that I need to configure snmp-traps
.
My questions:
- what are the commands that I need to execute to automatically detect
err-disabled
events and send the switch name, port name (gigabitEthernetx/y/z) as well as the reason for the error (security violation, loop detected, etc) to nagios? - do I need to configure this on each switch that belongs to a stack, or can I do this on a master switch?
You're going to have to do a bit of configuration, but there is a guide here that should work for you (http://askaralikhan.blogspot.com/2010/12/receiving-snmp-traps-in-nagios.html).
As long as you are comfortable getting snmptrapd up and running you shouldn't have any problems with following the guide.