Health checks
A health check belongs to one record value — an A, AAAA, SRV or MX value — so every
health command first names that value:
ZONE NAME TYPE DATA, or ZONE NAME TYPE --id UUID. See
Records for how names and data are written.
dinio health create example.com www A 192.0.2.1 --http https://192.0.2.1/health --expect 200,204dinio health show example.com www A 192.0.2.1dinio health update example.com www A 192.0.2.1 --interval 5mdinio health rm example.com www A 192.0.2.1A check runs only while its value’s host health is auto, and health create switches the
value to auto for you. To pause the check — for example during maintenance — force the value
down (or up), and switch it back to auto afterwards:
dinio record update example.com www A 192.0.2.1 --host-health downdinio record update example.com www A 192.0.2.1 --host-health autoSee DNS hosting for what each mode means.
health create
Section titled “health create”Pick exactly one kind of check:
| Option | Checks |
|---|---|
--http URL |
An HTTP(S) request to URL. |
--tcp HOST:PORT |
That a TCP connection opens. IPv6 as [2001:db8::1]:443. |
--ping ADDRESS |
ICMP echo. |
HTTP checks take extra options:
| Option | |
|---|---|
--method GET|POST|HEAD |
Default GET. |
--expect CODES |
Accepted status codes, comma separated: 200,204. |
--header NAME:VALUE |
Request header; repeat for more. |
--body TEXT |
Request body. |
Timing and the rest:
| Option | Default | |
|---|---|---|
--interval DURATION |
1m |
Time between runs; 30s to 24h. The zone Owner’s package may require more. |
--timeout DURATION |
5s |
Time limit of one attempt; 1s to 30s. |
--retries N |
Retries before the value counts as unhealthy, 0–5. | |
--retry-interval DURATION |
5s |
Pause between retries; 5s to 60s. |
--label TEXT |
Free-form label. |
Durations are written as 30s, 5m, 1h or 1d; a bare number is seconds.
One run, with all its retries, must end before the next one is due:
timeout × (retries + 1) + retry-interval × retries must be less than the interval. With
--timeout 5s --retries 3 that is 35 seconds, well within the default 1m.
health show
Section titled “health show”The check’s target, the value’s host health mode, timing, and the last result: status
(HEALTHY, UNHEALTHY, or UNKNOWN before the first run and while the value isn’t on
auto), when it last ran, and the last error.
health update
Section titled “health update”The same options as create. Options you leave out stay as they are; HTTP headers you pass are added to the existing ones or replace a header of the same
name. The kind of check cannot change — rm it and create a new one.
dinio health update example.com www A 192.0.2.1 --header "Host:www.example.com" --retries 2health rm
Section titled “health rm”Removes the check. A value on auto goes back to none; up and down stay. Asks for
confirmation.