function monitoring_sensor_settings_save in Monitoring 7
Saves sensor settings.
Parameters
string $sensor_name: Sensor name.
array $values: Settings to be saved.
12 calls to monitoring_sensor_settings_save()
- MonitoringApiTest::testLogging in test/
tests/ monitoring.api.test - Test logging with different settings.
- MonitoringCoreTest::testGenericDBAggregate in test/
tests/ monitoring.core.test - Tests the watchdog entries aggregator.
- MonitoringCoreTest::testSensorEnabledModulesAPI in test/
tests/ monitoring.core.test - Test cases for SensorEnabledModules sensor.
- MonitoringCoreTest::testSensors in test/
tests/ monitoring.core.test - Tests individual sensors.
- MonitoringMuninTest::testMultigraphsAPI in modules/
monitoring_munin/ monitoring_munin.test - Tests the multigraph API/CRUD
File
- ./
monitoring.module, line 408 - Monitoring bootstrap file.
Code
function monitoring_sensor_settings_save($sensor_name, $values) {
variable_set(monitoring_sensor_settings_key($sensor_name), $values);
// After settings save reset the cache.
monitoring_sensor_manager()
->resetCache();
// Changed settings might affect the sensor result.
SensorRunner::resetCache(array(
$sensor_name,
));
}