journal-forwarder

Crates.iojournal-forwarder
lib.rsjournal-forwarder
version1.179.0
created_at2022-07-01 23:47:50.315618+00
updated_at2025-08-24 03:30:58.865834+00
descriptionUtility for forward systemd-journald logs to an HTTP endpoint.
homepagehttps://gitlab.com/kevincox/journal-forwarder
repositoryhttps://gitlab.com/kevincox/journal-forwarder
max_upload_size
id617550
size53,288
Kevin Cox (kevincox)

documentation

README

journal-forwarder

A simple script to forward journald logs over HTTP somewhat reliabily.

Configuration

All the configuration is passed in as environment variables. Either JF_URL or JF_URL_SRC is required.

JF_DEBUG

If set to a non-empty string batches are printed to stdout rather than being sent to the configured target.

JF_BATCH

The maximum number of entries to include in a batch. Entries are only sent in batches when logs are backed up. Once caught up entries are always sent live.

Defaults to 100.

JF_CURSOR

The path to a file where to store the cursor of previously transmitted logs. If this file does not exist it will be created and all logs will be uploaded.

Defaults to ./journal-forwarder.cursor.

JF_EXCLUDE_0

A sequence of field matches that are excluded from uploading. Each is given a sequential number starting with 0. Processing stops at the first missing number.

Each variable must be in the form FIELD=value. Exact matches for this pair are excluded. Any matching exclude is sufficient to prevent a log from being uploaded. Multiple excludes for the same field are possible.

Defaults to no excludes.

JF_METHOD

The HTTP method to use for sending logs.

Defaults to POST.

JF_URL or JF_URL_SRC

The URL where to upload the logs. JF_URL is the URL directly, if not set JF_URL_SRC is a path from where to read the URL.

This value is required.

Requirements

On nixos the following packages are required:

  • coreutils
  • curl
  • gnused
  • jq
  • systemd
  • utillinux (butilt with systemd support)

Questions

Open an issue so that I can answer and add docs.

Commit count: 211

cargo fmt