You are here

function monitoring_update_monitoring_sensor_info in Monitoring 7

Implements monitoring_MODULE_monitoring_sensor_info().

Module: update

File

./monitoring.monitoring_sensors.inc, line 634
Define default sensors for core and contrib modules.

Code

function monitoring_update_monitoring_sensor_info() {
  $info = array();
  $info['update_core'] = array(
    'label' => 'Core',
    'description' => 'Available updates for Drupal core',
    'sensor_class' => 'Drupal\\monitoring\\Sensor\\Sensors\\SensorDrupalUpdate',
    'numeric' => FALSE,
    'value_label' => 'Outdated modules',
    'settings' => array(
      'category' => 'Update',
      // Cache for 1 day.
      'caching_time' => 24 * 3600,
      'type' => 'core',
    ),
  );
  $info['update_contrib'] = array(
    'label' => 'Modules and themes',
    'description' => 'Available updates for contrib modules and themes',
    'sensor_class' => 'Drupal\\monitoring\\Sensor\\Sensors\\SensorDrupalUpdate',
    'numeric' => FALSE,
    'value_label' => 'Outdated modules',
    'settings' => array(
      'category' => 'Update',
      // Cache for 1 day.
      'caching_time' => 24 * 3600,
      'type' => 'contrib',
    ),
  );
  return $info;
}