< Home

send-trap

Function

The send-trap command configures conditions for sending trap messages.

The undo send-trap command deletes the previous configuration.

By default, the device is disabled from sending traps.

Format

send-trap { { probefailure | rtd | testcomplete | testfailure | testresult-change } * | all }

undo send-trap { { probefailure | rtd | testcomplete | testfailure | testresult-change } * | all }

Parameters

Parameter Description Value

all

Indicates that a trap is sent in any of the following situations:
  • The two-way delay exceeds the threshold.
  • A probe fails.
  • A test is complete.
  • A test fails.
  • A test result changes.

-

probefailure

Sends a trap after a probe fails.

-

rtd

Sends a trap when the two-way delay exceeds the threshold.

-

testcomplete

Sends a trap after a test is complete successfully.

-

testfailure

Sends a trap after a test fails.

-

testresult-change

Sends a trap when a test result changes.

-

Views

NQA view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Traps are generated no matter whether the NQA test succeeds or fails. You can determine whether traps are sent to the NMS by enabling or disabling the trap function.

The send-trap command can be used to configure conditions for sending a trap message. If the specified conditions are met, the system sends a trap to the NMS.

Prerequisites

Before using the send-trap command, run the test-type command to specify the type of a test instance.

In addition, run the snmp-agent target-host trap address udp-domain ip-address command to configure a host that sends traps. Otherwise, traps cannot be sent to the NMS.

Precautions

The configuration of sending a trap in a running test instance cannot be changed.

Example

# Configure the test instance admin icmp to send alarm messages when the two-way delay exceeds the threshold.

<sysname> system-view
[sysname] nqa test-instance admin icmp
[sysname-nqa-admin-icmp] test-type icmp
[sysname-nqa-admin-icmp] send-trap rtd
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >