What should an AI SRE read next to Alertmanager alert groups for high latency?
Tares puts the same service’s metrics, logs and recent deploys on one timeline beside Alertmanager alerts, so the diagnosis cites evidence. For a high latency alert group, an AI SRE reads that service’s latency and error metrics, its request logs and its latest deploy or config events. Key every source by the same service label and an agent gets all of it in one read.
How it works
An Alertmanager alert is a signal that something crossed a line. It does not say why. Tares records each alert as an event and lines it up with the other sources that carry the same service label.
- The alert. Alertmanager has already evaluated, grouped and deduped. Its webhook receiver posts a batch, and Tares splits the
alertsarray into one event per alert. Theevent_typeis the alert name, the text is its summary, and the labels become Tares labels plus astatusoffiringorresolved. The full alert, including itsfingerprint, stays in the payload. - Metrics. A
prometheussource brings the numbers behind the alert, such as p99 latency, the 5xx rate, database connections and dependency health. - Logs. A
docker_logssource, or an OTLP pipeline, brings the request logs for the same service, so slow requests and errors sit on the same clock as the alert. - Recent changes. A
webhooksource with a deploy event type, and a second one for config changes, shows what shipped just before latency rose. Most real root causes are a change, so this is the highest-value addition.
The entity key for Alertmanager events is derived from a label, in the order namespace, service, job, instance, or from a label you declare as primary. When every source resolves to the same service value, Tares builds one timeline per service. The agent reads that timeline and can tie its conclusion to specific evidence lines. This is the pattern in the AI SRE guide.
Set it up
-
Create an Alertmanager source in the console under Sources → Add source → Alertmanager alerts, or ask a connected agent to create one and give you the webhook URL. The source page shows a receiver block with your ingest URL filled in. Add it to
alertmanager.ymland reload Alertmanager. The Alertmanager connector page has the full details.receivers: - name: tares webhook_configs: - url: http://localhost:8787/ingest/<ingest_key> send_resolved: true route: receiver: tares -
If Tares runs with auth on, Alertmanager sends a Bearer Authorization header holding an ingest-scoped API key. Without auth, the receiver needs nothing more.
-
Send a test batch and check Recent events:
curl -X POST http://localhost:8787/ingest/<ingest_key> \ -H 'Content-Type: application/json' \ -d '{"alerts":[{"status":"firing","labels":{"alertname":"PostgresDown","severity":"critical","namespace":"prod"},"annotations":{"summary":"Postgres is down"},"startsAt":"2024-01-01T00:00:00Z"}]}' -
Open Fields on the source and promote
namespaceorserviceso the alert correlates with your other sources. If your alerts use a different label, setkey_labelto it. -
Add the evidence sources, each with the same primary
servicelabel:- a
prometheussource for latency, error rate and dependency metrics, readingservicefrom the metric labels; - a
docker_logsorotlpsource for the service’s logs; - a
webhooksource for deploys, with a primaryservicelabel read from the payload and a deploy event type. Add a second one for config changes. Post to its ingest URL from your CD pipeline on every deploy.
- a
-
Add a trigger over those sources, keyed by
service. You can keep reacting to fired alerts, or threshold a typed field directly, for examplemax(p99_ms) > 1000for latency. Choose who wakes: a Tares agent, your own agent over a webhook, or a Slack channel. -
To investigate on demand, start the MCP endpoint and point your client at it:
tares mcpThen ask: what happened to this service in the last 15 minutes? The client reads the correlated timeline for that service.
What you get
- One timeline per service, with the latency alert, the p99 and error metrics, the request logs and the latest deploy on the same clock.
- A diagnosis that points at evidence, for example a deploy that landed minutes before latency climbed, instead of a guess from the alert text alone.
- Alertmanager keeps its grouping, silencing and resolved handling. Tares records what it pushes, and the
resolvedevent lands on the timeline when the alert clears. - A finding written back onto the service’s timeline. The next investigation, whether from a trigger or from your MCP client, starts from that conclusion and not from scratch.
- Freedom in who investigates: a Tares agent with a prompt you edit, your own agent service, or you through a connected client.
When something else fits
- If you do not need Alertmanager’s grouping and silencing and only want Tares to read the alerts your Prometheus rules fire, the
prometheus_alertsconnector polls them instead. - If the latency question is purely about numbers with no alert involved, a
prometheussource and a trigger on a typed field such as p99 are enough.