MMOframework
Why AI Playground Libraries Documentation Search Agency
FR EN
Index

ApplicationProbe

MMO\admin\monitoring\probes · 1 symbol · generated 27 Oct 2026

class

ApplicationProbe

ApplicationProbe.php:20

What the application itself says about its health: the metrics its own MetricsController answers (GET api/monitoring/metrics.json) -- php and opcache, the packages and their versions, and whatever the application counts (users, documents, jobs waiting...) through its providers.

class MMO\admin\monitoring\probes\ApplicationProbe extends MMO\admin\monitoring\aProbe
Namespace
MMO\admin\monitoring\probes
Extends
aProbe
The route answers a token only, sent as `X-Hub-Token`: a target's `metricsToken` in the hub's credentials file, or the one of `*` for every target. A target without one is not asked. Metrics: the application's, prefixed `app.` (`app.php.memoryPeakMb`, `app.users.active`...). Facts: the application's, prefixed the same. Its checks (`{name, status, message}`) make the reading's status.

Constants3

DESCRIPTION

const DESCRIPTION = 'the application\'s own metrics and checks (MetricsController)'

KIND

const KIND = 'target'

NAME

const NAME = 'application'

Properties1

path

string $path = 'api/monitoring/metrics.json'
Type
string

Methods5

parse($data, $reading)

ApplicationProbe.php:60
function parse(array $data, MMO\admin\monitoring\Reading $reading): void
$dataarraywhat MetricsController answered: {metrics, counters, facts, checks}
$readingReadingfilled
returnsvoid

probe($subject, $reading, $previous)

ApplicationProbe.php:35
protected function probe( MMO\admin\entities\Server|MMO\admin\entities\Target $subject, MMO\admin\monitoring\Reading $reading, ?MMO\admin\monitoring\Reading $previous ): void
$subjectServer | Target
$readingReading
$previousnull | Reading
returnsvoid
Inherited members (14)
ConstantsDeclared byDescription
SERVERaProbea probe of servers
TARGETaProbea probe of targets: the sites of the project, one per client
PropertiesDeclared byDescription
enabledaProbe
hubaProbe
timeoutaProbe
MethodsDeclared byDescription
collect($subject, $previous, $time)aProbeLook at a subject, never throwing: whatever goes wrong is in the reading.
debugName()aProbe
failure($e)aProbe
Number($value)aProbe
Percent($part, $whole)aProbe
run($subject, $script)aProbeRun a script on the subject, stopped after $timeout seconds where timeout exists (a webspace may lack it).
Sections($output)aProbe
shell($subject)aProbe
__construct($options, $hub)aProbe