# Run results and error codes

> What one run reports, the outcomes UP, DEGRADED and DOWN, runs without an outcome, and every error code a run can end with.

Each run on one node reports an **outcome** and what it observed. The run log on the check page, `GET /api/v1/checks/{checkId}/runs` and the MCP tool `get_runs` list them.

## Outcomes

| Outcome    | Meaning                                                                                 |
| ---------- | --------------------------------------------------------------------------------------- |
| `UP`       | The target answered and every assertion held                                            |
| `DEGRADED` | An HTTP target answered correctly but slower than `degradedAfterMs`                     |
| `DOWN`     | The target failed: an error below, or a failed assertion                                |
| none       | The node could not judge the target. The run is not a vote and never makes a check DOWN |

Only outcomes of healthy nodes in the current configuration vote ([How DOWN is decided](https://docs.monitorly.cloud/concepts/quorum.md#which-results-vote)).

## What a run records

- status code, total time, and its parts: DNS, connect, TLS, first byte;
- the address the node connected to, and for HTTP the redirects followed, the body size and the headers `server`, `content-type`, `cache-control`, `x-request-id` and `cf-ray` of the final response;
- the round-trip time of an ICMP echo;
- the expiry of the certificate (SSL) or the registration (domain);
- the error, as a code and a message, and each failed assertion with what came back;
- whether the result arrived late or belongs to a previous configuration.

## Failures of the target

These codes end a run as `DOWN`.

| Code                      | Meaning                                                                                 |
| ------------------------- | --------------------------------------------------------------------------------------- |
| `dns.nxdomain`            | The name does not exist                                                                 |
| `dns.no_records`          | The name has no records of the requested type                                           |
| `dns.failed`              | The resolver gave no usable answer                                                      |
| `tcp.refused`             | Nothing accepts connections on the port                                                 |
| `tcp.unreachable`         | No route to the address                                                                 |
| `tcp.failed`              | The connection failed for another reason                                                |
| `tls.expired`             | The certificate has expired                                                             |
| `tls.not_yet_valid`       | The certificate is not valid yet                                                        |
| `tls.untrusted`           | The certificate does not chain to a trusted root, or its signature is bad               |
| `tls.hostname_mismatch`   | The certificate is for another name                                                     |
| `tls.invalid_certificate` | The certificate is invalid for another reason                                           |
| `tls.handshake_failed`    | The TLS handshake failed                                                                |
| `http.protocol`           | The response is not valid HTTP                                                          |
| `http.too_many_redirects` | More redirects than `maxRedirects`                                                      |
| `http.invalid_redirect`   | A redirect has no usable `Location`, or leads to a scheme other than `http` and `https` |
| `timeout`                 | No answer within the check's timeout                                                    |
| `icmp.failed`             | The ping failed for a reason other than a timeout                                       |
| `domain.expired`          | The domain registration has expired                                                     |
| `domain.not_found`        | The registry does not know the domain                                                   |

A run can also be `DOWN` with no error code: the target answered, and an assertion failed (HTTP) or an expected DNS value is missing.

## Runs without an outcome

These codes say the node could not judge the target. The check shows the reason; the run never votes.

| Code                          | Meaning                                                                        | What to do                                                                  |
| ----------------------------- | ------------------------------------------------------------------------------ | --------------------------------------------------------------------------- |
| `egress.private_address`      | Every address of the target is in a range this node may not reach              | Check it from a [private node](https://docs.monitorly.cloud/nodes/install.md) in that network             |
| `config.secret_unreadable`    | The node could not read a secret header of the check                           | Enter the secret again; if it persists, the node may need to be reinstalled |
| `config.invalid_header_value` | A header value, usually a secret, is not a valid HTTP header value             | Fix the value                                                               |
| `config.invalid_target`       | The target cannot be parsed, or the node is too old for a feature of the check | Update the node                                                             |
| `runner.rate_limited`         | The node's limit of runs per destination address was reached                   | Spread checks of one host over time, or raise the node's limit              |
| `icmp.not_permitted`          | The node may not send ICMP                                                     | Give the node `CAP_NET_RAW`                                                 |
| `domain.expiry_unknown`       | The registry publishes no expiry date                                          | Nothing: some registries never do                                           |
| `domain.lookup_failed`        | The registry could not be reached or gave an unusable answer                   | Usually passes on its own                                                   |
| `probe.not_applicable`        | The check type does not run on nodes                                           | —                                                                           |

## Test runs

**Test now**, `POST /api/v1/projects/{projectId}/check-tests` and the MCP tool `test_check` report the same fields per node, plus a node state: `pending`, `done`, `offline`, `timeout`, `failed`, or `not_supported` for a node too old to run tests. Nothing of a test run is saved.
