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:
Tom Laermans
2011-04-03 19:36:32 +00:00
parent 036a1ce913
commit a914dfd482
13 changed files with 47 additions and 82 deletions
+2 -2
View File
@@ -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'] . "'");