01-11-2013 01:53 AM
Hi,
I've a problem on a isdn line (in theory up all the time) and i want to test with track and event manager the state of the int bri0/0/0:1 every ten minutes and
if is down (not test state change up <=> down but only state down) make a task (reboot router or other). How test if the interface is down with track and event manager every xx minutes ? It's easy to test up => down or down => up but if no state change, i don't understand how to make that ?
thank you for you help.
01-13-2013 03:26 PM
You could poll the SNMP ifOperStatus object for this interface will a poll-interval of 600. To do this, you would need to obtain the ifIndex of the BRI0/0/0:1 interface. Test the ifOperStatus value against 2. If ifOperStatus equals 2, then the interface is down and you can reload the router or do whatever else you'd like.
01-14-2013 03:15 AM
Ok.
The Ifindex'value of int bri0/0/0:1 is 2 and ifindex'oid is 1.3.6.1.2.1.2.2.1.1 and Ifoperstatus'oid is 1.3.6.1.2.1.2.2.1.8 but what
is the relationship between this three values with the command event snmp oid....
thank you for your help...
01-14-2013 04:50 AM
Hey,
With the info from Joseph and you Davide i did try on router with this EEM :
event manager applet Monitor_Interface_Bri0/0/0:1_DOWN
event snmp oid 1.3.6.1.2.1.2.2.1.8.2 get-type exact entry-op eq entry-val 2 entry-type increment poll-interval 600
action 1.0 reload
or
event manager applet Monitor_Interface_Bri0/0/0:1_DOWN
event snmp oid 1.3.6.1.2.1.2.2.1.8.2 get-type exact entry-op eq entry-val 2 entry-type increment poll-interval 600
action 1.0 cli command " enable "
action 1.1 cli command " conf t "
action 1.2 cli command " interface Bri0/0/0:1 "
action 1.3 cli command " shutdown "
action 1.4 cli command " no shutdown "
action 1.5 cli command " exit "
action 1.6 cli command " exit "
The first one is going to restart the router and the second one is going to put the interface in shutdown state, after is going to get the interface UP from shutdown.
Hope this is going to help you.
Thank you,
Bogdan
01-14-2013 06:00 AM
Yep, both are fine.
01-16-2013 01:25 AM
Thank you for you help ! it run. (number 27 replace number 2 for ifindex bri0/0/0:1)
Currently :
event manager applet Monitor_Interface_Bri0/0/0:1_DOWN
event snmp oid 1.3.6.1.2.1.2.2.1.8.27 get-type exact entry-op eq entry-val "2" entry-type increment poll-interval 660
action 1.0 syslog msg "applet monitor interface bri : state down => reboot router"
action 2.0 cli command "show clock | append flash0:intbridown"
action 3.0 cli command "show int bri0/0/0:1 | append flash0:intbridown"
action 4.0 cli command "show controllers bri0/0/0 | append flash0:intbridown"
action 5.0 reload
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide