fix log messages

git-svn-id: http://www.observium.org/svn/observer/trunk@1102 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-06-04 18:40:02 +00:00
parent e8778df3e9
commit ff963ff70d
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ while($frequency = mysql_fetch_array($freq_data)) {
$msg .= "Hz) at " . date($config['timestamp_format']);
mail($email, "Frequency Alarm: " . $device['hostname'] . " " . $frequency['freq_descr'], $msg, $config['email_headers']);
echo("Alerting for " . $device['hostname'] . " " . $frequency['freq_descr'] . "\n");
eventlog('Frequency ' . $frequency['freq_descr'] . " under threshold: " . $frequency['freq_current'] . " Hz (> " . $frequency['freq_limit'] . " Hz)", $device['device_id']);
eventlog('Frequency ' . $frequency['freq_descr'] . " under threshold: " . $frequency['freq_current'] . " Hz (< " . $frequency['freq_limit_low'] . " Hz)", $device['device_id']);
}
else if($frequency['freq_current'] < $frequency['freq_limit'] && $freq >= $frequency['freq_limit'])
{
@@ -46,7 +46,7 @@ while($frequency = mysql_fetch_array($freq_data)) {
$msg .= "Hz) at " . date($config['timestamp_format']);
mail($email, "Frequency Alarm: " . $device['hostname'] . " " . $frequency['freq_descr'], $msg, $config['email_headers']);
echo("Alerting for " . $device['hostname'] . " " . $frequency['freq_descr'] . "\n");
eventlog('Frequency ' . $frequency['freq_descr'] . " above threshold: " . $frequency['freq_current'] . " Hz (< " . $frequency['freq_limit'] . " Hz)", $device['device_id']);
eventlog('Frequency ' . $frequency['freq_descr'] . " above threshold: " . $frequency['freq_current'] . " Hz (> " . $frequency['freq_limit'] . " Hz)", $device['device_id']);
}
mysql_query("UPDATE frequency SET freq_current = '$freq' WHERE freq_id = '" . $frequency['freq_id'] . "'");
+2 -2
View File
@@ -37,7 +37,7 @@ while($voltage = mysql_fetch_array($volt_data)) {
$msg .= "V) at " . date($config['timestamp_format']);
mail($email, "Voltage Alarm: " . $device['hostname'] . " " . $voltage['volt_descr'], $msg, $config['email_headers']);
echo("Alerting for " . $device['hostname'] . " " . $voltage['volt_descr'] . "\n");
eventlog('Voltage ' . $voltage['volt_descr'] . " under threshold: " . $voltage['volt_current'] . " V (&gt; " . $voltage['volt_limit'] . " V)", $device['device_id']);
eventlog('Voltage ' . $voltage['volt_descr'] . " under threshold: " . $voltage['volt_current'] . " V (< " . $voltage['volt_limit_low'] . " V)", $device['device_id']);
}
else if($voltage['volt_current'] < $voltage['volt_limit'] && $volt >= $voltage['volt_limit'])
{
@@ -46,7 +46,7 @@ while($voltage = mysql_fetch_array($volt_data)) {
$msg .= "V) at " . date($config['timestamp_format']);
mail($email, "Voltage Alarm: " . $device['hostname'] . " " . $voltage['volt_descr'], $msg, $config['email_headers']);
echo("Alerting for " . $device['hostname'] . " " . $voltage['volt_descr'] . "\n");
eventlog('Voltage ' . $voltage['volt_descr'] . " above threshold: " . $voltage['volt_current'] . " V (&gt; " . $voltage['volt_limit'] . " V)", $device['device_id']);
eventlog('Voltage ' . $voltage['volt_descr'] . " above threshold: " . $voltage['volt_current'] . " V (> " . $voltage['volt_limit'] . " V)", $device['device_id']);
}
mysql_query("UPDATE voltage SET volt_current = '$volt' WHERE volt_id = '" . $voltage['volt_id'] . "'");