resident probe scheduler, successor of reed-alert
reed2 runs the checks of a host from one resident process instead of a
cron pass: each probe on its own timer, every interval while it holds,
every retry once it failed, a notification when it has failed try
times in a row and another when it comes back -- never a reminder in
between. Probes are listed in /etc/reed2/probes, one per line, tab
separated key=value fields: a command run by argv without any shell,
an rc.d service, the usage of a file system, the age of a file, the
expiry of a TLS certificate, the status of an HTTP answer, the echo
of a host. TLS and HTTP run inside the VM, the peer verified; a ping
is sent once per address, its verdict shared for ping_ttl seconds by
every probe that reaches that address. A probe can wait on another
one, a gate that stops it while the gate is failing. SIGHUP rereads
the list; a list that does not parse is refused and the running one
kept.

A probe can also be a family of tasks, one line for a target, one probe
per task, each on its own timer and in its own notification:
mailserver (16 tasks: MX, PTR, SPF, DKIM, DMARC, CAA, MTA-STS, TLS-RPT,
TLS certificates, DANE, DNSSEC, open relay, role addresses, DNSBL, client
settings, SPF of the MX host), webserver (13: DNS, redirect, certificate, protocols, HSTS,
DANE, DNSSEC, CAA, IPv6, aliases, OCSP, headers, suites), dns (6:
delegation, SOA, DNSSEC, CAA, secondaries, recursion), openbsd (4:
patches, packages, release, upgrade), pkgrepo and email (1 each). The
result of a task, and the answers it is built from, are kept in memory
for cache_ttl seconds (60 by default) when they succeed, never when they
fail, and shared by every probe that asks the same question.

reed2 FAMILY TARGET runs the tasks of a family once, in parallel, and gives
one verdict: silent and rc 0, or the failed tasks on stderr and rc 1, rc 2
when it could not test; -f text and -f json print every task. It replaces
probe-mailserver, probe-webserver, probe-dns, probe-openbsd, probe-pkgrepo
and probe-email. reed2 daemon -f FILE is reed2 -f FILE.

reed2 --check validates a list, reed2 --once runs every probe once and
prints the failures, with --verbose the start and end of each probe.
Notifications go to syslog, and to ntfy.sh as
well when the list asks for it, the topic in /etc/reed2/ntfy.conf.
Elixir escript, standard library and OTP only.

Maintainer: Jean-Gerard Pailloncy <j-g@pailloncy.com>
