[c-nsp] Event Manager Script
M K
gunner_200 at live.com
Wed Mar 12 11:08:03 EDT 2014
Thanks all for the kind replies , I will make another test and feed you back
BR,
Date: Wed, 5 Mar 2014 02:05:17 -0800
From: monitor64 at yahoo.com
Subject: Re: [c-nsp] Event Manager Script
To: oboehmer at cisco.com; gunner_200 at live.com; cisco-nsp at puck.nether.net
HiTry with 120 seconds delay. Also use environment variable to depicting to get email whensoever event triggers.Ami
On Wednesday, March 5, 2014 10:01 AM, Oliver Boehmer (oboehmer) <oboehmer at cisco.com> wrote:
can you just remove the "action 2.0 reload" from the script for the test so the router just spits out the syslog and then send
the logs?I noticed that the maximum "delay down" value accepted by the parser is 180 (3 minutes), maybe it didn't accept the command when you pasted it? I just tested this (with 60 sec delay), and it seems to work fine ("debug track" enabled):router(config)#Mar 5 09:53:14.230: Track: 99 Down change delayed for 60 secsMar 5 09:54:14.231: Track: 99 Down change delay expiredMar 5 09:54:14.231: Track: 99 Change #3 ip sla 99, reachability Up->DownMar 5 09:54:14.231: %TRACKING-5-STATE: 99 ip sla 99 reachability Up->DownMar 5 09:54:14.239: %HA_EM-6-LOG: reload-if-down: Reloading the router due to unreachabilityand as EEM only triggers on up->down
transition, it only takes action when the probe was up at least once. so this is good..oliFrom: M K <gunner_200 at live.com<mailto:gunner_200 at live.com>>Date: Wednesday, 5 March 2014 09:26To: Oliver Boehmer <oboehmer at cisco.com<mailto:oboehmer at cisco.com>>, "cisco-nsp at puck.nether.net<mailto:cisco-nsp at puck.nether.net>" <cisco-nsp at puck.nether.net<mailto:cisco-nsp at puck.nether.net>>Subject: RE: [c-nsp] Event Manager ScriptHi , thanks and sorry for the late replyI am facing some issues with the script , when the IP SLA is down , the router did not wait for the 5 minutes , it reloaded directly> From: oboehmer at cisco.com<mailto:oboehmer at cisco.com>> To: gunner_200 at live.com<mailto:gunner_200 at live.com>; cisco-nsp at puck.nether.net<mailto:cisco-nsp at puck.nether.net>> Subject: Re: [c-nsp] Event Manager Script> Date: Sun, 2 Mar 2014 12:33:34 +0000>>>> >Hi allI am trying to do a event manager script that will do the below and> >need some assistanceI want to ping to a specific destination and if the> >ping request
timed out for a period of for example 5 minutes , the router> >should be reloaded>> not sure whether this is a good idea or not (the router could reload> forever), here is a way to achieve the goal:>> ip sla 1> icmp-echo <destination-addr>> frequency 20> ip sla schedule 1 life forever start-time now> !>> track 1 ip sla 1 reachability> delay down 300> !> event manager applet reload-if-down> event track 1 state down> action 1.0 syslog msg "Reloading the router due to unreachability"> action 2.0 reload>> hope this helps..>> oli>_______________________________________________cisco-nsp mailing list cisco-nsp at puck.nether.nethttps://puck.nether.net/mailman/listinfo/cisco-nsparchive at http://puck.nether.net/pipermail/cisco-nsp/
More information about the cisco-nsp
mailing list