Configuration
Mimir Metrics can be configured via a YAML file (config.yaml), environment variables, or CLI flags.
Precedence: CLI Flags > Environment Variables > Config File > Defaults.
Quick Reference
| Flag | Env Var | YAML Key | Default | Description |
|---|---|---|---|---|
-config |
- | - | config.yaml |
Path to config file |
-broker |
MIMIR_BROKER_URL |
broker_url |
tcp://localhost:1883 |
MQTT Broker URL |
-client-id |
MIMIR_CLIENT_ID |
client_id |
mimir-metrics-$HOST |
MQTT Client ID |
-interval |
MIMIR_INTERVAL |
interval_seconds |
10 |
Collection interval (sec) |
-enable-logging |
MIMIR_ENABLE_LOGGING |
enable_logging |
- | Comma-separated sources (journald, docker, files) |
Configuration File
The default configuration file is config.yaml.
# Connection
broker_url: "tcp://localhost:1883"
client_id: "mimir-node-1"
username: ""
password: ""
# Metrics
interval_seconds: 10
host: "my-server"
enable_local: true
enable_docker: true
docker_socket: "/var/run/docker.sock"
# Disk Monitoring
disk_paths:
- "/"
- "/mnt/storage"
# Process Monitoring
enable_process: true
process_names:
- "nginx"
- "postgres"
process_metrics:
cpu: true
memory: true
# Logging Sidecar (Vector)
enable_logging: "journald,docker" # or "windows_eventlog" on Windows
logging_files:
- "/var/log/nginx/access.log"
logging_sink_url: "http://ingest.example.com/api/logs"
logging_api_key: "secret-token"
Environment Variables
All configuration options can be set via environment variables prefixed with MIMIR_.
MIMIR_BROKER_URLMIMIR_USERNAMEMIMIR_PASSWORDMIMIR_TOPIC_TEMPLATE(default:metrics/$host/$device/$metric)MIMIR_LOGGING_SINK_URLMIMIR_LOGGING_API_KEY
Logging Configuration
See the Logging Sidecar page for detailed logging setup.