Threshold trigger test configuration example
Network requirements
As shown in Figure 54, the device acts as the agent. The NMS uses SNMPv3 to monitor and manage the device. Configure a trigger and configure a threshold trigger test for the trigger. When the trigger conditions are met, the agent sent an mteTriggerFired notification to the NMS.
Figure 56: Network diagram
Configuration procedure
Configure the device:
# Add the user named owner1 to the SNMPv3 group g3. Assign g3 the right to access the MIB view a.
<Sysname> system-view [Sysname] snmp-agent usm-user v3 owner1 g3 [Sysname] snmp-agent group v3 g3 read-view a write-view a notify-view a [Sysname] snmp-agent mib-view included a iso
# Configure the agent to use the username owner1 to send SNMPv3 notifications to the NMS at 192.168.1.26.
[Sysname] snmp-agent target-host trap address udp-domain 192.168.1.26 params securityname owner1 v3 [Sysname] snmp-agent trap enable
Set the Event MIB minimum sampling interval to 50 seconds and set the maximum number to 10 for object instances that can be concurrently sampled.
<Sysname> system-view [Sysname] snmp mib event sample minimum 50 [Sysname] snmp mib event sample instance maximum 10
Configure a trigger:
# Create a trigger. Specify its owner as owner1 and its name as triggerA.
[Sysname] snmp mib event trigger owner owner1 name triggerA
# Set the sampling interval to 60 seconds. Make sure the interval is greater than or equal to the Event MIB minimum sampling interval.
[Sysname-trigger-owner1-triggerA] frequency 60
# Specify the monitored object.
[Sysname-trigger-owner1-triggerA] oid 1.3.6.1.4.1.25506.2.6.1.1.1.1.7.11
# Enable the threshold trigger test. Specify the rising threshold, falling threshold, delta rising threshold, and delta falling threshold for the test.
[Sysname-trigger-owner1-triggerA] test threshold [Sysname-trigger-owner1-triggerA-threshold] rising value 3 [Sysname-trigger-owner1-triggerA-threshold] falling value 1 [Sysname-trigger-owner1-triggerA-threshold] delta rising value 80 [Sysname-trigger-owner1-triggerA-threshold] delta falling value 10 [Sysname-trigger-owner1-triggerA-threshold] quit
# Enable the trigger.
[Sysname-trigger-owner1-triggerA] trigger enable [Sysname-trigger-owner1-triggerA] quit
Verifying the configuration
# Display Event MIB configuration and statistics.
[Sysname] display snmp mib event summary TriggerFailures : 0 EventFailures : 0 SampleMinimum : 50 SampleInstanceMaximum : 10 SampleInstance : 1 SampleInstancesHigh : 1 SampleInstanceLacks : 0
# Display information about the trigger.
[Sysname] display snmp mib event trigger owner owner1 name triggerA Trigger entry triggerA owned by owner1: TriggerComment : N/A TriggerTest : threshold TriggerSampleType : absoluteValue TriggerValueID : 1.3.6.1.4.1.25506.2.6.1.1.1.1.7.11<hh3cEntityExt CpuUsageThreshold.11> TriggerValueIDWildcard : false TriggerTargetTag : N/A TriggerContextName : N/A TriggercontextNameWildcard : false TriggerFrequency(in seconds): 60 TriggerObjOwner : N/A TriggerObjName : N/A TriggerEnabled : true Threshold entry: ThresStartUp : risingOrFalling ThresRising : 80 ThresFalling : 10 ThresDeltaRising : 0 ThresDeltaFalling : 0 ThresObjOwner : N/A ThresObjName : N/A ThresRisEvtOwner : N/A ThresRisEvtName : N/A ThresFalEvtOwner : N/A ThresFalEvtName : N/A ThresDeltaRisEvtOwner : N/A ThresDeltaRisEvtName : N/A ThresDeltaFalEvtOwner : N/A ThresDeltaFalEvtName : N/A
# When the rising threshold of the monitored object 1.3.6.1.4.1.25506.2.6.1.1.1.1.7.11 is greater than 80, the NMS receives an mteTriggerFired notification.