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:
@@ -33,7 +33,7 @@ while ($humidity = mysql_fetch_array($hum_data))
|
||||
$msg .= "%) at " . date($config['timestamp_format']);
|
||||
notify($device, "Humidity Alarm: " . $device['hostname'] . " " . $humidity['sensor_descr'], $msg);
|
||||
echo("Alerting for " . $device['hostname'] . " " . $humidity['sensor_descr'] . "\n");
|
||||
log_event('Frequency ' . $humidity['sensor_descr'] . " under threshold: " . $hum . " % (< " . $humidity['sensor_limit_low'] . " %)", $device['device_id'] , 'humidity', $humidity['sensor_id']);
|
||||
log_event('Frequency ' . $humidity['sensor_descr'] . " under threshold: " . $hum . " % (< " . $humidity['sensor_limit_low'] . " %)", $device, 'humidity', $humidity['sensor_id']);
|
||||
}
|
||||
else if ($humidity['sensor_current'] < $humidity['sensor_limit'] && $hum >= $humidity['sensor_limit'])
|
||||
{
|
||||
@@ -41,7 +41,7 @@ while ($humidity = mysql_fetch_array($hum_data))
|
||||
$msg .= "%) at " . date($config['timestamp_format']);
|
||||
notify($device, "Humidity Alarm: " . $device['hostname'] . " " . $humidity['sensor_descr'], $msg);
|
||||
echo("Alerting for " . $device['hostname'] . " " . $humidity['sensor_descr'] . "\n");
|
||||
log_event('Humidity ' . $humidity['sensor_descr'] . " above threshold: " . $hum . " % (> " . $humidity['sensor_limit'] . " %)", $device['device_id'], 'humidity', $humidity['sensor_id']);
|
||||
log_event('Humidity ' . $humidity['sensor_descr'] . " above threshold: " . $hum . " % (> " . $humidity['sensor_limit'] . " %)", $device, 'humidity', $humidity['sensor_id']);
|
||||
}
|
||||
|
||||
mysql_query("UPDATE sensors SET sensor_current = '$hum' WHERE sensor_class='humidity' AND sensor_id = '" . $humidity['sensor_id'] . "'");
|
||||
|
||||
Reference in New Issue
Block a user