Watch on Instagram

Network Bytes · Episode 52 · CCNA 4.5

"Syslog severity levels"

Every syslog message carries a severity level from 0 to 7, and lower numbers are worse. Learn the eight levels in order, a mnemonic to remember them, and what happens when you pick a logging level.

Posted · About a 1 minute watch, 3 minute read · Take the quiz

What syslog is

Routers, switches and firewalls constantly write short status messages: an interface went down, someone changed the configuration, a fan failed. These are syslog messages, defined by the IETF in RFC 5424. On a Cisco device a message can go to several places at once: the console (the screen you type commands on), the logging buffer in the device's memory (view it with show logging), terminal sessions, and a central syslog server that collects logs from the whole network, using UDP port 514 by default.

The eight levels, lower is worse

Each message carries a number that says how serious it is. The scale runs backwards from what many people expect: the smaller the number, the bigger the problem.

| Level | Name | Cisco keyword | Meaning | |---|---|---|---| | 0 | Emergency | emergencies | System is unusable | | 1 | Alert | alerts | Action needed immediately | | 2 | Critical | critical | Critical condition | | 3 | Error | errors | Error condition | | 4 | Warning | warnings | Warning condition | | 5 | Notification | notifications | Normal but significant (RFC 5424 calls it "Notice") | | 6 | Informational | informational | Informational message | | 7 | Debugging | debugging | Debug-level detail |

A handy study aid (not official) keeps the order straight: Every Awesome Cisco Engineer Will Need Icecream Daily.

Picking a logging level

You rarely want every message. Debugging output in particular is so chatty that it can slow a busy device, so it is normally turned on only for a short time. Instead you choose a level for each destination, and the device sends that level plus every lower number. For example, logging trap warnings (or logging trap 4) sends warning, error, critical, alert and emergency messages to the syslog server, and drops notification, informational and debugging. logging console and logging buffered take a level the same way for the console and the buffer.

Reading a Cisco log line

A Cisco syslog message shows its level inside the message code, in the form %FACILITY-SEVERITY-MNEMONIC. In %LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed state to down, the facility is LINK, the severity is 3 (error) and UPDOWN names the event. Once you know the scale, you can spot the serious lines at a glance.

Try it yourself

Your own computer keeps logs with severity levels too. On Windows, open Event Viewer, go to Windows Logs, System, and sort by the Level column (Critical, Error, Warning, Information). On a Mac, open the Console app and look at the message types. On Linux with systemd, run journalctl -p warning -b to see only warning-and-worse messages since the last boot, then try journalctl -p info -b and notice how many more lines appear.

Good to know

  • Syslog severity values come from RFC 5424: 0 Emergency, 1 Alert, 2 Critical, 3 Error, 4 Warning, 5 Notice (Cisco says "notifications"), 6 Informational, 7 Debug.
  • Cisco IOS keywords are emergencies, alerts, critical, errors, warnings, notifications, informational, debugging.
  • Setting logging trap 4 (or logging console warnings) sends that level and all lower numbers.
  • Syslog to a server uses UDP port 514 by default.
  • The mnemonic is a study aid, not official.
  • The log lines in the video are just examples.

For CCNA learners

This lines up with CCNA 200-301 exam topic 4.5, describe the use of syslog features including facilities and levels: know the eight levels in order with their numbers, that lower means more severe, and that a configured level includes every more severe level.

Answer to the comment question

4 levels. Logging at level 3 (errors) sends that level and everything more severe, so you get levels 0, 1, 2 and 3: emergency, alert, critical and error. Warning, notification, informational and debugging are not sent.

Test your knowledge

Quick quiz: "Syslog severity levels"

4 multiple-choice questions. Pick one answer for each, then check how you did.

1Which syslog severity level is the most severe?
2What does level 7, debugging, usually contain?
3You set the logging level to warning. Which messages does the device send?
4Which of these is NOT a usual destination for syslog messages on a Cisco device?

Sources

Video transcript

How does a router tell you how bad a problem is?

Every message it logs gets a severity level from zero to seven. These messages are called syslog, and they can go to the screen, to memory, or to a central server.

Here's the twist: lower numbers are worse. Zero means emergency: the device is unusable. Seven means debugging: chatty details.

In order: emergency, alert, critical, error, warning, notification, informational, debugging. Remember them with: Every Awesome Cisco Engineer Will Need Ice cream Daily.

When you pick a logging level, you get that level and everything more severe. Pick warning, level four, and you get levels zero through four.

You set logging to level three, errors. How many of the eight levels get sent? Comment your answer below!

That's your byte.

More from Network Bytes

All Network Bytes lessons