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

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

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
Highlighted

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
Highlighted
Hall of Fame 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.

Highlighted

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

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

Content for Community-Ad