Juniper J-Series Administration Manual page 119

Juniper networks router administration guide
Hide thumbs Also See for J-Series:
Table of Contents

Advertisement

Table 45: Configuring Event Policies (continued)
Task
Flag the event to initiate an SNMP
trap when it generates a system log
message.
Define the action to be taken when
the configured event occurs.
For example, configure the Services
Router to do the following when the
event occurs
SNMP_TRAP_LINK_DOWN
for the
interface:
t1–3/0/0
1.
Execute the
show interfaces
and
t1–3/0/0
show configuration
interfaces t1–3/0/0
commands.
2.
Upload the output of the show
commands in a text file named
config.txt
to a server named
bsd2
.
NOTE: Do not include spaces, the
slash, or the percent sign (%) in the
filename.
Chapter 6: Automating Network Operations and Troubleshooting
J-Web Configuration Editor
1.
Next to Then, click Configure.
2.
Select the Raise trap checkbox.
3.
Click OK.
1.
Next to Attributes match, click Add
new entry.
2.
In the Condition list, select matches.
3.
In the From event attribute box, type
SNMP_TRAP_LINK_DOWN.interface-name
4.
In the To event attribute value box,
type
.
t1–3/0/0
5.
Click OK.
6.
Next to Then, click Configure.
7.
Next to Execute commands, click
Configure.
8.
In the Destination box, type
9.
In the Output filename box, type
.
config.txt
10.
From the Output format list, select
text.
11.
Next to Commands, click Add new
entry.
12.
In the Command box, type
interfaces t1–3/0/0
.
13.
Click OK.
14.
Next to Commands, click Add new
entry.
15.
In the Command box, type
configuration interfaces t1–3/0/0
16.
Click OK.
CLI Configuration Editor
Enter
set then
set raise-trap
1.
Set the condition to execute the event
policy only when the
SNMP_TRAP_LINK_DOWN
for the
t1–3/0/0
.
set attributes-match
SNMP_TRAP_LINK_DOWN.interface-name
equals t1–3/0/0
2.
Enter
edit then execute-commands
3.
Set the commands to be executed
when the configured event occurs:
bsd2
.
set commands show interfaces
t1–3/0/0
set commands show configuration
interfaces t1–3/0/0
4.
Set the name and format of the file
in which the output of the executed
commands is to be uploaded to a
destination server:
show
set output-filename config.txt
output-format text
5.
Set the name of the server to which
the file containing the command
output is to be uploaded:
show
.
set destination bsd2
Running Self-Diagnostics with Event Policies
event occurs
interface:
97

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents