Monitoring EIGRP using EEM

Hi,
I'm trying to create an EEM script to monitor the status of some EIGRP peers on a specific interface.  The failure detection works, the problems I have are:
- The applet trigger is syslog, unfortunately there are two peers on the interface, so I get two syslogs, and thus the applet runs twice sending two traps.  I only want one.
- I want the applet to wait for 10 minutes after it is triggered before checking the EIGRP neighbor status (in case the peer comes back up right away).  The wait 600 seconds command doesn't seem to work as the trap is sent immediately.
Any help would be greatly appreciated!
snmp-server enable traps event-manager
event manager session cli username myuserid
event manager scheduler applet thread class default number 1
event manager applet backup-link-status
event syslog pattern "%DUAL-5-NBRCHANGE"
action  90 wait 600
action 100 cli command "show ip eigrp nei | inc Tu150"
action 110 regexp " [0-9.]+ " $_cli_result result
action 120 if $_regexp_result eq 0
action 130  syslog msg "Backup path down"
action 136 end
action 140 exit

This will not work since the EEM policy will terminate after 20 seconds.  What you should do is have the first policy configure a second timer policy to do the actual check of the EIGRP neighbor state:
event manager environment q "!event manager applet backup-link-change event syslog pattern "DUAL-5-NBRCHANGE" action 001 handle-error type ignore action 002 context retrieve key EIGRPCTX variable mutex action 003 if $_error eq FH_EOK action 004  exit 0 action 005 end action 006 set mutex 1 action 007 context save key EIGRPCTX variable mutex action 008 handle-error type exit action 009 cli command "enable" action 010 cli command "config t" action 011 cli command "event manager applet backup-link-status" action 012 cli command "event timer countdown time 600" action 013 cli command "action 1.0 cli command $q enable$q" action 014 cli command "action 2.0 cli command $q show ip eigrp nei | inc Tu150$q" action 015 cli command "action 3.0 regexp $q ^V?[0-9.]+$q \$_cli_result" action 016 cli command "action 4.0 if \$_regexp_result eq 0" action 017 cli command "action 5.0 syslog msg $q Backup path is down$q" action 018 cli command "action 6.0 end" action 019 cli command "action 7.0 cli command $q config t$q" action 020 cli command "action 7.1 context retrieve key EIGRPCTX variable mutex" action 021 cli command "action 7.2 cli command $q no event manager applet backup-link-status$q" action 022 cli command "action 7.3 cli command end" action 023 cli command "end"
On action 015, that ^V? sequence is "Control+V,Control+V,?".  You will need to type that in manually.
Depending on the timing of the two syslog messages, this may not defeat the double syslog.  If not, you could change the first event line to:
event syslog pattern "DUAL-5-NBRCHANGE" occurs 2 period X
Where X is the number of seconds between messages.

Similar Messages

  • Using EEM and TCL scripts for voice

    HI all,
    I'd like to use eem to check Sip dial-peer status+interface BRI status, when sip dial-peer has no answer to invite and bri interface is down the LAN interface must be shutted down. Is it possible to avhieve it using eem? I didn't find anything for eem monitoring sip dial-peers...
    thanks
    Massimiliano

    EEM doesn't have any ability to control the data plane currently.  Therefore, there is no direct voice tie-in.  There is a way to do Tcl scripting of some voice operations (e.g. IVR scripts), but those do not relate to EEM.
    That said, if there are some show commands which provide you the data you need, you can create an EEM timer policy (i.e. one that runs periodically), parsers the show command output, and takes further action if the output contains certain patterns.  Depending on the version of IOS, this may require an EEM Tcl script, or you may be able to do it within an EEM applet.
    If you need further assistance, you will need to provide your IOS version, and the exact commands (and output) which would tell you if the SIP peer isn't getting an answer and the BRI interface is truly down (I'm imagining something like "show isdn status" for this one).
    Please support CSC Helps Haiti
    https://supportforums.cisco.com/docs/DOC-8895
    https://supportforums.cisco.com

  • HT2589 We have purchase 5 apple minis and would like them all on one account.  That way we can monitor the use of these units.  they will be used strickly for a business application.  can I use one account in itunes or must i have multiple.

    We have purchased 5 apple minis and would like them all on one account, that way we can monitor the use of these units.  They will be used strickly for a business application.  Can I use one account in itunes or must i have multiple.

    Not going to happen the way you want it to.
    When you add a gift card balance to the Apple ID, it's available for the Apple ID.
    Probably best to create unique Apple ID's for each... this will also make things easier in the future as purchases are eternally tied to the Apple ID they were purchased with.

  • I just purchased a 28" 4K monitor to use with Premiere Pro CS6 in WIndows 8.1 and the fonts are super tiny.

    No matter what settings I choose, the fonts on the display are impossibly tiny.  The menu fonts at top are readable, but everything else feels like I am taking an eye exam. 
    Is this fixable, or do I need to return the 4K monitor and fuhgedaboutit? 
    Since I am doing some shooting in 4K, I thought this monitor would make sense. 
    If in fact it can't work with PP CS6 on WIn 8.1, what is the best recommended monitor to use with PP CS6?

    Hi Hbrandado,
    hbrandado wrote:
    No matter what settings I choose, the fonts on the display are impossibly tiny.  The menu fonts at top are readable, but everything else feels like I am taking an eye exam. 
    Is this fixable, or do I need to return the 4K monitor and fuhgedaboutit? 
    Since I am doing some shooting in 4K, I thought this monitor would make sense.
    I understand your issue and I don't have a solution for you. Sorry. In Premiere Pro CC 2014, you can increase the size of the fonts in the Project panel, but not in CS6.
    hbrandado wrote:
    If in fact it can't work with PP CS6 on WIn 8.1, what is the best recommended monitor to use with PP CS6?
    You may want to ask this in ourHardware Forum.
    Lots of gear heads that can help you there.
    Thanks,
    Kevin

  • Can I hook my iphone 5 to a touchscreen monitor and use the touchscreen feature of the monitor. Would I have to use the lighting to hdmi?

    Can I hook my iphone 5 to a touchscreen monitor and use the touchscreen feature of the monitor. Would I have to use the lighting to hdmi?

    The connection of the phone to the monitor would allow you to see, but does not have the ability to translate the touch on the monitor to the phone through that cable.

  • 2nd monitor not using all available pixels

    So am I the only one having this issue? -
    I have a Mac Mini that is running Windows 7 in bootcamp.  I have 2 monitors.  My 2nd monitor is connected with an HDMI to DVI cable.  In Windows, the whole screen of both monitors is used (edge to edge, top  to bottom).  But when I switch over to Yosemite, my second monitor has about a 1 inch bar of black on both sides and a 1/2 inch bar along the top and the bottom.  This is literally unused space.
    I've talked to Apple Support several times but they don't seem to have an answer.  I get transferred to someone but each time I get cut off.  (so I gave up trying to fix this over the phone or on line chat).  There are no features or selections in the Syncmaster to adjust this.  Why does it work perfectly fine in Windows but not when I switch over to Yosemite.
    Maybe this doesn't seem like a big deal but it's so frustrating that I'm actually finding myself not wanting to use the Yosemite side.
    Does anybody have a solutio

    Sorry:
    Display TypeLCD monitor / TFT active matrix
    Diagonal Size20 in
    Aspect RatioWidescreen
    Native Resolution1600 x 900
    Pixel Pitch0.2768 mm
    Brightness300 cd/m2
    Contrast Ratio1000:1 / 15000:1 (dynamic)
    Color Support16.7 million colors
    Response Time5 ms
    Horizontal Viewing Angle170
    Vertical Viewing Angle160
    FeaturesHDCP, MagicBright 3, MagicTune
    Dimensions (WxDxH)19.1 in x 7.9 in x 14.7 in
    Weight9.7 lbs
    ManufacturerSamsung  model 2033SW

  • Blackmagic Intensity Pro......Suggest a good HDMI monitor to use..

    I am looking to buy the Intensity Pro card to go with my Song HC7 ...to allow me to capture the uncompressed HDV....
    I am also looking for a 2nd monitor to use to judge color more accurate...
    Could anybody recomend conecting a LCD monitor with HDMI conection .say a
    Sony or Lg with HDMI conections to the HDMI on the intensity card....will I get anywhere as close as say a analogue
    Sony broadcast monitor.....also will it be able to view HDV and SD via the HDMI port conected via the Intensity pro....
    2nd.... Can you convert SDI to HDMI to get it into th intensity pro....are there such beasts or am I barking up the wrong tree...
    ROB

    Thanks for the quick reply.....
    what Im trying to work out is how much better a analogue monitor like
    http://www.planetdv.net/Content/ByManufacturer/JVC/Video_Output_Monitors/JVC_TM-H150CG_15inch_ColourMonitor.asp
    JVC TM150CG connected via componants out of Intensity card..
    would be over a
    http://uk.lge.com/prodmodeldetail.do?actType=search&page=1&modelCategoryId=0102& categoryId=0102&parentId=01&modelCodeDisplay=19LS4R&model=3
    LG19LSR connected to the Intensity pro via HDMI
    Cheers and I hope the links work

  • Problem with two monitors while using Photoshop, windows move from 2nd screen to 1st screen.

    Problem with two monitors while using Photoshop, windows move from 2nd screen to 1st screen.
    I saved a new workspace and it did not help.
    No problem before I went to Maverick.

    I found the fix, go to System Preferences and open Mission Control and uncheck the box to keep monitors as they were (When switching to an application...........)

  • DOES EIGRP USE AS NUMBER/process number as it's PORT NUMBER between the routers in the same AS/group?

    in this posthttps://supportforums.cisco.com/discussion/9805551/eigrp-port-number  there is an answer which seems a little weird, the question asks about the EIGRP port number, and someone answers that "The port number is the EIGRP AS."
    I goggled all over the net but could not find any single clue about it!! is that really so, I mean DOES EIGRP USE AS NUMBER AS PORT NUMBER?
    I know stuff about routing, EIGRP,RTP and so on, please don't state the obvious and just give some link to some document on Cisco, about this subject.
    BTW there's a link under the mentioned post but it doesn't load, I don't know, anyway thank you

    in this posthttps://supportforums.cisco.com/discussion/9805551/eigrp-port-number  there is an answer which seems a little weird, the question asks about the EIGRP port number, and someone answers that "The port number is the EIGRP AS."
    I goggled all over the net but could not find any single clue about it!! is that really so, I mean DOES EIGRP USE AS NUMBER AS PORT NUMBER?
    I know stuff about routing, EIGRP,RTP and so on, please don't state the obvious and just give some link to some document on Cisco, about this subject.
    BTW there's a link under the mentioned post but it doesn't load, I don't know, anyway thank you

  • I have 9" classic ipad. may i connect ipad to separate 21" monitor and use it as main monitor?

    I have 9" classic ipad. may i connect ipad to separate 21" monitor and use it as main monitor?

    The Apple Support Communities are an international user to user technical support forum. As a man from Mexico, Spanish is my native tongue. I do not speak English very well, however, I do write in English with the aid of the Mac OS X spelling and grammar checks. I also live in a culture perhaps very very different from your own. When offering advice in the ASC, my comments are not meant to be anything more than helpful and certainly not to be taken as insults.
    You would need to find a 3rd party dispay extender app to accomplish this. The results may or may not be acceptable to you.
    http://www.macworld.com/article/1156288/imac_second_monitor.html

  • Advise on buying an external monitor to use with FCPX

    I want to buy a monitor to use with my Macbook Pro
    Any advice on what to buy if I also want to use with FCPX?
    Is the advice to get the biggest one possible!? DOH!
    Anything else?
    I don't want to buy Apple: I don't have the budget to afford
    Thanks
    Omar

    I don't think there is much point in going larger than 24" and you can get quite a few around the £120 mark on Amazon.
    Make sure it has the right connection for your MBP as there are several different ones on the market.

  • Turning off internal monitor while using external one

    Hello, Apple Support Communities.
    Before OSX Lion, anyone could turn off internal monitor while using external one, by waking up computer with lid closed, and the internal monitor will be kept turned off. But now, -I wonder what made Apple to think this way- Lion will turn on the internal one back on.
    I don't care about all sorts of reasons why should I or shouldn't I desire to this. I just want it, because I have nice big monitor, which is apparently bigger than my Macbook Pro. Besides using double monitor will just exhaust my poor laptop. -mine is bit old-
    I found ridicoulus answer from community, saying I should try fridge magnet. Sorry, but I don't want risk my whole computer, especially my HDD from getting magnetic damage. It happened so many times, -thanks my little bro- so now I am sick of magnet. I don't think Apple will cover this AKA magnetic damage anyway. -It wouldn't just damage, just erase your HDD-
    So.... Any helpful insights? Thanks.

    Nevermind. I found solution. Though it cost me 24 bucks.
    Now Apple is seriously making me to consider to roll back to sucking Windows.
    Thanks Jobs!

  • Good monitor to use with iPad Air

    Any body have their favorite  monitor to use with iPad Air?

    I wasn't aware that the iPad Air supported external monitors. Based on that, I'd have to say that the iPad Air's monitor is my favorite, by default.

  • I have an Apple Cin HD Display 23" monitor, purchased in 2006.  I use it with a old PC (2007) running Win XP.  Works fine.  Can this monitor be used with a new PC with Intel 4th gen i5 processor, running Win 8.1?

    I have an Apple Cin HD Display 23" monitor (part no. M9178LL/A), purchased in 2006.  I use it with an old PC (2007) running Windows XP.  Works fine.  Can this monitor be used with a new PC with Intel 4th gen i5 or i7 processor, running Win 8.1?

    I have an Apple Cin HD Display 23" monitor (part no. M9178LL/A), purchased in 2006.  I use it with an old PC (2007) running Windows XP.  Works fine.  Can this monitor be used with a new PC with Intel 4th gen i5 or i7 processor, running Win 8.1?

  • Using EEM to automatically put APs onto correct VLAN?

    Hi,
    I am stuck in the unfortunate situation of read-only access to my own network until I pass my CCNA.... however, in the interim I've been researching some topics.
    One of the things I came across was using EEM to fire off tclsh progams when events occur on a switch/router, or even using syslog filtering to fire off events based on certain patterns.
    It occurred to me that, using these methods, you could get devices to autoconfigure themselves. For instance, I have a WiSM on site (which yet again I have little control over ...) and although I have very little idea of how the WiSM actually works, fundamentally the problem is that when a new AP is plugged in, it needs placed into a certain VLAN and can then offer wireless access into the network.
    Of course, a Cisco WLAN AP is a CDP aware device and this got me thinking ... if you can either fire off an event using EEM on CDP adjacency changes, or alternatively enable 'debug cdp adjacency' and filter the syslog ... you could take the CDP device's name, capabilities (Trans-Bridge for an AP), and MAC address. Then the Tcl script could, after checking the name and MAC address against a list of known APs, automatically place the AP onto the appropriate vlan (a running-config change).
    Similarly, an event or syslog trap could return the port back to the access VLAN when the AP is disconnected.
    This would enable autoconfiguration of APs as and when they are plugged in.
    Before I reinvent the wheel, has anyone: a) tried this; b) succeeded?
    Thanks,
    M.

    Hmm, that looks very much like what I want.
    No doubt it is very expensive. And tclsh is free...
    Still, looks like my idea is workable - since I'm guessing that SmartPorts is using the same techniques ...
    So, has anyone ever done it for free without paying a lot for SmartPorts?

Maybe you are looking for

  • How to get the number of routes in MLS L3SW table with SNMP

    Hello experts, Is there any way to get the number of routes in the MLS-hardware Layer 3-switching table with SNMP, like with CLI command "show mls cef summary"? If possible, please let me know the OID and which MIB do I use. [e.g.] #show mls cef summ

  • Purchased Garageband, crashes after 1.6GB update

    I just purchased Garageband tonight.  On a relatively fresh install of 10.8.2, when it finishes the auxilery 1.6GB download, it crashes unexpectedly with: Thread 6 Crashed: 0   libobjc.A.dylib                         0x97692a87 objc_msgSend + 23 1  

  • Photoshop Elements Serial Number Deactivation Question

    I bought Photoshop Elements 8.0 a few years back and have been using it happily and successfully since. However, I have now run into a serial number activation problem that will not allow me to use the software. The error given is: "Our records indic

  • Folders are disappearing from my desktop I am on 10.6.8

    Folders disappeared from my desktop. All the files in a FileMaker Advanced 11 folder which was on my HD disappeared but the folder remained. Files that were on a backup server disappeared - first half, then a few days later the remaining files were g

  • Grouping error in Oracle's analytic function  PERCENTILE_CONT()

    Hi, I have a question regarding the usage of Oracle's analytic function PERCENTILE_CONT(). The underlying time data in the table is of hourly granularity and I want to fetch average, peak values for the day along with 80th percentile for that day. Fo