Enabling and Configuring the Trap Severity Level on a Per-Category Basis

You can use the snmp-server enable traps per-category-trapFilters command to specify the trap severity level for a particular category without overwriting the existing global severity level, which applies to all enabled categories configured on the router.

If you change the global trap severity level (which applies to all enabled categories) after you set the per-category trap severity level, the global severity level takes precedence over the per-category severity level.

If you do not configure the per-category severity level, the global trap severity level (which applies to all enabled categories) takes effect for that category.

If you configure global severity levels for different categories in succession, the last global severity level you configure is applied to all categories.

Note: The snmp-server enable traps per-category-trapFilters command does not modify the severity level set for specific hosts using the snmp-server host command.

To overwrite the global severity level to the last-configured setting:

  1. Configure the global severity level as critical for all enabled trap categories by specifying the SONET trap category.
    host1(config)#snmp-server enable traps sonet trapFilters critical
  2. Configure the global severity level as notice for all enabled trap categories by specifying the BGP trap category. Although you specify the type of SNMP trap category when you configure the global severity level, it takes effect for all enabled trap categories on the router. The global severity level is set as notice for all enabled trap categories.
    host1(config)#snmp-server enable traps bgp trapFilters notice

To configure the per-category severity level without changing the global severity level:

  1. Configure the global severity level as critical for all enabled trap categories by specifying the SONET trap category.
    host1(config)#snmp-server enable traps sonet trapFilters critical
  2. Configure the global severity level as notice for all enabled trap categories by specifying the BGP trap category.
    host1(config)#snmp-server enable traps bgp trapFilters notice
  3. Configure the per-category severity level as debug for the SONET trap category. Although you configure the category-specific severity level as debug for the SONET category, the global severity level remains unchanged as notice. This behavior occurs because only the category-specific severity level is configured in this operation.
    host1(config)#snmp-server enable traps sonet per-category-trapFilters debug

To override the global severity level for a category with the per-category severity level:

  1. Configure the global severity level as critical for the SONET trap category.
    host1(config)#snmp-server enable traps sonet trapFilters critical
  2. Change the global severity level to notice for all enabled trap categories.
    host1(config)#snmp-server enable traps bgp trapFilters notice
  3. Configure the per-category severity level as debug for the SONET trap category. This setting overrides the notice trap severity level that was applicable for the SONET trap category.

    The global severity level is configured as notice for all enabled trap categories except SONET, whose severity level is set as debug. This configuration occurs because the global severity level is overwritten to the last configured value and the per-category severity level takes precedence over the global severity level.

    host1(config)#snmp-server enable traps sonet per-category-trapFilters debug

Related Documentation