---
title: Syslog
slug: telemetry-pipeline/syslog
docTags: 
createdAt: 2025-04-21T00:48:04.292Z
---

## Syslog Source

Collect log events sent using the **Syslog protocol** over TCP, UDP, or Unix Domain Sockets (UDS).
&#x20;This source is commonly used to ingest logs from network devices, operating systems, appliances, and legacy applications that emit Syslog-formatted messages.

It can operate both as a **central aggregator** and as a **sidecar** component.

## Collection Model

- Listens for incoming Syslog messages on a socket&#x20;
- Supports **TCP**, **UDP**, and **Unix Domain Sockets**&#x20;
- Parses incoming messages and forwards them immediately downstream&#x20;
- Designed for low-latency ingestion rather than guaranteed delivery&#x20;

This source does not provide backpressure or retry guarantees.

## Transport Modes

### TCP

- Connection-oriented&#x20;
- Supports TLS encryption&#x20;
- Allows connection limits and origin filtering&#x20;
- Suitable for reliable network-based log shipping&#x20;

### UDP

- Connectionless and lightweight&#x20;
- No delivery guarantees&#x20;
- Best suited for high-throughput or lossy environments where performance is prioritized&#x20;

### Unix Domain Socket (UDS)

- Local-only communication&#x20;
- Lowest latency and overhead&#x20;
- Suitable for sidecar or same-host integrations&#x20;

Only Unix **stream** sockets are supported.
&#x20;For Unix datagram sockets, a generic socket source should be used instead.

## Network Binding

### address (required for TCP and UDP)

Defines the socket address to listen on.

Operational notes:

- Must include a port number&#x20;
- Can also reference a socket passed via **systemd socket activation**&#x20;
- Determines where external systems send Syslog messages&#x20;

### path (required for Unix mode)

Defines the absolute filesystem path of the Unix socket.

Operational notes:

- The path must be writable by the running process&#x20;
- File permissions can be controlled separately&#x20;

## Connection Management

### connection\_limit (optional)

Limits the number of concurrent TCP connections.

Useful for:

- Protecting the process from resource exhaustion&#x20;
- Preventing unbounded client connections in aggregator deployments&#x20;

Only applies when using TCP.

### keepalive (optional)

Controls TCP keepalive behavior.

Helps detect:

- Broken connections&#x20;
- Idle clients that are no longer reachable&#x20;

Only applies to TCP-based listeners.

## Message Size Handling

### max\_length (optional)

Defines the maximum buffer size for incoming messages.

Messages exceeding this size are truncated.

This protects the system from:

- Malformed messages&#x20;
- Unexpectedly large payloads&#x20;
- Memory pressure from oversized logs&#x20;

## Source Identification

### host\_key (optional)

Defines the event field used to store the sender’s identity.

Behavior depends on transport mode:

- **TCP / UDP:** peer IP address and port&#x20;
- **Unix socket:** socket path&#x20;

If not set, the global schema’s host field is used.

## Origin Filtering

### permit\_origin (optional)

Restricts incoming TCP connections to a set of allowed IP networks.

Operational notes:

- IPs must be specified in CIDR notation&#x20;
- Only applies to TCP&#x20;
- Useful for securing aggregator endpoints exposed on a network&#x20;

## Socket Buffering

### receive\_buffer\_bytes (optional)

Controls the size of the socket receive buffer.

In most cases, the default value is sufficient and should not be modified.

Applies to both TCP and UDP.

## Unix Socket Permissions

### socket\_file\_mode (optional)

Defines filesystem permissions for the Unix socket file.

This controls which users or processes are allowed to write logs to the socket.

Only relevant when using Unix Domain Sockets.

## TLS Support

TLS can be enabled to secure Syslog traffic, primarily for TCP-based deployments.

### TLS Enablement

When TLS is enabled:

- Incoming connections are encrypted&#x20;
- The server presents an identity certificate&#x20;
- Client certificates can optionally be required and verified&#x20;

### Certificate Configuration

TLS configuration supports:

- Server certificate and private key&#x20;
- Optional passphrase for encrypted keys&#x20;
- Custom Certificate Authority bundles&#x20;
- Inline or file-based certificate material&#x20;

### Client Identity Metadata

### tls.client\_metadata\_key (optional)

Defines the event field where client certificate metadata is stored.

This enables:

- Attribution of logs to authenticated clients&#x20;
- Auditing and trust-based routing decisions downstream&#x20;

### Verification Controls

- **verify\_certificate:** Enforces certificate chain validation&#x20;
- **verify\_hostname:** Validates hostname against the certificate (outgoing only)&#x20;

Disabling verification weakens security and should only be done with full understanding of the risks.

## ALPN Support

### tls.alpn\_protocols (optional)

Defines supported ALPN protocols during TLS negotiation.

Protocols are prioritized in the order they are declared.

## Reliability Semantics

- Messages are processed on a **best-effort basis**&#x20;
- No acknowledgements or retries&#x20;
- Data loss is possible during:&#x20;
  - Network interruptions&#x20;
  - Process restarts&#x20;
  - Buffer overflows&#x20;

This design favors throughput and simplicity over guaranteed delivery.

## Common Use Cases

- Central Syslog collector for network devices&#x20;
- Log ingestion from firewalls, routers, and appliances&#x20;
- Sidecar-based local Syslog receivers&#x20;
- Migration from traditional Syslog servers to modern telemetry pipelines&#x20;
- Feeding SIEM, log analytics, or long-term storage system
