mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix RRD format for storage RRDS. we need to look at these rrd formats, i think, some might SUCK.
git-svn-id: http://www.observium.org/svn/observer/trunk@953 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -18,9 +18,9 @@ while($drive = mysql_fetch_array($query)) {
|
||||
|
||||
if(is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
||||
|
||||
$total = $drive['storage_size'] * $drive['storage_units'];
|
||||
$used = $drive['storage_used'] * $drive['storage_units'];
|
||||
$free = $total - $drive['storage_used'] * $drive['storage_units'];
|
||||
$total = $drive['storage_size'];
|
||||
$used = $drive['storage_used'];
|
||||
$free = $drive['storage_free'];
|
||||
$perc = round($drive['storage_perc'], 0);
|
||||
$used = formatStorage($used);
|
||||
$total = formatStorage($total);
|
||||
|
||||
@@ -12,8 +12,8 @@ while($storage = mysql_fetch_array($storage_data)) {
|
||||
|
||||
if (!is_file($storage_rrd)) {
|
||||
rrdtool_create($storage_rrd, "--step 300 \
|
||||
DS:used:GAUGE:600:-273:100000000000 \
|
||||
DS:free:GAUGE:600:-273:100000000000 \
|
||||
DS:used:GAUGE:600:0:U \
|
||||
DS:free:GAUGE:600:0:U \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
|
||||
@@ -33,7 +33,7 @@ function rrdtool_lastupdate($rrdfile, $rrdupdate)
|
||||
function rrdtool($command, $file, $options)
|
||||
{
|
||||
global $config; global $debug;
|
||||
if ($config['debug']) { echo($config['rrdtool'] . " $command $file $options \n"); }
|
||||
if ($debug) { echo($config['rrdtool'] . " $command $file $options \n"); }
|
||||
return shell_exec($config['rrdtool'] . " $command $file $options");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user