I am currently trying to write a manual applet that will get port information from the syslog msg and then interface into that port to do several commands.
When using even triggers, such as (event syslog pattern "xxxxx") it works fine. When I use the event none so that I can call it manually at anytime, I am not able to get the syntax right to look for the appropriate pattern.
My test applet that I am using to get the basics is as follows:
event manager applet test authorization bypass
event none
action 0010 regexp "(No Response from Client) on Interface ([A-Za-z0-9\/]+)" "$_syslog_msg" match dot1xport
action 0020 if $_regexp_result eq "0"
action 0030 puts "Port is $dot1xport"
action 0040 end
exit
When I run it and look at the log, it states that it cant locate the syslog_msg variable. I believe thats because there is no syslog_msg variable to reference since that is only to be used via trigger. So my question is, is there a way to reference this port pattern via the syslog via manual applet?