08-30-2021 12:41 PM
Hello! I'm trying to write an event manager to trigger on interface down events, but although the docs say there's an interface event, it doesn't seem to be implemented on N9300s. Any suggestions or workarounds? Thanks, Dan
n9348-b200(config)# event manager applet TEST
n9348-b200(config-applet)# event ?
cli Create a cli event specification
counter Create a counter event
fanabsent Create fanabsent event specification
fanbad Create fanbad event specification
fib FIB related event
gold Create a 'Diagnostic' event specification
internal-link-flap Create a 'internal-link-flap' event specification
memory Create memory thresholds event specification
module Create a 'module' event specification
module-failure Create a 'module-failure' event specification
neighbor-discovery Show CDP new neighbors
oir Create Online-Insertion-Removal event specification
policy-default Use the event in the system policy being overridden
poweroverbudget Create poweroverbudget event specification
snmp Create a 'snmp' event specification.
storm-control Create a storm control event specification
syslog Create a syslog event specification
sysmgr System manager related events
tag Event tag identifier
temperature Create temperature event specification
test Create a 'test' event specification
track Create a 'track' event specification
08-30-2021 01:57 PM
You can use syslog and match on "interface EthernetX/Y is down" log message.
Stay safe,
Sergiu
08-30-2021 02:55 PM
Sergiu:
Thanks for the suggestion. I’m hoping this will do the trick, and that action cli will actually call guestshell to run a script:
event manager applet E51-DOWN
event syslog pattern "IF_DOWN_NONE: Interface Ethernet1/51"
action 1 cli guestshell run /home/admin/e51-flaps.sh
#cat e51-flaps.sh
date >> /home/admin/e51-flaps.log
with the syslog messages looking like:
2021 Aug 30 16:59:58 111m-n9348 %ETHPORT-5-IF_DOWN_NONE: Interface Ethernet1/51
Dan
08-31-2021 02:37 AM - edited 08-31-2021 02:39 AM
You can also test the EEM script using "event manager run <eem-policy-name>" command.
Or, you can change the catching text to "VSHD_SYSLOG_CONFIG_I: Configured from vty" and you simply enter in config mode and then exit back to exec model.
Nexus-1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Nexus-1(config)# exit
Nexus-1# 2021 Aug 31 09:13:28 Nexus-1 %VSHD-5-VSHD_SYSLOG_CONFIG_I: Configured from vty by .....
Stay safe,
Sergiu
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide