# Checks reference

> Fields every check has - interval, timeout, nodes, quorum, rounds to DOWN and back, mute and escalation policy - with defaults and limits, as the API, the CLI and the MCP server accept them.

A check is the same object in the REST API (`POST /api/v1/projects/{projectId}/checks`), in `monitorly.yaml` (`checks:`) and in the MCP tools. Field names are camelCase. A field left out takes its default; an unknown field is an error.

```json
{
  "name": "Storefront",
  "intervalSecs": 60,
  "timeoutMs": 10000,
  "nodes": ["<node id>", "<node id>", "<node id>"],
  "quorum": { "mode": "half" },
  "downAfter": 2,
  "upAfter": 2,
  "kind": {
    "type": "http",
    "url": "https://shop.example.com/health",
    "method": "GET",
    "maxRedirects": 5,
    "assertions": [{ "target": "status", "op": "eq", "value": 200 }]
  }
}
```

## Fields

| Field                | Type              | Default                    | Rules                                                                                                                  |
| -------------------- | ----------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `name`               | string            | required                   | 1 to 200 characters, one line                                                                                          |
| `intervalSecs`       | integer           | required, except heartbeat and server | At least 30, and at least the plan's shortest interval                                                      |
| `timeoutMs`          | integer           | `10000`                    | 1 to 30000, and shorter than the interval                                                                              |
| `kind`               | object            | required                   | The check type and its own fields, chosen by `kind.type`: `http`, `tcp`, `icmp`, `dns`, `ssl`, `domain`, `heartbeat`, [`server`](https://docs.monitorly.cloud/servers/rules.md) |
| `nodes`              | array of node ids | required, except heartbeat and server | At least one; no node twice; platform nodes or this workspace's private nodes, not revoked. Heartbeat and server checks take none |
| `quorum`             | object            | `{"mode": "half"}`         | `half`, or `{"mode": "exact", "count": N}` with N from 1 to the number of nodes                                        |
| `downAfter`          | integer           | `2`                        | 1 to 10 failing confirmation rounds in a row before DOWN                                                               |
| `upAfter`            | integer           | `2`                        | 1 to 10 passing rounds before a DOWN check is UP again                                                                 |
| `muted`              | boolean           | `false`                    | `true`: the check runs and opens incidents, but sends no alerts                                                        |
| `escalationPolicyId` | id or null        | `null`                     | The check's own escalation policy; `null` follows the project's                                                        |

In `monitorly.yaml` a check also has `ref`, its stable key in the file; `nodes` may name nodes instead of ids, and secret headers are written as `secret: keep` ([`monitorly.yaml`](https://docs.monitorly.cloud/cli/monitorly-yaml.md)).

How `quorum`, `downAfter` and `upAfter` decide the status: [How DOWN is decided](https://docs.monitorly.cloud/concepts/quorum.md).

## What the API adds in responses

| Field                    | Meaning                                                                                                                                                  |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`, `projectId`        | Ids of the check and its project                                                                                                                         |
| `epoch`                  | Number of the check's meaningful configuration. It grows when the target, assertions, timeout, nodes or pause change; results of other epochs never vote |
| `paused`                 | Whether the check is paused                                                                                                                              |
| `ref`, `managedBy`       | Its key in `monitorly.yaml`, and `config` or `ui`: who manages it. `ref` is `null` until a config apply creates or adopts it                             |
| `createdAt`, `updatedAt` | RFC 3339 times in UTC                                                                                                                                    |

The list and the check page also return the current status, the row of locations with each node's health, the last 24 hours by hour, 30-day uptime and the median response time.

## Check types

- [HTTP](https://docs.monitorly.cloud/checks/http.md) and its [assertions](https://docs.monitorly.cloud/checks/assertions.md)
- [TCP](https://docs.monitorly.cloud/checks/tcp.md)
- [ICMP](https://docs.monitorly.cloud/checks/icmp.md)
- [DNS](https://docs.monitorly.cloud/checks/dns.md)
- [SSL certificate](https://docs.monitorly.cloud/checks/ssl.md)
- [Domain expiry](https://docs.monitorly.cloud/checks/domain.md)
- [Heartbeat](https://docs.monitorly.cloud/checks/heartbeat.md)

What a run returns and why it fails: [Run results and error codes](https://docs.monitorly.cloud/checks/results.md).
