Configuration

There is currently very little configuration required to use Central Logging. Most configuration is done through the web interface. However, there are a few things that can be configured via environment variables and CLI flags.

CLI Flags

  • -v — Display the application version and build date
  • -install — Install Central Logging as a systemd service (requires sudo)
  • -update — Download and install the latest version of the binary

Environment Variables

  • PORT — HTTP listen address and port. Defaults to :80. Set this when running locally or behind a reverse proxy (e.g. PORT=:8080).

S3 Backups

Nightly backups upload the main application database and every per-source log database to an S3 bucket. Both AWS S3 and self-hosted S3-compatible servers such as Garage and MinIO are supported.

Backups can be configured on the Settings page in the web UI (see below) or with the following environment variables:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • BACKUP_AWS_REGION
  • BACKUP_S3_BUCKET
  • BACKUP_S3_ENDPOINT — optional. Set this to the URL of an S3-compatible server (e.g. https://s3.example.com:3900 for Garage). Leave unset for AWS S3.

Values saved in the web UI take precedence over environment variables.

Backups are uploaded under the appdb/ prefix (main database) and logs/{source-token}/ prefixes (per-source log databases), and backups older than 15 days are removed automatically.

Example for a Garage server: set the endpoint to your Garage S3 API URL (e.g. https://s3.example.com:3900), the region to your Garage region (garage by default), and use a bucket and key pair created with garage bucket create / garage key create.

Web UI Settings

After initial setup, the following settings are available in the Settings page:

  • Host — The domain name used for links back to your Central Logging instance. Must be a valid domain.
  • Admin Email — Used for Let’s Encrypt TLS certificates and login.
  • License Key — Unlock additional features with a license key.
  • Backup S3 Endpoint — Optional URL of an S3-compatible server (Garage, MinIO, …). Leave blank for AWS S3.
  • Backup S3 Region — Region of the backup bucket (Garage servers typically use garage).
  • Backup S3 Bucket — Bucket that nightly backups are uploaded to.
  • Backup S3 Access Key ID / Backup S3 Secret Access Key — Credentials for the backup bucket.

Log Source Configuration

Each log source can be configured individually:

  • Retention Days — How many days to keep logs before automatic cleanup. Defaults to 15 days.
  • Transform Script — An optional JavaScript transformation applied to incoming logs during batch processing. See Sending Logs for details.

Data Directory

Central Logging stores all data in a cl-data/ directory relative to the binary:

cl-data/
├── db.db                    # Main application database
├── sessions.db              # Session store
├── {source-token}/
│   └── logs.db              # Per-source log database
└── metrics/
    └── {metric-token}/
        └── metrics.db       # Per-metric time-series data

Backups of the main database are created automatically on a daily schedule.

💌 Get notified on new features and updates

Only sent when a new version is released. Nothing else.