mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00: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,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");
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user