Overview
kanari agent runs a continuous monitoring loop. On each cycle it collects metrics and either logs them locally (local mode) or sends them to the Kanari backend for persistent monitoring and alerts (API mode).
Ctrl+C or SIGTERM. The agent handles both gracefully.
Flags
API key resolution
The agent finds your API key automatically in this order:--tokenflagKANARI_API_KEYenvironment variable~/.kanari/config— saved bykanari login← recommendedapi_keyin yourkanari.yaml
kanari login, you never need to set an API key manually.
Local mode
The best way to verify what the agent collects before connecting it to the backend.jq for filtering: