The info-center filter-id command configures the Switch to filter a specified log or trap.
The undo info-center filter-id command disables the Switch from filtering a specified log or trap.
By default, no log or trap is filtered.
info-center filter-id { id | bymodule-alias modname alias } &<1-50>
info-center filter-id { id | bymodule-alias modname alias } [ bytime interval | bynumber number ]
undo info-center filter-id all
undo info-center filter-id { id | bymodule-alias modname alias } &<1-50>
undo info-center filter-id { id | bymodule-alias modname alias } [ bytime interval | bynumber number ]
Parameter | Description | Value |
---|---|---|
id | Specifies the ID of the log or trap to be filtered. NOTE:
This parameter indicates the ID of a log. If this parameter fails to be configured, the log specified by this ID does not exist. |
The value is in hexadecimal notation and contains 8 digits. The value contains 0-9, a-f, and A-F. |
bymodule-alias modname alias | Specifies the module name and alias name corresponding to the log or trap to be filtered. | Enumerated type. Set the value according to the device configuration. |
all | Filters all logs or traps. | - |
bytime interval | Specifies the interval at which logs are sent. | The value is an integer that ranges from 1 to 86400, in seconds. |
bynumber number | Specifies the number of logs that are discarded between two received logs. | The value is an integer that ranges from 1 to 1000. |
Usage Scenario
If some logs or traps are unnecessary, configure the Switch not to output the logs and traps. When the filtering function is enabled, the information center does not send the traps with a specified ID that satisfy the filtering condition to any channel. As a result, the trap buffer, console, terminal, or SNMP agent cannot receive the traps with the specified ID.
Precautions
Currently, the Switch can filter traps with a maximum of 50 IDs. If there are more than 50 log IDs, the system displays a message indicating that the filtering table is full. To configure the filtering function, run the undo info-center filter-id { id | bymodule-alias modname alias } &<1-50> [ bytime interval | bynumber number ], or the undo info-center filter-id all command to delete original IDs and reconfigure the log ID.
You cannot add the same ID or alias name repeatedly.
When you add an unregistered or nonexistent ID or alias name, the system displays a message indicating that the system fails to filter the trap with the specified ID or alias name.
During a software upgrade, if the information filtering function is configured in the old version, but the new version does not support the specified log module and alias, the information filtering configuration of the specified log module and alias will be automatically cleared after the upgrade.
You are advised to use the module name and alias to filter specified log information. The id parameter can be obtained by running the display info-center register-info [ module module-name ] log command in the diagnostic view, and the modname and alias parameters can be obtained through the command association function.
<HUAWEI> system-view [HUAWEI] info-center filter-id bymodule-alias CMD CMD_PRI_REARRG
<HUAWEI> system-view [HUAWEI] undo info-center filter-id all
<HUAWEI> system-view [HUAWEI] info-center filter-id 40394017