Syslog
Synopsis
Parses syslog messages into structured objects containing priority, facility, severity, hostname, application name, process ID, and message content.
See Appendix for details of the format.
Schema
- syslog:
field: <ident>
description: <text>
if: <script>
ignore_failure: <boolean>
ignore_missing: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>
target_field: <ident>
use_table: <boolean>
Configuration
The following fields are used to define the processor:
| Field | Required | Default | Description |
|---|---|---|---|
field | Y | - | Field containing the syslog message |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | See Handling Failures |
ignore_missing | N | false | If true, quietly exit if field doesn't exist |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |
disabled | N | false | When true, the processor is skipped and the event continues to the next one. Lets you take a processor out of the path without removing its configuration |
target_field | N | log.syslog | Field to store the parsed syslog object. Ignored when use_table is set |
use_table | N | false | Write the parsed components into the Syslog virtual table instead of building the log.syslog map |
Details
Table Mode
With use_table: true the parsed components go straight into the Syslog virtual table rather than into a map: Facility, SeverityLevel, HostName, ProcessID, ProcessName and SyslogMessage (falling back to the raw field when the parser finds no message body).
The table must already exist. Run create_table first; the processor fails with virtual table "Syslog" not created rather than falling back to the map, so a misconfigured pipeline is visible instead of silently dropping the parse.
EventTime and HostIP are not parser outputs — set them yourself with a date or set step against $Syslog.*. RFC 5424 structured data is dropped in this mode: the table has no column for a nested parameter bag, so a pipeline that needs the SD block must stay on the map path.
The parse-derived format is published to _vmetric.syslog_format as CEF, LEEF or native.
Supported Formats
The processor supports:
- RFC 3164 (BSD-style) syslog messages
- RFC 5424 (modern format) syslog messages with structured data
- Common Event Format (CEF) messages
- Log Event Extended Format (LEEF) messages
The field must contain a valid syslog message string that conforms to one of the supported formats. Invalid messages will cause the processor to fail unless ignore_failure is set to true.
Examples
Basic
Parsing a basic syslog message... | |
extracts message components: | |
Metadata
Parsing an RFC 5424 format message... | |
includes the structured data: | |
CEF
Parsing a Cisco Firepower CEF message... | |
extracts the CEF data: | |
Error Messages
Parsing the error level messages... | |
correctly identifies the severity: | |