Hi
I noticed that ISR-G2 with IOS can support the subjected function. Actually, I build a function on ISR-G2 with EEM Applet to monitor local interface status. If syslog returns interface down then it will telnet to other device to no shut interface as network resiliency
event manager applet TSET
event syslog pattern "Line protocol on Interface.*changed state to down"
action 1.0 regexp "Interface ([^,]+), changed state to down" "$_syslog_msg" match intf state
action 2.0 syslog msg "$intf is down"
action 3.0 cli command "enable"
action 3.1 cli command "config t"
action 3.2 cli command "interface $intf"
action 3.3 cli command "shut"
action 4.1 cli command "telnet 2.2.2.2" pattern ">"
action 4.2 cli command "enable" pattern "Password:"
action 4.3 cli command "cisco" pattern "#"
action 4.4 cli command "config t" pattern "#"
action 4.5 cli command "inter $intf" pattern "#"
action 4.6 cli command "no shu" pattern "#"
action 4.7 cli command "end" pattern "#"
But when I move to N3K, it seems N3K doesn't provide "regexp", instead it provides "Python" engine. Can someone give me hints to perform such function call on N3K by translating my code on EEM Applet to EEM Python or VSH on NXOS?
Tks
Leon