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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

EEM Email Script Not Working

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

6 REPLIES
Cisco Employee

You never define $msg

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).

New Member

Thanks Joseph Cheers

Thanks Joseph

 

Cheers

New Member

HelloI have created the

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

 

 

 

 

Cisco Employee

Please start a new thread for

Please start a new thread for your issue.

New Member

event manager applet

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??? 

Cisco Employee

Please start a new top-level

Please start a new top-level thread for this idea.  Do not post into an existing thread as it confuses things for new users.
 

607
Views
0
Helpful
6
Replies
CreatePlease login to create content