What went wrong, from the readings: an incident opens the first time a metric crosses a rule (or a probe fails), stays open while it does, and is resolved by the first reading where it no longer does.
class MMO\admin\monitoring\Incidents
Espace de noms
MMO\admin\monitoring
One incident per subject, probe and cause (a metric, or the probe's own status), however many readings it lasts:
a disk at 92% for a week is one incident seen two thousand times, not two thousand alerts. Its `level` is the worst it
reached, `current` what the last reading said. Opening, getting worse and resolving are what [`Notifier`](https://mmoframework.fr/fr/documentation/mmo.admin/php/monitoring/Notifier.md#notifier) tells.
An incident is acknowledged by a person (`acknowledgedAt`, `acknowledgedBy`, `note`): still open, no longer news.
$incidents = new Incidents($store, $notifier);
$incidents->update($readings); // after each collection
$incidents->acknowledge($id, 'marc', 'disk to be extended on Monday');
array{0: string, 1: string, 2: float|int|null, 3: string}> key => [cause, level, value, message]: every metric over a rule, and the probe itself when it failed without a metric to blame
Open, update and resolve incidents from the readings of one collection.
function update(array $readings): voidOnly the subjects and probes that were read are touched: a collection of the http probe alone resolves nothing the
system probe found.