You are here

interface SensorResultDataInterface in Monitoring 8

Interface for sensor data.

Hierarchy

Expanded class hierarchy of SensorResultDataInterface

All classes that implement SensorResultDataInterface

2 files declare their use of SensorResultDataInterface
SensorResult.php in src/Result/SensorResult.php
SensorResultInterface.php in src/Result/SensorResultInterface.php
Contains \Drupal\monitoring\Result\SensorResultInterface.

File

src/Entity/SensorResultDataInterface.php, line 9

Namespace

Drupal\monitoring\Entity
View source
interface SensorResultDataInterface {

  /**
   * Sensor status OK.
   *
   * @var string
   */
  const STATUS_OK = 'OK';

  /**
   * Sensor status INFO.
   *
   * @var string
   */
  const STATUS_INFO = 'INFO';

  /**
   * Sensor status WARNING.
   *
   * @var string
   */
  const STATUS_WARNING = 'WARNING';

  /**
   * Sensor status CRITICAL.
   *
   * @var string
   */
  const STATUS_CRITICAL = 'CRITICAL';

  /**
   * Sensor status UNKNOWN.
   *
   * @var string
   */
  const STATUS_UNKNOWN = 'UNKNOWN';

  /**
   * Gets sensor status.
   *
   * @return string
   *   Sensor status.
   */
  public function getStatus();

  /**
   * Gets a human readable label for the sensor status.
   *
   * @return string
   *   Sensor status label.
   */
  public function getStatusLabel();

  /**
   * Gets the sensor metric value.
   *
   * @return mixed
   *   Whatever value the sensor is supposed to return.
   */
  public function getValue();

  /**
   * Gets sensor status message.
   *
   * Must not be called on an uncompiled result.
   *
   * @return string
   *   Sensor status message.
   */
  public function getMessage();

  /**
   * Get sensor execution time in ms.
   *
   * @return float
   */
  public function getExecutionTime();

  /**
   * The result data timestamp.
   *
   * @return int
   *   UNIX timestamp.
   */
  public function getTimestamp();

}

Members

Namesort descending Modifiers Type Description Overrides
SensorResultDataInterface::getExecutionTime public function Get sensor execution time in ms. 2
SensorResultDataInterface::getMessage public function Gets sensor status message. 2
SensorResultDataInterface::getStatus public function Gets sensor status. 2
SensorResultDataInterface::getStatusLabel public function Gets a human readable label for the sensor status. 2
SensorResultDataInterface::getTimestamp public function The result data timestamp. 2
SensorResultDataInterface::getValue public function Gets the sensor metric value. 2
SensorResultDataInterface::STATUS_CRITICAL constant Sensor status CRITICAL.
SensorResultDataInterface::STATUS_INFO constant Sensor status INFO.
SensorResultDataInterface::STATUS_OK constant Sensor status OK.
SensorResultDataInterface::STATUS_UNKNOWN constant Sensor status UNKNOWN.
SensorResultDataInterface::STATUS_WARNING constant Sensor status WARNING.