- Table of Contents
-
- 17-Network Management and Monitoring Command Reference
- 00-Preface
- 01-Information center commands
- 02-Flow log commands
- 03-Fast log output commands
- 04-NetStream commands
- 05-Sampler commands
- 06-Cloud connection commands
- 07-Mirroring commands
- 08-Packet capture commands
- 09-NQA commands
- 10-Track commands
- 11-BFD commands
- 12-Monitor Link commands
- 13-Smart Link commands
- 14-Interface backup commands
- 15-Interface collaboration commands
- 16-System maintenance and debugging commands
- 17-NTP commands
- 18-EAA commands
- 19-Process monitoring and maintenance commands
- 20-NETCONF commands
- 21-SNMP commands
- 22-RMON commands
- 23-Event MIB commands
- 24-CWMP commands
- 25-Process placement commands
- 26-GOLD commands
- 27-gRPC commands
- 28-iNQA commands
- 29-SmartMC commands (self-mesh supported)
- Related Documents
-
Title | Size | Download |
---|---|---|
18-EAA commands | 206.95 KB |
Contents
EAA commands
action cli
Use action cli to add a CLI action to a monitor policy.
Use undo action to remove an action.
Syntax
action number cli command-line
undo action number
Default
A monitor policy does not contain any actions.
Views
CLI-defined policy view
Predefined user roles
network-admin
context-admin
Parameters
number: Specifies an action ID in the range of 0 to 231.
cli command-line: Specifies the command line to be executed when the event occurs. You can enter abbreviated forms of command keywords, but you must make sure the forms can uniquely identify the command keywords. For example, you can enter dis cu for the display current-configuration command.
Usage guidelines
You can configure a series of actions to be executed in response to the event specified in a monitor policy. EAA executes the actions in ascending order of action IDs. When you add actions to a policy, you must make sure the execution order is correct. If two actions have the same ID, the most recent one takes effect.
To execute a command in a view other than user view, you must define actions required for accessing the target view before defining the command execution action. In addition, you must number the actions in the order they should be executed, starting with entering system view.
For example, to shut down an interface, you must create the following actions in order:
1. Action to enter system view.
2. Action to enter interface view.
3. Action to shut down the interface.
When you define an action, you can specify a value or specify a variable name for an argument. For more information about using EAA environment variables, see "rtm environment."
Examples
# Configure a CLI action for the CLI-defined policy test to shut down GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] rtm cli-policy test
[Sysname-rtm-test] action 1 cli system-view
[Sysname-rtm-test] action 2 cli interface gigabitethernet 1/0/1
[Sysname-rtm-test] action 3 cli shutdown
action reboot
Use action reboot to add a reboot action to a monitor policy.
Use undo action to remove an action.
Syntax
action number reboot [ slot slot-number ]
undo action number
Default
A monitor policy does not contain any actions.
Views
CLI-defined policy view
Predefined user roles
network-admin
context-admin
Parameters
number: Specifies an action ID in the range of 0 to 231.
slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, the command reboots the IRF fabric.
Usage guidelines
The reboot action configured with this command reboots devices or cards without saving the running configuration. If you want to save the running configuration, use the action cli command to configure reboot actions.
You can configure a series of actions to be executed in response to the event specified in a monitor policy. EAA executes the actions in ascending order of action IDs. When you add actions to a policy, you must make sure the execution order is correct. If two actions have the same ID, the most recent one takes effect.
When you define an action, you can specify a value or specify a variable name for an argument. For more information about using EAA environment variables, see "rtm environment."
Examples
# Configure an action for the CLI-defined policy test to reboot the specified slot.
<Sysname> system-view
[Sysname] rtm cli-policy test
[Sysname-rtm-test] action 3 reboot slot 1
action switchover
Use action switchover to add an active/standby switchover action to a monitor policy.
Use undo action to remove an action.
Syntax
action number switchover
undo action number
Default
A monitor policy does not contain any actions.
Views
CLI-defined policy view
Predefined user roles
network-admin
context-admin
Parameters
number: Specifies an action ID in the range of 0 to 231.
Usage guidelines
You can configure a series of actions to be executed in response to the event specified in a monitor policy. EAA executes the actions in ascending order of action IDs. When you add actions to a policy, you must make sure the execution order is correct. If two actions have the same ID, the most recent one takes effect.
This command does not trigger a master/subordinate switchover in either of the following situations:
· No subordinate device is configured.
· The subordinate device is not in up state.
Examples
# Configure an action for the CLI-defined policy test to perform an active/standby switchover.
<Sysname> system-view
[Sysname] rtm cli-policy test
[Sysname-rtm-test] action 3 switchover
action syslog
Use action syslog to add a Syslog action to a monitor policy.
Use undo action to remove an action.
Syntax
action number syslog priority priority facility local-number msg msg-body
undo action number
Default
A monitor policy does not contain any actions.
Views
CLI-defined policy view
Predefined user roles
network-admin
context-admin
Parameters
number: Specifies an action ID in the range of 0 to 231.
priority priority: Specifies the log severity level in the range of 0 to 7. A lower value represents a higher severity level.
facility local-number: Specifies a logging facility by its facility number in the range of local0 to local7. Facility numbers are used by a log host to identify log creation facilities for filtering log messages.
msg msg-body: Configures the log message body.
Usage guidelines
EAA sends log messages to the information center. You can configure the information center to output these messages to certain destinations. For more information about the information center, see "Configuring the information center."
You can configure a series of actions to be executed in response to the event specified in a monitor policy. EAA executes the actions in ascending order of action IDs. When you add actions to a policy, you must make sure the execution order is correct. If two actions have the same ID, the most recent one takes effect.
When you define an action, you can specify a value or specify a variable name for an argument. For more information about using EAA environment variables, see "rtm environment."
Examples
# Configure an action for the CLI-defined policy test to send a log message "hello" with a severity of 7 from the facility device local3.
<Sysname> system-view
[Sysname] rtm cli-policy test
[Sysname-rtm-test] action 3 syslog priority 7 facility local3 msg hello
commit
Use commit to enable a CLI-defined monitor policy.
Syntax
commit
Default
No CLI-defined monitor policies are enabled.
Views
CLI-defined policy view
Predefined user roles
network-admin
context-admin
Usage guidelines
You must execute this command for a CLI-defined monitor policy to take effect.
After changing the settings in a policy that has been enabled, you must re-execute this command for the changes to take effect.
Examples
# Enable CLI-defined monitor policy test.
<Sysname> system-view
[Sysname] rtm cli-policy test
[Sysname-rtm-test] commit
display rtm environment
Use display rtm environment to display user-defined EAA environment variables and their values.
Syntax
display rtm environment [ var-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
context-admin
context-operator
Parameters
var-name: Specifies a user-defined EAA environment variable by its name, a case-sensitive string of 1 to 63 characters. The name can contain digits, letters, and the underscore sign (_), but its leading character cannot be the underscore sign. If you do not specify a variable, this command displays all user-defined EAA environment variables.
Examples
# Display all user-defined EAA environment variables.
<Sysname> display rtm environment
Name Value
save_cmd save main force
show_run_cmd display current-configuration
Field |
Description |
Name |
Name of a user-defined EAA environment variable. This field displays a maximum of 30 characters. To display a user-defined EAA environment variable name of more than 30 characters, use the display current-configuration command. |
Value |
Value of the user-defined EAA environment variable. This field displays a maximum of 30 characters. To display a user-defined EAA environment variable value of more than 30 characters, use the display current-configuration command. |
display rtm policy
Use display rtm policy to display information about EAA monitor policies.
Syntax
display rtm policy { active | registered [ verbose ] } [ policy-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
context-admin
context-operator
Parameters
active: Specifies policies that are executing the actions.
registered: Specifies policies that have been created.
verbose: Displays detailed information about monitor policies.
policy-name: Specifies a policy by its name, a case-sensitive string of 1 to 63 characters. If you do not specify a policy, the command displays information about all monitor policies.
Usage guidelines
To display the running configuration of CLI-defined monitor policies, execute the display current-configuration command in any view or execute the display this command in CLI-defined monitor policy view.
Examples
# Display monitor policies that are executing the actions.
<Sysname> display rtm policy active
JID Type Event TimeActive PolicyName
507 CLI INTERFACE Aug 29 14:55:55 2013 test
Table 2 Command output
Field |
Description |
JID |
Job ID, displayed only when you specify the active keyword. |
Type |
Policy creation method: · TCL—The policy was configured by using Tcl. · CLI—The policy was configured from the CLI. |
Event |
Event type, including CLI, hotplug, interface, process, SNMP, SNMP-Notification, Syslog, and track. |
TimeActive |
Time when the monitor policy was triggered. |
PolicyName |
Name of the monitor policy. |
# Display brief information about all created monitor policies.
<Sysname> display rtm policy registered
Total number: 1
Type Event TimeRegistered PolicyName
CLI Aug 29 14:54:50 2013 test
Table 3 Command output
Field |
Description |
Total number |
Total number of the monitor policies. |
Type |
Policy creation method: · TCL—The policy was configured by using Tcl. · CLI—The policy was configured from the CLI. |
Event |
Event type, including CLI, hotplug, interface, process, SNMP, SNMP-Notification, Syslog, and track. |
TimeRegistered |
Time when the monitor policy was created. |
PolicyName |
Name of the monitor policy. |
# Display detailed information about all monitor policies.
<Sysname> display rtm policy registered verbose
Total number: 1
Policy Name: test
Policy Type: CLI
Event Type:
TimeRegistered: Aug 29 14:54:50 2013
User-role: network-operator
network-admin
Table 4 Command output
Field |
Description |
Total number |
Total number of the monitor polices. |
PolicyName |
Name of the monitor policy. |
Policy Type |
Policy creation method: · TCL—The policy was configured by using Tcl. · CLI—The policy was configured from the CLI. |
Event Type |
Event type, including CLI, hotplug, interface, process, SNMP, SNMP-Notification, Syslog, and track. |
TimeRegistered |
Time when the policy was created. |
User-role |
User roles for executing the monitor policy. To execute the monitor policy, an administrator must have a minimum of one of the displayed user roles. |
event cli
Use event cli to configure a CLI event for a CLI-defined monitor policy.
Use undo event to delete the event in a CLI-defined monitor policy.
Syntax
event cli { async [ skip ] | sync } mode { execute | help | tab } pattern regular-exp
undo event
Default
No CLI event is configured.
Views
CLI-defined policy view
Predefined user roles
network-admin
context-admin
Parameters
async [ skip ]: Enables or disables the system to execute the command that triggers the policy. If you specify the skip keyword, the system executes the actions in the policy without executing the command that triggers the policy. If you do not specify the skip keyword, the system executes both the actions in the policy and the command entered at the CLI.
sync: Enables the system to execute the command that triggers the event only if the policy has been executed successfully.
mode { execute | help | tab }: Specifies the CLI operation to monitor:
· 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 CLI in Fundamentals Configuration Guide.
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 display interface 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 display interface brief
# Configure a CLI-defined policy to monitor the use of the Tab key at command lines that contain the display interface 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 display interface brief
# Configure a CLI-defined policy to monitor the use of the question mark (?) at command lines that contain the display interface 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 display interface brief
event hotplug
Use event hotplug to configure an IRF member device join or leave event.
Use undo event to delete the event in a CLI-defined monitor policy.
Syntax
event hotplug [ insert | remove ] slot slot-number
undo event
Default
No hotplug event is configured.
Views
CLI-defined policy view
Predefined user roles
network-admin
context-admin
Parameters
insert: Specifies the IRF member device join event.
remove: Specifies the IRF member device leave event.
slot slot-number: Specifies an IRF member device by its member ID.
Usage guidelines
After you configure the event, the monitor policy is triggered when the member device joins or leaves the IRF fabric. If you do not specify the insert or remove keyword, EAA monitors the member device for joining or leaving the IRF fabric.
You can configure only one event entry for a monitor policy. If the monitor policy already contains an event entry, the new event entry replaces the old event entry.
Examples
# Configure a CLI-defined policy to monitor the member device for joining or leaving the IRF fabric.
<Sysname> system-view
[Sysname] rtm cli-policy test
[Sysname-rtm-test] event hotplug slot 1
event interface
Use event interface to configure an interface event for a CLI-defined monitor policy.
Use undo event to delete the event in a CLI-defined monitor policy.
Syntax
event interface interface-type interface-number monitor-obj monitor-obj start-op start-op start-val start-val restart-op restart-op restart-val restart-val [ interval interval ]
undo event
Default
No interface e