Rules
MMO\admin\monitoring · 1 symbol · generated 27 Oct 2026
Rules
Rules.php:19The thresholds a reading is judged by: a metric above its warning raises the reading to a warning, above its critical to critical -- below, for a rule that says below (days left on a certificate).
- Namespace
MMO\admin\monitoring- See
DEFAULTSare what a hub gets without saying anything. A hub's own rules (hub.json,rules) come first: a rule of its own for the same metric and probe replaces the default one,"off": trueremoves it, andsubjectsnarrows a rule to some servers or targets -- the one client whose disk is meant to be full.
Index
| DEFAULTS | probe => list of rules: what every hub watches unless it says otherwise | |
| rules | ||
| all() | ||
| apply($reading) | Judge a reading: raise its status, list what crossed a line in its alerts. | |
| debugName() | ||
| format($value) | ||
| forProbe($probe) | ||
| judge($rule, $value) | ||
| matchesSubject($subject, $name, $subjects) | ||
| starred($glob, $metric) | ||
| __construct($rules) |
Constants1
DEFAULTS
probe => list of rules: what every hub watches unless it says otherwise
Properties1
rules
- Type
- array
Methods9
all()
Rules.php:81| returns | array | list<array<string, mixed>>> every rule, by probe |
apply($reading)
Rules.php:88Judge a reading: raise its status, list what crossed a line in its alerts.
debugName()
Rules.php:75| returns | string |
format($value)
Rules.php:140forProbe($probe)
Rules.php:78judge($rule, $value)
Rules.php:116matchesSubject($subject, $name, $subjects)
Rules.php:127starred($glob, $metric)
Rules.php:135__construct($rules)
Rules.php:59| $rules = [] | array |