mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Widget Eventlog Sensors Link and Mouseover functionality (#11380)
* Global Settings - Alert Default Settings * Revert "Global Settings - Alert Default Settings" This reverts commita1af62b146
. * Widget Eventlog - Sensors link and overlib Image * travis fix * handling via AppServiceProvider * collect function * Travis ... * static list of Sensor Types * adding all sensor graph_types * remove collect * correct getTypes - remove change to lower case * class sensor_descr switch * class sensor_descr switch - revert * Use standard sensor type names * move types to attribute list * going back to changes from9eee7fad58
Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
@@ -200,10 +200,10 @@ function record_sensor_data($device, $all_sensors)
|
||||
// FIXME also warn when crossing WARN level!
|
||||
if ($sensor['sensor_limit_low'] != '' && $prev_sensor_value > $sensor['sensor_limit_low'] && $sensor_value < $sensor['sensor_limit_low'] && $sensor['sensor_alert'] == 1) {
|
||||
echo 'Alerting for '.$device['hostname'].' '.$sensor['sensor_descr']."\n";
|
||||
log_event("$class {$sensor['sensor_descr']} under threshold: $sensor_value $unit (< {$sensor['sensor_limit_low']} $unit)", $device, $class, 4, $sensor['sensor_id']);
|
||||
log_event("$class under threshold: $sensor_value $unit (< {$sensor['sensor_limit_low']} $unit)", $device, $sensor['sensor_class'], 4, $sensor['sensor_id']);
|
||||
} elseif ($sensor['sensor_limit'] != '' && $prev_sensor_value < $sensor['sensor_limit'] && $sensor_value > $sensor['sensor_limit'] && $sensor['sensor_alert'] == 1) {
|
||||
echo 'Alerting for '.$device['hostname'].' '.$sensor['sensor_descr']."\n";
|
||||
log_event("$class {$sensor['sensor_descr']} above threshold: $sensor_value $unit (> {$sensor['sensor_limit']} $unit)", $device, $class, 4, $sensor['sensor_id']);
|
||||
log_event("$class above threshold: $sensor_value $unit (> {$sensor['sensor_limit']} $unit)", $device, $sensor['sensor_class'], 4, $sensor['sensor_id']);
|
||||
}
|
||||
if ($sensor['sensor_class'] == 'state' && $prev_sensor_value != $sensor_value) {
|
||||
$trans = array_column(
|
||||
|
Reference in New Issue
Block a user