cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1524
Views
0
Helpful
2
Replies

Question about simple script

EugeneL
Level 1
Level 1

Here is a sample script

event manager applet test
 event routing network X.X.X.X/X protocol BGP
 action 1.0 syslog msg "Route $_routing_network $_routing_protocol $_routing_type $_routing_lastinterface"
 action 2.0 mail server "$_email_server" to "$_email_to" from "$_email_from" subject "$_event_pub_time:" body "$_syslog_msg"

 

I got an error in the log , actually twice

Aug 27 2015 01:49:20.734 edt: %HA_EM-3-FMPD_UNKNOWN_ENV: fh_parse_var: could not find environment variable: _syslog_msg
Aug 27 2015 01:49:20.734 edt: %HA_EM-3-FMPD_ERROR: Error executing applet test statement 2.0

Any advice is appreciated

 

 

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

$_syslog_msg is a built-in variable to the syslog event detector.  What you want is:

 

action 0.5 set msg "Route $_routing_network $_routing_protocol $_routing_type $_routing_lastinterface"

action 1.0 syslog msg $msg

action 2.0 mail server "$_email_server" to "$_email_to" from "$_email_from" subject "$_event_pub_time:" body "$msg"

View solution in original post

2 Replies 2

Joe Clarke
Cisco Employee
Cisco Employee

$_syslog_msg is a built-in variable to the syslog event detector.  What you want is:

 

action 0.5 set msg "Route $_routing_network $_routing_protocol $_routing_type $_routing_lastinterface"

action 1.0 syslog msg $msg

action 2.0 mail server "$_email_server" to "$_email_to" from "$_email_from" subject "$_event_pub_time:" body "$msg"

Thanks Joseph,

I will give it a try and let you know

Review Cisco Networking for a $25 gift card