HP MSR2000/3000/4000 Router Series Network Management and Monitoring Command Reference
259
sync: Enables the system to execute the command that triggers the event only if the policy has been
executed successfully.
execute: Triggers the policy when a matching command is entered.
help: Triggers the policy when a question mark (?) is entered at a matching command line.
tab: Triggers the policy when the Tab key is pressed to complete a parameter in a matching command
line.
pattern regular-exp: Specifies a regular expression for matching commands that trigger the policy. For
more information about using regular expressions, see Fundamentals Configuration Guide.
Usage guidelines
Use CLI event monitor policies to monitor operations performed at the CLI.
You can configure only one event for one 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 interface 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 interface
# Configure a CLI-defined policy to monitor the use of the Tab key at command lines that contain the
interface 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 interface
# Configure a CLI-defined policy to monitor the use of the question mark (?) at command lines that
contain the interface 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 interface
event hotplug
Use event hotplug to configure a hotplug event for a CLI-defined monitor policy.
Use undo event to delete the event in a CLI-defined monitor policy.
Syntax
MSR2000/MSR3000:
event hotplug slot slot-number [ subslot subslot-number ]
undo event
MSR4000:
event hotplug slot slot-number [ subslot subslot-number ]