The rmon prialarm command adds an entry to the extended alarm table.
The undo rmon prialarm command deletes an entry from the extended alarm table.
rmon prialarm entry-number prialarm-formula description-string sampling-interval { absolute | changeratio | delta } rising-threshold threshold-value1 event-entry1 falling-threshold threshold-value2 event-entry2 entrytype { cycle entry-period | forever } [ owner owner-name ]
undo rmon prialarm entry-number
Parameter | Description | Value |
---|---|---|
entry-number |
Specifies the index of the entry to be added or deleted. |
The value is an integer that ranges from 1 to 65535. |
prialarm-formula |
Specifies the formula for calculating an alarm variable. The alarm variable in the formula is identified by an OID. The OID value starts with a dot, for example, (.1.3.6.1.2.1.2.1.10.1)*8. The calculation formula is defined by user. The calculation result is a long integer. Ensure that the length of calculation result in each step cannot exceed the limit; otherwise, the calculation result is incorrect. |
The value is a string of 1 to 256 characters. |
description-string |
Specifies the alarm description. |
The value is a string of 1 to 256 characters. |
sampling-interval |
Specifies the sampling interval. |
The value is an integer that ranges from 10 to 65535, in seconds. |
absolute |
Indicates that the sample type is absolute. The value is the sampled value at the end of the period. |
- |
changeratio |
Indicates that the sample type is changeratio. The value is Changing value/Sampling interval. |
- |
delta |
Indicates that the sample type is delta. The value is the difference between the samples at the beginning and end of the period. |
- |
rising-threshold threshold-value1 |
Specifies the alarm rising threshold. |
The value is an integer that ranges from 1 to 2147483647. |
event-entry1 |
Indicates the entry number of the event corresponding to the rising threshold in the event table. |
The value is an integer that ranges from 1 to 65535. |
falling-threshold threshold-value2 |
Specifies the alarm falling threshold. |
The value is an integer that ranges from 0 to 2147483646. |
event-entry2 |
Indicates the entry number of the event corresponding to the falling threshold in the event table. |
The value is an integer that ranges from 1 to 65535. |
entrytype |
Indicates the lifetime type of an alarm entry. |
- |
cycle entry-period |
Indicates the lifetime of an alarm entry. |
The value is an integer that ranges from 11 to 2147483646. |
forever |
Indicates that the alarm entry is valid permanently. |
- |
owner owner-name |
Indicates the owner of the extended alarm variable. |
The value is a string of 1 to 127 case-sensitive characters without spaces. |
Usage Scenario
The extended alarm function can compute the alarm variables and compare the result with the specified threshold.
Compares the calculation result with the thresholds and takes actions according to the following table.
Situation |
Action |
---|---|
The sampled value is greater than or equal to the configured rising threshold threshold-value1. |
Trigger event-entry1. |
The sampled value is smaller than or equal to the configured falling threshold threshold-value2. |
Trigger event-entry2. |
To use more alarm functions, run the rmon prialarm command to configure the extended alarm table and add an entry to the table.
Prerequisites
Before configuring extended alarm function for the specified object, run the rmon event command to define the associated events. Otherwise, events cannot be triggered even if alarms are generated. When the sampled value exceeds the rising threshold or falls below the falling threshold, whether to record a log or send a trap to the NMS is determined by the rmon event command.
# Monitor broadcast and multicast packets: Set the sampling interval to 10 seconds and sample type to absolute. Trigger event 3 when the sample value reaches or exceeds 100000 and when the sample value reaches or falls below 100. Set the lifetime of the entry to forever and the owner to Huawei.
<HUAWEI> system-view [HUAWEI] rmon prialarm 1 .1.1.3.6.1.2.1.16.1.1.1.6.1+.1.3.6.1.2.1.16.1.1.1.7.1 sumofbroadandmulti 10 absolute rising-threshold 100000 3 falling-threshold 100 3 entrytype forever owner Huawei