Advanced logging with the systemd journal

Needle in a Haystack

Article from Issue 184/2016
Author(s):

The new logging component included with systemd offers some advanced features you won't find in Syslog.

Syslog, the default logging mechanism on Unix and Linux, dates from the early 1980s and was originally developed by Eric Allman – initially for Sendmail. Later, the tool established itself as a universal solution for logging system and error messages of all kinds. Among Linux distributions, Syslog was the generally accepted standard for many years. But while Syslog was marching to triumph, it revealed a number of weaknesses:

  • The protocol does not provide authentication; anyone can generate spoofed log entries for any application.
  • Syslogd transmits all messages in plain text, and anyone can read them.
  • The timestamp does not contain any information about the time zone.
  • As its transport protocol, Syslog uses the connectionless UDP, which does not guarantee that all messages arrive.
  • Browsing the log files is a relatively complicated process, requiring tools that search for text patterns.
  • The metadata that the Syslog protocol stores is incomplete.
  • You can't log binary data.
  • Syslog is only one of several logs on Linux, and the user must separately access UTMP/WTMP, Lastlog, audit, kernel logs, and firmware logs, as well as a variety of application-specific logs.
  • Log rotation and compression are available but not flexible. Rotation only applies to fixed intervals but does not include disk utilization, and compression usually only works during rotation.

The Syslog protocol was first standardized in 2001 in RFC 3164. Developers soon created alternatives that corrected some of the weaknesses, including Syslog-ng and Rsyslog. Syslog-ng supports dozens of features that go beyond the old Syslog daemon's feature set; however, some of these features – including encryption, multi-line messages, and failover on the client side – only exist in a commercial premium edition.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Journalctl

    The journal is the systemd component responsible for viewing and managing logfiles.

  • Command Line – Systemd Journals

    Systemd inaugurated a new journal system, journald. We look at how to view and interpret the new system logs.

  • QJournalctl

    QJournalctl is a convenient GUI tool that will help you track down log data in the systemd journal.

  • Systemd GUIs

    Graphical frontends make it easier to take full advantage of the Systemd process manager. We examine some leading tools for the KDE environment.

  • Command Line: Systemd

    Wondering what all the fuss is about systemd? We explain the basic concepts and capabilities of the new system management suite – coming soon to a distro near you.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News