Syslog: Comparison
Please note this is a comparison between Version 2 by Rita Xu and Version 1 by Rita Xu.

In computing, syslog /ˈsɪslɒɡ/ is a standard for message logging. It allows separation of the software that generates messages, the system that stores them, and the software that reports and analyzes them. Each message is labeled with a facility code, indicating the type of system generating the message, and is assigned a severity level. Computer system designers may use syslog for system management and security auditing as well as general informational, analysis, and debugging messages. A wide variety of devices, such as printers, routers, and message receivers across many platforms use the syslog standard. This permits the consolidation of logging data from different types of systems in a central repository. Implementations of syslog exist for many operating systems. When operating over a network, syslog uses a client-server architecture where a syslog server listens for and logs messages coming from clients.

  • syslog
  • security auditing
  • ˈsɪslɒɡ

1. History

Syslog was developed in the 1980s by Eric Allman as part of the Sendmail project.[1] It was readily adopted by other applications and has since become the standard logging solution on Unix-like systems.[2] A variety of implementations also exist on other operating systems and it is commonly found in network devices, such as routers.[3]

Syslog originally functioned as a de facto standard, without any authoritative published specification, and many implementations existed, some of which were incompatible. The Internet Engineering Task Force documented the status quo in RFC 3164. It was standardized by RFC 5424.[4]

Various companies have attempted to claim patents for specific aspects of syslog implementations.[5][6] This has had little effect on the use and standardization of the protocol.

2. Message Components

The information provided by the originator of a syslog message includes the facility code and the severity level. The syslog software adds information to the information header before passing the entry to the syslog receiver. Such components include an originator process ID, a timestamp, and the hostname or IP address of the device.

2.1. Facility

A facility code is used to specify the type of system that is logging the message. Messages with different facilities may be handled differently.[7] The list of facilities available is described by the standard:[4]:9

Facility code Keyword Description
0 kern Kernel messages
1 user User-level messages
2 mail Mail system
3 daemon System daemons
4 auth Security/authentication messages
5 syslog Messages generated internally by syslogd
6 lpr Line printer subsystem
7 news Network news subsystem
8 uucp UUCP subsystem
9 cron Cron subsystem
10 authpriv Security/authentication messages
11 ftp FTP daemon
12 ntp NTP subsystem
13 security Log audit
14 console Log alert
15 solaris-cron Scheduling daemon
16–23 local0 – local7 Locally used facilities

The mapping between facility code and keyword is not uniform in different operating systems and syslog implementations.[8]

2.2. Severity Level

The list of severities is also described by the standard:[4]:10

Value Severity Keyword Deprecated keywords Description Condition
0 Emergency emerg panic[9] System is unusable A panic condition.[10]
1 Alert alert   Action must be taken immediately A condition that should be corrected immediately, such as a corrupted system database.[10]
2 Critical crit   Critical conditions Hard device errors.[10]
3 Error err error[9] Error conditions  
4 Warning warning warn[9] Warning conditions  
5 Notice notice   Normal but significant conditions Conditions that are not error conditions, but that may require special handling.[10]
6 Informational info   Informational messages Confirmation that the program is working as expected.
7 Debug debug   Debug-level messages Messages that contain information normally of use only when debugging a program.[10]

The meaning of severity levels other than Emergency and Debug are relative to the application. For example, if the purpose of the system is to process transactions to update customer account balance information, an error in the final step should be assigned Alert level. However, an error occurring in an attempt to display the ZIP code of the customer may be assigned Error or even Warning level.

The server process which handles display of messages usually includes all lower (more severe) levels when display of less severe levels is requested. That is, if messages are separated by individual severity, a Warning level entry will also be included when filtering for Notice, Info and Debug messages.[11]

2.3. Message

In RFC 3164, the message component (known as MSG) was specified as having these fields: TAG, which should be the name of the program or process that generated the message, and CONTENT which contains the details of the message.

Described in RFC 5424,[12] "MSG is what was called CONTENT in RFC 3164. The TAG is now part of the header, but not as a single field. The TAG has been split into APP-NAME, PROCID, and MSGID. This does not totally resemble the usage of TAG, but provides the same functionality for most of the cases." Popular syslog tools such as Rsyslog conform to this new standard.

The content field should be encoded in a UTF-8 character set and octet values in the traditional ASCII control character range should be avoided.[13][14]

3. Logger

Generated log messages may be directed to various destinations including console, files, remote syslog servers, or relays. Most implementations provide a command line utility, often called logger, as well as a software library, to send messages to the log.[15]

To display and monitor the collected logs one needs to use a client application or access the log file directly on the system. The basic command line tools are tail and grep. The log servers can be configured to send the logs over the network (in addition to the local files). Some implementations include reporting programs for filtering and displaying of syslog messages.

4. Network Protocol

When operating over a network, syslog uses a client-server architecture where the server listens on a well-known or registered port for protocol requests from clients. Historically the most common transport layer protocol for network logging has been User Datagram Protocol (UDP), with the server listening on port 514.[16] Because UDP lacks congestion control mechanisms, Transmission Control Protocol (TCP) port 6514 is used; Transport Layer Security is also required in implementations and recommended for general use.[17][18]

5. Limitations

Since each process, application, and operating system was written independently, there is little uniformity to the payload of the log message. For this reason, no assumption is made about its formatting or contents. A syslog message is formatted (RFC 5424 gives the Augmented Backus–Naur form (ABNF) definition), but its MSG field is not.

The network protocol is simplex communication, with no means of acknowledging the delivery to the originator.

6. Outlook

Various groups are working on draft standards detailing the use of syslog for more than just network and security event logging, such as its proposed application within the healthcare environment.[19]

Regulations, such as the Sarbanes-Oxley Act, PCI DSS, HIPAA, and many others, require organizations to implement comprehensive security measures, which often include collecting and analyzing logs from many different sources. The syslog format has proven effective in consolidating logs, as there are many open-source and proprietary tools for reporting and analysis of these logs. Utilities exist for conversion from Windows Event Log and other log formats to syslog.

Managed Security Service Providers attempt to apply analytical techniques and artificial intelligence algorithms to detect patterns and alert customers to problems.[20]

7. Internet Standard Documents

The Syslog protocol is defined by Request for Comments (RFC) documents published by the Internet Engineering Task Force (Internet standards). The following is a list of RFCs that define the syslog protocol:[21]

  • The BSD syslog Protocol  (obsoleted by The Syslog Protocol )
  • Reliable Delivery for syslog 
  • The Syslog Protocol 
  • TLS Transport Mapping for Syslog 
  • Transmission of Syslog Messages over UDP 
  • Textual Conventions for Syslog Management 
  • Signed Syslog Messages 
  • Datagram Transport Layer Security (DTLS) Transport Mapping for Syslog 
  • Transmission of Syslog Messages over TCP 

References

  1. "Eric Allman". Internet Hall of Fame. https://www.internethalloffame.org/inductees/eric-allman. 
  2. "3 great engineering roles to apply for this week" (in en-US). 2021-08-06. https://venturebeat.com/2021/08/06/3-great-engineering-roles-to-apply-for-this-week/. 
  3. "Efficient and Robust Syslog Parsing for Network Devices in Datacenter Networks". https://www.researchgate.net/publication/339174356. 
  4. nullGerhards, Rainer, The Syslog Protocol, doi:10.17487/RFC5424, RFC 5424.
  5. "LXer: Patent jeopardizes IETF syslog standard". http://lxer.com/module/newswire/view/64026/index.html. 
  6. "IETF IPR disclosure on HUAWEI's patent claims". http://datatracker.ietf.org/public/ipr_detail_show.cgi?ipr_id=724. 
  7. "Syslog Facility". http://linux.die.net/man/3/syslog. 
  8. "The Ins and Outs of System Logging Using Syslog". SANS Institute. http://www.sans.org/reading_room/whitepapers/logging/ins-outs-system-logging-syslog_1168. 
  9. "syslog.conf(5) - Linux man page". https://linux.die.net/man/5/syslog.conf. 
  10. "closelog, openlog, setlogmask, syslog - control system log". http://pubs.opengroup.org/onlinepubs/009695399/functions/syslog.html. 
  11. "Severity Levels for Syslog Messages". https://docs.delphix.com/docs53/system-administration/system-monitoring/setting-syslog-preferences/severity-levels-for-syslog-messages. 
  12. Gerhards, Rainer (March 2009). RFC 5424 - The Syslog Protocol. https://tools.ietf.org/html/rfc5424#appendix-A.1. "This document describes a layered architecture for syslog. The goal of this architecture is to separate message content from message transport while enabling easy extensibility for each layer.". 
  13. "Transmission of Syslog Messages over TCP". https://www.ipa.go.jp/security/rfc/RFC6587EN.html. 
  14. Gerhards, Rainer (March 2009). rfc5424. https://datatracker.ietf.org/doc/html/rfc5424. Retrieved 2021-08-16. 
  15. "logger Command" (in en-us). https://www.ibm.com/docs/en/aix/7.2?topic=l-logger-command. 
  16. "Syslog Server". https://www.howtonetwork.com/technical/security-technical/syslog-server/. 
  17. Gerhards, Rainer (March 2009). RFC 5424 - The Syslog Protocol. https://tools.ietf.org/html/rfc5424#section-8.6. 
  18. Fuyou, Miao; Yuzhi, Ma; Salowey, Joseph A. (March 2009). RFC 5425 - TLS Transport Mapping for Syslog. https://tools.ietf.org/html/rfc5425#section-7.1. 
  19. "ATNA + SYSLOG is good enough". Healthcare Exchange Standards. 2 January 2012. https://healthcaresecprivacy.blogspot.com/2011/12/atna-syslog-is-good-enough.html. 
  20. Yamanishi, Kenji; Maruyama, Yuko (2005-08-21). "Dynamic syslog mining for network failure monitoring". Proceedings of the Eleventh ACM SIGKDD International Conference on Knowledge Discovery in Data Mining. KDD '05 (Chicago, Illinois, USA: Association for Computing Machinery): 499–508. doi:10.1145/1081870.1081927. ISBN 978-1-59593-135-1. https://doi.org/10.1145/1081870.1081927. 
  21. "Security Issues in Network Event Logging (syslog)". IETF. http://datatracker.ietf.org/wg/syslog/. 
More
ScholarVision Creations