Configuring a monitor policy from the CLI
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. (Optional.) Set the size for the EAA-monitored log buffer. | rtm event syslog buffer-size buffer-size | The default size of the EAA-monitored log buffer is 50000. |
3. Create a CLI-defined policy and enter its view. | rtm cli-policy policy-name | By default, no CLI-defined monitor policies exist. If a CLI-defined policy already exists, this command enters CLI-defined policy view. |
4. Configure an event in the policy. |
| By default, a monitor policy does not contain an event. You can configure only one event in a monitor policy. If the monitor policy already contains an event, the new event overrides the old event. The subslot subslot-number option is available only for the HPE FlexFabric 5940 2-slot switch (JH397A) and HPE FlexFabric 5940 4-slot switch (JH398A). |
5. Configure the actions to take when the event occurs. |
| 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 can specify a value or specify a variable name in $variable_name format for an argument. The subslot subslot-number option is available only for the HPE FlexFabric 5940 2-slot switch (JH397A) and HPE FlexFabric 5940 4-slot switch (JH398A). |
6. (Optional.) Assign a user role to the policy. | user-role role-name | 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. An EAA policy cannot have both the security-audit user role and any other user roles. Any previously assigned user roles are automatically removed when you assign the security-audit user role to the policy. The previously assigned security-audit user role is automatically removed when you assign any other user roles to the policy. |
7. (Optional.) Configure the policy runtime. | running-time time | The default runtime is 20 seconds. |
8. Enable the policy. | commit | By default, CLI-defined policies are not enabled. A CLI-defined policy can take effect only after you perform this step. |