cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3482
Views
0
Helpful
15
Replies

How do I combine multiple attributes in SYSLOG message and set environment variables?

ryan.chaney
Level 1
Level 1

I have written a simple EEM script to poll an OID which records the ADSL sync speed and generates a syslog if it falls below 4Mbit.

event manager applet ADSL_SPEED

event snmp oid 1.3.6.1.2.1.10.94.1.1.2.1.8.11 get-type exact entry-op lt entry-val "4000000" poll-interval 1800

action 1.0 syslog priority notifications msg "ADSL sync speed has fallen below 4Mbps"

I would like to do is to improve on this and have the syslog message log the current sync speed, current noise margin and number of interface flaps on the DSL interface, such as:

"Current ADSL speed is X Mbps, Noise Margin is Y DB,  Z WAN interface resets since counters last cleared"

How can I combine these 3 things in one SYSLOG message?

I would also like to see the same output when I login to the router. How can I set this as a banner?

action x.0 cli command "banner motd Current ADSL speed is (??) Mbps, Noise Margin is (??) DB,  (??) WAN interface resets since counters last cleared"

How do I set the variables to use here?

Thanks in advance.

Ryan

15 Replies 15

\x0a is an ASCII code, just the hex numbering of it.  Octal should also work (i.e., \012).