syslog source receives syslog-formatted log data over TCP, UDP, or Unix domain sockets. It supports both RFC 3164 (BSD syslog) and RFC 5424 formats.
Configuration
Parameters
Transport mode for receiving syslog messages.Options:
tcp, udp, unixSocket address to listen on.
Unix socket path (Unix mode only).
Maximum buffer size of incoming messages in bytes.
Field name for the peer host. Defaults to global
log_schema.host_key.For TCP/UDP: the peer’s IP address and port (e.g., 1.2.3.4:9000)
For Unix: the socket pathTCP keepalive configuration (TCP mode only).
TLS configuration for secure syslog (TCP mode only).
Size of the socket receive buffer in bytes.
Maximum number of concurrent TCP connections (TCP mode only).
IP allowlist configuration (TCP mode only).
Unix file permissions for the socket file in octal (Unix mode only).
Output Schema
The syslog source produces log events with fields parsed from the syslog message:| Field | Type | Description |
|---|---|---|
message | string | The syslog message content |
timestamp | timestamp | Parsed syslog timestamp |
hostname | string | Hostname from syslog message |
severity | string | Syslog severity level |
facility | string | Syslog facility |
version | integer | Syslog version (RFC 5424 only) |
appname | string | Application name |
procid | integer/string | Process ID |
msgid | string | Message ID (RFC 5424 only) |
source_ip | string | IP address of the sender |
source_type | string | Always “syslog” |
| Structured data | object | RFC 5424 structured data elements |
Examples
TCP Syslog
UDP Syslog
Unix Domain Socket
TLS-Encrypted Syslog
High-Performance Configuration
IP Allowlist
How It Works
Message Parsing
The source automatically detects and parses both syslog formats: RFC 3164 (BSD syslog):Structured Data
RFC 5424 structured data is parsed into nested objects:Severity and Facility
The priority value<PRI> is decoded into human-readable severity and facility:
Severity levels:
- 0: emergency
- 1: alert
- 2: critical
- 3: error
- 4: warning
- 5: notice
- 6: informational
- 7: debug
- 0: kernel
- 1: user
- 2: mail
- 3: daemon
- 4: auth
- 16-23: local0-local7
- (and more)
Transport Modes
TCP:- Reliable, ordered delivery
- Connection-oriented
- Supports TLS encryption
- Suitable for most production use cases
- Fire-and-forget, no delivery guarantees
- Lower overhead
- Better for high-volume, loss-tolerant scenarios
- Local communication only
- Lowest overhead
- Perfect for same-host log collection
Performance
- TCP mode can handle millions of messages per second
- UDP mode has lower latency but no delivery guarantees
- Unix sockets have the lowest overhead for local communication
- Connection pooling and keep-alive improve TCP performance
- Tune
receive_buffer_bytesfor high-throughput scenarios
Best Practices
- Use TCP mode for reliable log delivery
- Enable TLS for syslog over untrusted networks
- Set appropriate
max_lengthbased on expected message sizes - Configure
connection_limitto prevent resource exhaustion - Use Unix sockets for local log forwarding
- Monitor connection counts and dropped messages
- Configure firewall rules for port 514 (or custom port)
- Use structured logging (RFC 5424) when possible
- Set up log rotation for high-volume scenarios
- Test with actual syslog clients (rsyslog, syslog-ng, etc.)