Skip to content

datalust/seq-input-syslog

Repository files navigation

Seq.Input.Syslog and datalust/seq-input-syslog

Ingest syslog RFC 5424 and RFC 3164 messages via UDP into Seq.

The app is packaged both as a plug-in Seq App for all platforms, and as a standalone Docker container that forwards events to Seq via its HTTP API.

Getting started on Windows (requires Seq 5.1+)

On Windows, the syslog input is installed into Seq as a Seq App.

Seq syslog input

1. Install the app package

In Settings > Apps, choose Install from NuGet. The app package id is Seq.Input.Syslog.

2. Start an instance of the app

From the apps screen, choose Add Instance and give the new syslog input a name.

The default settings will cause the syslog input to listen on localhost port 514. Choose a different port if required.

Select Save Changes to start the input.

3. Configure Windows Firewall

Ensure UDP port 514 (or the selected port, if you specified a different one), is allowed through Windows Firewall.

4. Log some events!

That's all there is to it. Events ingested through the input will appear in the Events stream. If the input doesn't work, check for diagnostic events raised by the input app (there is some status information shown under the app instance name).

Events ingested by the input will be associated with the default None API key, which can be used to attach properties, apply filters, or set a minimum level for the ingested events.

Getting started with Docker (all versions)

For Docker, the app is deployed as a Docker container that is expected to run alongside the Seq container. The datalust/seq-input-syslog container accepts syslog messages (via UDP on port 514 by default), and forwards them to the Seq ingestion endpoint specified in the SEQ_ADDRESS environment variable.

To run the container:

$ docker run \
    --rm \
    -it \
    -p 514:514/udp \
    -e SEQ_ADDRESS=https://seq.example.com:5341 \
    datalust/seq-input-syslog

The container is published on Docker Hub as datalust/seq-input-syslog, previously datalust/squiflog (still updated, for backwards-compatibility).

Container configuration

A seq-input-syslog container can be configured using the following environment variables:

Variable Description Default
SEQ_ADDRESS The address of the Seq server to forward events to http://localhost:5341
SEQ_API_KEY The API key to use -
SYSLOG_ADDRESS The address to bind the syslog server to udp://0.0.0.0:514
SYSLOG_ENABLE_DIAGNOSTICS Whether to enable diagnostic logs and metrics (accepts True or False) False

Collecting Docker container logs

The output from any Docker container can be collected by configuring its logging driver on startup:

$ docker run \
    --rm \
    -it \
    --log-driver syslog \
    --log-opt syslog-address=udp://seq-input-syslog.example.com:514 \
    --log-opt syslog-format=rfc5424 \
    my-app:latest

In this case the syslog-address option needs to resolve to the running seq-input-syslog container.

Important note: providing the --log-opt syslog-format=rfc5424 enables the stricter and more informative RFC 5424 syslog format. Leaving this unset may default to the earlier RFC 3164 format.