newdevice: Add UniFi Wireless MIB polling for Capacity #4266

This commit is contained in:
Neil Lathwood
2016-10-17 17:48:49 +01:00
committed by GitHub
6 changed files with 755 additions and 0 deletions

View File

@@ -2295,6 +2295,15 @@ $config['graph_types']['device']['ubnt_airfiber_RFTotPktsRx']['section'] = 'wire
$config['graph_types']['device']['ubnt_airfiber_RFTotPktsRx']['order'] = '7';
$config['graph_types']['device']['ubnt_airfiber_RFTotPktsRx']['descr'] = 'RF Total Packets Rx';
// Unifi Support
$config['graph_types']['device']['ubnt_unifi_RadioCu_0']['section'] = 'wireless';
$config['graph_types']['device']['ubnt_unifi_RadioCu_0']['order'] = '0';
$config['graph_types']['device']['ubnt_unifi_RadioCu_0']['descr'] = 'Radio0 Capacity Used';
$config['graph_types']['device']['ubnt_unifi_RadioCu_1']['section'] = 'wireless';
$config['graph_types']['device']['ubnt_unifi_RadioCu_1']['order'] = '1';
$config['graph_types']['device']['ubnt_unifi_RadioCu_1']['descr'] = 'Radio1 Capacity Used';
// Siklu support
$config['graph_types']['device']['siklu_rfAverageRssi']['section'] = 'wireless';
$config['graph_types']['device']['siklu_rfAverageRssi']['order'] = '0';

View File

@@ -0,0 +1,69 @@
<?php
// Polling of UniFi MIB AP for Ubiquiti Unifi Radios
// based on Airfiber MIB work of Mark Gibbons
// UBNT-UniFi-MIB
echo ' UBNT-UniFi-MIB ';
// $mib_oids (oidindex,dsname,dsdescription,dstype)
$mib_oids = array(
'unifiRadioCuTotal.0' => array(
'',
'Radio0CuTotal',
'Radio0 Channel Utilized',
'GAUGE',
),
'unifiRadioCuTotal.1' => array(
'',
'Radio1CuTotal',
'Radio1 Channel Utilized',
'GAUGE',
),
'unifiRadioCuSelfRx.0' => array(
'',
'Radio0CuSelfRx',
'Radio0 Channel Utilized Rx',
'GAUGE',
),
'unifiRadioCuSelfRx.1' => array(
'',
'Radio1CuSelfRx',
'Radio1 Channel Utilized Rx',
'GAUGE',
),
'unifiRadioCuSelfTx.0' => array(
'',
'Radio0CuSelfTx',
'Radio0 Channel Utilized Tx',
'GAUGE',
),
'unifiRadioCuSelfTx.1' => array(
'',
'Radio1CuSelfTx',
'Radio1 Channel Utilized Tx',
'GAUGE',
),
'unifiRadioOtherBss.0' => array(
'',
'Radio0OtherBss',
'Radio0 Channel Utilized by Others',
'GAUGE',
),
'unifiRadioOtherBss.1' => array(
'',
'Radio1OtherBss',
'Radio1 Channel Utilized by Others',
'GAUGE',
),
);
$mib_graphs = array(
'ubnt_unifi_RadioCu_0',
'ubnt_unifi_RadioCu_1',
);
unset($graph, $oids, $oid);
poll_mib_def($device, 'UBNT-UniFi-MIB:UBNT', 'ubiquiti', $mib_oids, $mib_graphs, $graphs);
// EOF

View File

@@ -77,6 +77,7 @@ if ($device['type'] == 'network' || $device['type'] == 'firewall' || $device['ty
}
echo (($wificlients1 + 0).' clients on Radio0, '.($wificlients2 + 0)." clients on Radio1\n");
include 'includes/polling/mib/ubnt-unifi-mib.inc.php';
}
if (isset($wificlients1) && $wificlients1 != '') {