mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
Foob
git-svn-id: http://www.observium.org/svn/observer/trunk@98 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -8,11 +8,9 @@ while($temperature = mysql_fetch_array($temp_data)) {
|
||||
echo($temp_cmd);
|
||||
$temp = `$temp_cmd`;
|
||||
|
||||
$temprrd = "rrd/" . $device[hostname] . "-temp-" . $temperature[temp_id] . ".rrd";
|
||||
$temprrdold = "rrd/" . $device[hostname] . "-temp" . $temperature[temp_id] . ".rrd";
|
||||
if (is_file($temprrdold)) {
|
||||
rename($temprrdold, $temprrd);
|
||||
}
|
||||
|
||||
|
||||
$temprrd = "rrd/" . $device[hostname] . "-temp-" . str_replace(" ", "_",$temperature['temp_descr']) . ".rrd";
|
||||
|
||||
if (!is_file($temprrd)) {
|
||||
`rrdtool create $temprrd \
|
||||
@@ -25,6 +23,7 @@ while($temperature = mysql_fetch_array($temp_data)) {
|
||||
}
|
||||
|
||||
$temp = str_replace("\"", "", $temp);
|
||||
if($temperature['temp_tenths']) { $temp = $temp / 10; }
|
||||
echo("$temprrd, N:$temp");
|
||||
|
||||
`rrdtool update $temprrd N:$temp`;
|
||||
|
||||
Reference in New Issue
Block a user