R0106-HP MSR Router Series Network Management and Monitoring Command Reference(V7)

243
EAA executes an SNMP_Notification event monitor policy when the value of the monitored variable in
an SNMP notification meets the specified condition.
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 SNMP notifications that contain the variable OID
1.3.6.1.4.1.318.2.8.3. Enable the system to drop an SNMP notification and execute the policy if the
variable in the notification contains the "UPS:Returned from battery backup power" string.
<Sysname> system-view
[Sysname] rtm cli-policy snmp_notification
[Sysname-rtm-snmp_notification] event snmp-notification oid 1.3.6.1.4.1.318.2.8.3
oid-val “UPS:Returned from battery backup power” op eq drop
event syslog
Use event syslog to configure a Syslog event for a CLI-defined monitor policy.
Use undo event to delete the event in a CLI-defined monitor policy.
Syntax
event syslog priority level msg msg occurs times period period
undo event
Default
No log event is configured.
Views
CLI-defined policy view
Predefined user roles
network-admin
Parameters
priority level: Specifies the lowest severity level for matching log messages. The level argument can be an
integer in the range of 0 to 7, or the word all, which represents any severity level from 0 to 7. A lower
number represents higher priority level. For example, specify a severity level of 3 to match log messages
from level 3 to level 0.
msg msg: Specifies a regular expression to match the message body, a string of 1 to 255 characters. The
log message must use the HP format. For more information about log message formats, see "Configuring
the information center."
occurs times period period: Executes the policy if the number of log matches over an interval exceeds the
limit. The times argument specifies the maximum number of log matches in the range of 1 to 32. The
period argument specifies an interval in the range of 1 to 4294967295 seconds.
Usage guidelines
Use Syslog event monitor policies to monitor log messages.
EAA executes a Syslog event monitor policy when the number of matching logs over an interval reaches
the limit.