Octet

List the syslog severity levels and explain how logging levels work on a Cisco device.

Show the answer

Say this first

Eight levels, 0 to 7: 0 emergencies, 1 alerts, 2 critical, 3 errors, 4 warnings, 5 notifications, 6 informational, 7 debugging. A lower number is more severe. Setting a level gives you that level and everything more severe: logging trap warnings sends levels 0 to 4. Cisco messages carry the level in their tag, as in %LINK-3-UPDOWN: facility LINK, severity 3, mnemonic UPDOWN.

Go deeper

LevelKeywordTypical messages
0emergenciessystem unusable
1alertsact now, for example temperature alarms
2criticalcritical conditions
3errors%LINK-3-UPDOWN interface down
4warningswarnings
5notifications%LINEPROTO-5-UPDOWN, %SYS-5-CONFIG_I, %OSPF-5-ADJCHG, %BGP-5-ADJCHANGE
6informationalACL log hits such as %SEC-6-IPACCESSLOGP
7debuggingdebug output

A memory aid: Every Awesome Cisco Engineer Will Need Ice cream Daily.

Where logs go on IOS

DestinationCommandDefault level
Consolelogging consoledebugging
SSH and telnet sessionslogging monitor, plus terminal monitor per sessiondebugging
Local bufferlogging buffereddebugging
Syslog serverslogging trapinformational
Cisco IOS
service timestamps log datetime msec show-timezone
service sequence-numbers
logging buffered 64000 informational
logging console warnings
logging source-interface Loopback0
logging host 10.0.0.60
logging trap informational

Syslog uses UDP 514 by default. TCP and TLS (port 6514) are available where the platform supports them. Cisco devices use facility local7 by default.

Traps

  • Getting the direction wrong. logging trap 4 sends 0 to 4, not 4 to 7.
  • Logging without NTP and timestamps. Logs with wrong times are close to useless in an incident.
How did you do?Book 9.3 Infrastructure Applications