How to access an url when interface has down for 5 minutes and will send an email if it has up before 5 mins (will not access url)

I've tried this one before and it works, but the problem is, I would like to use full tcl, do I need 3 tcl script to do that? And is there another way to implement that 5 minutes problem? Because it looks a bit brute force to cancel the trigger occurs...
#event manager directory user policy "flash:/Test"
#event manager policy test.tcl
#test.tcl already contain the http::get
event manager environment _email_from [email protected]
event manager environment _email_to [email protected]
event manager environment _email_server [email protected]
event manager environment _email_cc [email protected]
event manager applet one
event syslog pattern "Line protocol on Interface GigabitEthernet0/0, changed state to down"
action 1.0 cli command "enable"
action 1.1 cli command "show clock"
action 2.0 mail server "$_email_server" to "$_email_to" from "$_email_from" cc "$_email_cc" subject "Test" body "$_cli_result"
event manager applet two
event tag e1 syslog pattern "Line protocol on Interface GigabitEthernet0/0, changed state to down"
trigger occurs 1 delay 60
 correlate event e1
action 1.0 cli command "enable"
action 1.6 cli command "tclsh flash:/Test/test.tcl"
event manager applet three
event syslog pattern "Line protocol on Interface GigabitEthernet0/0, changed state to up"
action 1.0 cli command "enable"
action 1.1 cli command "configure term"
action 1.2 cli command "event manager applet two"
action 1.3 cli command "no trigger occurs 1 delay 60"
action 1.4 cli command "trigger occurs 1 delay 60"
action 1.5 cli command "correlate event e1"
action 2.0 mail server "$_email_server" to "$_email_to" from "$_email_from" cc "$_email_cc" subject "Test" body "$_cli_result"

Okay, that clarifies things.  You will want multiple policies for this.  You can take that previous Tcl policy I posted in my last reply and change the event detector line to:
::cisco::eem::event_register_timer countdown time 300
Call this Tcl policy tm_access_url.tcl.
Then, your other policies will be:
event manager applet intf-down
 event syslog pattern "Line protocol on Interface GigabitEthernet0/0, changed state to down"
 action 1.0 cli command "enable"
 action 1.1 cli command "show clock"
 action 2.0 mail server "$_email_server" to "$_email_to" from "$_email_from" cc "$_email_cc" subject "Test" body "$_cli_result"
 action 3.0 cli command "config t"
 action 4.0 cli command "event manager policy tm_access_url.tcl"
 action 5.0 cli command "end"
Your other applet will be:
event manager applet intf-up
 event syslog pattern "Line protocol on Interface GigabitEthernet0/0, changed state to up"
 action 1.0 cli command "enable"
 action 1.1 cli command "show clock"
 action 2.0 mail server "$_email_server" to "$_email_to" from "$_email_from" cc "$_email_cc" subject "Test" body "$_cli_result"
 action 3.0 cli command "config t"
 action 4.0 cli command "no event manager policy tm_access_url.tcl"
 action 5.0 cli command "end"

Similar Messages

  • I have an iMac, and have a Verizon DSL account. Recently, my Mac Mail keeps requesting the passwords on my account every few minutes, and will not allow me to send messages using Mac Mail. I cannot edit the outgoing server; how can I send emails?

    I have an iMac, and have a Verizon DSL account (3 email addresses). Recently, my Mac Mail keeps requesting the passwords on my accounts every few minutes, and will not allow me to send messages using Mac Mail (the message says that the outgoing server was rejected. I cannot edit the outgoing server, and the keychain will not save my passwords (the ports are valid). How can I change the outgoing server to send emails, and how can I avoid having Mail request my passwords every 2 minutes? Verizon, as usual, will not provide support to iMacs.

    Is there an email saved in your drafts or outbox folder?  I suspect that Mail is continually trying to send it, and each time Google is rejecting the email message.
    You can open the message and then delete it from your Outbox folder.  Then try removing all @gmail email addresses from it and seeing whether you can send to the other folks.  I suspect that will work.
    With email, if an SMTP server *can* verify email addresses, sometimes it will and it will refuse to send messages.  If a message has to be relayed across servers, no verification is done, and you'll get a bounce if an email address is bad.

  • How do i fix my 3gs that is stuck in recovery mode and will not restore?

    how do i fix my 3gs that is stuck in recovery mode and will not restore?

    well if it's in recovery mode, all of the data is already gone. this article mey help you get it working again: http://support.apple.com/kb/HT1808

  • TS2771 on i pod touch the orientation does not change when I turn it on it's side when using safari etc.  When viewing youtube it only displays widescreen and will not display portrait , anyone any ideas? is this a fault or do all ipod touch do this?

    On i pod touch the orientation does not change when I turn it on it's side when using safari etc.  When viewing youtube it only displays widescreen and will not display portrait , anyone any ideas? is this a fault or do all ipod touch do this?

    The user guide says:
    Movies viewed in Videos and YouTube appear only in landscape orientation. Street views in Maps
    also appear only in landscape orientation.
    Do you have the scree orientation lock turned on? If on there is a circular arrow icon with a padlock inside next to the battery charge icon in the upper right.

  • Ipad 2 locked up when updating iOS 8.1.3 today and will not reset or even turn off

    went to update iPad 2 from iOS 8.1.2 to 8.1.3 and it froze while updating.  Then error it could not update because of problem.  But it is locked on screen with cord to iTunes and will not reset or turn off.  Can't get to screen to do reset in iTunes or anything.  help

    Please tell me that it has NEVER been jailbroke.  If it has never been jailbroke, here are some standard repair procedures:
    First, try a system reset.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  It could take well over an hour!  Connect via cable to the computer that you use for sync.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow the on-screen directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."
    At the end of the basic Restore, you will be asked if you wish to sync the iPad/iPod.  As before, say "yes."  Note that that sync selection will disappear and the Restore will end if you do not respond within a reasonable time.  If that happens, only the apps that are part of the IOS will appear on your device.  Corrective action is simple -  choose manual "Sync" from the bottom right of iTunes.
    If you're unable to do the Restore (or it doesn't help), go into Recovery Mode per the instructions here.  You WILL lose all of your data (game scores, etc,) but, for the most part, you can redownload apps and music without being charged again.  Also, read this.

  • What do I need to do to power off my Ipad.  It has a message on the screen that it has not been backed up by icloud for two weeks and will not respond to anything.

    I charged my Ipad last night and this morning there was a message from icloud that it has not been backed up for two weeks.  I tried to click the ok but it will not respond.  I cannot even power off the Ipad.  Does anyone know what I should do?

    A reset should help. Tap and hold the Home button and the On/Off button at the same time for approximately 10-15 seconds, until the Apple logo reappears. When the logo appears, release both buttons and await restart. No content will be affected.

  • HT204053 How do I get into my IPad when ICloud has not been used for 11 weeks and will not let me into my IPad to Backup?

    Apple Support does not seem to be available here in Mexico...given phone numbers don´´t work.  No local Apple Store.  Meanwhile my IPad refuses to open, even allow me to connect to WiFi until I update my ICloud...which can´t be done till I´m connected to WiFi...chicken and egg story.

    Welcome to the Apple Community.
    You might try a forced shutdown to begin with, hold down the top and home buttons together until the device shuts down, then restart it.

  • TS3988 How do I stop my Calendar moving to server account seems stuck and will not complete. Force Quitting changes nothing?

    I have just added I cloud to my PC and my Calendar is stuck trying to move to server account.
    It has shown a couple of failure messages but I cannot access preferences as ther are greyed out.
    What can be done to stop calendar trying to upgrade?

    I am having the same issue.  I am on MacOS 10.9 and the "genius" at the Apple Store deleted all my events on iCloud and attempted to re-upload them but the Calendar app has been in limbo, "Moving calendars to server account" for days.
    If I quit the Calendar app and start it back up it immediately resumes uploading.  So currently my Calendar app is unusable.
    I would like to do 2 things.  First, get it to stop moving events to iCloud.  And second, find out how I can sync Calendar events from my Mac (running OS 10.9) and my iPhone 5S.
    The reason why the Apple 'genius' was trying to clean out my events from iClous and re-upload them was because despite having iCloud turned on for Calendars on both my Mac and iPhone, they were still not syncing all my events.

  • My iPod Touch has been locked out for 22 million minutes, and will not let me restore it?

    I hadn't used my iPod in at least a few weeks prior to turning it on and charging it. After I did, it gave me a notification that said, "Disabled for 22, 311, 091 minutes." So I looked into it and decided to restore my iPod using iTunes on my computer. However, after attempting to restore it, it told me that I would have to enter a passcode on it. I do not have any access to other computers, and it won't connect to the Internet to use Find My iPhone unless I used voice command to access FaceTime -- which only works when it is unlocked. I know the password, but I really don't want to wait for a month or so to access it. How do I fix this?

    Disabled
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Forgot passcode or device disabled
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: Back up and restore your iOS device with iCloud or iTunes       
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        
    If problem what happens or does not happen and when in the instructions? When you successfully get the iPod in recovery mode and connect to computer iTunes should say it found an iPod in recovery mode.

  • When I shut down firefox 6.0 it will not let me open it back up untill I reboot. I have vista 64bit

    have hp pavilion

    Please provide a crash id or stacktrace -> https://developer.mozilla.org/en/How_to_get_a_stacktrace_for_a_bug_report
    Does the issue still occur if you start Firefox in Safe Mode? http://support.mozilla.com/en-US/kb/Safe+Mode
    How about with a new, empty profile? http://support.mozilla.com/en-US/kb/Basic%20Troubleshooting#w_8-make-a-new-profile

  • When i hold down any key my cursor will not move at the same time and i need help!

    the title says it all, its a major problem while gaming and i would appriciate suggestions on how to fix

    Model of a laptop? And are you sure that you're not trying to play games on a touchpad? Are you using an external usb mouse?

  • I am trying to upgrade to the layest version of firefox on my Mac laptop. When I drag the Icon to the App Folder , I get a message that says I do not have permissions for certain items and will not let me install. I am logged on as a administrator.

    I am currently using firefox 3.0.19 '''bold text'''

    * Download a new copy of the Firefox program: http://www.mozilla.com/firefox/all.html
    * Trash the current Firefox application to do a clean (re)install.
    * Install the new version that you have downloaded.
    Your profile data is stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder], so you won't lose your bookmarks and other personal data.

  • Pages auto corrects words when I don't want it to and will not accept my word the way I want it spelled.

    I am writng a paper and I have spelled someones name the correct way but pages keeps auto correcting it to something else. I have retyped the name over and over again but pages keeps changing it back to the word it thinks it is suppost to be. I have made sure the spelling features are all turned off. I can't figure out what to do. I am about to throw the stupid thing out the window. : )

    finally figured it out nevermind.

  • When I run an Utilities check on the HD. I always get a prompt-SUID System/Library/CoreS has been modified and will not be repaired. how can i access this to be repaired. Most files are corrupted by messages that they are one thing but should be another

    When I  run a system utilities check and select HD. i always get a prompt the the SUID System/Library/CoreS has been modified and will not be repaired. How can I access this file so that I may repair it? Left unrepaired . There are a lot of files that do not have the correct code. They are one thing but should be another

    Hello there, toestothenose.
    It seems that you may not have gotten the entire message into your thread here, but the following Knowledge Base article offers a good resource on which messages from Disk Utility's Repair Disk Permissions can be safely ignored:
    Mac OS X: Disk Utility's Repair Disk Permissions messages that you can safely ignore
    http://support.apple.com/kb/ts1448
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • HT2534 When I try to set up an Apple ID, it's asking for a credit card, and there is no "None" option, like this page suggests. How can I bypass this? This iPad is for a younger child who has no credit card, and will not need to make any purchases.

    When I try to set up an Apple ID, it's asking for a credit card, and there is no "None" option, like this page suggests. How can I bypass this? This iPad is for a younger child who has no credit card, and will not need to make any purchases.

    You can create an iTune and App Store account without credit card details
    1. Sign out of current Apple ID if you are sign-in to one (important)
    2. Go to App Store and select a free app
    3. Tap INSTALL APP
    4. Create New Apple ID
    5. Confirm Your Country
    6. Agree with Terms and Conditions
    7. Fill in your Apple ID and Password (you must create a new Apple ID; don't use your old Apple ID)
    8. Create and answer your secret question
    9. Select NONE for Payment Method
    10. Fill in Billing Address
    11. Submit application for new Apple ID
    12. Wait for verification email
    13. When email arrive, verify your account
    14. Start downloading your free apps

Maybe you are looking for

  • Logic Studio comes with quicktime 7 Pro.   where is it?

    as the box indicates in the "contents" section beside the requirements section in the top side of the box, it gives the list of all the softwares that come with logic studio (e.i. logic pro, soundtrack pro2, waveburner, compressor... blah blah blah a

  • Plot scale associatio​n

    is this possible: I have a graph, it has multiple y-scales.... several on the left side of the graph and several on the right, I display only 2 at a time, it's basically a dual y-scale plot with selectable y-scales... I do this using property nodes a

  • How do I save *complete* KDE4 and x config?

    I've always had trouble getting a global view of DE configuration, x configuration, etc. For now, I've got KDE4.2 looking and behaving exactly as I want, which is not always the case. What do I need to back up in order to restore this if and when som

  • Syntax to call a report

    Hi , I want to know the syntax to call a Oracle Reports from my browser. I'm on OAS 10gr2 on Windows 2008 server with reports 10gr2. My reports are in "e:\rapports\" Thanks

  • HT4059 faild to load book because request sorce is missing. How can I fix this?

    When ever I try to open a book it says failed to load sorce because request is missing. Please help