cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1728
Views
0
Helpful
3
Replies

ENV_Variable errors

Todd Martin
Community Member

I have the following config:

track 74 ip sla 74

ip sla logging traps

!

ip sla 74
 tcp-connect 2.2.1.1 179 source-ip 1.1.1.1
 timeout 30
 frequency 10
ip sla schedule 74 life forever start-time now

!

event manager applet DODIN_BGP_PEER_DOWN
  event syslog pattern "state Up->Down"
  action 1.0 info type routername
  action 2.0 syslog msg A_DODIN_BGP_PEER_On "$routername"_IS_UNREACHABLE

 

when the event is triggered, I get an error message

HA_EM-3-FMPD_UNKNOWN_ENV:could not find environment variable:routername

HA_EM-3-FMPD_ERROR: Error executing applet DODIN_BGP_PEER_DOWN statement 2.0

what am I Missing?  appreciate quick response, need a solution deployed by Friday.

 

TM

 

 

 

1 Accepted Solution

Accepted Solutions

The entire msg should be wrapped in a pair of " " and not two pair.  The variable $_info_routername does not get wrapped in its own "".

 

This should work as well.

action 2.0 syslog msg "A_DODIN_BGP_PEER_On $_info_routername _IS_UNREACHABLE"

 

 

View solution in original post

3 Replies 3

Dan Frey
Cisco Employee
Cisco Employee

action 2.0 should replace $routername with:  $_info_routername

Thanks for your response.

I tried all of the following with no success

action 2.0 syslog msg "A_DODIN_BGP_PEER_On"$_info_routername"_IS_UNREACHABLE"

action 2.0 syslog msg "A_DODIN_BGP_PEER_On$_info_routername_IS_REACHABLE"

 

This one works by placing the varable on the end ....

 action 1.2 syslog msg "A_BGP_PEER_FAILED_ON_$_info_routername"

This achieves the desired affect So I plan to run with this one.

Thanks Again.

The entire msg should be wrapped in a pair of " " and not two pair.  The variable $_info_routername does not get wrapped in its own "".

 

This should work as well.

action 2.0 syslog msg "A_DODIN_BGP_PEER_On $_info_routername _IS_UNREACHABLE"