Synthesized alerts — alerts
Evaluates a PromQL ratio each poll and emits an alert event when it exceeds a threshold. Use it to put a “this is bad” marker in the timeline without running Alertmanager.
Prerequisites: a reachable Prometheus server.
Set up
Agent
Ask a connected agent:
Use navflow to alert when the 5xx percentage on
localhost:9090exceeds 5.
The agent composes the ratio expression, test_source dry-runs it, then create_source.
Configuration
| field | type | description |
|---|---|---|
url* | string | Prometheus base URL |
ratio_promql* | string | PromQL expression returning the ratio to watch |
threshold | number | fire when the ratio exceeds this value (default 5) |
key | string | legacy fixed key — prefer a primary const label |
An alerts source marks the timeline; a trigger pushes.
To wake an agent when a condition holds, attach a trigger to a view instead — see
Watch with triggers.
Verify
Push the ratio over the threshold (or lower threshold temporarily) and watch the alert event land
on the next poll.
Last updated on