2011-09-26 11:49:38 +00:00
|
|
|
<?php
|
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
require 'includes/graphs/common.inc.php';
|
2011-09-28 23:24:28 +00:00
|
|
|
|
2011-10-01 10:10:02 +00:00
|
|
|
$scale_min = 0;
|
2015-07-10 13:36:21 +02:00
|
|
|
$colours = 'mixed';
|
|
|
|
$nototal = (($width < 224) ? 1 : 0);
|
|
|
|
$unit_text = 'Packets/sec';
|
|
|
|
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-powerdns-'.$app['app_id'].'.rrd';
|
2011-10-01 10:10:02 +00:00
|
|
|
$array = array(
|
2015-07-10 13:36:21 +02:00
|
|
|
'q_tcpAnswers' => array(
|
|
|
|
'descr' => 'TCP Answers',
|
|
|
|
'colour' => '008800FF',
|
|
|
|
),
|
|
|
|
'q_tcpQueries' => array(
|
|
|
|
'descr' => 'TCP Queries',
|
|
|
|
'colour' => '00FF00FF',
|
|
|
|
),
|
|
|
|
'q_udpAnswers' => array(
|
|
|
|
'descr' => 'UDP Answers',
|
|
|
|
'colour' => '336699FF',
|
|
|
|
),
|
|
|
|
'q_udpQueries' => array(
|
|
|
|
'descr' => 'UDP Queries',
|
|
|
|
'colour' => '6699CCFF',
|
|
|
|
),
|
|
|
|
);
|
2011-09-28 23:24:28 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
$i = 0;
|
2011-09-28 23:24:28 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
if (is_file($rrd_filename)) {
|
|
|
|
foreach ($array as $ds => $vars) {
|
|
|
|
$rrd_list[$i]['filename'] = $rrd_filename;
|
|
|
|
$rrd_list[$i]['descr'] = $vars['descr'];
|
|
|
|
$rrd_list[$i]['ds'] = $ds;
|
|
|
|
$rrd_list[$i]['colour'] = $vars['colour'];
|
|
|
|
$i++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
echo "file missing: $file";
|
2011-10-01 10:10:02 +00:00
|
|
|
}
|
2011-09-28 23:24:28 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
require 'includes/graphs/generic_multi_simplex_seperated.inc.php';
|