syslog

In computing, syslog 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 software type generating the message, and 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.

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. A variety of implementations also exist on other operating systems and it is commonly found in network devices, such as routers.

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.[2]

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

Syslog 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.

Facility

A facility code is used to specify the type of program that is logging the message. Messages with different facilities may be handled differently.[5] The list of facilities available is defined by the standard:[2]:9

Facility codeKeywordDescription
0kernkernel messages
1useruser-level messages
2mailmail system
3daemonsystem daemons
4authsecurity/authorization messages
5syslogmessages generated internally by syslogd
6lprline printer subsystem
7newsnetwork news subsystem
8uucpUUCP subsystem
9cronclock daemon
10authprivsecurity/authorization messages
11ftpFTP daemon
12ntpNTP subsystem
13securitylog audit
14consolelog alert
15solaris-cronscheduling daemon
16-23local0...local7locally used facilities (local0-local7)

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

Severity level

The list of severities is also defined by the standard:[2]:10

ValueSeverityKeywordDeprecated keywordsDescriptionCondition
0Emergencyemergpanic[7]System is unusable.A panic condition.[8]
1AlertalertAction must be taken immediatelyA condition that should be corrected immediately, such as a corrupted system database.[8]
2CriticalcritCritical conditionsHard device errors.[8]
3Errorerrerror[7]Error conditions
4Warningwarningwarn[7]Warning conditions
5NoticenoticeNormal but significant conditionsConditions that are not error conditions, but that may require special handling.[8]
6InformationalinfoInformational messages
7DebugdebugDebug-level messagesMessages that contain information normally of use only when debugging a program.[8]

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.

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,[9] "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.

Logger

The messages may be directed to various destinations, tuned by facility and severity, including console, files, remote syslog servers, or relays.

Most implementations provide a command line utility, often called logger, as well as a link library, to send messages to the log. Some implementations include reporting programs for filtering and displaying of syslog messages.

Network protocol

When operating over a network, syslog implements a client-server application structure 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. As UDP lacks congestion control mechanisms, support for Transport Layer Security is required to implement and also recommended for general use[10] on Transmission Control Protocol port 6514.[11]

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.

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 health care environment.[12]

Regulations, such as the Sarbanes-Oxley Act, PCI DSS, HIPAA, and many others, are requiring 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. Converters exist from Windows Event Log as well as other log formats to syslog.

An emerging area of managed security services is the collection and analysis of syslog records for organizations. Managed Security Service Providers attempt to apply analytical techniques and artificial intelligence algorithms to detect patterns and alert customers to problems.

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:[13]

Tools

To display and monitor the collected logs one need to use a client application or access the log file directly on the system. The log servers can be configured to send the logs over the network (in addition to the local files).

The basic command line tools are tail and grep.

See also

References

  1. "Eric Allman". Internet Hall of Fame. Retrieved 2017-10-30.
  2. 1 2 3 Gerhards, Rainer. The Syslog Protocol. doi:10.17487/RFC5424. RFC 5424. https://tools.ietf.org/html/rfc5424.
  3. "LXer: Patent jeopardizes IETF syslog standard".
  4. "IETF IPR disclosure on HUAWEI's patent claims".
  5. "Syslog Facility". Retrieved 22 November 2012.
  6. "The Ins and Outs of System Logging Using Syslog". SANS Institute.
  7. 1 2 3 "syslog.conf(5) - Linux man page". Retrieved 2017-03-29.
  8. 1 2 3 4 5 "closelog, openlog, setlogmask, syslog - control system log". Retrieved 2017-03-29.
  9. Gerhards, Rainer (March 2009). "RFC 5424 - The Syslog Protocol". 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.
  10. "RFC 5424 - The Syslog Protocol".
  11. "RFC 5425 - TLS Transport Mapping for Syslog".
  12. "ATNA + SYSLOG is good enough". Healthcare Exchange Standards. Retrieved 2018-06-06.
  13. "Security Issues in Network Event Logging (syslog)". IETF.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.