4.5 Describe syslog, including facilities and severity levels

CCNA 200-301 v1.1 · 4.0 IP Services

Every Cisco device writes events as syslog messages: an interface going down, a neighbor coming up, a configuration change. For the CCNA you read a message, know the eight severity levels, understand what a facility is, and send the right messages to the right places.

What you must know

Reading a message

*Nov  1 21:04:17.123: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to down

LINEPROTO is the facility (the part of IOS that logged it), 5 the severity (notification), UPDOWN the mnemonic. On a syslog server, the facility field also classifies messages by source (local0 to local7 for network devices), so the server can file them separately.

Severity levels

LevelKeywordExample
0emergenciesSystem unusable
1alertsImmediate action needed
2criticalCritical condition
3errorsError condition
4warningsWarning
5notificationsNormal but significant (interface up/down)
6informationalInformational (ACL log hits)
7debuggingDebug output

A memory aid: Every Awesome Cisco Engineer Will Need Ice cream Daily. Setting a level sends that level and every lower number: logging trap warnings sends 0 to 4.

Where logs go

service timestamps log datetime msec
logging buffered 64000 informational
logging console warnings
logging monitor debugging
logging host 10.0.50.20
logging trap notifications
logging source-interface Loopback0

SW1's interface event reaches the server (1), where messages from every device are kept, searched and correlated. Messages only show on an SSH session after terminal monitor.

Commands

show loggingLogging settings for each destination and the buffered messages.
terminal monitorShows log messages in the current SSH or Telnet session.
clear loggingEmpties the buffer.

Exam traps

Check yourself

What severity is %OSPF-5-ADJCHG?
5, notifications.
logging trap 4 is set. Is a level 6 message sent to the server?
No: only levels 0 to 4 are sent.
Name the levels from 0 to 7.
Emergencies, alerts, critical, errors, warnings, notifications, informational, debugging.

More topics in 4.0 IP Services