MMOframework
Pourquoi l'IA Playground Bibliothèques Documentation Rechercher Agence
FR EN
Index

Incidents

MMO\admin\monitoring · 1 symbole · générée le 27 Oct 2026

class

Incidents

Incidents.php:20

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');

Propriétés3

events

protected array $events = []
Type
array

notifier

protected ?MMO\admin\monitoring\Notifier $notifier
Type
null | Notifier

store

protected MMO\admin\monitoring\MonitorStore $store
Type
MonitorStore

Méthodes8

acknowledge($id, $by, $note)

Incidents.php:106
function acknowledge(string $id, string $by, string $note = ''): array
$idstring
$bystringwho
$note = ''stringwhy it can wait
retournearraythe incident
lèvewhen there is no such incident

all($open)

Incidents.php:35
function all(bool $open = false): array
$open = falseboolonly the open ones
retournearrayincidents, the open ones first, then the most recent

causes($reading)

Incidents.php:120
protected function causes(MMO\admin\monitoring\Reading $reading): array
$readingReading
retournearrayarray{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

update($readings)

Incidents.php:53

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.
$readingsarray
retournevoid

__construct($store, $notifier)

Incidents.php:24
function __construct( MMO\admin\monitoring\MonitorStore $store, ?MMO\admin\monitoring\Notifier $notifier = null )
$storeMonitorStore
$notifier = nullnull | Notifier