< Home

snmp-agent notify-filter-profile

Function

The snmp-agent notify-filter-profile command creates or updates the trap filtering information.

The undo snmp-agent notify-filter-profile command deletes the created or updated trap filtering information.

Format

snmp-agent notify-filter-profile { excluded | included } profile-name oid-tree

undo snmp-agent notify-filter-profile profile-name

undo snmp-agent notify-filter-profile { excluded | included } profile-name

Parameters

Parameter Description Value
include Includes the MIB subtree. -
exclude Excludes the MIB subtree. -
profile-name Specifies the profile name. It is a string of 1 to 32 characters without spaces.
NOTE:

When double quotation marks are used around the string, spaces are allowed in the string.

oid-tree Specifies the object subtree name, that is, the OID value of a MIB object. The value is a string of 1 to 255 numeric characters, in dotted decimal donation.

Views

System view

Default Level

3: Management level

Usage Guidelines

By default, no trap messages are filtered.

Usage Scenario

To filter trap messages sent to a target host, run the snmp-agent notify-filter-profile command to add the MIB objects to be filtered to a filter profile to limit the number of MIB objects that can send trap messages to the NMS. After the filter profile is configured using the snmp-agent notify-filter-profile command, only the trap messages generated by eligible MIB objects are sent to the NMS.

Precautions

If notify-filter-profile is not configured, all trap messages are sent to the target host.

The snmp-agent notify-filter-profile command supports either the variable OID of a character string or an object name. For a character string, an asterisk (*) can be used as the mask.

The asterisk (*) symbol can be placed only in the middle rather than at the beginning or end of the string.

In Include filtering mode of an alarm, OIDs of all bound variables in the alarm must be specified in this command. Otherwise, the filtering fails.

In Exclude filtering mode of an alarm, only the OID of the alarm or that of any bound variable need to be specified in this command.

Example

# Set a filter profile named tmp.
<sysname> system-view
[sysname] snmp-agent notify-filter-profile included tmp 1.3.6.1.*.4
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >