Watch which Datadog monitors are alerting, and what changed since the last check

Every hour of the working day: Datadog monitors in Alert or Warn, how long each has been there, and what is new or recovered since the hour before.

Runs
Hourly, 8:00 to 18:00 on weekdays
Uses
Datadog
Posts
Report card

What lands on your board

AcmeDatadog monitors in alert · Claude Code

3 monitors alerting, 1 new since 10:00

Checkout p95 latency started alerting at 10:42 on 2 hosts. Two older alerts are still open and 2 monitors recovered since the last check.

Alert 3Warn 2New 1Recovered 2
MonitorStateFiring forChange
Checkout p95 latency above 800 ms (P2)Alert18 minNew
RDS acme-prod free storage below 15%Alert2 daysOngoing
Queue depth on emails above 5,000Alert3 hOngoing
Disk usage above 80% on web-3Warn9 daysOngoing
5xx rate on api above 1%Warn35 minOngoing
Done
An example with made-up numbers. Your agent posts your real ones.

What it does

The Datadog Monitors page sorts by status and shows everything at once: the database alert that matters, the disk warning that has been yellow for a month, and the muted synthetic test nobody owns. On-call gets paged for the urgent ones; everyone else has no quiet way to see the state of things.

This skill gives the team that view during working hours. The agent lists monitors in Alert and Warn, sorts by how long they have been firing, and compares with its previous run so the card says what is new, what is still going and what recovered.

How it works

  1. 1Search monitors by state

    GET https://api.<site>/api/v1/monitor/search?query=status:alert muted:false&per_page=100, then again with status:warn. Keep id, name, status, type, tags and last_triggered_ts. With the Datadog MCP server, search_datadog_monitors does the same.

  2. 2See which groups are firing

    For multi-alert monitors, GET /api/v1/monitor/{id}?group_states=alert,warn lists the hosts or services in each state, and gives priority when set. Show at most three groups per monitor.

  3. 3

    3Compare with the last run

    Keep the list of monitor IDs and states in a small JSON file. A monitor not in the last run is new, one in both is ongoing, one that dropped out recovered. Firing time is now minus last_triggered_ts.

  4. 4

    4Report

    New alerts first, then ongoing ones longest first, then warnings, then recovered in one line. Mark the card as failed only when a new monitor with priority P1 or P2 is in Alert.

  5. Post it to the board

    With BRIEFKIN_TOKEN set, the agent sends the result as one card that updates in place every run. Without it, you get the report in the chat.

What you get

  • Counts: monitors in Alert, in Warn, new since the last run, recovered.
  • New: name, groups affected, priority, when it fired.
  • Ongoing: name and how long it has been firing, longest first.
  • Recovered since the last check.
  • One line on which alert to look at first.

Install and run it

Pick your agent, where the data comes from and how to schedule it; the commands below follow.

Agent
Data
Schedule
  1. Install the skill

    One command. It puts the SKILL.md in ~/.claude/skills and in ~/.agents/skills, which Codex, Cursor, Gemini CLI, Copilot CLI and OpenCode read too.

    shellcurl -fsSL https://briefkin.dev/skills/datadog-monitors-in-alert/install | sh
  2. Run it

    Ask Claude Code:

    promptRun the datadog-monitors-in-alert skill

    Or paste the prompt instead of installing:

    promptUsing the Datadog API (GET /api/v1/monitor/search, read only) or the Datadog MCP server, list monitors that are not muted and are in Alert, then those in Warn. For each, give the name, type, priority, the groups currently alerting (GET /api/v1/monitor/{id}?group_states=alert,warn, at most three) and how long since last_triggered_ts. Compare with the list from my previous run if I give it to you, or that you saved: say which monitors are new, which are ongoing and which recovered. Order: new alerts, ongoing alerts longest first, warnings, recovered. End with the one alert to look at first and why. Do not mute, resolve or edit any monitor.
  3. Put it on a schedule

    Hourly, 8:00 to 18:00 on weekdays, from cron on any machine where Claude Code is signed in:

    crontab0 8-18 * * 1-5 claude -p "Run the datadog-monitors-in-alert skill"

    Add it with crontab -e. A laptop asleep at that time runs it when it wakes if you use launchd or Task Scheduler instead; GitHub Actions works for the API route.

  4. Send it to your board

    Connect Briefkin once with curl -fsSL https://briefkin.dev/install | sh and every run lands on your board as a report card. How setup works

View the SKILL.mdRaw file
SKILL.md---
name: datadog-monitors-in-alert
description: "Every hour of the working day: Datadog monitors in Alert or Warn, how long each has been there, and what is new or recovered since the hour before. Use when the user asks for this, or when it runs on a schedule."
---

# Datadog monitors in alert

Every hour of the working day: Datadog monitors in Alert or Warn, how long each has been there, and what is new or recovered since the hour before.

The Datadog Monitors page sorts by status and shows everything at once: the database alert that matters, the disk warning that has been yellow for a month, and the muted synthetic test nobody owns. On-call gets paged for the urgent ones; everyone else has no quiet way to see the state of things.

This skill gives the team that view during working hours. The agent lists monitors in Alert and Warn, sorts by how long they have been firing, and compares with its previous run so the card says what is new, what is still going and what recovered.

## Two ways to get the data

Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.

## Route A: API or MCP server

### What you need

- A Datadog API key and application key in `DD_API_KEY` and `DD_APP_KEY`, with the application key scoped to `monitors_read`, and your site (for example `datadoghq.com` or `datadoghq.eu`).
- Or the Datadog MCP server with the core toolset, which includes `search_datadog_monitors`.

If something is missing, say what and stop; do not invent numbers.

### Steps

1. **Search monitors by state** (Datadog): `GET https://api.<site>/api/v1/monitor/search?query=status:alert muted:false&per_page=100`, then again with `status:warn`. Keep `id`, `name`, `status`, `type`, `tags` and `last_triggered_ts`. With the Datadog MCP server, `search_datadog_monitors` does the same.
2. **See which groups are firing** (Datadog): For multi-alert monitors, `GET /api/v1/monitor/{id}?group_states=alert,warn` lists the hosts or services in each state, and gives `priority` when set. Show at most three groups per monitor.
3. **Compare with the last run**: Keep the list of monitor IDs and states in a small JSON file. A monitor not in the last run is new, one in both is ongoing, one that dropped out recovered. Firing time is now minus `last_triggered_ts`.
4. **Report**: New alerts first, then ongoing ones longest first, then warnings, then recovered in one line. Mark the card as failed only when a new monitor with priority P1 or P2 is in Alert.

## Route B: the browser

### What you need

- Signed in to Datadog on the right organization, with any role that can read monitors (Datadog Read Only Role is enough).

If something is missing, say what and stop; do not invent numbers.

### Steps

Start at https://app.datadoghq.com/monitors/triggered. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.

1. **Open Triggered Monitors on your site**: Monitors > **Triggered Monitors** lists every monitor group currently in Alert, Warn or No Data, one row per group. On another Datadog site replace the host (`app.datadoghq.eu`, `us3.datadoghq.com`, `us5.datadoghq.com`, `ap1.datadoghq.com`).
2. **Filter to alerts that are not muted**: In the search bar type `status:alert muted:false` and read the rows, then change it to `status:warn muted:false`. Each row shows the monitor name, the group (host, service, query tag), its priority and the **Triggered** time, which is how long it has been firing.
3. **Open the ones that matter**: Click a monitor name to open its status page; the **Status & History** section shows which groups are alerting and when each one changed. Keep at most three groups per monitor for the card.
4. **Compare with the last check**: Note the monitor names and states, and compare with the list from the previous hour: not seen before is new, still there is ongoing, gone is recovered. The **Manage Monitors** page (Monitors > Manage) sorted by status gives the same list per monitor instead of per group.

Note: Triggered Monitors shows one row per group, so a multi-alert monitor firing on 20 hosts takes 20 rows; the Manage Monitors page shows it once. Both pages reflect the current state only, so the new/ongoing/recovered comparison needs the previous list.

## The report

- **Counts**: monitors in Alert, in Warn, new since the last run, recovered.
- **New**: name, groups affected, priority, when it fired.
- **Ongoing**: name and how long it has been firing, longest first.
- **Recovered** since the last check.
- One line on which alert to look at first.

## Post it to Briefkin

When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.

```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
  -H "authorization: Bearer $BRIEFKIN_TOKEN" \
  -H "content-type: application/json" \
  -d @- <<'JSON'
{
  "v": 1,
  "event_id": "datadog-monitors-in-alert/<date of this run, e.g. 2026-10-16>",
  "item_key": "datadog-monitors-in-alert",
  "project": "Acme",
  "source": "Datadog monitors in alert skill",
  "kind": "update",
  "title": "3 monitors alerting, 1 new since 10:00",
  "summary": "**Checkout p95 latency** started alerting at 10:42 on 2 hosts. Two older alerts are still open and **2** monitors recovered since the last check.",
  "widget": [
    {
      "type": "Badges",
      "props": {
        "items": [
          {
            "label": "Alert 3",
            "tone": "bad"
          },
          {
            "label": "Warn 2",
            "tone": "warn"
          },
          {
            "label": "New 1",
            "tone": "bad"
          },
          {
            "label": "Recovered 2",
            "tone": "ok"
          }
        ]
      }
    },
    {
      "type": "Table",
      "props": {
        "columns": [
          "Monitor",
          "State",
          "Firing for",
          "Change"
        ],
        "rows": [
          [
            "Checkout p95 latency above 800 ms (P2)",
            "Alert",
            "18 min",
            "New"
          ],
          [
            "RDS acme-prod free storage below 15%",
            "Alert",
            "2 days",
            "Ongoing"
          ],
          [
            "Queue depth on emails above 5,000",
            "Alert",
            "3 h",
            "Ongoing"
          ],
          [
            "Disk usage above 80% on web-3",
            "Warn",
            "9 days",
            "Ongoing"
          ],
          [
            "5xx rate on api above 1%",
            "Warn",
            "35 min",
            "Ongoing"
          ]
        ]
      }
    }
  ]
}
JSON
```

Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.

## Run it on a schedule

Suggested: Hourly, 8:00 to 18:00 on weekdays (`0 8-18 * * 1-5`). From cron, with the agent signed in on that machine:

```bash
0 8-18 * * 1-5 claude -p "Run the datadog-monitors-in-alert skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```

Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/datadog-monitors-in-alert#schedule

Source: https://briefkin.dev/skills/datadog-monitors-in-alert

What your agent needs

  • A Datadog API key and application key in DD_API_KEY and DD_APP_KEY, with the application key scoped to monitors_read, and your site (for example datadoghq.com or datadoghq.eu).

  • Or the Datadog MCP server with the core toolset, which includes search_datadog_monitors.

Connecting Datadog

  1. Datadog MCP Server, Datadog's official remote server at https://mcp.datadoghq.com/v1/mcp for US1. Other sites have their own host, such as https://mcp.datadoghq.eu/v1/mcp or https://mcp.us5.datadoghq.com/v1/mcp, and US government sites aren't supported. In Claude Code, install the Datadog plugin with /plugin install datadog@claude-plugins-official and run /ddsetup, or run claude mcp add --transport http datadog-mcp https://mcp.datadoghq.com/v1/mcp. In Codex, add the URL under [mcp_servers.datadog] in ~/.codex/config.toml and run codex mcp login datadog; in Cursor, install the Datadog plugin. Only the core toolset is on by default; add ?toolsets= to the URL for more (setup).
  2. API with an API key and an application key. Store them in DD_API_KEY and DD_APP_KEY with DD_SITE (datadoghq.com, datadoghq.eu and so on) and send them as the DD-API-KEY and DD-APPLICATION-KEY headers. Scope the application key to what the report reads, such as monitors_read, incident_read and slos_read. The MCP server also accepts a key pair from a scoped service account for clients without OAuth.

People need the mcp_read permission to use the server; leave out mcp_write, or keep MCP Write Access off for the organization, and the agent can't create or edit monitors or notebooks.

Questions

Why not run it all night?

Overnight, the right channel for an urgent alert is your paging tool, not a card. The schedule covers working hours so the team has a shared view of what is open; change the cron to 0 * * * * if you want it around the clock.

Are muted monitors and downtimes hidden?

Muted monitors are left out by muted:false. Monitors silenced by a scheduled downtime show as muted too, so planned maintenance does not fill the card. Remove the filter if you want to audit what is muted.

Do I need Briefkin to use the Datadog monitors in alert skill?

No. The skill runs with your own agent and gives you the report in the chat. With a Briefkin token set, each run also posts it to your board as a report card, so you can glance at it instead of asking again.

Which agents can run it?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, Windsurf and Amp all read SKILL.md files. The install command puts it in ~/.claude/skills and ~/.agents/skills, where they look. ChatGPT, the Claude app and Grok take the prompt instead. Pick your agent under "Install and run it" and the commands change to match.

Can it work without an API or MCP server, from my browser?

Yes. Switch the data source to "Your browser" and the steps change to the Datadog pages themselves: the agent opens app.datadoghq.com/monitors/triggered in a browser you are signed in to and reads the numbers off the page. Claude Code, Codex, Cursor, Claude app and ChatGPT can drive a browser out of the box; Gemini CLI, Copilot CLI and OpenCode need a Playwright or Chrome DevTools MCP server first. It is slower than the API and needs you signed in, so it suits a report you run by hand or from a scheduler on your own computer.

Read this report on your board, not in a chat log

Skills are free to use with any agent. Briefkin is where their results land: one board for every report, number and question your agents send, with a ping when something needs you.

Free during the open beta. No card.