mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
updates and cleanups. fixed mysql query
git-svn-id: http://www.observium.org/svn/observer/trunk@514 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -91,7 +91,8 @@ function shorthost($hostname, $len=16) {
|
||||
|
||||
function rrdtool_update($rrdfile, $rrdupdate) {
|
||||
global $config;
|
||||
echo($config['rrdtool'] . " update $rrdfile $rrdupdate \n");
|
||||
global $debug;
|
||||
if($debug) { echo($config['rrdtool'] . " update $rrdfile $rrdupdate \n"); }
|
||||
return shell_exec($config['rrdtool'] . " update $rrdfile $rrdupdate");
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ while ($hrDevice = mysql_fetch_array($query)) {
|
||||
$this_hrDevice = $hrDevice_array[$device[device_id]][$hrDevice[hrDeviceIndex]];
|
||||
|
||||
$update_query = "UPDATE `hrDevice` SET";
|
||||
$update_query .= ", `hrDeviceStatus` = '".mres($this_hrDevice['hrDeviceStatus'])."'";
|
||||
$update_query .= " `hrDeviceStatus` = '".mres($this_hrDevice['hrDeviceStatus'])."'";
|
||||
$update_query .= ", `hrDeviceErrors` = '".mres($this_hrDevice['hrDeviceErrors'])."'";
|
||||
$update_query .= ", `hrProcessorLoad` = '".mres($this_hrDevice['hrProcessorLoad'])."'";
|
||||
$update_query .= " WHERE hrDevice_id = '".$hrDevice['hrDevice_id']."'";
|
||||
|
||||
Reference in New Issue
Block a user