Removed ?> from includes/polling/wireless/xirrus.inc.php. Also added graphs for average data rates and noise floor and a custom graph for clients connected per radio that should work on larger models.

This commit is contained in:
Rick Hodger
2016-05-25 19:56:10 +01:00
parent 39f8371ea2
commit ae23432138
7 changed files with 186 additions and 18 deletions

View File

@@ -0,0 +1,44 @@
<?php
require 'includes/graphs/common.inc.php';
$pallette = array(
1 => 'FF0000',
2 => '0000FF',
3 => '00FF00',
4 => 'FF00FF',
5 => '000000',
6 => 'FFFF00',
7 => 'C0C0C0',
8 => '800000',
9 => '808000',
10 => '008000',
11 => '00FFFF',
12 => '008080',
13 => '000080',
14 => '800080',
15 => 'FF69B4',
16 => '006400'
);
$rrd_options .= ' -l 0 -E ';
$rrd_options .= " COMMENT:'Average Data Rate Cur Min Max\\n'";
$radioId=1;
foreach(glob($config['rrd_dir'].'/'.$device['hostname'].'/xirrus_stats-*.rrd') as $rrd) {
// get radio name
preg_match("/xirrus_stats-iap([0-9]{1,2}).rrd/", $rrd, $out);
list(,$radioId)=$out;
// build graph
$color=$pallette[$radioId];
$descr = "iap$radioId ";
$rrd_options .= " DEF:rate$radioId=$rrd:dataRate:AVERAGE";
$rrd_options .= " LINE2:rate$radioId#".$color.":'".$descr."'";
$rrd_options .= " GPRINT:rate$radioId:LAST:'%5.0lf'";
$rrd_options .= " GPRINT:rate$radioId:MIN:'%5.0lf'";
$rrd_options .= " GPRINT:rate$radioId:MAX:'%5.0lf'\\l";
$radioId++;
}//end foreach

View File

@@ -0,0 +1,44 @@
<?php
require 'includes/graphs/common.inc.php';
$pallette = array(
1 => 'FF0000',
2 => '0000FF',
3 => '00FF00',
4 => 'FF00FF',
5 => '000000',
6 => 'FFFF00',
7 => 'C0C0C0',
8 => '800000',
9 => '808000',
10 => '008000',
11 => '00FFFF',
12 => '008080',
13 => '000080',
14 => '800080',
15 => 'FF69B4',
16 => '006400'
);
$rrd_options .= ' -E ';
$rrd_options .= " COMMENT:'Noisefloor Cur Min Max\\n'";
$radioId=1;
foreach(glob($config['rrd_dir'].'/'.$device['hostname'].'/xirrus_stats-*.rrd') as $rrd) {
// get radio name
preg_match("/xirrus_stats-iap([0-9]{1,2}).rrd/", $rrd, $out);
list(,$radioId)=$out;
// build graph
$color=$pallette[$radioId];
$descr = "iap$radioId ";
$rrd_options .= " DEF:noise$radioId=$rrd:noiseFloor:AVERAGE";
$rrd_options .= " LINE2:noise$radioId#".$color.":'".$descr."'";
$rrd_options .= " GPRINT:noise$radioId:LAST:'%5.0lf'";
$rrd_options .= " GPRINT:noise$radioId:MIN:'%5.0lf'";
$rrd_options .= " GPRINT:noise$radioId:MAX:'%5.0lf'\\l";
$radioId++;
}//end foreach

View File

@@ -24,7 +24,12 @@ $pallette = array(
$rrd_options .= ' -E ';
$rrd_options .= " COMMENT:'Signal RSSI Cur Min Max\\n'";
$radioId=1;
foreach(glob($config['rrd_dir'].'/'.$device['hostname'].'/xirrus_rssi-*.rrd') as $rrd) {
foreach(glob($config['rrd_dir'].'/'.$device['hostname'].'/xirrus_stats-*.rrd') as $rrd) {
// get radio name
preg_match("/xirrus_stats-iap([0-9]{1,2}).rrd/", $rrd, $out);
list(,$radioId)=$out;
// build graph
$color=$pallette[$radioId];
$descr = "iap$radioId ";

View File

@@ -0,0 +1,44 @@
<?php
require 'includes/graphs/common.inc.php';
$pallette = array(
1 => '001080',
2 => '043D85',
3 => '096C8A',
4 => '0F8F84',
5 => '159461',
6 => '1B9A3E',
7 => '279F22',
8 => '56A429',
9 => '83A930',
10 => 'AEAE38',
11 => 'B48E40',
12 => 'B97049',
13 => 'BE5552',
14 => 'C35B79',
15 => 'C864A1',
16 => 'CE6FC7'
);
$rrd_options .= ' -l 0 -E ';
$rrd_options .= " COMMENT:'Associated Stations Cur Min Max\\n'";
$radioId=1;
foreach(glob($config['rrd_dir'].'/'.$device['hostname'].'/xirrus_users-*.rrd') as $rrd) {
// get radio name
preg_match("/xirrus_users-iap([0-9]{1,2}).rrd/", $rrd, $out);
list(,$radioId)=$out;
// build graph
$color=$pallette[$radioId];
$descr = "iap$radioId ";
$rrd_options .= " DEF:stations$radioId=$rrd:stations:AVERAGE";
$rrd_options .= " AREA:stations$radioId#".$color.":'".$descr."':STACK";
$rrd_options .= " GPRINT:stations$radioId:LAST:'%5.0lf'";
$rrd_options .= " GPRINT:stations$radioId:MIN:'%5.0lf'";
$rrd_options .= " GPRINT:stations$radioId:MAX:'%5.0lf'\\l";
$radioId++;
}//end foreach