mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
PowerDNS application type. Thanks to Dennis de Houx.
git-svn-id: http://www.observium.org/svn/observer/trunk@2572 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
$scale_min = 0;
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-powerdns-".$app['app_id'].".rrd";
|
||||
|
||||
|
||||
$array = array('corruptPackets' => array('descr' => 'Corrupt', 'colour' => 'FF8800FF'),
|
||||
'servfailPackets' => array('descr' => 'Failed', 'colour' => 'FF0000FF'),
|
||||
'q_timedout' => array('descr' => 'Timedout', 'colour' => 'FFFF00FF'),
|
||||
);
|
||||
|
||||
|
||||
$i = 0;
|
||||
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"); }
|
||||
|
||||
$colours = "red";
|
||||
$nototal = 0;
|
||||
$unit_text = "Packets/sec";
|
||||
|
||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
$scale_min = 0;
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$powerdns_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-powerdns-".$app['app_id'].".rrd";
|
||||
|
||||
if (is_file($powerdns_rrd))
|
||||
{
|
||||
$rrd_filename = $powerdns_rrd;
|
||||
}
|
||||
|
||||
$ds = "latency";
|
||||
|
||||
$colour_area = "6699FF";
|
||||
$colour_line = "336699";
|
||||
|
||||
$colour_area_max = "FFEE99";
|
||||
|
||||
$graph_max = 100;
|
||||
|
||||
$unit_text = "Latency";
|
||||
|
||||
include("includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
$scale_min = 0;
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-powerdns-".$app['app_id'].".rrd";
|
||||
|
||||
|
||||
$array = array('pc_hit' => array('descr' => 'Hits', 'colour' => '008800FF'),
|
||||
'pc_miss' => array('descr' => 'Misses', 'colour' => '880000FF'),
|
||||
'pc_size' => array('descr' => 'Size', 'colour' => '006699FF'),
|
||||
);
|
||||
|
||||
|
||||
$i = 0;
|
||||
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"); }
|
||||
|
||||
$colours = "blue";
|
||||
$nototal = 0;
|
||||
$unit_text = "Packets/sec";
|
||||
|
||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
$scale_min = 0;
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-powerdns-".$app['app_id'].".rrd";
|
||||
|
||||
|
||||
$array = array('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'),
|
||||
);
|
||||
|
||||
|
||||
$i = 0;
|
||||
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"); }
|
||||
|
||||
$colours = "mixed";
|
||||
$nototal = 0;
|
||||
$unit_text = "Packets/sec";
|
||||
|
||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
$scale_min = 0;
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-powerdns-".$app['app_id'].".rrd";
|
||||
|
||||
|
||||
$array = array('q_udp4Answers' => array('descr' => 'UDP4 Answers\t', 'colour' => '00008888'),
|
||||
'q_udp4Queries' => array('descr' => 'UDP4 Queries ', 'colour' => '000088FF'),
|
||||
'q_udp6Answers' => array('descr' => 'UDP6 Answers ', 'colour' => '88000088'),
|
||||
'q_udp6Queries' => array('descr' => 'UDP6 Queries ', 'colour' => '880000FF'),
|
||||
);
|
||||
|
||||
|
||||
$i = 0;
|
||||
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"); }
|
||||
|
||||
$colours = "mixed";
|
||||
$nototal = 0;
|
||||
$unit_text = "Packets/sec";
|
||||
|
||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
$scale_min = 0;
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-powerdns-".$app['app_id'].".rrd";
|
||||
|
||||
|
||||
$array = array('qc_miss' => array('descr' => 'Misses', 'colour' => '750F7DFF'),
|
||||
'qc_hit' => array('descr' => 'Hits', 'colour' => '00FF00FF'),
|
||||
);
|
||||
|
||||
|
||||
$i = 0;
|
||||
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"); }
|
||||
|
||||
$colours = "mixed";
|
||||
$nototal = 0;
|
||||
$unit_text = "Packets/sec";
|
||||
|
||||
//include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
include("includes/graphs/generic_multi_line.inc.php");
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
$scale_min = 0;
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-powerdns-".$app['app_id'].".rrd";
|
||||
|
||||
|
||||
$array = array('rec_questions' => array('descr' => 'Questions', 'colour' => '6699CCFF'),
|
||||
'rec_answers' => array('descr' => 'Answers', 'colour' => '336699FF'),
|
||||
);
|
||||
|
||||
|
||||
$i = 0;
|
||||
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"); }
|
||||
|
||||
$colours = "mixed";
|
||||
$nototal = 0;
|
||||
$unit_text = "Packets/sec";
|
||||
|
||||
//include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
include("includes/graphs/generic_multi_line.inc.php");
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
global $config;
|
||||
|
||||
$graphs = array('powerdns_latency' => 'Latency',
|
||||
'powerdns_fail' => 'Corrupt - Failed - Timedout',
|
||||
'powerdns_packetcache' => 'Packet Cache',
|
||||
'powerdns_querycache' => 'Query Cache',
|
||||
'powerdns_recursing' => 'Recursing Queries and Answers',
|
||||
'powerdns_queries' => 'Total UDP/TCP Queries and Answers',
|
||||
'powerdns_queries_udp' => 'Detail UDP IPv4/IPv6 Queries and Answers');
|
||||
|
||||
foreach ($graphs as $key => $text) {
|
||||
$graph_type = $key;
|
||||
$graph_array['height'] = "100";
|
||||
$graph_array['width'] = "215";
|
||||
$graph_array['to'] = $now;
|
||||
$graph_array['id'] = $app['app_id'];
|
||||
$graph_array['type'] = "application_".$key;
|
||||
|
||||
echo('<h3>'.$text.'</h3>');
|
||||
|
||||
echo("<tr bgcolor='$row_colour'><td colspan=5>");
|
||||
|
||||
include("includes/print-quadgraphs.inc.php");
|
||||
|
||||
echo("</td></tr>");
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user