Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

I need event manager that do: when log router show "isla 10 reachability Down->Up"

I  Trie this, but is not work!

event manager applet RETORNA-BGP-SEG-SEX
event timer cron cron-entry "*/20 18-23 * * 1-5"  ! Not work because i can use only one event
event syslog occurs 1 pattern "isla 10 reachability Down->Up"
action 1.0 syslog msg "TESTA-CRON"
action 1.1 cli command "enable"
action 1.2 cli command "conf t"
action 1.3 cli command "int lo 20"
action 1.4 cli command "shutdown"

I think need user if, but I don´t know how configure this with if!


Thanks!!!

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: I need event manager that do: when log router show "isla 10

From your cron entry it looks like you're checking it every 20 minutes between those hours. Does it shut down at all? What event are you using to bring it back up? (I'm assuming when you see it go from up to down.)

Dan,

I admit I've never used the track command in an eem applet. I'm going to play around with that today. I've always created 2 applets (one for up and one for down) and always thought there had to be a better way.

John

HTH, John *** Please rate all useful posts ***

Re: I need event manager that do: when log router show "isla 10

Just when I was reading your reply John, I realized that maybe the event track is not the best option in this case.

If Silvio wants to run the commands :

       a) if the track changes to UP between 18 and 23, then matching the logg and also the cron

       b) if the track is UP between 18 and 23 , then event track will do it.

It's just the wording.

Dan

9 REPLIES

I need event manager that do: when log router show "isla 10 reac

What are you trying to do?

HTH, John *** Please rate all useful posts ***
New Member

I need event manager that do: when log router show "isla 10 reac

When log router show isla 10 reachability Down->Up, then it put int lo20 in shutdown, but only every day at 06 pm to 11 pm!

Thanks

Re: I need event manager that do: when log router show "isla 10

Hi Silvio,

Because in order to take action you must meet 2 conditions , you must use "corellate". Also instead of matching the log from track , you can use "event track"

event manager applet name

event tag track track 1 state up

event tag timer timer cron cron-entry "* 18-23 * * *"

trigger

  correlate event track and event timer

action 1.0 syslog msg "TESTA-CRON"

action 1.1 cli command "enable"

action 1.2 cli command "conf t"

action 1.3 cli command "int lo 20"

action 1.4 cli command "shutdown"

Also if you have AAA configured, you will need to add : event manager session cli username user


Dan

New Member

I need event manager that do: when log router show "isla 10 reac

Thanks Itrie to do this!

New Member

I need event manager that do: when log router show "isla 10 reac

That you for your help!!!

Re: I need event manager that do: when log router show "isla 10

From your cron entry it looks like you're checking it every 20 minutes between those hours. Does it shut down at all? What event are you using to bring it back up? (I'm assuming when you see it go from up to down.)

Dan,

I admit I've never used the track command in an eem applet. I'm going to play around with that today. I've always created 2 applets (one for up and one for down) and always thought there had to be a better way.

John

HTH, John *** Please rate all useful posts ***

Re: I need event manager that do: when log router show "isla 10

Just when I was reading your reply John, I realized that maybe the event track is not the best option in this case.

If Silvio wants to run the commands :

       a) if the track changes to UP between 18 and 23, then matching the logg and also the cron

       b) if the track is UP between 18 and 23 , then event track will do it.

It's just the wording.

Dan

New Member

I need event manager that do: when log router show "isla 10 reac

Thats corret, it is only example!

In this case option b it corret!

But if i use a condition for exemple using a condition if or while, its possible. If yes please post a example!

Thanks

I need event manager that do: when log router show "isla 10 reac

Silvio,

I don't have an IOS that allows me to run both syslog and timers under the event clause. It's either one or the other. Double check that you don't have one overwriting the other.

"sh run | b event"

If you only have the event timer, then that's probably why your event isn't firing because it doesn't have anything to look at which is where Dan's suggestion of tracking would come in. If you have the syslog pattern, then it should be working. You could try to change your syslog pattern match like:

event syslog occurs 1 pattern "isla 10 reachability Down.*Up

Edit: I didn't read your original post close enough and noticed that you had already stated that you couldn't have two events. My apologies.

HTH,

John

HTH, John *** Please rate all useful posts ***
636
Views
5
Helpful
9
Replies
CreatePlease to create content