more improvements to graphs

git-svn-id: http://www.observium.org/svn/observer/trunk@2455 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-09-14 13:44:19 +00:00
parent e9f14f8f85
commit 83e466a4bd
2 changed files with 19 additions and 3 deletions

View File

@@ -28,14 +28,29 @@ foreach (dbFetchRows("SELECT * FROM `ports` WHERE `device_id` = ?", array($id))
}
}
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] . "/port-" . safename($int['ifIndex'] . ".rrd")) && $ignore != 1)
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/port-" . safename($int['ifIndex'] . ".rrd");
if (is_file($rrd_filename) && $ignore != 1)
{
$rrd_filenames[] = $config['rrd_dir'] . "/" . $device['hostname'] . "/port-" . safename($int['ifIndex'] . ".rrd");
$rrd_filenames[] = $rrd_filename;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = $port['ifDescr'];
$rrd_list[$i]['rra_in'] = $rra_in;
$rrd_list[$i]['rra_out'] = $rra_out;
$i++;
}
unset($ignore);
}
$units ='bps';
$total_units ='B';
$colours_in ='greens';
$multiplier = "8";
$colours_out = 'blues';
$nototal = 1;
$rra_in = "INOCTETS";
$rra_out = "OUTOCTETS";
@@ -46,6 +61,6 @@ $colour_line_out = "000099";
$colour_area_in = "CDEB8B";
$colour_area_out = "C3D9FF";
include("includes/graphs/generic_multi_bits.inc.php");
include("includes/graphs/generic_multi_bits_separated.inc.php");
?>

View File

@@ -9,6 +9,7 @@ if (!$nototal) { $rrd_options .= " COMMENT:'Total '"; }
$rrd_options .= " COMMENT:'Out\: Current Maximum'";
if (!$nototal) { $rrd_options .= " COMMENT:' Total'"; }
$rrd_options .= " COMMENT:'\\n'";
if(!isset($multiplier)) { $multiplier = "8"; }
foreach ($rrd_list as $rrd)
{