Search code examples
scriptingtclcisco

How to trigger cisco EEM when match 3 times same log on same LC?


E.g:

Router will report similar log on different LC as follow, A/B/C should variable:

0/3/cpu0: alarm report "C"
0/1/cpu0: alarm report "A"
0/2/cpu0: alarm report "B"
0/3/cpu0: alarm report "C"
0/1/cpu0: alarm report "A"
0/1/cpu0: alarm report "A"

I want to use cisco EEM+TCL to do something, and trigger condition should same alarm happened 3 times on same LC. As above messages, 0/1/cpu0 will trigger EEM. I think can use "occurs" keyword in EEM, due to similar alarm as above "alarm report" at different LC, so don't know how to defined that...

Follow trigger condition not match my demand:

::cisco::eem::event_register_syslog pattern "alarm report" occurs 3 period 60 maxrun 300"

Solution

  • I had resolve the question, please check my blog for detail info:

    http://www.zhaocs.info/do-action-by-eemtcl-after-the-log-happen-x-times-in-y-lcrsp-at-asr9k.html

    enter image description here