mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 16:04:35 +02:00
syntaxer run + manual cleanup
git-svn-id: http://www.observium.org/svn/observer/trunk@2630 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$ds = "frequency";
|
||||
$colour_area = "F6F6F6";
|
||||
$colour_line = "B3D0DB";
|
||||
$colour_area_max = "FFEE99";
|
||||
$graph_max = 100;
|
||||
$unit_text = "Frequency";
|
||||
$ntpclient_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpclient-".$app['app_id'].".rrd";
|
||||
$scale_min = 0;
|
||||
$ds = "frequency";
|
||||
$colour_area = "F6F6F6";
|
||||
$colour_line = "B3D0DB";
|
||||
$colour_area_max = "FFEE99";
|
||||
$graph_max = 100;
|
||||
$unit_text = "Frequency";
|
||||
$ntpclient_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpclient-".$app['app_id'].".rrd";
|
||||
|
||||
if (is_file($ntpclient_rrd)) {
|
||||
$rrd_filename = $ntpclient_rrd;
|
||||
}
|
||||
if (is_file($ntpclient_rrd))
|
||||
{
|
||||
$rrd_filename = $ntpclient_rrd;
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_simplex.inc.php");
|
||||
include("includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,32 +1,34 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$colours = "mixed";
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Milliseconds";
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpclient-".$app['app_id'].".rrd";
|
||||
$array = array(
|
||||
'offset' => array('descr' => 'Offset'),
|
||||
'jitter' => array('descr' => 'Jitter'),
|
||||
'noise' => array('descr' => 'Noise'),
|
||||
'stability' => array('descr' => 'Stability')
|
||||
);
|
||||
$colours = "mixed";
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Milliseconds";
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpclient-".$app['app_id'].".rrd";
|
||||
$array = array(
|
||||
'offset' => array('descr' => 'Offset'),
|
||||
'jitter' => array('descr' => 'Jitter'),
|
||||
'noise' => array('descr' => 'Noise'),
|
||||
'stability' => array('descr' => 'Stability')
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
$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'] = $config['graph_colours'][$colours][$i];
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
echo("file missing: $file");
|
||||
}
|
||||
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'] = $config['graph_colours'][$colours][$i];
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
echo("file missing: $file");
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_multi_line.inc.php");
|
||||
include("includes/graphs/generic_multi_line.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,33 +1,34 @@
|
||||
<?php
|
||||
|
||||
// $units = "b";
|
||||
// $total_units = "B";
|
||||
// $colours_in = "greens";
|
||||
//$multiplier = "0";
|
||||
// $colours_out = "blues";
|
||||
// $units = "b";
|
||||
// $total_units = "B";
|
||||
// $colours_in = "greens";
|
||||
//$multiplier = "0";
|
||||
// $colours_out = "blues";
|
||||
|
||||
$nototal = 1;
|
||||
$nototal = 1;
|
||||
|
||||
$ds_in = "packets_recv";
|
||||
$ds_out = "packets_sent";
|
||||
$ds_in = "packets_recv";
|
||||
$ds_out = "packets_sent";
|
||||
|
||||
$graph_title .= "::packets";
|
||||
$unit_text = "Packets";
|
||||
$graph_title .= "::packets";
|
||||
$unit_text = "Packets";
|
||||
|
||||
$colour_line_in = "330033";
|
||||
$colour_line_out = "FF6600";
|
||||
$colour_area_in = "AA66AA";
|
||||
$colour_area_out = "FFDD88";
|
||||
$colour_area_in_max = "CC88CC";
|
||||
$colour_area_out_max= "FFEFAA";
|
||||
$colour_line_in = "330033";
|
||||
$colour_line_out = "FF6600";
|
||||
$colour_area_in = "AA66AA";
|
||||
$colour_area_out = "FFDD88";
|
||||
$colour_area_in_max = "CC88CC";
|
||||
$colour_area_out_max = "FFEFAA";
|
||||
|
||||
$ntpdserver_rrd = $config['rrd_dir'] . "/". $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
$ntpdserver_rrd = $config['rrd_dir'] . "/". $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
|
||||
if (is_file($ntpdserver_rrd)) {
|
||||
$rrd_filename = $ntpdserver_rrd;
|
||||
}
|
||||
if (is_file($ntpdserver_rrd))
|
||||
{
|
||||
$rrd_filename = $ntpdserver_rrd;
|
||||
}
|
||||
|
||||
// include("includes/graphs/generic_bits.inc.php");
|
||||
include("includes/graphs/generic_duplex.inc.php");
|
||||
include("includes/graphs/generic_duplex.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,32 +1,34 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$colours = "mixed";
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Buffer";
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
$array = array(
|
||||
'buffer_recv' => array('descr' => 'Received'),
|
||||
'buffer_used' => array('descr' => 'Used'),
|
||||
'buffer_free' => array('descr' => 'Free')
|
||||
);
|
||||
$scale_min = 0;
|
||||
$colours = "mixed";
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Buffer";
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
$array = array(
|
||||
'buffer_recv' => array('descr' => 'Received'),
|
||||
'buffer_used' => array('descr' => 'Used'),
|
||||
'buffer_free' => array('descr' => 'Free')
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
$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'] = $config['graph_colours'][$colours][$i];
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
echo("file missing: $file");
|
||||
}
|
||||
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'] = $config['graph_colours'][$colours][$i];
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
echo("file missing: $file");
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_multi_line.inc.php");
|
||||
include("includes/graphs/generic_multi_line.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$ds = "frequency";
|
||||
$colour_area = "F6F6F6";
|
||||
$colour_line = "B3D0DB";
|
||||
$colour_area_max = "FFEE99";
|
||||
$graph_max = 100;
|
||||
$unit_text = "Frequency";
|
||||
$ntpdserver_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
$scale_min = 0;
|
||||
$ds = "frequency";
|
||||
$colour_area = "F6F6F6";
|
||||
$colour_line = "B3D0DB";
|
||||
$colour_area_max = "FFEE99";
|
||||
$graph_max = 100;
|
||||
$unit_text = "Frequency";
|
||||
$ntpdserver_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
|
||||
if (is_file($ntpdserver_rrd)) {
|
||||
$rrd_filename = $ntpdserver_rrd;
|
||||
}
|
||||
if (is_file($ntpdserver_rrd))
|
||||
{
|
||||
$rrd_filename = $ntpdserver_rrd;
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_simplex.inc.php");
|
||||
include("includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,31 +1,33 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Packets";
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
$array = array(
|
||||
'packets_drop' => array('descr' => 'Dropped', 'colour' => '880000FF'),
|
||||
'packets_ignore' => array('descr' => 'Ignored', 'colour' => 'FF8800FF')
|
||||
);
|
||||
$scale_min = 0;
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Packets";
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
$array = array(
|
||||
'packets_drop' => array('descr' => 'Dropped', 'colour' => '880000FF'),
|
||||
'packets_ignore' => array('descr' => 'Ignored', 'colour' => 'FF8800FF')
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
$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");
|
||||
}
|
||||
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");
|
||||
}
|
||||
|
||||
// include("includes/graphs/generic_multi_line.inc.php");
|
||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,32 +1,34 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$colours = "mixed";
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Milliseconds";
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
$array = array(
|
||||
'offset' => array('descr' => 'Offset'),
|
||||
'jitter' => array('descr' => 'Jitter'),
|
||||
'noise' => array('descr' => 'Noise'),
|
||||
'stability' => array('descr' => 'Stability')
|
||||
);
|
||||
$colours = "mixed";
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Milliseconds";
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
$array = array(
|
||||
'offset' => array('descr' => 'Offset'),
|
||||
'jitter' => array('descr' => 'Jitter'),
|
||||
'noise' => array('descr' => 'Noise'),
|
||||
'stability' => array('descr' => 'Stability')
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
$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'] = $config['graph_colours'][$colours][$i];
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
echo("file missing: $file");
|
||||
}
|
||||
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'] = $config['graph_colours'][$colours][$i];
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
echo("file missing: $file");
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_multi_line.inc.php");
|
||||
include("includes/graphs/generic_multi_line.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$ds = "stratum";
|
||||
$colour_area = "FFCECE";
|
||||
$colour_line = "880000";
|
||||
$colour_area_max = "FFCCCC";
|
||||
$graph_max = 0;
|
||||
$unit_text = "Stratum";
|
||||
$ntpdserver_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
$scale_min = 0;
|
||||
$ds = "stratum";
|
||||
$colour_area = "FFCECE";
|
||||
$colour_line = "880000";
|
||||
$colour_area_max = "FFCCCC";
|
||||
$graph_max = 0;
|
||||
$unit_text = "Stratum";
|
||||
$ntpdserver_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
|
||||
if (is_file($ntpdserver_rrd)) {
|
||||
$rrd_filename = $ntpdserver_rrd;
|
||||
}
|
||||
if (is_file($ntpdserver_rrd))
|
||||
{
|
||||
$rrd_filename = $ntpdserver_rrd;
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_simplex.inc.php");
|
||||
include("includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,36 +1,40 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$ds = "uptime";
|
||||
//$colour_area = "CEFFCE";
|
||||
//$colour_line = "008800";
|
||||
$colour_area = "EEEEEE";
|
||||
$colour_line = "36393D";
|
||||
$colour_area_max = "FFEE99";
|
||||
$graph_max = 0;
|
||||
$unit_text = "Seconds";
|
||||
$ntpdserver_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
$scale_min = 0;
|
||||
$ds = "uptime";
|
||||
//$colour_area = "CEFFCE";
|
||||
//$colour_line = "008800";
|
||||
$colour_area = "EEEEEE";
|
||||
$colour_line = "36393D";
|
||||
$colour_area_max = "FFEE99";
|
||||
$graph_max = 0;
|
||||
$unit_text = "Seconds";
|
||||
$ntpdserver_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-ntpdserver-".$app['app_id'].".rrd";
|
||||
|
||||
if (is_file($ntpdserver_rrd)) {
|
||||
$rrd_filename = $ntpdserver_rrd;
|
||||
}
|
||||
if (is_file($ntpdserver_rrd))
|
||||
{
|
||||
$rrd_filename = $ntpdserver_rrd;
|
||||
}
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " DEF:uptime=".$rrd_filename.":uptime:AVERAGE";
|
||||
$rrd_options .= " CDEF:cuptime=uptime,86400,/";
|
||||
if ($width<224) {
|
||||
$rrd_options .= " 'COMMENT:Days Cur Min Max Avg\\n'";
|
||||
} else {
|
||||
$rrd_options .= " 'COMMENT:Days Current Minimum Maximum Average\\n'";
|
||||
}
|
||||
$rrd_options .= " AREA:cuptime#".$colour_area.":";
|
||||
$rrd_options .= " LINE1.25:cuptime#".$colour_line.":Uptime";
|
||||
$rrd_options .= " GPRINT:cuptime:LAST:%6.2lf";
|
||||
$rrd_options .= " GPRINT:cuptime:AVERAGE:%6.2lf";
|
||||
$rrd_options .= " GPRINT:cuptime:MAX:%6.2lf";
|
||||
$rrd_options .= " GPRINT:cuptime:AVERAGE:%6.2lf\\n";
|
||||
$rrd_options .= " DEF:uptime=".$rrd_filename.":uptime:AVERAGE";
|
||||
$rrd_options .= " CDEF:cuptime=uptime,86400,/";
|
||||
|
||||
if ($width<224)
|
||||
{
|
||||
$rrd_options .= " 'COMMENT:Days Cur Min Max Avg\\n'";
|
||||
} else {
|
||||
$rrd_options .= " 'COMMENT:Days Current Minimum Maximum Average\\n'";
|
||||
}
|
||||
|
||||
$rrd_options .= " AREA:cuptime#".$colour_area.":";
|
||||
$rrd_options .= " LINE1.25:cuptime#".$colour_line.":Uptime";
|
||||
$rrd_options .= " GPRINT:cuptime:LAST:%6.2lf";
|
||||
$rrd_options .= " GPRINT:cuptime:AVERAGE:%6.2lf";
|
||||
$rrd_options .= " GPRINT:cuptime:MAX:%6.2lf";
|
||||
$rrd_options .= " GPRINT:cuptime:AVERAGE:%6.2lf\\n";
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,32 +1,34 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$colours = "red";
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Packets/sec";
|
||||
$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'),
|
||||
);
|
||||
$scale_min = 0;
|
||||
$colours = "red";
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Packets/sec";
|
||||
$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;
|
||||
$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");
|
||||
}
|
||||
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");
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$ds = "latency";
|
||||
$colour_area = "F6F6F6";
|
||||
$colour_line = "B3D0DB";
|
||||
$colour_area_max = "FFEE99";
|
||||
$graph_max = 100;
|
||||
$unit_text = "Latency";
|
||||
$powerdns_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-powerdns-".$app['app_id'].".rrd";
|
||||
$scale_min = 0;
|
||||
$ds = "latency";
|
||||
$colour_area = "F6F6F6";
|
||||
$colour_line = "B3D0DB";
|
||||
$colour_area_max = "FFEE99";
|
||||
$graph_max = 100;
|
||||
$unit_text = "Latency";
|
||||
$powerdns_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-powerdns-".$app['app_id'].".rrd";
|
||||
|
||||
if (is_file($powerdns_rrd)) {
|
||||
$rrd_filename = $powerdns_rrd;
|
||||
}
|
||||
if (is_file($powerdns_rrd))
|
||||
{
|
||||
$rrd_filename = $powerdns_rrd;
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_simplex.inc.php");
|
||||
include("includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,32 +1,34 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$colours = "blue";
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Packets/sec";
|
||||
$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'),
|
||||
);
|
||||
$scale_min = 0;
|
||||
$colours = "blue";
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Packets/sec";
|
||||
$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;
|
||||
$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");
|
||||
}
|
||||
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");
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,33 +1,35 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$colours = "mixed";
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Packets/sec";
|
||||
$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'),
|
||||
);
|
||||
$scale_min = 0;
|
||||
$colours = "mixed";
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Packets/sec";
|
||||
$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;
|
||||
$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");
|
||||
}
|
||||
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");
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,33 +1,35 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$colours = "mixed";
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Packets/sec";
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-powerdns-".$app['app_id'].".rrd";
|
||||
$array = array(
|
||||
'q_udp4Answers' => array('descr' => 'UDP4 Answers', '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'),
|
||||
);
|
||||
$scale_min = 0;
|
||||
$colours = "mixed";
|
||||
$nototal = (($width<224) ? 1 : 0);
|
||||
$unit_text = "Packets/sec";
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-powerdns-".$app['app_id'].".rrd";
|
||||
$array = array(
|
||||
'q_udp4Answers' => array('descr' => 'UDP4 Answers', '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;
|
||||
$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");
|
||||
}
|
||||
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");
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,31 +1,33 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$colours = "mixed";
|
||||
$nototal = 0;
|
||||
$unit_text = "Packets/sec";
|
||||
$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'),
|
||||
);
|
||||
$scale_min = 0;
|
||||
$colours = "mixed";
|
||||
$nototal = 0;
|
||||
$unit_text = "Packets/sec";
|
||||
$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;
|
||||
$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");
|
||||
}
|
||||
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");
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_multi_line.inc.php");
|
||||
include("includes/graphs/generic_multi_line.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,31 +1,33 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$colours = "mixed";
|
||||
$nototal = 0;
|
||||
$unit_text = "Packets/sec";
|
||||
$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'),
|
||||
);
|
||||
$scale_min = 0;
|
||||
$colours = "mixed";
|
||||
$nototal = 0;
|
||||
$unit_text = "Packets/sec";
|
||||
$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;
|
||||
$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");
|
||||
}
|
||||
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");
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_multi_line.inc.php");
|
||||
include("includes/graphs/generic_multi_line.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
<?php
|
||||
|
||||
$units = "b";
|
||||
$total_units = "B";
|
||||
$colours_in = "greens";
|
||||
//$multiplier = "0";
|
||||
$colours_out = "blues";
|
||||
$units = "b";
|
||||
$total_units = "B";
|
||||
$colours_in = "greens";
|
||||
//$multiplier = "0";
|
||||
$colours_out = "blues";
|
||||
|
||||
$nototal = 1;
|
||||
$nototal = 1;
|
||||
|
||||
$ds_in = "traf_in";
|
||||
$ds_out = "traf_out";
|
||||
$ds_in = "traf_in";
|
||||
$ds_out = "traf_out";
|
||||
|
||||
$graph_title .= "::bits";
|
||||
$graph_title .= "::bits";
|
||||
|
||||
$colour_line_in = "006600";
|
||||
$colour_line_out = "000099";
|
||||
$colour_area_in = "CDEB8B";
|
||||
$colour_area_out = "C3D9FF";
|
||||
$colour_line_in = "006600";
|
||||
$colour_line_out = "000099";
|
||||
$colour_area_in = "CDEB8B";
|
||||
$colour_area_out = "C3D9FF";
|
||||
|
||||
$rrddir = $config['rrd_dir']."/".$device['hostname'];
|
||||
$hostname = (isset($_GET['hostname']) ? $_GET['hostname'] : "unkown");
|
||||
$rrd_filename = $rrddir."/app-shoutcast-".$app['app_id']."-".$hostname.".rrd";
|
||||
$rrddir = $config['rrd_dir']."/".$device['hostname'];
|
||||
$hostname = (isset($_GET['hostname']) ? $_GET['hostname'] : "unkown");
|
||||
$rrd_filename = $rrddir."/app-shoutcast-".$app['app_id']."-".$hostname.".rrd";
|
||||
|
||||
include("includes/graphs/generic_bits.inc.php");
|
||||
include("includes/graphs/generic_bits.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,49 +1,54 @@
|
||||
<?php
|
||||
|
||||
$units = "b";
|
||||
$total_units = "B";
|
||||
$colours_in = "greens";
|
||||
$multiplier = "8";
|
||||
$colours_out = "blues";
|
||||
$units = "b";
|
||||
$total_units = "B";
|
||||
$colours_in = "greens";
|
||||
$multiplier = "8";
|
||||
$colours_out = "blues";
|
||||
|
||||
$nototal = 1;
|
||||
$nototal = 1;
|
||||
|
||||
$ds_in = "traf_in";
|
||||
$ds_out = "traf_out";
|
||||
$ds_in = "traf_in";
|
||||
$ds_out = "traf_out";
|
||||
|
||||
$graph_title = "Traffic Statistic";
|
||||
$graph_title = "Traffic Statistic";
|
||||
|
||||
$colour_line_in = "006600";
|
||||
$colour_line_out = "000099";
|
||||
$colour_area_in = "CDEB8B";
|
||||
$colour_area_out = "C3D9FF";
|
||||
$colour_line_in = "006600";
|
||||
$colour_line_out = "000099";
|
||||
$colour_area_in = "CDEB8B";
|
||||
$colour_area_out = "C3D9FF";
|
||||
|
||||
$rrddir = $config['rrd_dir']."/".$device['hostname'];
|
||||
$files = array();
|
||||
$i = 0;
|
||||
$rrddir = $config['rrd_dir']."/".$device['hostname'];
|
||||
$files = array();
|
||||
$i = 0;
|
||||
|
||||
if ($handle = opendir($rrddir)) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if ($file != "." && $file != "..") {
|
||||
if (eregi("app-shoutcast-".$app['app_id'], $file)) {
|
||||
array_push($files, $file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($files as $id=>$file) {
|
||||
$hostname = eregi_replace('app-shoutcast-'.$app['app_id'].'-', '', $file);
|
||||
$hostname = eregi_replace('.rrd', '', $hostname);
|
||||
list($host, $port) = split('_', $hostname, 2);
|
||||
$rrd_filenames[] = $rrddir."/".$file;
|
||||
$rrd_list[$i]['filename'] = $rrddir."/".$file;
|
||||
$rrd_list[$i]['descr'] = $host.":".$port;
|
||||
$rrd_list[$i]['ds_in'] = $ds_in;
|
||||
$rrd_list[$i]['ds_out'] = $ds_out;
|
||||
$i++;
|
||||
if ($handle = opendir($rrddir))
|
||||
{
|
||||
while (false !== ($file = readdir($handle)))
|
||||
{
|
||||
if ($file != "." && $file != "..")
|
||||
{
|
||||
if (eregi("app-shoutcast-".$app['app_id'], $file))
|
||||
{
|
||||
array_push($files, $file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_multi_bits_separated.inc.php");
|
||||
foreach ($files as $id => $file)
|
||||
{
|
||||
$hostname = eregi_replace('app-shoutcast-'.$app['app_id'].'-', '', $file);
|
||||
$hostname = eregi_replace('.rrd', '', $hostname);
|
||||
list($host, $port) = split('_', $hostname, 2);
|
||||
$rrd_filenames[] = $rrddir."/".$file;
|
||||
$rrd_list[$i]['filename'] = $rrddir."/".$file;
|
||||
$rrd_list[$i]['descr'] = $host.":".$port;
|
||||
$rrd_list[$i]['ds_in'] = $ds_in;
|
||||
$rrd_list[$i]['ds_out'] = $ds_out;
|
||||
$i++;
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_multi_bits_separated.inc.php");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,90 +1,102 @@
|
||||
<?php
|
||||
|
||||
//$colour = "random";
|
||||
$unit_text = "ShoutCast Server";
|
||||
$total_text = "Total of all ShoutCast Servers";
|
||||
$nototal = 0;
|
||||
//$colour = "random";
|
||||
$unit_text = "ShoutCast Server";
|
||||
$total_text = "Total of all ShoutCast Servers";
|
||||
$nototal = 0;
|
||||
|
||||
$rrddir = $config['rrd_dir']."/".$device['hostname'];
|
||||
$files = array();
|
||||
$i = 0;
|
||||
$x = 0;
|
||||
$rrddir = $config['rrd_dir']."/".$device['hostname'];
|
||||
$files = array();
|
||||
$i = 0;
|
||||
$x = 0;
|
||||
|
||||
if ($handle = opendir($rrddir)) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if ($file != "." && $file != "..") {
|
||||
if (eregi("app-shoutcast-".$app['app_id'], $file)) {
|
||||
array_push($files, $file);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($handle = opendir($rrddir))
|
||||
{
|
||||
while (false !== ($file = readdir($handle)))
|
||||
{
|
||||
if ($file != "." && $file != "..")
|
||||
{
|
||||
if (eregi("app-shoutcast-".$app['app_id'], $file))
|
||||
{
|
||||
array_push($files, $file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($files as $id=>$file) {
|
||||
$hostname = eregi_replace('app-shoutcast-'.$app['app_id'].'-', '', $file);
|
||||
$hostname = eregi_replace('.rrd', '', $hostname);
|
||||
list($host, $port) = split('_', $hostname, 2);
|
||||
$rrd_filenames[] = $rrddir."/".$file;
|
||||
$rrd_list[$i]['filename'] = $rrddir."/".$file;
|
||||
$rrd_list[$i]['descr'] = $host.":".$port;
|
||||
$rrd_list[$i]['colour'] = $colour;
|
||||
$i++;
|
||||
}
|
||||
foreach ($files as $id => $file)
|
||||
{
|
||||
$hostname = eregi_replace('app-shoutcast-'.$app['app_id'].'-', '', $file);
|
||||
$hostname = eregi_replace('.rrd', '', $hostname);
|
||||
list($host, $port) = split('_', $hostname, 2);
|
||||
$rrd_filenames[] = $rrddir."/".$file;
|
||||
$rrd_list[$i]['filename'] = $rrddir."/".$file;
|
||||
$rrd_list[$i]['descr'] = $host.":".$port;
|
||||
$rrd_list[$i]['colour'] = $colour;
|
||||
$i++;
|
||||
}
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
if ($width > "500") {
|
||||
$descr_len = 38;
|
||||
} else {
|
||||
$descr_len = 8;
|
||||
$descr_len += round(($width - 250) / 8);
|
||||
}
|
||||
if ($width > "500")
|
||||
{
|
||||
$descr_len = 38;
|
||||
} else {
|
||||
$descr_len = 8;
|
||||
$descr_len += round(($width - 250) / 8);
|
||||
}
|
||||
|
||||
if ($width > "500") {
|
||||
$rrd_options .= " COMMENT:\"".substr(str_pad($unit_text, $descr_len+2), 0, $descr_len+2)." Current Unique Average Peak\\n\"";
|
||||
} else {
|
||||
$rrd_options .= " COMMENT:\"".substr(str_pad($unit_text, $descr_len+5), 0, $descr_len+5)." Now Unique Average Peak\\n\"";
|
||||
}
|
||||
foreach ($rrd_list as $rrd) {
|
||||
$colours = (isset($rrd['colour']) ? $rrd['colour'] : "default");
|
||||
$strlen = ((strlen($rrd['descr'])<$descr_len) ? ($descr_len - strlen($rrd['descr'])) : "0");
|
||||
$descr = (isset($rrd['descr']) ? str_replace(":", "\:", substr(str_pad($rrd['descr'], $desc_len+$strlen), 0, $descr_len+$strlen)) : "Unkown");
|
||||
for ($z=0; $z<$strlen; $z++) { $descr .= " "; }
|
||||
if ($i) { $stack = "STACK"; }
|
||||
$colour = $config['graph_colours'][$colours][$x];
|
||||
$rrd_options .= " DEF:cur".$x."=".$rrd['filename'].":current:AVERAGE";
|
||||
$rrd_options .= " DEF:peak".$x."=".$rrd['filename'].":peak:MAX";
|
||||
$rrd_options .= " DEF:unique".$x."=".$rrd['filename'].":unique:AVERAGE";
|
||||
$rrd_options .= " VDEF:avg".$x."=cur".$x.",AVERAGE";
|
||||
$rrd_options .= " AREA:cur".$x."#".$colour.":\"".$descr."\":$stack";
|
||||
$rrd_options .= " GPRINT:cur".$x.":LAST:\"%6.2lf\"";
|
||||
$rrd_options .= " GPRINT:unique".$x.":LAST:\"%6.2lf%s\"";
|
||||
$rrd_options .= " GPRINT:avg".$x.":\"%6.2lf\"";
|
||||
$rrd_options .= " GPRINT:peak".$x.":LAST:\"%6.2lf\"";
|
||||
$rrd_options .= " COMMENT:\"\\n\"";
|
||||
if ($x) {
|
||||
$totcur .= ",cur".$x.",+";
|
||||
$totpeak .= ",peak".$x.",+";
|
||||
$totunique .= ",unique".$x.",+";
|
||||
}
|
||||
$x = (($x<count($config['graph_colours'][$colours])-1) ? $x+1 : 0);
|
||||
//$x++;
|
||||
}
|
||||
if (!$nototal) {
|
||||
$strlen = ((strlen($total_text)<$descr_len) ? ($descr_len - strlen($total_text)) : "0");
|
||||
$descr = (isset($total_text) ? str_replace(":", "\:", substr(str_pad($total_text, $desc_len+$strlen), 0, $descr_len+$strlen)) : "Total");
|
||||
$colour = $config['graph_colours'][$colours][$x];
|
||||
for ($z=0; $z<$strlen; $z++) { $descr .= " "; }
|
||||
$rrd_options .= " CDEF:totcur=cur0".$totcur;
|
||||
$rrd_options .= " CDEF:totunique=unique0".$totunique;
|
||||
$rrd_options .= " CDEF:totpeak=peak0".$totpeak;
|
||||
$rrd_options .= " VDEF:totavg=totcur,AVERAGE";
|
||||
$rrd_options .= " LINE2:totcur#".$colour.":\"".$descr."\"";
|
||||
$rrd_options .= " GPRINT:totcur:LAST:\"%6.2lf\"";
|
||||
$rrd_options .= " GPRINT:totunique:LAST:\"%6.2lf%s\"";
|
||||
$rrd_options .= " GPRINT:totavg:\"%6.2lf\"";
|
||||
$rrd_options .= " GPRINT:totpeak:LAST:\"%6.2lf\"";
|
||||
$rrd_options .= " COMMENT:\"\\n\"";
|
||||
if ($width > "500")
|
||||
{
|
||||
$rrd_options .= " COMMENT:\"".substr(str_pad($unit_text, $descr_len+2), 0, $descr_len+2)." Current Unique Average Peak\\n\"";
|
||||
} else {
|
||||
$rrd_options .= " COMMENT:\"".substr(str_pad($unit_text, $descr_len+5), 0, $descr_len+5)." Now Unique Average Peak\\n\"";
|
||||
}
|
||||
|
||||
foreach ($rrd_list as $rrd)
|
||||
{
|
||||
$colours = (isset($rrd['colour']) ? $rrd['colour'] : "default");
|
||||
$strlen = ((strlen($rrd['descr'])<$descr_len) ? ($descr_len - strlen($rrd['descr'])) : "0");
|
||||
$descr = (isset($rrd['descr']) ? str_replace(":", "\:", substr(str_pad($rrd['descr'], $desc_len+$strlen), 0, $descr_len+$strlen)) : "Unkown");
|
||||
for ($z=0; $z<$strlen; $z++) { $descr .= " "; }
|
||||
if ($i) { $stack = "STACK"; }
|
||||
$colour = $config['graph_colours'][$colours][$x];
|
||||
$rrd_options .= " DEF:cur".$x."=".$rrd['filename'].":current:AVERAGE";
|
||||
$rrd_options .= " DEF:peak".$x."=".$rrd['filename'].":peak:MAX";
|
||||
$rrd_options .= " DEF:unique".$x."=".$rrd['filename'].":unique:AVERAGE";
|
||||
$rrd_options .= " VDEF:avg".$x."=cur".$x.",AVERAGE";
|
||||
$rrd_options .= " AREA:cur".$x."#".$colour.":\"".$descr."\":$stack";
|
||||
$rrd_options .= " GPRINT:cur".$x.":LAST:\"%6.2lf\"";
|
||||
$rrd_options .= " GPRINT:unique".$x.":LAST:\"%6.2lf%s\"";
|
||||
$rrd_options .= " GPRINT:avg".$x.":\"%6.2lf\"";
|
||||
$rrd_options .= " GPRINT:peak".$x.":LAST:\"%6.2lf\"";
|
||||
$rrd_options .= " COMMENT:\"\\n\"";
|
||||
if ($x)
|
||||
{
|
||||
$totcur .= ",cur".$x.",+";
|
||||
$totpeak .= ",peak".$x.",+";
|
||||
$totunique .= ",unique".$x.",+";
|
||||
}
|
||||
$x = (($x<count($config['graph_colours'][$colours])-1) ? $x+1 : 0);
|
||||
//$x++;
|
||||
}
|
||||
|
||||
if (!$nototal)
|
||||
{
|
||||
$strlen = ((strlen($total_text)<$descr_len) ? ($descr_len - strlen($total_text)) : "0");
|
||||
$descr = (isset($total_text) ? str_replace(":", "\:", substr(str_pad($total_text, $desc_len+$strlen), 0, $descr_len+$strlen)) : "Total");
|
||||
$colour = $config['graph_colours'][$colours][$x];
|
||||
for ($z=0; $z<$strlen; $z++) { $descr .= " "; }
|
||||
$rrd_options .= " CDEF:totcur=cur0".$totcur;
|
||||
$rrd_options .= " CDEF:totunique=unique0".$totunique;
|
||||
$rrd_options .= " CDEF:totpeak=peak0".$totpeak;
|
||||
$rrd_options .= " VDEF:totavg=totcur,AVERAGE";
|
||||
$rrd_options .= " LINE2:totcur#".$colour.":\"".$descr."\"";
|
||||
$rrd_options .= " GPRINT:totcur:LAST:\"%6.2lf\"";
|
||||
$rrd_options .= " GPRINT:totunique:LAST:\"%6.2lf%s\"";
|
||||
$rrd_options .= " GPRINT:totavg:\"%6.2lf\"";
|
||||
$rrd_options .= " GPRINT:totpeak:LAST:\"%6.2lf\"";
|
||||
$rrd_options .= " COMMENT:\"\\n\"";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,42 +1,45 @@
|
||||
<?php
|
||||
|
||||
$rrddir = $config['rrd_dir']."/".$device['hostname'];
|
||||
$hostname = (isset($_GET['hostname']) ? $_GET['hostname'] : "unkown");
|
||||
$rrd_filename = $rrddir."/app-shoutcast-".$app['app_id']."-".$hostname.".rrd";
|
||||
$rrddir = $config['rrd_dir']."/".$device['hostname'];
|
||||
$hostname = (isset($_GET['hostname']) ? $_GET['hostname'] : "unkown");
|
||||
$rrd_filename = $rrddir."/app-shoutcast-".$app['app_id']."-".$hostname.".rrd";
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " DEF:cur=".$rrd_filename.":current:AVERAGE";
|
||||
$rrd_options .= " DEF:max=".$rrd_filename.":max:MAX";
|
||||
//$rrd_options .= " DEF:bit=".$rrd_filename.":bitrate:LAST";
|
||||
$rrd_options .= " DEF:bit=".$rrd_filename.":bitrate:MAX";
|
||||
$rrd_options .= " DEF:peak=".$rrd_filename.":peak:MAX";
|
||||
$rrd_options .= " DEF:unique=".$rrd_filename.":unique:AVERAGE";
|
||||
$rrd_options .= " DEF:status=".$rrd_filename.":status:AVERAGE";
|
||||
$rrd_options .= " CDEF:peakm=peak,1,-";
|
||||
$rrd_options .= " VDEF:avg=cur,AVERAGE";
|
||||
$rrd_options .= " VDEF:peakh=peakm,MAXIMUM";
|
||||
$rrd_options .= " CDEF:bitrate=bit,8,*";
|
||||
$rrd_options .= " CDEF:server=status,UN,1,0,IF";
|
||||
$rrd_options .= " CDEF:server_offline=status,1,LT,1,UNKN,IF";
|
||||
$rrd_options .= " CDEF:stream=max,UN,1,0,IF";
|
||||
$rrd_options .= " CDEF:stream_offline=max,1,LT,1,UNKN,IF";
|
||||
$rrd_options .= " AREA:cur#63C2FEFF:\"Current Listeners\"";
|
||||
if ($width >= 355) {
|
||||
$rrd_options .= " GPRINT:cur:LAST:\"\:%8.2lf\"";
|
||||
$rrd_options .= " GPRINT:max:LAST:\"from%8.2lf\"";
|
||||
$rrd_options .= " GPRINT:bitrate:LAST:\"(bitrate\:%8.2lf%s\"";
|
||||
$rrd_options .= " COMMENT:\")\\n\"";
|
||||
} else {
|
||||
$rrd_options .= " GPRINT:cur:LAST:\"\:%8.2lf\\n\"";
|
||||
}
|
||||
$rrd_options .= " AREA:unique#AADEFEFF:\"Unique Listeners \"";
|
||||
$rrd_options .= " GPRINT:unique:LAST:\"\:%8.2lf%s\\n\"";
|
||||
$rrd_options .= " HRULE:avg#FF9000FF:\"Average Listeners\"";
|
||||
$rrd_options .= " GPRINT:avg:\"\:%8.2lf\\n\"";
|
||||
$rrd_options .= " LINE1:peak#C000FFFF:\"Peak Listeners \"";
|
||||
$rrd_options .= " GPRINT:peak:LAST:\"\:%8.2lf\\n\"";
|
||||
$rrd_options .= " TICK:stream_offline#B4FF00FF:1.0:\"Streaming client offline\\n\"";
|
||||
$rrd_options .= " TICK:server_offline".$warn_colour_b."FF:1.0:\"Streaming server offline\"";
|
||||
$rrd_options .= " DEF:cur=".$rrd_filename.":current:AVERAGE";
|
||||
$rrd_options .= " DEF:max=".$rrd_filename.":max:MAX";
|
||||
//$rrd_options .= " DEF:bit=".$rrd_filename.":bitrate:LAST";
|
||||
$rrd_options .= " DEF:bit=".$rrd_filename.":bitrate:MAX";
|
||||
$rrd_options .= " DEF:peak=".$rrd_filename.":peak:MAX";
|
||||
$rrd_options .= " DEF:unique=".$rrd_filename.":unique:AVERAGE";
|
||||
$rrd_options .= " DEF:status=".$rrd_filename.":status:AVERAGE";
|
||||
$rrd_options .= " CDEF:peakm=peak,1,-";
|
||||
$rrd_options .= " VDEF:avg=cur,AVERAGE";
|
||||
$rrd_options .= " VDEF:peakh=peakm,MAXIMUM";
|
||||
$rrd_options .= " CDEF:bitrate=bit,8,*";
|
||||
$rrd_options .= " CDEF:server=status,UN,1,0,IF";
|
||||
$rrd_options .= " CDEF:server_offline=status,1,LT,1,UNKN,IF";
|
||||
$rrd_options .= " CDEF:stream=max,UN,1,0,IF";
|
||||
$rrd_options .= " CDEF:stream_offline=max,1,LT,1,UNKN,IF";
|
||||
$rrd_options .= " AREA:cur#63C2FEFF:\"Current Listeners\"";
|
||||
|
||||
if ($width >= 355)
|
||||
{
|
||||
$rrd_options .= " GPRINT:cur:LAST:\"\:%8.2lf\"";
|
||||
$rrd_options .= " GPRINT:max:LAST:\"from%8.2lf\"";
|
||||
$rrd_options .= " GPRINT:bitrate:LAST:\"(bitrate\:%8.2lf%s\"";
|
||||
$rrd_options .= " COMMENT:\")\\n\"";
|
||||
} else {
|
||||
$rrd_options .= " GPRINT:cur:LAST:\"\:%8.2lf\\n\"";
|
||||
}
|
||||
|
||||
$rrd_options .= " AREA:unique#AADEFEFF:\"Unique Listeners \"";
|
||||
$rrd_options .= " GPRINT:unique:LAST:\"\:%8.2lf%s\\n\"";
|
||||
$rrd_options .= " HRULE:avg#FF9000FF:\"Average Listeners\"";
|
||||
$rrd_options .= " GPRINT:avg:\"\:%8.2lf\\n\"";
|
||||
$rrd_options .= " LINE1:peak#C000FFFF:\"Peak Listeners \"";
|
||||
$rrd_options .= " GPRINT:peak:LAST:\"\:%8.2lf\\n\"";
|
||||
$rrd_options .= " TICK:stream_offline#B4FF00FF:1.0:\"Streaming client offline\\n\"";
|
||||
$rrd_options .= " TICK:server_offline".$warn_colour_b."FF:1.0:\"Streaming server offline\"";
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
if(isset($config['smokeping']['dir'])) {
|
||||
if (isset($config['smokeping']['dir'])) {
|
||||
$smokeping_files = array();
|
||||
if ($handle = opendir($config['smokeping']['dir'])) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
|
||||
@@ -25,7 +25,7 @@ foreach ($rrd_list as $i => $rrd)
|
||||
|
||||
$rrd_options .= " DEF:".$rrd['ds'].$i."=".$rrd['filename'].":".$rrd['ds'].":AVERAGE ";
|
||||
|
||||
if($simple_rrd)
|
||||
if ($simple_rrd)
|
||||
{
|
||||
$rrd_options .= " CDEF:".$rrd['ds'].$i."min=".$rrd['ds'].$i." ";
|
||||
$rrd_options .= " CDEF:".$rrd['ds'].$i."max=".$rrd['ds'].$i." ";
|
||||
|
||||
Reference in New Issue
Block a user