04-21-2018 01:18 PM - edited 03-01-2019 06:32 PM
I try to catch a bad config command on nexus5k.
I tried an eem applet.
event manager test description "catch bad trunk config line" event cli match "switchport trunk allowed vlan [0-9].*" action 1 cli local sen * hey please use the add parameter
It seems to me the match statement does not work on config commands.
I tried some variants, but config commands are not catched for event triggering.
event cli match "*switchport*" # no success
event cli match "show version" # success
Any suggestions ?
Solved! Go to Solution.
04-25-2018 12:51 AM
Hi, following match Statement works:
event cli match "conf t ; interface * ; switchport *"
Seems that the whole cli context has to be in the match Statement.
04-22-2018 10:14 AM
Config commands should be matched, but I do not have a N5K with which to test. I do not see anything wrong with your initial regex. You might try matching on "switchport" without any metacharacters (*switchport* is an invalid regex) to see if any config command matches.
If it's not working I recommend you open a TAC case as this sounds like a bug.
04-23-2018 07:59 AM
04-25-2018 12:51 AM
Hi, following match Statement works:
event cli match "conf t ; interface * ; switchport *"
Seems that the whole cli context has to be in the match Statement.
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