Configuring alarms Configure events to trigger alarms
Digi TransPort® Routers User Guide
685
Thi s event had suf f i ci ent pr i or i t y t o cause t he t r ansmi ssi on of t hi s emai l .
Pl ease check t he at t ached l ogs and r evi ew.
Include the output from CLI commands in the email body
You can also execute CLI commands and include their output within the email; the output from up to
10 CLI commands will be added to the body of the email. The command to be executed needs to be
entered in place of xxxxx below. To include the output from multiple commands, use the run_cmd()
function multiple times.
The run_command() function is as follows:
<%r un_cmd( " xxxxx" ) ; %>
For example,
<%r un_cmd( " at i 5" ) ; %>
<%r un_cmd( " buf s" ) ; %>
<%r un_cmd( " msgs" ) ; %>
For example, here is a template adding CLI commands:
TO: f r ed@anyco. com, j ane@anyco. co. uk
FROM: MyRout er
SUBJECT: aut omat i c emai l
MI ME- Ver si on: 1. 0
Uni t : <%smt pi d( ) ; %>
Event : <%emai l _event ( ) ; %>
Thi s event had suf f i ci ent pr i or i t y t o cause t he t r ansmi ssi on of t hi s emai l .
Pl ease check t he at t ached l ogs and r evi ew.
<%r un_cmd( " at i 5" ) ; %>
<%r un_cmd( " buf s" ) ; %>
<%r un_cmd( " msgs" ) ; %>
You can also specify an extra parameter which indicates the required priority of the event before the
command is executed. This allows events to be sent off without attachments, but if the event has an
equal or higher priority than the value of this parameter, the attachments are included. This ensures
that the attachments are not included unnecessarily with non-critical events and using up all the data
allowance on a wireless connection.
<%r un_cmd( " chkst " , " 5" ) ; %>
An example template adding CLI commands with priority values is:
TO: f r ed@anyco. com, j ane@anyco. co. uk
FROM: MyRout er
SUBJECT: aut omat i c emai l
MI ME- Ver si on: 1. 0
Uni t : <%smt pi d( ) ; %>
Event : <%emai l _event ( ) ; %>
This event had sufficient priority to cause the transmission of this email. Please check the attached
logs and review.
<%r un_cmd( " chkst " , " 5" ) ; %>
In the example above, the command chkst is executed when an event with a priority equal to or
higher than 5 is detected.