How do I line up Alertmanager alert groups with OpenTelemetry metric series on one timeline?
Tares lines them up when you key both sources by the same service label. Alertmanager alerts and OTLP metric points then land on one timeline per service, merged on one clock in Explore. Alertmanager pushes alerts to an ingest URL, your OpenTelemetry exporter or Collector sends metrics to the OTLP endpoint, and Tares correlates the two.
How it works
Tares correlates events from different sources when they share a key. Here the key is the service.
- Alertmanager source. The Alertmanager connector receives each batch Alertmanager posts and fans the
alertsarray out into one event per alert. The event type is the alert name, the text is the alert summary, and the alert labels become Tares labels. Tares adds astatuslabel that isfiringorresolved. The full alert, including itsfingerprint, stays in the payload. - OTLP source. The OpenTelemetry connector receives OTLP/HTTP logs, traces and metrics. One source ingests every service. Resource attributes such as
service.namebecome labels, and theservicelabel is the natural key. - The shared key. The Alertmanager source derives its entity key from the first alert label it finds in this order:
namespace,service,job,instance. If your alerts carrynamespace, that label wins overservice. Setkey_labeltoserviceso the alert key matches the OTLPservicelabel.
Once both sources use the same service value, Explore shows the alert and the metric points for that service merged on one clock. The alert tells you what fired, and the metric points show how the service got there. This is the same per-service timeline the AI SRE guide builds its incident agent on.
Set it up
-
Start Tares locally.
tares up -
Create the OTLP source under Sources, Add source, otlp, or ask a connected agent to create an OTLP source keyed by service. Mark
serviceas the primary label.- name: otel connector: otlp config: labels: - { name: service, field: service, primary: true } -
Point your exporter at Tares. For OTLP/gRPC, install the
otlp-grpcextra first. The receiver listens on:4317.OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:8787 # OTLP/HTTP → /v1/{logs,traces,metrics} # or gRPC (otlp-grpc extra): OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 -
Create the Alertmanager source under Sources, Add source, Alertmanager alerts. The source page shows a receiver block with your ingest URL filled in. Set
key_labeltoservicein the source config so alerts key on the same label as your metrics.- name: alerts connector: alertmanager config: key_label: service -
Add the receiver to your
alertmanager.ymland reload Alertmanager. Keepsend_resolved: trueso resolved alerts reach the timeline too.receivers: - name: tares webhook_configs: - url: http://localhost:8787/ingest/<ingest_key> send_resolved: true route: receiver: tares -
If your Tares instance has auth on, both senders (Alertmanager and the OTLP exporter) use a Bearer Authorization header holding an ingest-scoped API key. Without auth you need nothing extra.
-
Check both sources. Recent events on each source shows what has arrived, and Fields on the Alertmanager source lists the alert labels. Open Explore, find your service under the
servicekey, and confirm alerts and metric points appear together. Make sure the alert label values match the OTelservice.namevalues exactly. A mismatch puts them on two separate timelines.
What you get
- One timeline per service with Alertmanager alerts and OpenTelemetry metric points merged on one clock in Explore.
- Alertmanager’s own grouping, silencing and resolved tracking, kept as it is. Tares records what Alertmanager pushes, one event per alert, with
firingandresolvedstatus. - Every service from your OTel SDKs and Collector on the same OTLP source, with no per-service setup.
- Logs and traces from the same OTLP source on that service’s timeline too, if you export them.
- A single read that a connected agent or a trigger-woken agent can work from, so the investigation starts from the alert and the metrics that led to it.
When something else fits
- If your metrics live in a Prometheus server and you do not export them over OTLP, use the Prometheus connector. You pick metrics by name or label, with no PromQL, and key them by
servicethe same way. - If you do not need Alertmanager’s grouping and want Tares to read fired rules directly, the
prometheus_alertsconnector polls them instead. It is described in the AI SRE guide’s source table.