UBR EEM script resetting the modem

Hello,
I'm trying to find a way to perform some action on cable modem basing on syslog event. Let's take an example: I'm getting the following message in the syslog:
%UBR10000-5-UNREGSIDTIMEOUT: CMTS deleted unregistered Cable Modem XXXX.YYYY.ZZZZ
Now, I'd like the script to reset this modem when such event occurs (maybe it makes no sense to reset deleted modem but it's only example)
And now I'm looking for the way, how to use the event syslog message in the script and how to extract the MAC address of the modem from this line.
Being specific - how to get $MAC variable, having in mind that there's no regexp command on UBR IOS?
event manager applet modem_reset
 event syslog occurs 1 pattern "CMTS deleted unregistered Cable Modem" period 1
 action 1 cli command "clear cable modem $MAC reset"
BR,
Andrzej

Hello, Joseph,
Thanks a lot for your reply. I have followed your advice and prepare an example script, however I have an issue with extracting particular substring. This is the first time I'm fighting with TCL scripts so sorry my ignorance. Please, could you look at this and let me know what could be wrong here:
U10k#sh run | sec event
event manager environment sub4
event manager directory user policy "disk0:/"
event manager session cli username "user"
event manager applet config
event syslog occurs 1 pattern "Configured from" period 1
action 1 cli command "type $_syslog_msg | append disk0:conf_log"
action 2 cli command "show cable modem | append disk0:conf_log"
action 3 policy tcl.tcl
event manager policy tcl.tcl type user
U10k#
U10k#
U10k#
U10k#
U10k#more disk0:tcl.tcl
::cisco::eem::event_register_syslog occurs 1 pattern {Configured from} period 1
# This EEM tcl policy was generated by the EEM applet conversion
# utility at http://www.marcuscom.com/convert_applet/
# using the following applet:
# event manager applet config
# event syslog occurs 1 pattern "Configured from" period 1
# action 1 regexp "from console by [A-Za-z] on" $_syslog_msg user sub1 sub2 sub3 sub4
# action 2 syslog msg "Configuration changed by $sub4"
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*
array set arr_einfo [event_reqinfo]
set _regexp_result [regexp {from console by [A-Za-z] on} $arr_einfo(msg) user sub1 sub2 sub3 sub4]
action_syslog msg "Configuration changed by $sub4"
U10k#
U10k#
U10k#
U10k#
U10k#clear logging
Clear logging buffer [confirm]
U10k#conf t
Enter configuration commands, one per line. End with CNTL/Z.
U10k(config)#int gig
U10k(config)#int gigabitEthernet 1/0/2
U10k(config-if)#shu
U10k(config-if)#shutdown
U10k(config-if)#no shu
U10k(config-if)#no shutdown
U10k(config-if)#exit
U10k(config)#exit
U10k#sh
U10k#show logg
U10k#show logging
Syslog logging: enabled (0 messages dropped, 781 messages rate-limited, 5 flushes, 0 overruns, xml disabled, filtering disabled)
No Active Message Discriminator.
No Inactive Message Discriminator.
Console logging: level debugging, 500 messages logged, xml disabled,
filtering disabled
Monitor logging: level debugging, 0 messages logged, xml disabled,
filtering disabled
Buffer logging: level informational, 1225 messages logged, xml disabled,
filtering disabled
Exception Logging: size (4096 bytes)
Count and timestamp logging messages: disabled
Persistent logging: disabled
Trap logging: level informational, 1230 message lines logged
Log Buffer (131072 bytes):
001264: Feb 19 11:39:06.647 GMT+1: %SYS-5-CONFIG_I: Configured from console by klonex on vty1 (192.168.101.197)
001265: Feb 19 11:39:06.787 GMT+1: %HA_EM-6-LOG: tmpsys:/eem_policy/tcl.tcl: Configuration changed by
001266: Feb 19 11:39:07.167 GMT+1: %HA_EM-3-FMPD_ERROR: Error executing applet config statement 3
BR,
Andrzej

Similar Messages

  • Poor Internet Connection/Have to keep resetting the modem

    For the past two months our internet service has been terrible.  I've had numerous phone calls with Verizon tech support and had two technicians visit our house.  Needless to say, after all new wiring in our house, updating the lines outside our house, and a new modem I still have to reset the modem several times a day and then when the internet does work it is extremely slow.  The technician said my house and my neighbor's house don't even show on the grid for our local Verizon office and that the problem is somewhere between our road and their office........so how does that get fixed?  Apparently the lines are too busy and it just keeps kicking us off.  Has anyone else experienced a problem like this?  I work part time from home and rely on my internet service.  I also don't have the time to contact Verizon every single day!  Help!

    Hi country105,
    Your issue has been escalated to a Verizon agent. Before the agent can begin assisting you, they will need to collect further information from you. Please go to your profile page for the forum and look at the top of the middle column where you will find an area titled "My Support Cases". You can reach your profile page by clicking on your name beside your post, or at the top left of this page underneath the title of the board.
    Under "My Support Cases" you will find a link to the private board where you and the agent may exchange information. The title of your post is the link. This should be checked on a frequent basis, as the agent may be waiting for information from you before they can proceed with any actions. To ensure you know when they have responded to you, at the top of your support case there is a drop down menu for support case options. Open that and choose "subscribe". Please keep all correspondence regarding your issue in the private support portal.

  • I have Comcast internet, my roommates PC (with viruses) runs at the speed of light while my iMac struggles.  My iMac worked fine on other internet connections before we got our own internet.  I've reset the modem, cleaned my Mac, still nothing helps!

    As my title states, the PC works super fast and mine struggles.  We have $75 internet which goes to say that our internet is mega fast.  Before we got our personal modem, we were sniping other peoples internet in our apartment complex.  Even with a few bars of internet from AirPort, it was going faster than our internet now.  I've reset the modem, I've inserted DNS's, I've cleaned my Mac, everything I can think of.  I need help.  I called Comcast and they said it was my iMac.  I just bought this iMac in October.  It's still new to me.  Comcast says it's my iMac but I do not believe them.  My iMac runs fast, until I try to use the internet, so I know it's somehting with the internet.  Please help, it's making me regret spending $1300 on a computer

    I have asked a moderator to provide assistance, they will post an invite on this thread.
    Once you get a reply, if you click on their name, you will see a screen like this. Click on the link as shown below.
    Please do not send them a personal message, as they may not be on duty for a long time, and your message will not be tracked properly.
    There are some useful help pages here, for BT Broadband customers only, on my personal website.
    BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones.

  • Once again, service drops out, speed slows and I have to reset the modem lots

    Here are the links to the last posts/problems:
     {edited for privacy}
    4/29 reset router 5 times  had to go into the verizon management console (VMC) twice to enable router for WiFi
    4/30 reset router once
    5/2 reset router once
    5/3 connection speed dropped to 2.9 reset router 6 times
    5/4 connection speed dropped to 2.5 reset router twice
    5/6 reset router once
    5/8 reset router once
    5/9 connection speed dropped to 1.9 reset router 3 times  had to go into VMC to enable router for WiFi
    5/10 connection speed down to 1.5 reset router four times
    5/11 --today--connection speed down to 1.5 reset router 4 times--it is only 9:30 AM--four times since 7 AM? sketchy service indeed
    my original post was here
    forums.verizon.com/t5/High-Speed-Internet-DSL-and-Dial/What-s-up-quot-line-problems-quot-with-regards-to-high-speed/m-p/692388/highlight/true#M24452
    I note with irony how you will see that someone tried to contact me...but that isn't the case. I contacted them. By phone because that was what the "Chat" customer service person told me to do. This is classic case of one hand doesn't know what the other is doing. When I do get a live person on the phone ....Basically....verizon says there is a "line problem" and I wait for three days and the speed gets better for about a week, and then the speed drops off.
    They can't deliver what I am paying for. I don't have a phone, I pay for high speed internet because FIOS is unavailable. Currently as I type this....speed test says I am .9/.27...the modem tells me 1.5/.4 but it drops as well. What is the issue, Verizon?
    In addition someone on Verizon's end says...someone will call you in a few hours...which never happens. Never. More like in a day or two. If that.  
    Buyers beware....beware,,,

    Hi whit616,
    We have reopened your private support case.  Please access your case thread by following the instructions we have posted in your original public thread, HERE.
    Please note that you need to access the private thread and respond to the agents' requests.  The agents cannot begin to assist with your issue until they hear from you.

  • Can I test/reset the modem?

    I've got Tiger running on a 450 MHz B&W powermac. It has a built-in modem. When I ran it under Jaguar, I was able to fax with no difficulties, but now it tends to hang.
    I recently installed Timbuktu on it, and discovered that although the modem is recognized in System Profiler, it is not recognized as an option in Timbuktu.
    So I was wondering, is there a diagnostic app that would indicate whether or not the modem is still functioning, or perhaps something that could simply reset it, like we did way back when with external modems? I would very much like to have my faxing ability back.
    Thanks

    If, by chance, a fax-specific file got altered, corrupted, overwritten, or deleted by TB2, you might try reapplying the OS 10.4.11 combo update. Suggest you verify your hard drive beforehand, then repair permissions before and after reapplying the combo update.

  • Can't connect to the modem's server.

    Hi guys, I have a major problem.
    When ever I connect to the internet with my modem, it works. But, when I connect to internet with my router and modem, I can't connect. But I have solved my problem by resetting both, my wireless router and modem. Then after I reconfigure my wireless router all I need to do is to log into my modem's server. But I can't connect to the modem's server. I tired logging in with "admin" (being the password) but I still can't connect to it.
    I am using: Verizon Broadband Network
                     Ultra RangePlus Wireless-N Broadband Router model: WRT160N
                     Westell modem model 6100
    What is the problem? Has anyone experienced this problem before?
    Message Edited by machg on 04-11-2009 07:10 PM
    Solved!
    Go to Solution.

    You will not be able to log  into the modem as long as the router is plugged in
    You must configure the modem first to bridge mode,then plug in the router and log into it
       1.)unplug router and have only the modem in
           go to 192.168.1.1 enter
          that will take you into the verizon modem/ if you have reset the modem then your user is; admin
                                                                                                                         your password is ; password
         once you lopg into that it will ask you to change the username/password
          just type in ADMIN in all 3 blanks
    now you are logged into the modem;;;;;;go to network at the top,then network connections on the left,broadband connection ,you will then put your protocol on bridge/routed bridge,
    now go to wireless settings at the top and make sure wireless is turned on
    you have the option to set up a security key on basic security settings
    once your modem  resets then plug in your router,you are now in bridge mode and the modems connection has moved to your router.  you must restart modem and computer for everything to take effect....
    also make sure and refresh your network list on your laptop
    Hope this works 

  • Im about to reset my modem and need steps on how to setup stuff

    I'm new to these things but i forgot my acc and pass on the 192.168.1.1 to setup a pass because people keep using my wifi and it makes my internet slow like crazy. Can someone provide me proper instructions with well explained details? thanks a lot.

    OK. From this point, here's what you need to do. Before resetting your modem, see if you can obtain your Username and Password for the Verizon service, if you don't know this. It would be the same imformation used to log into your Verizon e-mail and Account area. Once you've gotten this information, locate and hold the Reset Button on your router down for 30 seconds.
    Once the modem reboots, visit http://192.168.1.1/ on a PC connected to the router using Ethernet. Be aware, you may get a Verizon welcome screen upon opening your browser. IGNORE THIS, IT IS A WALLED GARDEN WE WILL SHUT OFF. The first time you log in, it will ask you for a Username and Password. Use the username of admin and the password of password. Another screen will pop up asking you to change the password. Change the router's password to something you will remember, but is strong enough to not be easily guessed. Save the password, and then log in with your username and the new password. If you are prompted to set up a PPPoE connection, use the Username and Password from your Verizon e-mail/Account page and enter it in. If all goes well, you should see the Internet light come up Green. In some areas, you can also use any User/Pass combination on the PPPoE connection to make it work.
    From here, visit http://192.168.1.1/verizon/redirect.htm or http://192.168.1.1/verizon/redirect (whichever one works) and press the Disable button. From here, the Walled Garden as mentioned before will be shut off so that you can configure anything else, such as the Wireless settings you wish to use manually.
    I hope I covered everything, and I also hope this helps. If you do get stuck or are lost in a step, you can always reset the modem and start over, or you can let the walled garden page perform it's duty and configure the modem (so that it can connect again) for you.
    ========
    The first to bring me 1Gbps Fiber for $30/m wins!

  • Has anyone else experienced problems logging onto internet after ios7 update?  I have to go through all these resets of iPad and the modem until the iPad recognizes the home internet. It is highly frustrating.

    Experiencing difficulty logging into the home internet after iOS 7 update. It will no
    to recognize the wifi. I have to reset the iPad network settings in airplane mode and the modem each time I need to use the internet. If I'm lucky the iPad will then accept the wifi code and join the network. so frustrating!

    Greetings,
    I've never seen this issue, and I handle many iPads, of all versions. WiFi issues are generally local to the WiFi router - they are not all of the same quality, range, immunity to interference, etc. You have distance, building construction, and the biggie - interference.
    At home, I use Apple routers, and have no issues with any of my WiFi enabled devices, computers, mobile devices, etc - even the lowly PeeCees. I have locations where I have Juniper Networks, as well as Aruba, and a few Netgears - all of them work as they should.
    The cheaper routers, Linksys, D-Link, Seimens home units, and many other no name devices have caused issues of various kinds, and even connectivity.
    I have no idea what Starbucks uses, but I always have a good connection, and I go there nearly every morning and get some work done, as well as play.
    You could try changing channels, 2.4 to 5 Gigs, changing locations of the router. I have had to do all of these at one time or another over the many years that I have been a Network Engineer.
    Good Luck - Cheers,
    M.

  • I phone is keeping searching for network even if i take the Sim out and i did reset but no use also it cant make software update - and the modem firmware has no number also

    i phone is keeping searching for network even if i take the Sim out and i did reset but no use also it cant make software update - and the modem firmware has no number also

    Either your phone is broken, or it was jailbroken. You can try a DFU restore.

  • My ipod touchs location services has stopped working. I just installed a new modem to my pc could that be the problem and how to fix ? ive already reset the ipod to new status and no help. thank for any help

    my ipod touch has lost location services after i installed a new modem to my pc . it is turned on in the settings and i have even reset the ipod to new status. Any help would be appreciated thanks.

    Nothing you can do except wait until Apple adds the router to their database of routers and their location. If you or someone nearby does not have an iPhone it can take a while. There is no way to tell Apple to add a router to their database.
    iOS 5: Understanding Location Services

  • Comcast just replaced my cable modem/wireless router.  All devices connect properly except my iPhone 4.  It shows itself to be connected to the network, but it does not load any web page.  Resetting the iPhone does not solve the problem.  Any suggestions?

    Comcast just replaced my cable modem/wireless router.  All devices connect properly except my iPhone 4.  It shows itself to be connected to the network, but it does not load any web page.  Resetting the iPhone does not solve the problem.  Any suggestions?

    Thank you for your response.
    I had rebooted the router (several times, actually), to no avail.
    I do not know the answer to whether MAC filtering is enabled on the router.  Have tried to find info about that, but unsuccessfully.  Router is an Arris TG852G, supplied by Comcast.  I would be surprised if MAC filtering were the issue, since in addition to the computer, we have successfully connected several other devices to the wifi, namely an iPad, a Android phone and a Kindle Fire - all able to access internet pages through the wifi, and all without a need to add the device to a MAC address whitelist.  To add to the mystery, the Comcast tech was able to connect his iPhone 4 to my network and access web pages.  He was unable to connect my iPhone, however, after trying for some time.
    I seem to recall reading somewhere that an iPhone cannot connect to a wireless "n" router, only "b" or "g".  The Arris router is described as a n/g/b compliant router, and as noted the Comcast tech was able to connect his iPhone, so don't know why that would be the issue here.
    By the way, my iPhone does connect wirelessly to my network at home.  This difficulty is at a second home.
    Any other thoughts would be appreciated.

  • Since yesterday my Apple TV will not load the movies or tv at all. I select it from the home screen, it goes black, tries to load then goes back to the home screen. YouTube and Netflix works though.  I've reset the Apple TV and the modem. No change. help?

    Since yesterday my Apple TV will not load the movies or tv at all. I select it from the home screen, it goes black, tries to load then goes back to the home screen. YouTube and Netflix works though.  I've reset the Apple TV and the modem. No change. Any ideas what the problem is?

    Apple TV: Unable to access Movies, TV Shows, or other iTunes features after updating
              http://support.apple.com/kb/TS4526

  • My Airport Extreme and iMac appear to have the same IP address as a result of installing a new ATT modem via direct ethernet connection. How can I reset the Airport IP without disturbing the iMac setting if the iMac can't reach the Airport?

    My provider's (ATT) modem recently went bad and though I usually use an Airport Extreme connection to the modem I had to start up their new modem via a direct ethernet connection from my computer to the modem. In trying to restart my Airport to modem via ethernet connection I was told that my computer IP and Airport ID are the same and so now my computer will not connect to the Airport. How can I best get out of this situation?

    Anytime you change networking hardware, it is always a good idea to perform a complete power recycle of your networking components.
    I would recommend that you do the following as a minimum:
    Power-down the modem, AirPort base station, and computer(s).
    Disconnect the AirPort base station from the Internet broadband modem.
    While all of the devices are powered-down, perform a "factory default" reset on the base station. This will get it back to its "out-of-the-box" configuration and make setting it up much easier, especially if you use the "Assist me" process within the AirPort Utility. (ref: Resetting an AirPort Base Station or Time Capsule)
    After the base station resets, go ahead and power it back down.
    Reconnect the AirPort base station to the Internet broadband modem. For the Extreme and Time Capsule, be sure to connect the cable to the base station's WAN (circle-of-dots) port.
    Power-up the modem; wait at least 10-15 minutes to allow it adequate time to initialize.
    Power-up the AirPort base station; wait at least 5-10 minutes. Note: The AirPort's status light may continue to flash amber after it has intialized. That is because, there may be some additional configuration items necessary, like setting up wireless security, before the overall setup is completed to get a green status.
    Power-up your computer(s).
    In this basic configuration, the AirPort base station will broadcast an unsecured wireless network with a Network Name (SSID) of Apple Network NNNNNN. Network clients, connected to the base station either by wire or wireless, should now be able to access the Internet through the ISP's modem. Once Internet connectivity has been verified, you can use the AirPort Utility to configure the base station for wireless security and any other desired options. Please post back your results.

  • HT3964 Hi ,  My modem got zapped by lightning yesterday.  My iMac still was able to power on when I tried it yesterday.  Today the modem is replaced and internet is working, but now the computer will not power on.  I followed the steps to reset SMC.  Noth

    Hi ,  My modem got zapped by lightning yesterday.  My iMac still was able to power on when I tried it yesterday.  Today the modem is replaced and internet is working, but now the computer will not power on.  I followed the steps to reset SMC.  Nothing. ??

    Ouch, not much more you can do, I think you'll have to have it looked at.

  • Trying to hook up my time capsule.  Plugged in the eithnet from the extreme over to the time capsule--then plugged in the time capsule--still in amber blinking light--went back to extreme and works fine--reset the cable modem in between but that did not f

    Hoping someone can help with setting up my new time capsule.  I am just switching from my extreme to the time capsule.  I can not get the time capsule to go anywhere but to amber blinkiing.  I can go back to the extreme and interenet works fine.
    Here is what I did:
    plugged in the ethernet cable from the cable modem
    plugged in the time capsule power
    Just cycles to amber blinking -- no internet connection
    Tried pulling up the airport utility but it just shows my old extreme configuration and says that it is not supported anymore.  Do not see how to display info on the flashing light.
    I have gone back to the extreme three times and it seems to work fine.
    I also repowered the modem in between trying to get the time capsule to work

    Is this a cable modem? It has to be off for at least 20min and sometimes much longer before it will give up the old settings. You might even need to power down the cable modem overnight.
    Tell us exactly what broadband you have with what ISP and exact model of modem..
    The new TC cannot be setup without using the latest airport utility 6.3.1 or 6.3.2 and you need Lion - Mavericks to use it.
    The computer also needs to have ipv6 setup to local link on whatever you are connecting with, wireless or ethernet.

Maybe you are looking for