W Watchflare docs

Agent config (TOML)

Complete reference of all fields in the Watchflare agent configuration file.

The agent is configured via a TOML file written by the register command. You rarely need to edit it manually.

PlatformPath
Linux/etc/watchflare/agent.conf
macOS (Apple Silicon)/opt/homebrew/etc/watchflare/agent.conf
macOS (Intel)/usr/local/etc/watchflare/agent.conf

For full explanations, see Configuration reference.


All fields

agent.conf toml
# Hub connection
server_host = "hub.example.com"   # required
server_port = "50051"              # default: "50051"

# Credentials — written at registration, do not edit
agent_id  = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
agent_key = "base64encodedkey..."

# TLS
ca_cert_file = "/etc/watchflare/ca.pem"  # written at registration
server_name  = "watchflare"              # default: "watchflare"

# Collection intervals (seconds)
heartbeat_interval = 5    # default: 5
metrics_interval   = 30   # default: 30

# Write-Ahead Log
wal_enabled     = true    # default: true
wal_path        = "/var/lib/watchflare/metrics.wal"  # default: {data_dir}/metrics.wal
wal_max_size_mb = 10      # default: 10

# Logging
log_file  = "/var/log/watchflare-agent.log"  # default: "" (stdout)
log_level = "info"                            # default: "info"

# Container metrics (opt-in)
container_metrics = false  # default: false

Field reference

FieldTypeDefaultDescription
server_hoststringHub hostname or IP
server_portstring"50051"Hub gRPC port
agent_idstringUUID assigned at registration
agent_keystringHMAC signing key
ca_cert_filestringPath to Hub CA certificate
server_namestring"watchflare"TLS server name for certificate validation
heartbeat_intervalint5Seconds between heartbeats
metrics_intervalint30Seconds between metric collections
wal_enabledbooltrueBuffer metrics locally when Hub is unreachable
wal_pathstring{data_dir}/metrics.walWAL file path
wal_max_size_mbint10Max WAL size — older records are dropped (FIFO)
log_filestring""Log file path. Empty = stdout.
log_levelstring"info"debug / info / warn / error
container_metricsboolfalseEnable Docker container metrics

Environment variable overrides

VariableDescription
WATCHFLARE_CONFIG_DIROverride the config directory
WATCHFLARE_DATA_DIROverride the data directory
WATCHFLARE_LOG_FILEOverride the log file path
WATCHFLARE_DEBUGSet to 1 to force debug log level

File locations

Linux

PathPurposeOwnerMode
/usr/local/bin/watchflare-agentBinaryroot:root755
/etc/watchflare/agent.confConfigroot:watchflare640
/etc/watchflare/ca.pemCA certificateroot:watchflare640
/var/lib/watchflare/Data directorywatchflare:watchflare750
/var/lib/watchflare/metrics.walWALwatchflare:watchflare
/var/lib/watchflare/packages.state.jsonPackage statewatchflare:watchflare640
/var/log/watchflare-agent.logLogswatchflare:watchflare644
/etc/systemd/system/watchflare-agent.serviceServiceroot:root644

macOS (Apple Silicon — /opt/homebrew)

PathPurpose
/opt/homebrew/bin/watchflare-agentBinary
/opt/homebrew/etc/watchflare/agent.confConfig
/opt/homebrew/etc/watchflare/ca.pemCA certificate
/opt/homebrew/var/watchflare/Data directory
/opt/homebrew/var/watchflare/metrics.walWAL
/opt/homebrew/var/log/watchflare-agent.logLogs

On Intel Mac, replace /opt/homebrew with /usr/local.