Enable SNMP Trap Logging
Use SNMP trap logging to send a copy of all traps to the syslog server.
Before you begin
You must configure and enable the syslog server.
About this task
Note
The platform logs CLILOG and SNMPLOG as INFO. Normally, if you configure the logging level to WARNING, the system skips all INFO messages. However, if you enable CLILOG and SNMPLOG the system logs CLI Log and SNMP Log information regardless of the logging level you set. This is not the case for other INFO messages.
Procedure
Example
Enable SNMP trap logging and view the contents of the SNMP log:
Switch:1>enable Switch:1#configure terminal Switch:1(config)#snmplog enable Switch:1(config-app)#show logging file module snmp CP1 [02/06/15 22:39:58.530:UTC] 0x00004595 00000000 GlobalRouter SNMP INFO Boot ed with file CP1 [02/06/15 22:39:59.547:UTC] 0x00004603 00400003.67108870 DYNAMIC CLEAR Glob alRouter SNMP INFO 2k card up(CardNum=1 AdminStatus=1 OperStatus=1) CP1 [02/06/15 22:39:59.547:UTC] 0x00004603 00400003.67108870 DYNAMIC CLEAR Glob alRouter SNMP INFO 2k card up(CardNum=2 AdminStatus=1 OperStatus=1) CP1 [02/06/15 22:39:59.547:UTC] 0x00004603 00400003.67108870 DYNAMIC CLEAR Glob alRouter SNMP INFO 2k card up(CardNum=3 AdminStatus=1 OperStatus=1) CP1 [02/06/15 22:40:45.839:UTC] 0x000045e5 00400005 DYNAMIC SET GlobalRouter SN MP INFO Sending Cold-Start Trap
Variable Definitions
The following table defines parameters for the snmplog command.
Variable |
Value |
---|---|
enable |
Enables the logging of traps. Use the command no snmplog enable to disable the logging of traps. |