Files
librenms-librenms/html/includes/graphs/customer/bits.inc.php
T

32 lines
982 B
PHP
Raw Normal View History

2009-10-28 13:52:39 +00:00
<?php
## Generate a list of ports and then call the multi_bits grapher to generate from the list
2011-09-19 13:48:46 +00:00
$i=0;
foreach(dbFetchRows("SELECT * FROM `ports` AS I, `devices` AS D WHERE `port_descr_type` = 'cust' AND `port_descr_descr` = ? AND D.device_id = I.device_id", array($id)) as $port)
2011-03-17 13:35:25 +00:00
{
2011-09-19 13:48:46 +00:00
if (is_file($config['rrd_dir'] . "/" . $port['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd")))
2011-03-17 13:35:25 +00:00
{
2011-09-19 13:48:46 +00:00
$rrd_filename = $config['rrd_dir'] . "/" . $port['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd");
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = $port['hostname'] ."-". $port['ifDescr'];
$i++;
2009-10-28 13:52:39 +00:00
}
}
2011-09-19 13:48:46 +00:00
#echo($config['rrd_dir'] . "/" . $port['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd"));
$units ='bps';
$total_units ='B';
$colours_in ='greens';
$multiplier = "8";
$colours_out = 'blues';
$nototal = 1;
$ds_in = "INOCTETS";
$ds_out = "OUTOCTETS";
2009-10-28 13:52:39 +00:00
2011-09-19 13:48:46 +00:00
include("includes/graphs/generic_multi_bits_separated.inc.php");
2009-10-28 13:52:39 +00:00
2011-05-13 12:57:11 +00:00
?>