Step
4.
Configure the actions
to take when the event
occurs.
5.
(Optional.) Assign a
user role to the policy.
6.
(Optional.) Configure
the policy runtime.
7.
Enable the policy.
Configuring a monitor policy by using Tcl
Step
1.
Edit a Tcl script file
(see
Table 1
2.
Download the file to
the device by using
FTP or TFTP.
3.
Enter system view.
Command
•
Configure the action to execute a
command:
action number cli command-line
•
Configure a reboot action (in standalone
mode):
action number reboot [ slot slot-number
[ subslot subslot-number ] ]
•
Configure a reboot action (in IRF mode):
action number reboot [ chassis
chassis-number [ slot slot-number
[ subslot subslot-number ] ] ]
•
Configure a logging action:
action syslog priority level facility
local-number msg msg-body
•
Configure an active/standby switchover
action:
action number switchover
user-role role-name
running-time time
commit
Command
N/A
1).
N/A
system-view
Remarks
The supported Tcl version is 8.5.8.
For more information about using FTP and
TFTP, see Fundamentals Configuration
Guide.
N/A
188
Remarks
By default, a monitor policy does
not contain any actions.
Repeat this step to add a
maximum of 232 actions to the
policy.
When you define an action, you
may choose to specify a value or
specify a variable name in
$variable_name format for an
argument.
By default, a monitor policy
contains user roles that its creator
had at the time of policy creation.
A monitor policy supports a
maximum of 64 valid user roles.
User roles added after this limit is
reached do not take effect.
The default runtime is 20
seconds.
By default, CLI-defined policies
are not enabled.
A CLI-defined policy can take
effect only after you perform this
step.