321
Usage guidelines
Use CLI event monitor policies to monitor operations performed at the CLI.
You can configure only one event for a monitor policy. If the monitor policy already contains an event,
the new event replaces the old event.
Examples
# Configure a CLI-defined policy to monitor execution of commands that contain the
dis inter brief
string. Enable the system to execute the actions in the policy without executing the command that
triggers the policy.
<Sysname>system-view
[Sysname] rtm cli-policy test
[Sysname-rmt-test] event cli async skip mode execute pattern dis inter brief
# Configure a CLI-defined policy to monitor the use of the
Tab
key at command lines that contain the
dis inter brief
string. Enable the system to execute the actions in the policy and display the
complete parameter when
Tab
is pressed at a policy-matching command line.
<Sysname> system-view
[Sysname] rtm cli-policy test
[Sysname-rmt-test] event cli async mode tab pattern dis inter brief
# Configure a CLI-defined policy to monitor the use of the question mark (?) at command lines that
contain the
dis inter brief
string. Enable the system to execute a policy-matching command line only
if the actions in the policy are executed successfully when a question mark is entered at the
command line.
<Sysname>system-view
[Sysname] rtm cli-policy test
[Sysname-rmt-test] event cli sync mode help pattern dis inter brief
event hotplug
(Centralized devices in standalone mode.) Use
event hotplug
to configure a subcard hot-swapping
event.
(Centralized devices in IRF mode.) Use
event hotplug
to configure an event to monitor a member
device for joining or leaving the IRF fabric or a subcard slot for subcard hot-swapping.
(Distributed devices.) Use
event hotplug
to configure a card hot-swapping event.
Syntax
Distributed devices in standalone mode/centralized devices in standalone or IRF mode:
event hotplug
[
insert
|
remove
]
slot
slot-number
[
subslot
subslot-number
]
undo event
Distributed devices in IRF mode:
event hotplug
[
insert
|
remove
]
chassis
chassis-number
slot
slot-number
[
subslot
subslot-number
]