Menu

Syslog

Table of Contents

Syslog is an essential logging and notification technology for Cisco networks. It collects events from devices on the network and sends them to a centralized log server, where they can be analyzed or used to generate alerts. Syslog is commonly used to monitor network health and performance, track system events, and generate alarms. By default, Cisco routers send logs to the Syslog server at localhost. If you want logs sent to another server, you can create a Syslog collection configuration using the logging command-line interface (CLI).

The Syslog Protocol – RFC5424

https://datatracker.ietf.org/doc/html/rfc5424

Introduction

Cisco Syslog collects network event data from various devices on a Cisco router and sends it to a centralized log server. Because Syslog is an essential logging technology, it is commonly used to monitor network health and performance, track system events, and generate alarms. Syslog is an open protocol that can be used on a variety of devices, including routers and switches.  It is also the perfect solution for network monitoring.

  • industry-standard protocol for message logging
  • log events such as system restarts, interface status(up/down), etc.
  • log messages can be displayed on CLI, saved to device RAM, or sent to an external/centralized Syslog server
  • used for troubleshooting and examining causes of incidents
  • syslog and SNMP are both used for monitoring and troubleshooting

What are Cisco Syslog Messages?

Syslog messages are the core logs from Cisco devices. Syslog messages are usually sent out at a high rate of about 100-200 messages per minute. This allows for many Syslog to be kept in the log files on a server and easy to search through. Cisco Syslog messages can be used to troubleshoot problems in the network. The syslogs are also very helpful in monitoring and tracking system activity. Cisco Syslog messages can be sent out to a server or your own device. The Cisco Syslog messages can also be sent out to a third party.

Using syslogs to troubleshoot problems is one of the best ways to get information about what is going on in the network. There are many syslogs that can be sent out to a server and you will have access to them all. The syslogs allow you to see what is happening in the network at any given time. Cisco Syslog messages are very helpful in tracking system activity.

Syslog Message Format

A typical Syslog message format is below(in green).

seq: timestamp: %facility-severity-MNEMONIC : description

Below is an example of a real Syslog message on a Cisco router:

* Feb 11 03:02:55.304: %LINK-3-UPDOWN: Interface GigabitEthernet0/0, changed state to up

Identifying components of the Syslog message.

* Feb 11 03:02:55.304:timestamp
%LINKfacility
3severity
UPDOWNMNEMONIC
Interface GigabitEthernet0/0 changed state to updescription

The table below shows the explanation of each component that forms the Syslog message.

ComponentDescription
SeqA sequence number indicates the order/sequence of messages.
TimestampA timestamp indicates the time the message was generated.
facilityA value that indicates which process on the device generated the message.
severityA number that indicates the severity of the logged event.
MNEMONICA shortcode for the message indicates what happened.
descriptionDetailed information about the event being reported.

Syslog Severity Levels

Please use the mnemonic below to remember the security levels.

Every Awesome Cisco Engineer Will Need Icecream Daily
LevelKeywordDescription
0EmergencySystem is unusable
1AlertAction must be taken immediately
2CriticalCritical conditions
3ErrorError conditions
4WarningWarning conditions
5NoticeNormal but significant condition (Notification)
6InformationalInformational messages
7DebuggingDebug-level messages
L0,1[severe], L2,3,4[Impactful], L5,6[Normal] and L7[Debug]

Syslog Logging Locations

Syslog messages sent to Console line and Buffer by default – No configuration needed.

  • Console line: levels 0 – 7 are displayed on the CLI console port
  • VTY lines: Syslog messages displayed on CLI when using Telnet/SSH session(disabled by default)
  • Buffer: L0-L7 are saved to RAM
  • External server: Syslog external server listen on UDP port 514

UDP Port 514

Syslog external server listening port #

What are some examples of Cisco Syslog messages?

There are three different types of Syslog messages. Each is used for a specific purpose and type of report.

1. Logging: This is used to log system activity on the network.

2. Display: This is used to display system activity on the network.

3. Logging and Display: The syslogs are combined and sent to a Syslog server. The Syslog server allows all of the messages to be viewed at once.

What is the purpose of the Syslog?

The Syslog is used to monitor all system activity on a network. It allows you to see what is happening on your network at any given time.

Configuring Cisco Syslog

Configuring Cisco Syslog on your devices depends on the device in question. Cisco Syslog is a system that enables you to monitor and debug any errors or issues with your network devices. Cisco Syslog is software that runs on Cisco devices and is installed and configured with the appropriate device.

To configure Cisco Syslog, you must complete certain tasks:

1. Enable Syslog on your router and switch.

2. Configure your router to send all of the information in its log files, including login attempts and failed login attempts, to a Syslog server.

3. Configure your devices to send logs to the Syslog server.

4. Configure the Syslog server to receive logs from your devices and log them in a secure manner.

5. Configure Cisco Syslog on the device(s) that you want to be able to monitor remotely.

Source: Jeremy IT Lab – Syslog Commands

Syslog useful commands

Source: Jeremy IT Lab – Syslog useful commands

Syslog vs SNMP

Syslog is used to monitor and troubleshoot devices by sending logs of events happening on a device to a server. SNMP is used to monitor devices by querying the devices for information about their status. Both Syslog and SNMP are complementary tools but their functionalities differ.

Syslog

  • used for message logging
  • Events that occur within the system are categorized based on facility/severity and logged.
  • Used for system management, analysis, and troubleshooting.
  • Messages are sent from the devices to the server. The server can’t actively pull information from the devices (like SNMP Get) or modify variables (like SNMP Set).

SNMP

  • used to retrieve and organize information about SNMP-managed devices
  • IP addresses, current interface status, temperature, CPU usage, etc.
  • SNMP servers can use Get to query the clients and Set to modify variables on the clients

Solarwinds Syslog Server(Free Ed.)

With Kiwi Syslog Server Free Edition, you can collect, view, and archive Syslog messages and SNMP traps from up to five sources.

Key Features

  • Get centralized management of Syslog messages and SNMP traps
  • Log to disk and split logs by date or priority and get daily email summaries
  • View 10 filtered windows in real-time and receive high-traffic alerts
  • Get real-time statistics and daily statistics summaries in the console

Lab Exercise

See if you can configure this lab otherwise watch Day 41 of Jeremy IT Lab on Udemy for the solution.

Source: Jeremy IT Lab
wanikwai
wanikwai

A christian & dad to Mireya and Jnr. I write occasionally about technology on this website.

Articles: 26

Share your thoughts

Discover more from Watson Anikwai

Subscribe now to keep reading and get access to the full archive.

Continue reading