# Alertmanager

> Work with Prometheus Alertmanager: silence alerts during a deploy or from a chat button, expire and list silences, list firing alerts, and send and resolve alerts of your own. Start a workflow when an alert fires or resolves, or a silence is created or about to end.

App · 10 actions. Web page: https://docs.lodol.com/docs/integrations/alertmanager

## Actions

### Create silence

Silence the alerts the matchers pick for a length of time or until a moment, now or from a later start, such as during a deploy. They keep firing in Alertmanager but notify no one.

**Inputs**

- Matchers (`matchers`, text, required): Which alerts to silence, one matcher per line, such as alertname=DiskFull and instance=~"db-.*". An alert's labels from a trigger work too.
- For (`duration`, text): How long it lasts, or type one such as 90m or 1d 12h. Defaults to 2 hours. One of: `15m` (15 minutes), `30m` (30 minutes), `1h` (1 hour), `2h` (2 hours), `4h` (4 hours), `8h` (8 hours), `1d` (1 day), `1w` (1 week). Default: `2h`.
- Until (`ends_at`, date and time): When it ends, instead of a length of time.
- Starts (`starts_at`, date and time): When it starts, such as a maintenance window's start. Leave blank for now.
- Created by (`created_by`, text): Who it is from, shown in Alertmanager. Defaults to Lodol.
- Comment (`comment`, text): Why, shown in Alertmanager, such as Deploying release 4.2.

**Outputs**

- `comment` (text): Why it was created
- `created_by` (text): Who created it
- `ends_at` (text): When it ends, in UTC (ISO 8601)
- `id` (text): The silence's ID
- `link` (text): Its page in Alertmanager
- `matchers` (list): The alerts it silences
- `matchers_text` (text): Its matchers on one line, comma-separated
- `minutes_left` (number): Whole minutes until it ends; 0 once expired
- `starts_at` (text): When it starts, in UTC (ISO 8601)
- `state` (text): active, pending (starts later) or expired
- `updated_at` (text): When it last changed, in UTC (ISO 8601)

**Example output**

```json
{
  "comment": "Deploying release 4.2",
  "created_by": "Lodol",
  "ends_at": "2026-11-09T11:00:00.000Z",
  "id": "3f2a1b4c-5d6e-4f70-8a9b-0c1d2e3f4a5b",
  "link": "https://alertmanager.example.com/#/silences/3f2a1b4c-5d6e-4f70-8a9b-0c1d2e3f4a5b",
  "matchers": [
    "alertname=\"DiskFull\"",
    "instance=~\"db-.*\""
  ],
  "matchers_text": "alertname=\"DiskFull\", instance=~\"db-.*\"",
  "minutes_left": 120,
  "starts_at": "2026-11-09T09:00:00.000Z",
  "state": "active",
  "updated_at": "2026-11-09T09:00:00.000Z"
}
```

### Expire silence

End a silence now, so its alerts notify again. One already ended is left as it is.

**Inputs**

- Silence (`silence`, text, required): The silence: pick it, or give its ID from Create silence, List silences or a trigger.

**Outputs**

- `already_expired` (true/false): True when it had already ended, so nothing changed
- `comment` (text): Why it was created
- `created_by` (text): Who created it
- `ends_at` (text): When it ends, in UTC (ISO 8601)
- `id` (text): The silence's ID
- `link` (text): Its page in Alertmanager
- `matchers` (list): The alerts it silences
- `matchers_text` (text): Its matchers on one line, comma-separated
- `minutes_left` (number): Whole minutes until it ends; 0 once expired
- `starts_at` (text): When it starts, in UTC (ISO 8601)
- `state` (text): active, pending (starts later) or expired
- `updated_at` (text): When it last changed, in UTC (ISO 8601)

**Example output**

```json
{
  "already_expired": false,
  "comment": "Deploying release 4.2",
  "created_by": "Lodol",
  "ends_at": "2026-11-09T09:30:00.000Z",
  "id": "3f2a1b4c-5d6e-4f70-8a9b-0c1d2e3f4a5b",
  "link": "https://alertmanager.example.com/#/silences/3f2a1b4c-5d6e-4f70-8a9b-0c1d2e3f4a5b",
  "matchers": [
    "alertname=\"DiskFull\"",
    "instance=~\"db-.*\""
  ],
  "matchers_text": "alertname=\"DiskFull\", instance=~\"db-.*\"",
  "minutes_left": 0,
  "starts_at": "2026-11-09T09:00:00.000Z",
  "state": "expired",
  "updated_at": "2026-11-09T09:00:00.000Z"
}
```

### Get silence

Get one silence: what it matches, who created it and why, when it ends, and its state.

**Inputs**

- Silence (`silence`, text, required): The silence: pick it, or give its ID from Create silence, List silences or a trigger.

**Outputs**

- `comment` (text): Why it was created
- `created_by` (text): Who created it
- `ends_at` (text): When it ends, in UTC (ISO 8601)
- `id` (text): The silence's ID
- `link` (text): Its page in Alertmanager
- `matchers` (list): The alerts it silences
- `matchers_text` (text): Its matchers on one line, comma-separated
- `minutes_left` (number): Whole minutes until it ends; 0 once expired
- `starts_at` (text): When it starts, in UTC (ISO 8601)
- `state` (text): active, pending (starts later) or expired
- `updated_at` (text): When it last changed, in UTC (ISO 8601)

**Example output**

```json
{
  "comment": "Deploying release 4.2",
  "created_by": "Lodol",
  "ends_at": "2026-11-09T11:00:00.000Z",
  "id": "3f2a1b4c-5d6e-4f70-8a9b-0c1d2e3f4a5b",
  "link": "https://alertmanager.example.com/#/silences/3f2a1b4c-5d6e-4f70-8a9b-0c1d2e3f4a5b",
  "matchers": [
    "alertname=\"DiskFull\"",
    "instance=~\"db-.*\""
  ],
  "matchers_text": "alertname=\"DiskFull\", instance=~\"db-.*\"",
  "minutes_left": 120,
  "starts_at": "2026-11-09T09:00:00.000Z",
  "state": "active",
  "updated_at": "2026-11-09T09:00:00.000Z"
}
```

### Get status

Get Alertmanager's version, when it started, its cluster's members and its configuration as loaded (secrets hidden).

**Inputs**: None.

**Outputs**

- `build_date` (text): When it was built
- `cluster_name` (text): Its name in the cluster
- `cluster_status` (text): ready, settling or disabled (when it runs on its own)
- `config` (text): Its configuration file as loaded, with passwords and secret URLs shown as <secret>
- `go_version` (text): The Go version it was built with
- `peer_count` (number): How many members the cluster has
- `peers` (list): The cluster's members, itself included
- `revision` (text): The source revision it was built from
- `up_since` (text): When it started, in UTC (ISO 8601)
- `version` (text): Alertmanager's version, such as 0.28.1

**Example output**

```json
{
  "build_date": "20250307-15:05:18",
  "cluster_name": "01JQ8T2M8ZB3W8X3XW4E5G7N9H",
  "cluster_status": "ready",
  "config": "route:\n  receiver: oncall\nreceivers:\n  - name: oncall\n",
  "go_version": "go1.23.7",
  "peer_count": 1,
  "peers": [
    {
      "address": "10.0.0.5:9094",
      "name": "01JQ8T2M8ZB3W8X3XW4E5G7N9H"
    }
  ],
  "revision": "b2099eaa2c9ebc25edb26517cb9c732738e93910",
  "up_since": "2026-11-01T07:00:00.000Z",
  "version": "0.28.1"
}
```

### List alert groups

List the alerts as Alertmanager groups them for notifications (by alert name, cluster or whatever its routes group by), with each group's receiver and alerts.

**Inputs**

- Matchers (`matchers`, text): Only alerts whose labels match, one matcher per line, such as alertname=DiskFull or instance=~"web-.*" (=~ matches a pattern; != and !~ leave out). Leave blank for every alert.
- Receiver (`receiver`, text): Only alerts sent to this receiver. Leave blank for any.
- Include muted groups (`include_muted`, true/false): Also list groups whose alerts are all silenced or inhibited. On by default. Default: `true`.

**Outputs**

- `alert_count` (number): How many alerts the groups hold in all
- `count` (number): How many groups there are
- `groups` (list): The groups

**Example output**

```json
{
  "alert_count": 1,
  "count": 1,
  "groups": [
    {
      "alert_count": 1,
      "alerts": [
        {
          "annotations": {
            "description": "/var/lib/postgresql has 2 GB left.",
            "summary": "Disk on db-1 is 95% full"
          },
          "description": "/var/lib/postgresql has 2 GB left.",
          "ends_at": "2026-11-09T08:24:30.000Z",
          "fingerprint": "5f2a8c41d9e07b36",
          "generator_url": "https://prometheus.example.com/graph?g0.expr=disk_used",
          "inhibited": false,
          "inhibited_by": [],
          "labels": {
            "alertname": "DiskFull",
            "instance": "db-1:9100",
            "job": "node",
            "severity": "critical"
          },
          "name": "DiskFull",
          "receivers": [
            "oncall"
          ],
          "severity": "critical",
          "silence_link": "https://alertmanager.example.com/#/silences/new?filter=%7Balertname%3D%22DiskFull%22%7D",
          "silenced": false,
          "silenced_by": [],
          "starts_at": "2026-11-09T08:12:30.000Z",
          "state": "active",
          "summary": "Disk on db-1 is 95% full",
          "updated_at": "2026-11-09T08:20:30.000Z"
        }
      ],
      "firing_count": 1,
      "labels": {
        "alertname": "DiskFull"
      },
      "receiver": "oncall"
    }
  ]
}
```

### List alerts

List the alerts firing now, newest first, with their labels, annotations and receivers: only those not silenced or inhibited, unless you choose otherwise.

**Inputs**

- Matchers (`matchers`, text): Only alerts whose labels match, one matcher per line, such as alertname=DiskFull or instance=~"web-.*" (=~ matches a pattern; != and !~ leave out). Leave blank for every alert.
- Which alerts (`state`, text): Firing and not muted (the default), silenced, inhibited, either of those, or any. One of: `active` (Firing, not silenced or inhibited), `silenced`, `inhibited`, `muted` (Silenced or inhibited), `any`. Default: `active`.
- Receiver (`receiver`, text): Only alerts sent to this receiver. Leave blank for any.
- How many (`limit`, number): The most to list. Defaults to 100. From 1 to 1000.

**Outputs**

- `alerts` (list): The alerts, newest first
- `count` (number): How many alerts are listed
- `has_more` (true/false): True when more alerts matched than the limit
- `total` (number): How many alerts matched, before the limit

**Example output**

```json
{
  "alerts": [
    {
      "annotations": {
        "description": "/var/lib/postgresql has 2 GB left.",
        "summary": "Disk on db-1 is 95% full"
      },
      "description": "/var/lib/postgresql has 2 GB left.",
      "ends_at": "2026-11-09T08:24:30.000Z",
      "fingerprint": "5f2a8c41d9e07b36",
      "generator_url": "https://prometheus.example.com/graph?g0.expr=disk_used",
      "inhibited": false,
      "inhibited_by": [],
      "labels": {
        "alertname": "DiskFull",
        "instance": "db-1:9100",
        "job": "node",
        "severity": "critical"
      },
      "name": "DiskFull",
      "receivers": [
        "oncall"
      ],
      "severity": "critical",
      "silence_link": "https://alertmanager.example.com/#/silences/new?filter=%7Balertname%3D%22DiskFull%22%7D",
      "silenced": false,
      "silenced_by": [],
      "starts_at": "2026-11-09T08:12:30.000Z",
      "state": "active",
      "summary": "Disk on db-1 is 95% full",
      "updated_at": "2026-11-09T08:20:30.000Z"
    }
  ],
  "count": 1,
  "has_more": false,
  "total": 1
}
```

### List receivers

List the receivers Alertmanager's configuration names: where it can send notifications, such as a team's email or Slack channel.

**Inputs**: None.

**Outputs**

- `count` (number): How many receivers there are
- `receivers` (list): The receivers in Alertmanager's configuration

**Example output**

```json
{
  "count": 2,
  "receivers": [
    {
      "name": "oncall"
    },
    {
      "name": "team-email"
    }
  ]
}
```

### List silences

List silences, active ones ending soonest first: those in force or starting later, unless you choose otherwise.

**Inputs**

- Which silences (`state`, text): Active or pending (the default), only active, only pending (starting later), expired, or any. One of: `current` (Active or pending), `active`, `pending` (Pending (starts later)), `expired`, `any`. Default: `current`.
- Matchers (`matchers`, text): Only silences of alerts with these labels, such as alertname=DiskFull. Leave blank for every silence.
- Created by (`created_by`, text): Only silences whose creator contains this, such as a name.
- How many (`limit`, number): The most to list. Defaults to 100. From 1 to 1000.

**Outputs**

- `count` (number): How many silences are listed
- `has_more` (true/false): True when more silences matched than the limit
- `silences` (list): The silences: active ones ending soonest first, then pending, then expired
- `total` (number): How many silences matched, before the limit

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "silences": [
    {
      "comment": "Deploying release 4.2",
      "created_by": "Lodol",
      "ends_at": "2026-11-09T11:00:00.000Z",
      "id": "3f2a1b4c-5d6e-4f70-8a9b-0c1d2e3f4a5b",
      "link": "https://alertmanager.example.com/#/silences/3f2a1b4c-5d6e-4f70-8a9b-0c1d2e3f4a5b",
      "matchers": [
        "alertname=\"DiskFull\"",
        "instance=~\"db-.*\""
      ],
      "matchers_text": "alertname=\"DiskFull\", instance=~\"db-.*\"",
      "minutes_left": 120,
      "starts_at": "2026-11-09T09:00:00.000Z",
      "state": "active",
      "updated_at": "2026-11-09T09:00:00.000Z"
    }
  ],
  "total": 1
}
```

### Resolve alert

Mark a firing alert resolved now, found by its fingerprint or by the name and labels it was sent with. For alerts a workflow sent: Prometheus sends its own again while they still fire.

**Inputs**

- Alert (`alert`, text, required): The alert's fingerprint (from a trigger, List alerts or Send alert), or its name, such as BackupFailed.
- Labels (`labels`, object): With a name: the other labels it was sent with, severity too. Leave blank for a fingerprint.

**Outputs**

- `fingerprint` (text): The alert's fingerprint
- `labels` (object): Its labels
- `name` (text): The alert's name
- `resolved_at` (text): When it was resolved, in UTC (ISO 8601)
- `was_firing` (true/false): True when it was firing and is now resolved; false when no such alert was firing, so nothing changed

**Example output**

```json
{
  "fingerprint": "5f2a8c41d9e07b36",
  "labels": {
    "alertname": "DiskFull",
    "instance": "db-1:9100",
    "job": "node",
    "severity": "critical"
  },
  "name": "DiskFull",
  "resolved_at": "2026-11-09T09:02:00.000Z",
  "was_firing": true
}
```

### Send alert

Send an alert to Alertmanager, which routes it to its receivers like one from Prometheus. Without an end, it resolves itself after 5 minutes (Alertmanager's resolve_timeout) unless sent again; use Resolve alert to end it sooner.

**Inputs**

- Alert name (`alert_name`, text, required): The alert's name (its alertname label), such as BackupFailed.
- Severity (`severity`, text): Its severity label, such as critical, warning or info, which routes often send to different receivers.
- Labels (`labels`, object): Other labels, such as instance db-1 and team database. The same name and labels make the same alert.
- Summary (`summary`, text): One line on what is wrong, shown in notifications.
- Description (`description`, text): More detail, shown in notifications.
- Other annotations (`annotations`, object): More annotations, such as runbook_url.
- Started (`starts_at`, date and time): When it started. Leave blank for now.
- Ends (`ends_at`, date and time): When it ends by itself. Leave blank for 5 minutes after it was last sent.
- Source link (`generator_url`, text): A link to what raised it, such as a dashboard or a run's page.

**Outputs**

- `annotations` (object): All its annotations, such as summary and runbook_url
- `description` (text): Its description annotation; empty when it has none
- `ends_at` (text): When Alertmanager will count it resolved unless it hears about it again, in UTC (ISO 8601)
- `fingerprint` (text): Alertmanager's ID for the alert, worked out from its labels, such as 5f2a8c41d9e07b36
- `generator_url` (text): A link to what raised it, such as its Prometheus graph
- `inhibited` (true/false): True when another alert inhibits it
- `inhibited_by` (list): The alerts inhibiting it
- `labels` (object): All its labels, such as alertname, instance and job
- `name` (text): The alert's name (its alertname label)
- `receivers` (list): Where Alertmanager sends it
- `severity` (text): Its severity label, such as critical; empty when it has none
- `silence_link` (text): A link to Alertmanager's New Silence page, filled in with its labels
- `silenced` (true/false): True when a silence mutes it
- `silenced_by` (list): The silences muting it
- `starts_at` (text): When it started firing, in UTC (ISO 8601)
- `state` (text): active (firing and notifying), suppressed (silenced or inhibited) or unprocessed (just arrived)
- `summary` (text): Its summary annotation; empty when it has none
- `updated_at` (text): When Alertmanager last heard about it, in UTC (ISO 8601)

**Example output**

```json
{
  "annotations": {
    "description": "/var/lib/postgresql has 2 GB left.",
    "summary": "Disk on db-1 is 95% full"
  },
  "description": "/var/lib/postgresql has 2 GB left.",
  "ends_at": "2026-11-09T08:24:30.000Z",
  "fingerprint": "5f2a8c41d9e07b36",
  "generator_url": "https://prometheus.example.com/graph?g0.expr=disk_used",
  "inhibited": false,
  "inhibited_by": [],
  "labels": {
    "alertname": "DiskFull",
    "instance": "db-1:9100",
    "job": "node",
    "severity": "critical"
  },
  "name": "DiskFull",
  "receivers": [
    "oncall"
  ],
  "severity": "critical",
  "silence_link": "https://alertmanager.example.com/#/silences/new?filter=%7Balertname%3D%22DiskFull%22%7D",
  "silenced": false,
  "silenced_by": [],
  "starts_at": "2026-11-09T08:12:30.000Z",
  "state": "active",
  "summary": "Disk on db-1 is 95% full",
  "updated_at": "2026-11-09T08:20:30.000Z"
}
```
