Skip to Content
TaresConnectorsPrometheus alerts

Prometheus alerts: prometheus_alerts

Polls Prometheus’s own /api/v1/alerts, the alerts its alerting rules have already fired. One event per active alert, keyed by a label, plus a resolved event when it clears. No Alertmanager and no PromQL: Prometheus decides what’s an alert; Tares correlates it and can dispatch it to an agent.

State is tracked across polls, so each alert fires once (re-emitting only on a state change) and emits a resolved event when it disappears, not one copy every tick.

Supports discovery: given a url, it lists the configured alerting rules and the severities present.

Prerequisites: a reachable Prometheus server with alerting rules configured.

Set up

Ask a connected agent:

Use tares to ingest the firing alerts from the Prometheus at localhost:9090.

The agent calls discover_source (lists the configured rules and the severities present), then create_source.

Each alert becomes an event with event_type = the alert name, text = its summary, and its labels as Tares labels plus a synthetic state (firing / pending / resolved).

Configuration

fieldtypedescription
url*stringPrometheus base URL, e.g. http://localhost:9090
bearer_tokenstring · secretoptional Authorization: Bearer token (managed Prometheus / auth proxy)
usernamestringoptional HTTP basic-auth username
passwordstring · secretoptional HTTP basic-auth password / API token, paired with username
severitiesstringcomma-separated severities to ingest (blank = all), e.g. critical,warning
include_pendingboolalso ingest alerts still pending (waiting out their for: duration)

Discover only proposes the labels guaranteed to be present (severity, state). An alert’s dynamic labels (namespace, service, …) only exist while it’s firing. Add those from the Fields view once real alerts have been ingested.

Verify

Open the source: Recent events shows one event per active alert (and resolved events as they clear); Fields shows the labels the alerts carry, so you can promote namespace / service to correlate on.

Last updated on