mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
cleanups, small fixes and remove test-*php from the root
git-svn-id: http://www.observium.org/svn/observer/trunk@1998 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -30,7 +30,7 @@ while ($dbcurrent = mysql_fetch_array($current_data))
|
||||
# FIXME also warn when crossing WARN level!!
|
||||
if ($dbcurrent['sensor_current'] > $dbcurrent['sensor_limit_low'] && $current <= $dbcurrent['sensor_limit_low'])
|
||||
{
|
||||
$msg = "Current Alarm: " . $device['hostname'] . " " . $dbcurrent['sensor_descr'] . " is " . $current . "A (Limit " . $dbcurrent['sensor_limit'];
|
||||
$msg = "Current Alarm: " . $device['hostname'] . " " . $dbcurrent['sensor_descr'] . " is under threshold: " . $current . "A (< " . $dbcurrent['sensor_limit'];
|
||||
$msg .= "A) at " . date($config['timestamp_format']);
|
||||
notify($device, "Current Alarm: " . $device['hostname'] . " " . $dbcurrent['sensor_descr'], $msg);
|
||||
echo("Alerting for " . $device['hostname'] . " " . $dbcurrent['sensor_descr'] . "\n");
|
||||
@@ -38,7 +38,7 @@ while ($dbcurrent = mysql_fetch_array($current_data))
|
||||
}
|
||||
else if ($dbcurrent['sensor_current'] < $dbcurrent['sensor_limit'] && $current >= $dbcurrent['sensor_limit'])
|
||||
{
|
||||
$msg = "Current Alarm: " . $device['hostname'] . " " . $dbcurrent['sensor_descr'] . " is " . $current . "A (Limit " . $dbcurrent['sensor_limit'];
|
||||
$msg = "Current Alarm: " . $device['hostname'] . " " . $dbcurrent['sensor_descr'] . " is over threshold: " . $current . "A (> " . $dbcurrent['sensor_limit'];
|
||||
$msg .= "A) at " . date($config['timestamp_format']);
|
||||
notify($device, "Current Alarm: " . $device['hostname'] . " " . $dbcurrent['sensor_descr'], $msg);
|
||||
echo("Alerting for " . $device['hostname'] . " " . $dbcurrent['sensor_descr'] . "\n");
|
||||
|
||||
Reference in New Issue
Block a user