datalust/seq-input-gelf

By datalust

Updated about 1 month ago

A server that accepts GELF (Graylog extended format) messages via UDP/TCP and writes them to Seq.

Image
2

1M+

datalust/seq-input-gelf repository overview

datalust/seq-input-gelf

Previously datalust/sqelf.

A server that accepts Graylog extended format messages via UDP or TCP and writes them to Seq.

See the GitHub repo for more details.

Getting started

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

To run the container:

docker run \
    --name seq-input-gelf \
    -d \
    --restart unless-stopped \
    -p 12201:12201/udp \
    -e SEQ_ADDRESS=https://seq.example.com:5341 \
    datalust/seq-input-gelf
Container configuration

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

VariableDescriptionDefault
SEQ_ADDRESSThe address of the Seq server to forward events tohttp://localhost:5341
SEQ_API_KEYThe API key to use-
GELF_ADDRESSThe address to bind the GELF server to. The protocol may be udp or tcpudp://0.0.0.0:12201
GELF_ENABLE_DIAGNOSTICSWhether to enable diagnostic logs and metrics (accepts True or False)False
Quick local setup with docker-compose

The following is an example docker-compose file that can be used to manage a local Seq container alongside seq-input-gelf in your development environment to collect log events from other containers:

version: '3'
services:
  seq-input-gelf:
    image: datalust/seq-input-gelf:latest
    depends_on:
      - seq
    ports:
      - "12201:12201/udp"
    environment:
      SEQ_ADDRESS: "http://seq:5341"
    restart: unless-stopped
  seq:
    image: datalust/seq:latest
    ports:
      - "5341:80"
    environment:
      ACCEPT_EULA: Y
    restart: unless-stopped
    volumes:
      - ./seq-data:/data

The service can be started using docker-compose up.

Usage Example: Collecting Docker container logs

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

docker run \
    --name my-app \
    -d \
    --restart unless-stopped \
    --log-driver gelf \
    --log-opt gelf-address=udp://seq-input-gelf.example.com:12201 \
    my-app:latest

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

Tag summary

Content type

Image

Digest

sha256:38d92d99e

Size

85.2 MB

Last updated

about 1 month ago

docker pull datalust/seq-input-gelf