Because the console is often used for critical router access rather than monitoring router status, consider disabling log output to the console via the no logging console global configuration command.

IOS code running on VIP cards also generates syslog messages. These may be sent to the console via the service slave-log global configuration command. However, for most purposes, the default behavior of sending messages to the trap and monitor locations is sufficient.

Timestamps can be added to all logging and debug outputs via the service timestamps logging and service timestamps debug global configuration commands. Using the keywords datetime localtime show-timezone msec will format the timestamps to include the date and time with millisecond accuracy in the local time zone, and will print the configured time zone for the router.

Rather than sending log output to a syslog server, you can send it to an SNMP trap daemon via the snmp-server enable trap syslog global configuration command. This removes the need to have a syslog server within the NMS. A copy of each message sent to the SNMP server is kept in the logging history table and can be viewed via the show logging history exec command. The size of this history table, and the level of messages logged and sent to the SNMP trap server are set via the logging history size and logging history level global configuration commands.

Was this article helpful?

0 0

Post a comment