Use this documentation with care! It describes
the outdated version 7, which was actively
developed around 2014 and is considered dead by the
This documentation reflects the latest update of the v7-stable branch. It describes the 7.6.8 version, which was never released. As such, it contains some content that does not apply to any released version.
To obtain the doc that properly matches your installed v7 version, obtain the doc set from your distro. Each version of rsyslog contained the version that exactly matches it.
As general advise, it is strongly suggested to upgrade to the current version supported by the rsyslog project. The current version can always be found on the right-hand side info box on the rsyslog web site.
Note that there is only limited rsyslog community support available for the outdated v7 version (officially we do not support it at all, but we usually are able to answer simple questions). If you need to stick with v7, it probably is best to ask your distribution for support.
Data items in rsyslog are called “properties”. They can have different origin. The most important ones are those that stem from received messages. But there are also others. Whenever you want to access data items, you need to access the resprective property.
Properties are used in
- conditional statements
The property name is case-insensitive (prior to 3.17.0, they were case-senstive).
These are extracted by rsyslog parsers from the original message. All message properties start with a letter.
The following message properties exist:
- the MSG part of the message (aka “the message” ;))
- the message excactly as it was received from the socket. Should be useful for debugging.
- hostname from the message
- alias for HOSTNAME
- hostname of the system the message was received from (in a relay chain, this is the system immediately in front of us and not necessarily the original sender). This is a DNS-resolved name, except if that is not possible or DNS resolution has been disabled.
- The same as fromhost, but alsways as an IP address. Local inputs (like imklog) use 127.0.0.1 in this property.
- TAG from the message
- the “static” part of the tag, as defined by BSD syslogd. For example, when TAG is “named”, programname is “named”.
- PRI part of the message - undecoded (single value)
- the PRI part of the message in a textual form with the numerical PRI appended in brackes (e.g. “local0.err<133>”)
- the monitorware InfoUnitType - used when talking to a MonitorWare backend (also for Adiscon LogAnalyzer)
- the facility from the message - in numerical form
- the facility from the message - in text form
- severity from the message - in numerical form
- severity from the message - in text form
- an alias for syslogseverity - included for historical reasons (be careful: it still is the severity, not PRI!)
- an alias for syslogseverity-text
- timestamp when the message was RECEIVED. Always in high resolution
- timestamp from the message. Resolution depends on what was provided in the message (in most cases, only seconds)
- alias for timereported
- The contents of the PROTCOL-VERSION field from IETF draft draft-ietf-syslog-protcol
- The contents of the STRUCTURED-DATA field from IETF draft draft-ietf-syslog-protocol
- The contents of the APP-NAME field from IETF draft draft-ietf-syslog-protocol
- The contents of the PROCID field from IETF draft draft-ietf-syslog-protocol
- The contents of the MSGID field from IETF draft draft-ietf-syslog-protocol
- The name of the input module that generated the message (e.g. “imuxsock”, “imudp”). Note that not all modules necessarily provide this property. If not provided, it is an empty string. Also note that the input module may provide any value of its liking. Most importantly, it is not necessarily the module input name. Internal sources can also provide inputnames. Currently, “rsyslogd” is defined as inputname for messages internally generated by rsyslogd, for example startup and shutdown and error messages. This property is considered useful when trying to filter messages based on where they originated - e.g. locally generated messages (“rsyslogd”, “imuxsock”, “imklog”) should go to a different place than messages generated somewhere.
These properties are provided by the rsyslog core engine. They are not related to the message. All system properties start with a dollar-sign.
timereported contains the timestamp
from the message. Depending on how long the message was in the relay chain, this
can be quite old. In contrast,
$now is the system time when the message
is being processed. Depending on your needs, you need one or the other. Usually,
the message-based timestamp is the more important one, but that really depdends
on the use case.
The following system properties exist:
- The UTF-8 encoded Unicode byte-order mask (BOM). This may be useful in templates for RFC5424 support, when the character set is know to be Unicode.
- The current date stamp in the format YYYY-MM-DD
- The current year (4-digit)
- The current month (2-digit)
- The current day of the month (2-digit)
- The current hour in military (24 hour) time (2-digit)
- The current half hour we are in. From minute 0 to 29, this is always 0 while from 30 to 59 it is always 1.
- The current quarter hour we are in. Much like $HHOUR, but values range from 0 to 3 (for the four quater hours that are in each hour)
- The current minute (2-digit)
- The name of the current host as it knows itself (probably useful for filtering in a generic way)