Files
skyg-linux-tracker/config.example.toml
T
ariandClaude Sonnet 5.5 c5972b762f WS-I: native TLS (optional, default off) with SIGHUP cert reload
server.tls.{enabled,cert_file,key_file}; rustls (ring, explicit provider) via
tokio-rustls + hyper-util; https:// MCP origins when enabled; non-loopback
plain-HTTP startup warning; tests/tls.rs; README TLS section.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 07:10:14 -04:00

57 lines
3.5 KiB
TOML

# skyg-linux-tracker example configuration.
#
# Precedence, lowest to highest: built-in defaults < this file < SKYG_* env vars < CLI flags.
# Default path: /etc/skyg-linux-tracker.toml (override with --config or SKYG_CONFIG).
# Every value below is the default. Env var names use the SKYG_ prefix and a
# double underscore for nesting, e.g. SKYG_SERVER__PORT.
# List values in env vars use array syntax: SKYG_OTEL__METRICS__UNITS='["nginx.service"]'.
[server]
bind = "127.0.0.1" # listen address; non-loopback requires auth.enabled = true; SKYG_SERVER__BIND
port = 9109 # listen port; SKYG_SERVER__PORT
allowed_hosts = [] # extra Host header values accepted on /mcp, added to loopback names and bind; SKYG_SERVER__ALLOWED_HOSTS
allowed_origins = [] # extra Origin values accepted on /mcp, must include scheme, e.g. "https://app.example.com"; SKYG_SERVER__ALLOWED_ORIGINS
# Native TLS for REST and /mcp. Optional and off by default: when enabled = false the
# server speaks plain HTTP and the file paths are ignored and never read.
# Certificate and key are re-read on SIGHUP (a bad new pair is rejected and the old one kept).
[server.tls]
enabled = false # serve HTTPS; requires cert_file and key_file; SKYG_SERVER__TLS__ENABLED
cert_file = "" # PEM certificate chain, leaf first; SKYG_SERVER__TLS__CERT_FILE
key_file = "" # PEM private key (PKCS#8, PKCS#1 or SEC1); SKYG_SERVER__TLS__KEY_FILE
[auth]
enabled = true # false is rejected at startup unless server.bind is loopback; SKYG_AUTH__ENABLED
db_path = "/var/lib/skyg-linux-tracker/db.sqlite" # SQLite database holding hashed API tokens; SKYG_AUTH__DB_PATH
[otel]
enabled = false # master switch for OTLP export; SKYG_OTEL__ENABLED
endpoint = "http://localhost:4317" # OTLP gRPC; use http://host:4318 with protocol "http/protobuf"; SKYG_OTEL__ENDPOINT
protocol = "grpc" # "grpc" or "http/protobuf"; SKYG_OTEL__PROTOCOL
service_name = "skyg-linux-tracker" # OTel resource attribute service.name; SKYG_OTEL__SERVICE_NAME
export_unit_metrics = true # poll systemd units and containers and export gauges; SKYG_OTEL__EXPORT_UNIT_METRICS
export_logs = false # fan journal and docker logs out as OTel logs; SKYG_OTEL__EXPORT_LOGS
metrics_interval_secs = 30 # metrics poll interval; SKYG_OTEL__METRICS_INTERVAL_SECS
# Extra OTLP headers (gRPC metadata for the grpc protocol).
# Env form: SKYG_OTEL__HEADERS__AUTHORIZATION. Values are redacted by --print-config.
[otel.headers]
# authorization = "Bearer <token>"
[otel.logs]
journal_units = [] # journal units to export as logs, empty = all; SKYG_OTEL__LOGS__JOURNAL_UNITS
docker_containers = [] # containers to export logs for, empty = all; SKYG_OTEL__LOGS__DOCKER_CONTAINERS
[otel.metrics]
units = [] # glob allowlist of units; empty = *.service and *.timer only; SKYG_OTEL__METRICS__UNITS
containers = [] # glob allowlist of containers; empty = all; SKYG_OTEL__METRICS__CONTAINERS
[sources]
docker_socket = "/var/run/docker.sock" # point at a read-only socket proxy for a hardened setup; SKYG_SOURCES__DOCKER_SOCKET
journal_namespace = "" # journal namespace, empty = default journal; SKYG_SOURCES__JOURNAL_NAMESPACE
[limits]
max_lines = 1000 # max journal lines per request; SKYG_LIMITS__MAX_LINES
max_tail = 1000 # max container log lines per request; SKYG_LIMITS__MAX_TAIL
max_follow_secs = 60 # max duration of a bounded follow (MCP tail_journal); SKYG_LIMITS__MAX_FOLLOW_SECS