One way of looking at a server or a target: what a hub runs, for every subject it applies to, at every collection.
abstract class MMO\admin\monitoring\aProbe
Namespace
MMO\admin\monitoring
A probe only ever reads. It runs one command (or one request) per subject, which prints everything it needs in
sections (`@@name` lines, [`Sections`](https://mmoframework.fr/en/documentation/mmo.admin/php/monitoring/aProbe.md#aprobe-sections)), so that a server across the world costs one round trip, not twenty.
Its options come from the hub's `probes` (`hub.json`): every public property can be set there, `enabled` and
`timeout` included -- `"database": {"engine": "mysql"}`.
What it cannot see is `unknown`, not an error: a webspace without `ps`, a target without a database. What it sees
wrong it says with [`Reading::raise`](https://mmoframework.fr/en/documentation/mmo.admin/php/monitoring/Reading.md#reading-raise); thresholds on numbers are the [`Rules`](https://mmoframework.fr/en/documentation/mmo.admin/php/monitoring/Rules.md#rules)' job, not the probe's.
class UptimeProbe extends aProbe {
const string NAME = 'uptime';
protected function probe(Server|Target $subject, Reading $reading, ?Reading $previous): void {
$reading->metric('uptime.days', (float)$this->shell($subject)->exec('cut -d" " -f1 /proc/uptime') / 86400);
}
}