×

Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

Event Manager time-range applet

Unanswered Question
Apr 18th, 2012
User Badges:

Hello,


How to configure event manager so when interface Tunnel goes down the router will reload only on specific time, when the router clock is between 12 A.M and 16 A.M ?

If interface Tunnel is down and router clock is not between 12 and 16 A.M, it should not reload.


track 1 interface Tunnel0 line-protocol

delay down 180 up 30


event manager applet tunnel-down

event track 1 state down

action 1.0 cli command "enable"

action 2.0 reload"



thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (3 ratings)
Loading.
Dan-Ciprian Cicioiu Wed, 04/18/2012 - 01:39
User Badges:
  • Gold, 750 points or more

Hi Eugen,


I think that you could specify the exact time of the reload : reload at 04:01.

And you can do another applet if the interface goes UP => reload cancel.


Dan

Eugen Bitca Wed, 04/18/2012 - 02:36
User Badges:

Hi,


Tha applet should run only when the router time is between 12 and 16 AM.

If Tunnel is down and it is 17 AM the applet should not run.

Dan-Ciprian Cicioiu Wed, 04/18/2012 - 03:36
User Badges:
  • Gold, 750 points or more

Hi Eugen ,


I think that event timer together with cron entry is the solution for you.


Dan

Joe Clarke Wed, 04/18/2012 - 06:55
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

I think you want to use multiple events here:


event manager applet tunnel-down

event tag track track 1 state down

event tag timer timer cron cron-entry "* 12-16 * * *"

trigger

  correlate event track and event timer

action 1.0 cli command "enable"

action 2.0 "reload"

Eugen Bitca Wed, 04/18/2012 - 07:08
User Badges:

in this case the applet will run every minute from 12 to 16 h.

If the action 2.0 is not the command reload, but some show commands, than every minute of the specific time range the applet will run.

The apllet should run only once, if for example, the time is 13 o'clock and Tunnel is down, than do some actions.



Thanks

Joe Clarke Wed, 04/18/2012 - 07:13
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

The applet will only run if both the tunnel is down and the time is between 12 and 16.  That's what the correlate does.  Yes, if the tunnel is still down when the route reloads, it will reload again while the time window is still between 12 and 16.  It will not necessarily run every minute, though.

Eugen Bitca Wed, 04/18/2012 - 07:32
User Badges:

what if I do not use reload but some show command, than every minute the show command will run.

Dan-Ciprian Cicioiu Wed, 04/18/2012 - 07:36
User Badges:
  • Gold, 750 points or more

The same is with "reload", after reload if the interface will be down and also the time range will be 12-16 , it will reload again.


Dan

Joe Clarke Wed, 04/18/2012 - 07:39
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

No, it will not run every minute.  The track down event is an edge-trigger event.  It will only happen once when the tunnel goes down.  The tunnel would need to come back up and go down again within the 12-16 window for the policy to run again.

Dan-Ciprian Cicioiu Wed, 04/18/2012 - 07:17
User Badges:
  • Gold, 750 points or more

Eugen ,


EEM action is triggered by 2 events in this case :

          - time interval - because you want to take actions only between 12 and 16

          - tunnel interface down.


After the applet is applying the actions it will stop, it will not run just once like a daemon, it is more like a script.

So there is the need to run every minute and check if the tunnel is down.


Please correct me if i'm wrong Joseph


Dan

Joe Clarke Wed, 04/18/2012 - 07:20
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

Correct.  These are edge-triggered events.  Of course, as I said, if when the router reloads the tunnel is still down, the router will reload again (because the tunnel down event will still occur).

Actions

This Discussion