The associated log-id does not have to be configured before a snmp-trap-group can be created, however, the snmp-trap-group must exist before the log-id can be configured to use it.
The following displays a basic SNMP trap group configuration example:
A:ALA-12>config>log# info
----------------------------------------------
...
snmp-trap-group 2
trap-target "ops-mon-4" address 10.10.10.104 snmpv2c notify-community "warnings-12a7"
exit
...
log-id 2
description "This is a test log file."
filter 1
from main security
to snmp
exit
...
----------------------------------------------
A:ALA-12>config>log#
The following displays a SNMP trap group, log, and interface configuration examples:
A:SetupCLI>config>log# snmp-trap-group 44
A:SetupCLI>config>log>snmp-trap-group# info
----------------------------------------------
trap-target "xyz-test" address xx.xx.x.x snmpv2c notify-community "xyztesting"
trap-target "test2" address xx.xx.xx.x snmpv2c notify-community "xyztesting"
----------------------------------------------
*A:SetupCLI>config>log>log-id# info
----------------------------------------------
from main
to snmp
----------------------------------------------
*A:SetupCLI>config>router# interface xyz-test
*A:SetupCLI>config>router>if# info
----------------------------------------------
address xx.xx.xx.x/24
port 1/1/1
----------------------------------------------
*A:SetupCLI>config>router>if#