cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2212
Views
5
Helpful
3
Replies

eem: "event cli match" don't match on config commands

alois.heilmaier
Level 1
Level 1

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 ?

 

1 Accepted Solution

Accepted Solutions

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.

 

View solution in original post

3 Replies 3

Joe Clarke
Cisco Employee
Cisco Employee

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.

Thank's. I called my cisco Partner. They will open a case.

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.