EEM script to find a pattern and send an alert of some sort
Hello folks, can someone suggest why the script below is not returning anything? My goal is to execute 'show hsrp detail', if HSRP output contains pattern indicated below, I should be able to generate an alert somehow.
Please let me know what I am missing.
event manager applet HSRP
event syslog pattern "Standby router is unknown"
action 1.0 cli show hsrp detail
action 2.0 syslog msg HSRP ISSUE
action 3.0 cli end
This is the output I want to find pattern from:
SWITCHTEST# show hsrp detail Ethernet2/1 - Group 101 (HSRP-V2) (IPv4) Local state is Initial(Interface Down), priority 90 (Cfged 90), may preempt Forwarding threshold(for vPC), lower: 1 upper: 90 Hellotime 3 sec, holdtime 10 sec Virtual IP address is 10.17.173.1 (Cfged) Active router is unknown Standby router is unknown Authentication text "cisco" Virtual mac address is 0000.0c9f.f065 (Default MAC) 6 state changes, last state change 04:18:02 IP redundancy name is hsrp-Eth2/1-101 (default)
What you want to do is not possible on NX-OS yet. While you can get the syslog message "HSRP ISSUE" the output of the command will not display. You could store it on flash by redirecting the output to a local file, but it will not appear in the syslog message.
This is actually a pretty cool feature, i didn't even know it existed until I was looking for a solution to advertise a subnet (prefix in BGP talk), only if a certain condition existed. This is exactly what conditional advertisements does
j ai une question j ai achete un routeur cisco 887VA-k9 , je le configuré avec la configuration ci- dessous
si je le lier avec mon pc portable sur l un de ses ports directement ça marche toute est bien ( la connexion internet + m...
Attached policy provides CLI access to the Cisco 4G router over text messaging. Two files are in the attached .tar file:
2. PDF with instructions on how to load and use the .tcl file.