Tells someone an incident opened, got worse or was resolved (Incidents): through the channels of the hub's notify list, each with the lowest level it cares about.
class MMO\admin\monitoring\Notifier
Espace de noms
MMO\admin\monitoring
- `{"type": "desktop"}` -- `notify-send` on this machine: the hub runs here, for the person sitting at it;
- `{"type": "command", "command": "..."}` -- any command, the event in its environment (`HUB_EVENT`, `HUB_SUBJECT`,
`HUB_LEVEL`, `HUB_MESSAGE`, `HUB_JSON`) and never in its text: a message cannot run anything;
- `{"type": "webhook", "url": "https://..."}` -- a JSON POST `{text, events}` (Slack, Mattermost, Discord and
Google Chat read its `text`);
- `{"type": "mail", "to": "me@example.org"}` -- php's `mail()`, as configured on this machine.
`"level": "critical"` keeps a channel for what is critical; a resolution is told on the channels its incident was.
A channel failing is logged, never thrown: a broken webhook must not stop the next collection.