mirror of
https://framagit.org/framasoft/framaspace/argos.git
synced 2025-04-28 18:02:41 +02:00
2 KiB
2 KiB
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" |
status-in |
Check that the returned status code is in the list of codes you expect. |
|
body-contains |
Check that the returned body contains a given string. | body-contains: "Hello world" |
headers-contain |
Check that the response contains the expected headers. |
|
headers-have |
Check that the response contains the expected headers. |
|
---
caption: argos-config.yaml
---
- domain: "https://example.org"
paths:
- path: "/"
checks:
- status-is: 200
- body-contains: "Hello world"
- headers-contain:
- "content-encoding"
- "content-type"
- path: "/foobar"
checks:
- status-in:
- 200
- 302
# It’s VERY important to respect the 4 spaces indentation here!
- headers-have:
content-encoding: "gzip"
content-type: "text/html"
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.
---
caption: argos-config.yaml
---
ssl:
thresholds:
- "1d": critical
- "5d": warning
- domain: "https://example.org"
paths:
- path: "/"
checks:
- ssl-certificate-expiration: "on-check"