What should an AI SRE read next to Alertmanager alert groups for a cron job that stopped?
Tares gives an AI SRE the same service’s metrics, logs and recent deploys on one timeline beside the Alertmanager alert, so the diagnosis cites evidence. The alert says the cron job stopped. The neighbouring events help the agent say why and since when. Every source shares one service label, so the agent reads a single correlated timeline.
How it works
Tares has an alertmanager connector that receives what Alertmanager routes to a webhook receiver. Alertmanager has already evaluated, grouped and deduped the alerts. With send_resolved it also tracks firing to resolved. Tares records what it pushes and correlates it with your other sources.
Each POST from Alertmanager is a batch. Tares fans the alerts array out into one event per alert:
event_typeis the alert name.textis the alert summary.- The alert labels become Tares labels, plus a
statusoffiringorresolved. - The full alert, including
fingerprint, stays in the payload.
The entity key decides which timeline an event lands on. Tares derives it from a label in the order namespace, service, job, instance, or from a label you declare as primary. For the join to work, the alert source, the metrics, the logs and the deploy events must all be keyed by the same service label. If the alert keys on namespace while everything else keys on service, the alert lands on a different timeline from the evidence.
For a stopped cron job, the agent reads these next to the alert group:
- Metrics for the same service, polled from Prometheus with the
prometheusconnector or any metric you pick by name or label. - Logs for the same service, from a container with
docker_logsor from your OpenTelemetry pipeline with OTLP. - Recent changes, such as deploys and config changes, posted to a webhook source with
event_type: deployorevent_type: config. - Earlier findings that agents wrote back onto that service’s timeline.
The agent reads these as one timeline on one clock. It can tie the stop to a specific log line, a metric that went flat or a deploy that landed just before.
Set it up
-
Create the alert source. In the console go to Sources, Add source, Alertmanager alerts, name it and create it. Or ask a connected agent to create an Alertmanager source and give you the webhook URL. The source page shows a receiver block with the ingest URL filled in.
-
Add the receiver to
alertmanager.ymland reload Alertmanager:
receivers:
- name: tares
webhook_configs:
- url: http://localhost:8787/ingest/<ingest_key>
send_resolved: true
route:
receiver: taresIf Tares has auth on, the sender uses a Bearer Authorization header holding an ingest-scoped API key. Without auth, the receiver above is enough.
-
Set the key to the service label. Make sure your cron alert rules carry a
servicelabel. Send an alert, open the source’s Fields view and promoteserviceto the source’s primary label. Do not leave the key onnamespace. The metrics, logs and deploy sources in the next step useserviceas their primary label, and the alert has to use the same one to share their timeline. Thekey_labelfield on the source also lets you name the alert label to key on. -
Add the evidence sources, each with
serviceas its primary label:- Metrics for the cron job’s service, with the
prometheusconnector. - Logs, with
docker_logsor OTLP. For OTLP the service label readsresourceAttributes.service.name. - A
webhooksource for deploys, with a primaryservicelabel andevent_type: deploy. Post to it from your CD pipeline on every deploy. A second one withevent_type: configcovers config changes.
- Metrics for the cron job’s service, with the
-
Check the join. Send a test alert and look at Recent events. Then open Explore, pick the service and confirm the alert, metrics, logs and deploys appear together.
-
Wake an agent. Add a trigger over these sources, keyed by
service, that fires when an alert event arrives. Subscribe an agent to it, or connect your own MCP client and ask what happened to the service. The full walkthrough is in Build an AI SRE. The connector details are on the Alertmanager connector page.
What you get
- One timeline per service, with the Alertmanager alert group, metrics, logs and deploys merged on one clock.
- Alerts that resolve show up as
resolvedevents, so the agent sees when the cron job came back, if it did. - A diagnosis that cites evidence lines instead of repeating the alert text. It can say the job stopped, name the log line or the deploy beside it, and suggest a next action.
- The conclusion written back as a finding on the service’s timeline, so the next investigation starts from it.
- Your alerting stays in Alertmanager. Tares ingests what it routes and does not re-threshold anything.
When something else fits
- If you do not run Alertmanager and rely on Prometheus rules alone, the
prometheus_alertsconnector polls fired alerts, but you lose Alertmanager’s grouping and silencing and its real-time delivery. - If the cron job runs outside Prometheus, have it post a heartbeat or failure event to a
webhooksource, and keep the sameservicelabel.