mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02:00
remove DEVELOPING file, moved to wiki now (see Developing); minor layout fixes; remove some sql queries upon eventlog, as log_event actually prefers to receive a device array in the first place
git-svn-id: http://www.observium.org/svn/observer/trunk@2011 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -37,7 +37,7 @@ while ($sensor = mysql_fetch_array($volt_data))
|
||||
$msg .= "V) at " . date($config['timestamp_format']);
|
||||
notify($device, "Voltage Alarm: " . $device['hostname'] . " " . $sensor['sensor_descr'], $msg);
|
||||
echo("Alerting for " . $device['hostname'] . " " . $sensor['sensor_descr'] . "\n");
|
||||
log_event('Voltage ' . $sensor['sensor_descr'] . " under threshold: " . $volt . " V (< " . $sensor['sensor_limit_low'] . " V)", $device['device_id'], 'voltage', $sensor['sensor_id']);
|
||||
log_event('Voltage ' . $sensor['sensor_descr'] . " under threshold: " . $volt . " V (< " . $sensor['sensor_limit_low'] . " V)", $device, 'voltage', $sensor['sensor_id']);
|
||||
}
|
||||
else if ($sensor['sensor_current'] < $sensor['sensor_limit'] && $volt >= $sensor['sensor_limit'])
|
||||
{
|
||||
@@ -45,7 +45,7 @@ while ($sensor = mysql_fetch_array($volt_data))
|
||||
$msg .= "V) at " . date($config['timestamp_format']);
|
||||
notify($device, "Voltage Alarm: " . $device['hostname'] . " " . $sensor['sensor_descr'], $msg);
|
||||
echo("Alerting for " . $device['hostname'] . " " . $sensor['sensor_descr'] . "\n");
|
||||
log_event('Voltage ' . $sensor['sensor_descr'] . " above threshold: " . $volt . " V (> " . $sensor['sensor_limit'] . " V)", $device['device_id'], 'voltage', $sensor['sensor_id']);
|
||||
log_event('Voltage ' . $sensor['sensor_descr'] . " above threshold: " . $volt . " V (> " . $sensor['sensor_limit'] . " V)", $device, 'voltage', $sensor['sensor_id']);
|
||||
}
|
||||
mysql_query("UPDATE sensors SET sensor_current = '$volt' WHERE sensor_class='voltage' AND sensor_id = '" . $sensor['sensor_id'] . "'");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user