kron schedule with route flapping

How I do stop the route flapping on router without remove kron occurren, policy-list and cli ???

kron occurrence routeflap in 1 recurring
 policy-list flapping
kron policy-list flapping
 cli privilege exec level 0 no clear ip ospf process
 cli clear ip ospf process
 cli yes

thanks a lot![:)]


  • The policy really looks like it won't work actually - you may need to attach an eem script to it to properly do what you want to do. But theoretically to stop it from working you may create a CLI event detector script that intercepts "clear ip ospf process" command and does not let it run in the device.

  • Hi Petr,


    Can you give us an example of it?

  • Hello Peter,

    Here below is config that you're mean or not? Could you please advise?

    event manager applet NO_CLEAR_OSPF
     event cli pattern "clear ip ospf process.*" sync no skip yes
     action 01.0 syslog msg "NO CLEAR OSPF"

    Thanks in advance!

  • a simple little test will tell you that the cli event pattern is not enough to kick this off.  I tried several more and finally found the correct CLI pattern.  This is why there are companies out there making big business out of creating EEM patterns for other companies to use.  One of the bigger companies was founded by Cisco ex-pats.

    My first few attempts:

    cli pattern "clear ip ospf process.*| .*[0-9]+" sync no skip yes"

    cli pattern "clear ip ospf process ...*" sync no skip yes

    and a few other EEM configurations none of which worked. 

    event manager applet TEST-OSPF-3
     event syslog pattern "Reset ALL OSPF processes [no]:.*"
     action 1.01 cli command "no"
     action 1.02 syslog msg "NO CLEARING IP OSPF"


    the interesting thing was that when I was trying to create some of the EEM scripts something in there would kick off the original script??

    R5(config-applet)#event cli patter "do clear ip ospf process.*"
    R5(config-applet)#$attern "do clear ip ospf process.*" syn no skip yes      
    *Feb 12 11:55:53.269: %HA_EM-6-LOG: NO_CLEAR_OSPF: No_Clear_OSPF

    so then I thought, wait..."clear ip ospf process" isn't a cli pattern.  The correct CLI pattern would look like this:

    event manager applet TEST-OSPF-4
     event cli pattern "do clear ip ospf process.*" sync no skip yes
     action 1.01 syslog msg "NO-OSPF-TEST-4.0"

    R5(config)#do clear ip ospf process
    *Feb 12 12:03:54.045: %HA_EM-6-LOG: TEST-OSPF-4: NO-OSPF-TEST-4.0



    As for creating EEM for clearing ip ospf process from exec I don't know.  But sure am glad I figured this one out!

  • Wow! really appreciate it ... Thx.[:D]

Sign In or Register to comment.