Monitoring.php in DRD Agent 8.3
Same filename and directory in other branches
Namespace
Drupal\drd_agent\Agent\RemoteFile
src/Agent/Remote/Monitoring.phpView source
<?php
namespace Drupal\drd_agent\Agent\Remote;
/**
* Implements the Monitoring class.
*/
class Monitoring extends Base {
/**
* {@inheritdoc}
*/
public function collect() : array {
$review = [];
if ($this->moduleHandler
->moduleExists('monitoring')) {
/* @var \Drupal\monitoring\Result\SensorResultInterface $result */
foreach (monitoring_sensor_run_multiple() as $result) {
$review[$result
->getSensorId()] = $result
->toArray();
$review[$result
->getSensorId()]['label'] = $result
->getSensorConfig()
->getLabel();
}
}
return $review;
}
}
Classes
Name | Description |
---|---|
Monitoring | Implements the Monitoring class. |