mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
40 lines
1007 B
PHP
40 lines
1007 B
PHP
![]() |
<?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:'Signal RSSI Cur Min Max\\n'";
|
||
|
$radioId=1;
|
||
|
foreach(glob($config['rrd_dir'].'/'.$device['hostname'].'/xirrus_rssi-*.rrd') as $rrd) {
|
||
|
$color=$pallette[$radioId];
|
||
|
|
||
|
$descr = "iap$radioId ";
|
||
|
|
||
|
$rrd_options .= " DEF:rssi$radioId=$rrd:rssi:AVERAGE";
|
||
|
$rrd_options .= " LINE2:rssi$radioId#".$color.":'".$descr."'";
|
||
|
$rrd_options .= " GPRINT:rssi$radioId:LAST:'%5.0lf'";
|
||
|
$rrd_options .= " GPRINT:rssi$radioId:MIN:'%5.0lf'";
|
||
|
$rrd_options .= " GPRINT:rssi$radioId:MAX:'%5.0lf'\\l";
|
||
|
|
||
|
$radioId++;
|
||
|
}//end foreach
|