[j-nsp] Shutdown an interface based on CRC errors
Phil Shafer
phil at juniper.net
Fri Feb 12 20:29:45 EST 2016
Robert Hass writes:
>I'm looking for function which can shutdown an interface if CRC error
>threshold will be overdraft. Is any existing command for this in JunOS for
>MX and EX platforms ?
I'm not an SNMP hacker (and I don't play one on TV) but RMON can get
you half way there. Tell SNMP to monitor the variable using something like:
[edit snmp rmon]
alarm 1 {
interval 10;
variable etherStatsCRCAlignErrors.515;
sample-type absolute-value;
rising-threshold 10000;
falling-threshold 500;
rising-event-index 1;
}
event 1 {
type log;
}
Then put an event scirpt for a trigger:
[edit event-options]
policy monitor-crc {
events snmpd_rmon_eventlog;
then {
event-script monitor-events.slax;
}
}
But I've not been able to find out what the actual event looks like. The
online help says:
phil at cli> help syslog SNMPD_RMON_EVENTLOG
Name: SNMPD_RMON_EVENTLOG
Message: <syslog-subtag><delimiter><message>
Help: RMON event completed
Description: The indicated remote monitoring (RMON) event completed.
Type: Event: This message reports an event, not an error
Severity: warning
Facility: LOG_DAEMON
which isn't really great. I'd assume the $$.message has what you
need encoded in a text string, but you'll need to get a sample to
be sure.
Then build an RPC to deactive the specific interface and commit it.
You might even be able to do this direct in the event policy using
simple commands.
Thanks,
Phil
More information about the juniper-nsp
mailing list