Skip to Content
Tares

How do I route Opsgenie on-call alerts to an AI SRE?

Tares routes Opsgenie alerts to an AI SRE through the webhook connector: Opsgenie posts each alert to a Tares ingest URL, and a trigger wakes your agent when one arrives. Tares has no connector of its own for Opsgenie today, so you set up a webhook source and one Opsgenie webhook integration. The setup takes a few minutes and uses the same pieces as the rest of the AI SRE guide.

How it works

Opsgenie reaches Tares through the webhook connector and a vendor setup in Opsgenie. The path has three parts:

  • Opsgenie posts the alert. A Webhook integration in Opsgenie sends a JSON object to the Tares ingest URL each time a mapped alert action happens. The object carries action, an alert object with alertId, tinyId, message, alias, entity, username and userId, plus source, integrationId and integrationName.
  • Tares stores it lossless. A webhook source keeps the full payload and maps the fields you declare as labels into the event. One-level dotted fields such as alert.alias work as labels. action is a top-level field, so it can set the event type.
  • A trigger wakes the agent. A trigger watches the source and fires when a matching alert event arrives. The agent subscribed to that trigger wakes and works from the evidence Tares holds.

On a secured instance, Opsgenie sends an Authorization: Bearer header holding an ingest-scoped API key. That header is the credential. If Tares has auth off, no header is needed.

Set it up

  1. Create the webhook source in Tares. Use Sources, Add source, webhook, or ask a connected agent to create it. Mark one label as primary. Save, then copy the ingest endpoint from the source page.
- name: opsgenie_alerts connector: webhook config: event_type_field: action labels: - { name: alias, field: alert.alias, primary: true }
  1. Add the webhook in Opsgenie. Add a Webhook integration, name it, assign the team and set its webhook URL to the Tares ingest URL.
  2. Add the header if Tares has auth on. Define a custom header on the integration: Authorization: Bearer followed by an ingest-scoped API key. Creating a push source in the console mints a key and shows it once.
  3. Map the alert actions. Choose the actions you want, such as alert created, to post to the webhook URL. Then turn the integration on.
  4. Check the mapping. Post a sample payload to the ingest URL and look at Recent events. The Fields view shows which payload fields arrive and how often, so you can confirm alert.alias is a reliable primary label.
curl -X POST http://localhost:8787/ingest/<ingest_key> \ -H 'Content-Type: application/json' \ -d '{"action": "Create", "alert": {"alias": "postgres-down", "message": "Postgres is down"}}'
  1. Add a trigger on the source. This one fires when a Create alert arrives within five minutes.
- name: opsgenie-alert sources: [opsgenie_alerts] filters: - { field: event_type, op: eq, value: Create } condition: { aggregate: count, predicate: "> 0", window: 5m } cooldown: 5m
  1. Pick who wakes. Subscribe a Tares agent to the trigger, or send the firing to your own agent service or a Slack channel. The AI SRE guide shows each option and how the agent writes its finding back.

What you get

  • Each Opsgenie alert action you mapped becomes an event in Tares, with the full payload kept as sent.
  • Events carry the label you chose, such as the alert alias, so you can find and group alerts for one alert.
  • A trigger fires when a matching alert arrives, so the agent starts without anyone paging it.
  • The agent wakes with the evidence Tares holds, and its conclusion is written back so the next investigation starts from it.
  • A cooldown on the trigger keeps repeated alerts from waking the agent over and over.
  • On a secured instance, the Bearer header keeps only holders of an ingest-scoped key from posting to the source.

When something else fits

  • Atlassian stopped selling Opsgenie on 2025-06-04 and ends support on 2027-04-05. If you are moving off it, point the new tool at the same webhook source pattern and keep the trigger.
  • If your alerts already flow through Prometheus rules, the polled or Alertmanager sources in the AI SRE guide fit better than adding Opsgenie as a hop.
  • If you only need to notify people, Opsgenie alone is enough. Use Tares when you want an agent to investigate with evidence.

Still stuck? Get help

Last updated on