argos/docs/checks.md
Luc Didry e2402ac190
💥 — Change default config file path to argos-config.yaml (fix #36)
Argos will first try the given config file (given either with `--config` or with
`ARGOS_YAML_FILE` env var), then `argos-config.yaml`, then `/etc/argos/config.yaml`.
2024-06-17 16:15:53 +02:00

45 lines
1.2 KiB
Markdown

# Checks
At its core, argos runs checks and return the results to the service. Here are the implemented checks, with a description of what they do and how to configure them.
## Simple checks
These checks are the most basic ones. They simply check that the response from the service matches what you expect.
| Check | Description | Configuration |
| --- | --- | --- |
| `status-is` | Check that the returned status code matches what you expect. | `status-is: "200"` |
| `body-contains` | Check that the returned body contains a given string. | `body-contains: "Hello world"` |
```{code-block} yaml
---
caption: argos-config.yaml
---
- domain: "https://example.org"
paths:
- path: "/"
checks:
- status-is: 200
- body-contains: "Hello world"
```
## SSL certificate expiration
Checks that the SSL certificate will not expire soon. You need to define the thresholds in the configuration, and set the `on-check` option to enable the check.
```{code-block} yaml
---
caption: argos-config.yaml
---
ssl:
thresholds:
- "1d": critical
- "5d": warning
- domain: "https://example.org"
paths:
- path: "/"
checks:
- ssl-certificate-expiration: "on-check"
```