Alerts CLI Reference¶
Overview¶
The lango alerts command group provides access to operational alerts generated by the alerting system. Alerts are triggered when configurable thresholds are exceeded (e.g., policy block rate, recovery retries).
Requires a running Lango server (lango serve) with alerting.enabled: true.
Both table and JSON modes write through the Cobra command output stream so wrappers and test harnesses can capture alerts output directly.
Unknown --output values fail fast with an actionable error before any alerts command contacts the gateway.
Commands¶
lango alerts list¶
List recent operational alerts.
lango alerts list [--days=7] [--output table|json] [--addr <url>]
Flags:
| Flag | Default | Description |
|---|---|---|
--days |
7 |
Number of days to look back |
--output |
table |
Output format: table or json |
--addr |
configured server address | Gateway address override |
When --addr is omitted, alerts commands use the configured server.host and server.port, falling back to http://localhost:18789 only when those values are unavailable.
Example:
# List alerts from the last 3 days
lango alerts list --days=3
# Output as JSON
lango alerts list --output json
lango alerts summary¶
Show aggregated alert counts by type.
lango alerts summary [--output table|json] [--addr <url>]
Example:
lango alerts summary
Alert Types¶
| Type | Trigger | Status |
|---|---|---|
policy_block_rate |
Policy block count exceeds threshold in a 5-minute window | Active |
recovery_retries |
Recovery retry count exceeds threshold per session (sliding 5min window) | Active |
circuit_breaker |
Circuit breaker tripped for an agent | Active |
config_drift |
Configuration or provenance drift detected | Planned |
Configuration¶
Enable alerting in your imported JSON config or through lango settings:
alerting:
enabled: true
policyBlockRateThreshold: 10
recoveryRetryThreshold: 5
Note: Alert channel routing (e.g., to Slack or Discord) is planned for a future release.