03-07-2014 08:57 AM
Hello Support,
I have created the following script to send me an email when the cpu is high on our router:
event manager applet high_cpu
event snmp oid 1.3.6.1.4.1.9.9.109.1.1.1.1.3.1 get-type exact entry-op gt entry-val "5" poll-interval 60
action 1.01 syslog msg "------HIGH CPU DETECTED----, CPU: $_snmp_oid_val %"
action 1.02 info type routername
action 1.03 syslog msg "$msg"
action 1.04 mail server "10.45.1.40" to "carlton.patterson@skanska.co.uk" from "carlton@keyloop.co.uk" subject "$_info_routername" body "$msg"
Everything is working well apart from the body of the script.
I keep on getting the following error message:
Mar 7 16:50:27.976: %HA_EM-6-LOG: high_cpu: ------HIGH CPU DETECTED----, CPU: 24 %
Mar 7 16:50:27.976: %HA_EM-3-FMPD_UNKNOWN_ENV: fh_parse_var: could not find environment variable: msg
Mar 7 16:50:27.976: %HA_EM-3-FMPD_ERROR: Error executing applet high_cpu statement 1.03
I'm quite sure its something simple that I'm missing but I can't see it.
Any help will be greatly appreciated
Cheers
Carlton
03-08-2014 11:49 AM
You never define $msg anywhere. You need to use the "set" action to set this vairable to some value (i.e., the message you want to send).
03-09-2014 02:54 PM
Thanks Joseph
Cheers
04-15-2014 02:46 AM
Hello
I have created the following script Any change to the config will be immediatly reported to me via an msg
event manager applet configuration_change_manuell
event syslog pattern “.*%SYS-5-CONFIG_I.*”
action 1.1 cli command “enable”
action 1.2 cli command “show archive log config all”
action 1.3 syslog msg "Config has been changed"
But I have a problem:
R2#
*Apr 15 11:38:26.947: %SYS-5-CONFIG_I: Configured from console by console
*Apr 15 11:38:27.031: %PARSER-5-CFGLOG_LOGGEDCMD: User:unknown user logged command:!exec: enable
R2#
*Apr 15 11:38:27.151: %HA_EM-6-LOG: configuration_change_manuell: Config has been changed
the msg is posted but the command"show archive log config all" has not market and I get an error
"User:unknown user logged command:!exec: enable"
Any help will be greatly appreciated
04-15-2014 07:05 AM
Please start a new thread for your issue.
04-15-2014 08:33 AM
event manager applet configuration_change_manuell
event syslog pattern “.*%SYS-5-CONFIG_I.*”
action 1.1 cli command “enable”
action 1.2 cli command “show archive log config all”
action 1.3 syslog msg "Config has been changed"
I get an error with this script "User:unknown user logged command:!exec: enable"
what I have to do???
04-15-2014 08:38 AM
Please start a new top-level thread for this idea. Do not post into an existing thread as it confuses things for new users.
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