# Checkmk

> Act on Checkmk monitoring from workflows: list problems, acknowledge them with a ticket number, schedule downtime around a change, run a check now, and add, change or delete hosts from an asset system and activate the changes. Start a workflow when a host goes down, a service goes critical or warning, or a problem recovers.

App · 14 actions. Web page: https://docs.lodol.com/docs/integrations/checkmk

## Actions

### Acknowledge problem

Acknowledge a host's or a service's problem with a comment, such as a ticket number, so Checkmk shows someone is on it and stops notifying about it.

**Inputs**

- Host (`host`, text, required): The host's name in Checkmk, such as web01.
- Service (`service`, text): The service's name as Checkmk shows it, such as Filesystem /var. Leave blank for the host itself.
- Comment (`comment`, text, required): Why, or who's on it, such as Ticket INC-1042 opened.
- Until it's OK (`sticky`, true/false): Keep the acknowledgement until the problem is OK (or UP) again. Turn off to end it at the next change of state, such as from WARN to CRIT. Default: `true`.
- Notify contacts (`notify`, true/false): Tell the host's or service's contacts it was acknowledged, as Checkmk's own form does. Default: `true`.
- Expires (`expires`, date and time): When the acknowledgement ends by itself. Leave blank to keep it.

**Outputs**

- `acknowledged` (true/false): True when someone has acknowledged the problem
- `comment` (text): The comment the acknowledgement was given
- `host_groups` (list): The host groups its host is in
- `host_name` (text): The host's name in Checkmk, such as web01
- `in_downtime` (true/false): True while it (or its host) is in a scheduled downtime
- `last_check` (text): When it was last checked, in UTC
- `link` (text): A link to it in Checkmk
- `long_output` (text): The check's longer output, when it gives one
- `object_type` (text): host or service
- `output` (text): What the check said, such as CRIT - 98% used
- `service` (text): The service's name, such as CPU load; empty for the host itself
- `since` (text): When it got into this state, in UTC
- `state` (text): The state as Checkmk shows it: UP, DOWN, UNREACHABLE or PENDING for a host; OK, WARN, CRIT, UNKNOWN or PENDING for a service

**Example output**

```json
{
  "acknowledged": true,
  "comment": "Ticket INC-1042 opened",
  "host_groups": [
    "databases"
  ],
  "host_name": "db01",
  "in_downtime": false,
  "last_check": "2026-03-14T22:03:47Z",
  "link": "https://monitor.example.com/mysite/check_mk/view.py?view_name=service&host=db01&service=Filesystem+%2Fvar",
  "long_output": "",
  "object_type": "service",
  "output": "Used: 96.12% - 48.1 GiB of 50.0 GiB (warn/crit at 80.00%/90.00% used)",
  "service": "Filesystem /var",
  "since": "2026-03-14T20:41:17Z",
  "state": "CRIT"
}
```

### Activate changes

Activate the pending changes, such as hosts added or deleted, so Checkmk monitors them that way, and wait until it's done.

**Inputs**

- Include other users' changes (`include_other_users`, true/false): Also activate changes other people made. Needs the Administrator role; without it, only the automation user's own changes can be activated. Default: `false`.

**Outputs**

- `activated` (true/false): False when there was nothing to activate
- `activation_id` (text): Checkmk's ID for the activation
- `changes` (list): The changes activated
- `count` (number): How many changes were activated
- `message` (text): What happened, in a sentence
- `sites` (list): The sites it was activated on

**Example output**

```json
{
  "activated": true,
  "activation_id": "ef0780ea-46a1-478a-a4ee-6fdb353672e8",
  "changes": [
    {
      "change": "Created new host web03.",
      "id": "80ef400c-7fe2-4e75-9bc1-f952d3f470ae",
      "time": "2026-03-14T21:50:48Z",
      "user": "lodol"
    }
  ],
  "count": 1,
  "message": "Activated 1 changes.",
  "sites": [
    "mysite"
  ]
}
```

### Create host

Add a host to Checkmk in a folder, with its IP address, such as from an asset system. Discover its services and activate changes to monitor it.

**Inputs**

- Host name (`host_name`, text, required): The host's name in Checkmk, such as web03.yourcity.gov: letters, numbers, dots, dashes and underscores.
- Folder (`folder`, text): The folder's path as Checkmk's Hosts page shows it, such as /linux/web. Leave blank for Main.
- IP address (`ip_address`, text): Where Checkmk reaches the host, an IP address or a DNS name, such as 10.20.0.11. Leave blank to use the host name.
- Alias (`alias`, text): A longer name, such as Public website, node 3.
- Monitored with (`monitoring`, text): How Checkmk monitors it. One of: `agent` (Checkmk agent), `snmp` (SNMP (network devices)), `ping` (No agent: ping only). Default: `agent`.
- Labels (`labels`, text): Labels as name:value, separated by commas, such as env:prod, team:web.

**Outputs**

- `alias` (text): Its alias, a longer name
- `folder` (text): Its folder, such as /linux/web; / is Main
- `host_name` (text): The host's name in Checkmk, such as web01
- `ip_address` (text): The IP address or DNS name Checkmk checks it at
- `labels` (object): Its labels, such as {"env": "prod"}
- `monitoring` (text): How Checkmk monitors it: agent (Checkmk agent), snmp or ping (no agent)
- `needs_activation` (true/false): Always true: activate changes to monitor it this way
- `setup_link` (text): A link to the host's settings in Checkmk

**Example output**

```json
{
  "alias": "Public website, node 3",
  "folder": "/linux/web",
  "host_name": "web03",
  "ip_address": "10.20.0.13",
  "labels": {
    "env": "prod"
  },
  "monitoring": "agent",
  "needs_activation": true,
  "setup_link": "https://monitor.example.com/mysite/check_mk/wato.py?mode=edit_host&host=web03&folder=linux%2Fweb"
}
```

### Delete host

Delete a host from Checkmk, such as when a server is retired. Activate changes to stop monitoring it.

**Inputs**

- Host (`host`, text, required): The host's name in Checkmk, such as web01.

**Outputs**

- `deleted` (true/false): True when Checkmk deleted it
- `host_name` (text): The host's name in Checkmk, such as web01
- `needs_activation` (true/false): Always true: activate changes to stop monitoring it

**Example output**

```json
{
  "deleted": true,
  "host_name": "web03",
  "needs_activation": true
}
```

### Discover services

Scan a host for its services, such as its disks and network interfaces, and monitor the new ones, as Checkmk's Service discovery page does.

**Inputs**

- Host (`host`, text, required): The host's name in Checkmk, such as web01.
- What to do (`mode`, text): What to do with what the scan finds. One of: `fix_all` (Accept all: add new services, remove vanished ones), `new` (Only add new services), `tabula_rasa` (Start over: remove all services and find them again). Default: `fix_all`.

**Outputs**

- `count` (number): How many services are listed
- `host_name` (text): The host's name in Checkmk, such as web01
- `ignored` (number): How many are disabled
- `mode` (text): What the discovery did: fix_all, new or tabula_rasa
- `monitored` (number): How many are monitored
- `needs_activation` (true/false): Always true: activate changes to apply it
- `services` (list): The host's services after the discovery
- `undecided` (number): How many were found and aren't monitored
- `vanished` (number): How many are monitored but no longer found

**Example output**

```json
{
  "count": 3,
  "host_name": "web03",
  "ignored": 0,
  "mode": "fix_all",
  "monitored": 3,
  "needs_activation": true,
  "services": [
    {
      "check_plugin": "cpu_loads",
      "phase": "monitored",
      "service": "CPU load"
    },
    {
      "check_plugin": "df",
      "phase": "monitored",
      "service": "Filesystem /"
    },
    {
      "check_plugin": "mem_linux",
      "phase": "monitored",
      "service": "Memory"
    }
  ],
  "undecided": 0,
  "vanished": 0
}
```

### Get host status

Get a host's state (UP, DOWN or UNREACHABLE), its address and groups, how many of its services are OK, warning or critical, and its service problems.

**Inputs**

- Host (`host`, text, required): The host's name in Checkmk, such as web01.

**Outputs**

- `acknowledged` (true/false): True when someone has acknowledged its problem
- `address` (text): The IP address or DNS name Checkmk checks it at
- `alias` (text): The host's alias, its longer name
- `folder` (text): Its folder in Setup, such as /linux/web
- `host_groups` (list): The host groups it is in
- `host_name` (text): The host's name in Checkmk, such as web01
- `in_downtime` (true/false): True while it is in a scheduled downtime
- `last_check` (text): When it was last checked, in UTC
- `link` (text): A link to the host in Checkmk
- `output` (text): What the host check said
- `service_problems` (list): Its services that are WARN, CRIT or UNKNOWN, the worst first
- `services_critical` (number): How many are CRIT
- `services_ok` (number): How many of its services are OK
- `services_pending` (number): How many haven't been checked yet
- `services_unknown` (number): How many are UNKNOWN
- `services_warning` (number): How many are WARN
- `since` (text): When it got into this state, in UTC
- `state` (text): UP, DOWN, UNREACHABLE or PENDING (not checked yet)

**Example output**

```json
{
  "acknowledged": false,
  "address": "10.20.0.31",
  "alias": "Records database",
  "folder": "/linux/db",
  "host_groups": [
    "databases"
  ],
  "host_name": "db01",
  "in_downtime": false,
  "last_check": "2026-03-14T22:04:40Z",
  "link": "https://monitor.example.com/mysite/check_mk/view.py?view_name=hoststatus&host=db01",
  "output": "OK - 10.20.0.31 rta 0.412ms lost 0%",
  "service_problems": [
    {
      "acknowledged": true,
      "output": "Used: 96.12% - 48.1 GiB of 50.0 GiB",
      "service": "Filesystem /var",
      "since": "2026-03-14T20:41:17Z",
      "state": "CRIT"
    }
  ],
  "services_critical": 1,
  "services_ok": 41,
  "services_pending": 0,
  "services_unknown": 0,
  "services_warning": 0,
  "since": "2026-03-01T08:12:40Z",
  "state": "UP"
}
```

### Get service status

Get a service's state (OK, WARN, CRIT or UNKNOWN), what its check said and whether someone has acknowledged it.

**Inputs**

- Host (`host`, text, required): The host's name in Checkmk, such as web01.
- Service (`service`, text, required): The service's name as Checkmk shows it, such as CPU load.

**Outputs**

- `acknowledged` (true/false): True when someone has acknowledged the problem
- `host_groups` (list): The host groups its host is in
- `host_name` (text): The host's name in Checkmk, such as web01
- `in_downtime` (true/false): True while it (or its host) is in a scheduled downtime
- `last_check` (text): When it was last checked, in UTC
- `link` (text): A link to it in Checkmk
- `long_output` (text): The check's longer output, when it gives one
- `object_type` (text): host or service
- `output` (text): What the check said, such as CRIT - 98% used
- `service` (text): The service's name, such as CPU load; empty for the host itself
- `since` (text): When it got into this state, in UTC
- `state` (text): The state as Checkmk shows it: UP, DOWN, UNREACHABLE or PENDING for a host; OK, WARN, CRIT, UNKNOWN or PENDING for a service

**Example output**

```json
{
  "acknowledged": true,
  "host_groups": [
    "databases"
  ],
  "host_name": "db01",
  "in_downtime": false,
  "last_check": "2026-03-14T22:03:47Z",
  "link": "https://monitor.example.com/mysite/check_mk/view.py?view_name=service&host=db01&service=Filesystem+%2Fvar",
  "long_output": "",
  "object_type": "service",
  "output": "Used: 96.12% - 48.1 GiB of 50.0 GiB (warn/crit at 80.00%/90.00% used)",
  "service": "Filesystem /var",
  "since": "2026-03-14T20:41:17Z",
  "state": "CRIT"
}
```

### List host groups

List the host groups, with their hosts and how many are down.

**Inputs**: None.

**Outputs**

- `aliases_known` (true/false): False when the user's role may not read Setup's host groups: aliases are then the names, and empty groups aren't listed
- `count` (number): How many host groups there are
- `host_groups` (list): The host groups, by name

**Example output**

```json
{
  "aliases_known": true,
  "count": 2,
  "host_groups": [
    {
      "alias": "Databases",
      "host_count": 1,
      "hosts": [
        "db01"
      ],
      "hosts_down": 0,
      "link": "https://monitor.example.com/mysite/check_mk/view.py?view_name=hostgroup&hostgroup=databases",
      "name": "databases"
    },
    {
      "alias": "Web servers",
      "host_count": 2,
      "hosts": [
        "web01",
        "web02"
      ],
      "hosts_down": 1,
      "link": "https://monitor.example.com/mysite/check_mk/view.py?view_name=hostgroup&hostgroup=web_servers",
      "name": "web_servers"
    }
  ]
}
```

### List hosts

List the hosts in a folder, with their IP address, labels and state.

**Inputs**

- Folder (`folder`, text): The folder's path as Checkmk's Hosts page shows it, such as /linux/web. Leave blank for Main, the top folder.
- Include subfolders (`include_subfolders`, true/false): Also list the hosts in the folders inside it. Default: `true`.
- How many (`limit`, number): The most to list. Defaults to 100. From 1 to 1000.

**Outputs**

- `count` (number): How many hosts are listed
- `folder` (text): The folder listed, such as /linux; / is Main
- `hosts` (list): The hosts, by name
- `include_subfolders` (true/false): True when hosts in its subfolders are listed too
- `total` (number): How many hosts there are in all
- `truncated` (true/false): True when there were more than the step listed

**Example output**

```json
{
  "count": 2,
  "folder": "/linux",
  "hosts": [
    {
      "alias": "Records database",
      "folder": "/linux/db",
      "host_name": "db01",
      "ip_address": "10.20.0.31",
      "labels": {},
      "link": "https://monitor.example.com/mysite/check_mk/view.py?view_name=hoststatus&host=db01",
      "monitored": true,
      "monitoring": "agent",
      "output": "OK - 10.20.0.31 rta 0.412ms lost 0%",
      "state": "UP"
    },
    {
      "alias": "Public website, node 2",
      "folder": "/linux/web",
      "host_name": "web02",
      "ip_address": "10.20.0.12",
      "labels": {
        "env": "prod"
      },
      "link": "https://monitor.example.com/mysite/check_mk/view.py?view_name=hoststatus&host=web02",
      "monitored": true,
      "monitoring": "agent",
      "output": "CRITICAL - 10.20.0.12: Host unreachable",
      "state": "DOWN"
    }
  ],
  "include_subfolders": true,
  "total": 2,
  "truncated": false
}
```

### List problems

List the problems going on now as rows: hosts down or unreachable and services critical, warning or unknown, with what each check said, worst first.

**Inputs**

- Show (`show`, text): Host problems, service problems or both. One of: `all` (Hosts and services), `hosts` (Hosts down or unreachable), `services`. Default: `all`.
- Service state (`service_state`, text): Which service problems to list. Only when Show is Hosts and services or Services. One of: `any` (Critical, warning or unknown), `critical`, `warning`, `unknown`. Default: `any`.
- Host (`host`, text): Only problems on this host.
- Host group (`host_group`, text): Only problems on hosts in this host group.
- Handled (`handled`, text): Only problems nobody has acknowledged or put in downtime yet, or only acknowledged ones. One of: `all` (Every problem), `unhandled` (Unhandled (not acknowledged, not in downtime)), `acknowledged`. Default: `all`.
- How many (`limit`, number): The most to list. Defaults to 100. From 1 to 1000.

**Outputs**

- `count` (number): How many problems are listed
- `hosts_down` (number): How many hosts are DOWN or UNREACHABLE
- `problems` (list): The problems, hosts first, then the worst and the newest
- `services_critical` (number): How many services are CRIT
- `services_unknown` (number): How many services are UNKNOWN
- `services_warning` (number): How many services are WARN
- `total` (number): How many problems there are in all
- `truncated` (true/false): True when there were more than the step listed

**Example output**

```json
{
  "count": 2,
  "hosts_down": 1,
  "problems": [
    {
      "acknowledged": false,
      "host_alias": "Public website, node 2",
      "host_groups": [
        "web_servers"
      ],
      "host_name": "web02",
      "in_downtime": false,
      "last_check": "2026-03-14T22:04:03Z",
      "link": "https://monitor.example.com/mysite/check_mk/view.py?view_name=hoststatus&host=web02",
      "object_type": "host",
      "output": "CRITICAL - 10.20.0.12: Host unreachable @ 10.20.0.1",
      "service": "",
      "since": "2026-03-14T21:58:03Z",
      "state": "DOWN"
    },
    {
      "acknowledged": true,
      "host_alias": "Records database",
      "host_groups": [
        "databases"
      ],
      "host_name": "db01",
      "in_downtime": false,
      "last_check": "2026-03-14T22:03:47Z",
      "link": "https://monitor.example.com/mysite/check_mk/view.py?view_name=service&host=db01&service=Filesystem+%2Fvar",
      "object_type": "service",
      "output": "Used: 96.12% - 48.1 GiB of 50.0 GiB (warn/crit at 80.00%/90.00% used)",
      "service": "Filesystem /var",
      "since": "2026-03-14T20:41:17Z",
      "state": "CRIT"
    }
  ],
  "services_critical": 1,
  "services_unknown": 0,
  "services_warning": 0,
  "total": 2,
  "truncated": false
}
```

### Remove downtime

End a host's or service's downtime now, by its ID from 'Schedule downtime', or every downtime on the host or service.

**Inputs**

- Host (`host`, text, required): The host's name in Checkmk, such as web01.
- Downtime ID (`downtime_id`, text): The ID 'Schedule downtime' gave, such as 57. Separate several with commas. Leave blank to remove every downtime on the host (or on the service).
- Service (`service`, text): Only this service's downtimes. Leave blank for the host's and its services'.

**Outputs**

- `count` (number): How many were removed
- `host_name` (text): The host's name in Checkmk, such as web01
- `removed` (list): The downtimes removed
- `service` (text): The service whose downtimes were removed; empty for every one

**Example output**

```json
{
  "count": 1,
  "host_name": "web02",
  "removed": [
    {
      "author": "lodol",
      "comment": "Patching (CHG-2291)",
      "end": "2026-03-14T23:00:00Z",
      "host_name": "web02",
      "id": "57",
      "service": "",
      "start": "2026-03-14T22:00:00Z"
    }
  ],
  "service": ""
}
```

### Reschedule check

Run a host's or a service's check now, such as after a fix, rather than at its next interval, and get the new result.

**Inputs**

- Host (`host`, text, required): The host's name in Checkmk, such as web01.
- Service (`service`, text): The service's name as Checkmk shows it, such as Filesystem /var. Leave blank for the host itself.

**Outputs**

- `acknowledged` (true/false): True when someone has acknowledged the problem
- `checked` (true/false): True when Checkmk has run the check since; false when it hadn't finished yet, so the result is the one before
- `host_groups` (list): The host groups its host is in
- `host_name` (text): The host's name in Checkmk, such as web01
- `in_downtime` (true/false): True while it (or its host) is in a scheduled downtime
- `last_check` (text): When it was last checked, in UTC
- `link` (text): A link to it in Checkmk
- `long_output` (text): The check's longer output, when it gives one
- `object_type` (text): host or service
- `output` (text): What the check said, such as CRIT - 98% used
- `service` (text): The service's name, such as CPU load; empty for the host itself
- `since` (text): When it got into this state, in UTC
- `state` (text): The state as Checkmk shows it: UP, DOWN, UNREACHABLE or PENDING for a host; OK, WARN, CRIT, UNKNOWN or PENDING for a service

**Example output**

```json
{
  "acknowledged": false,
  "checked": true,
  "host_groups": [
    "databases"
  ],
  "host_name": "db01",
  "in_downtime": false,
  "last_check": "2026-03-14T22:05:12Z",
  "link": "https://monitor.example.com/mysite/check_mk/view.py?view_name=service&host=db01&service=Filesystem+%2Fvar",
  "long_output": "",
  "object_type": "service",
  "output": "Used: 61.40% - 30.7 GiB of 50.0 GiB",
  "service": "Filesystem /var",
  "since": "2026-03-14T22:05:12Z",
  "state": "OK"
}
```

### Schedule downtime

Schedule downtime for a host, or some of its services, for a change window, so their problems don't notify anyone.

**Inputs**

- Host (`host`, text, required): The host's name in Checkmk, such as web01.
- Services (`services`, text): Only these services, by name, such as HTTP, separated by commas. Leave blank for the host.
- Comment (`comment`, text, required): What it's for, such as Patching (CHG-2291).
- Start (`start`, date and time): When it starts. Leave blank to start now.
- Minutes (`duration_minutes`, number): How long it lasts, in minutes. Defaults to 60. From 1 to 527040.

**Outputs**

- `comment` (text): Its comment
- `count` (number): How many downtimes were made
- `downtime_ids` (list): Their IDs, for 'Remove downtime'
- `downtimes` (list): The downtimes Checkmk made, one per service
- `end` (text): When it ends, in UTC
- `host_name` (text): The host's name in Checkmk, such as web01
- `services` (list): The services it was scheduled for; empty for the host
- `start` (text): When it starts, in UTC

**Example output**

```json
{
  "comment": "Patching (CHG-2291)",
  "count": 1,
  "downtime_ids": [
    "57"
  ],
  "downtimes": [
    {
      "author": "lodol",
      "comment": "Patching (CHG-2291)",
      "end": "2026-03-14T23:00:00Z",
      "host_name": "web02",
      "id": "57",
      "service": "",
      "start": "2026-03-14T22:00:00Z"
    }
  ],
  "end": "2026-03-14T23:00:00Z",
  "host_name": "web02",
  "services": [],
  "start": "2026-03-14T22:00:00Z"
}
```

### Update host

Change a host's IP address, alias or labels, or move it to another folder. Blank fields are left as they are; activate changes to apply.

**Inputs**

- Host (`host`, text, required): The host's name in Checkmk, such as web01.
- IP address (`ip_address`, text): Where Checkmk reaches the host, an IP address or a DNS name, such as 10.20.0.11. Leave blank to use the host name.
- Alias (`alias`, text): A longer name, such as Public website, node 3.
- Move to folder (`folder`, text): The folder's path as Checkmk's Hosts page shows it, such as /linux/web. Leave blank to keep it where it is.
- Labels (`labels`, text): Labels as name:value, separated by commas, such as env:prod. They replace the host's labels.

**Outputs**

- `alias` (text): Its alias, a longer name
- `folder` (text): Its folder, such as /linux/web; / is Main
- `host_name` (text): The host's name in Checkmk, such as web01
- `ip_address` (text): The IP address or DNS name Checkmk checks it at
- `labels` (object): Its labels, such as {"env": "prod"}
- `monitoring` (text): How Checkmk monitors it: agent (Checkmk agent), snmp or ping (no agent)
- `needs_activation` (true/false): Always true: activate changes to monitor it this way
- `setup_link` (text): A link to the host's settings in Checkmk

**Example output**

```json
{
  "alias": "Public website, node 3",
  "folder": "/linux/web",
  "host_name": "web03",
  "ip_address": "10.20.0.13",
  "labels": {
    "env": "prod"
  },
  "monitoring": "agent",
  "needs_activation": true,
  "setup_link": "https://monitor.example.com/mysite/check_mk/wato.py?mode=edit_host&host=web03&folder=linux%2Fweb"
}
```
