mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
t # This is a combination of 11 commits.
More mibs needed from http://www.ieee802.org/1/files/public/MIBs/ Updated mib names Updated poller function and siklu call Updates for Siklu detection Removed one graph not supported Added rfOperationalFrequency graph Removed modulation graph Work on siklu support Siklu packets supports Last updates for Siklu support Updated more siklu support
This commit is contained in:
@@ -245,7 +245,7 @@ function poll_device($device, $options)
|
||||
}
|
||||
}
|
||||
|
||||
function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_graphs, &$graphs)
|
||||
function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_graphs, &$graphs, $rrd_options)
|
||||
{
|
||||
|
||||
global $config;
|
||||
@@ -253,11 +253,14 @@ function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_gra
|
||||
echo("This is mag_poll_mib_def Processing\n");
|
||||
$mib = NULL;
|
||||
|
||||
list($mib,) = explode(":", $mib_name_table, 2);
|
||||
|
||||
//$mib_dirs = mib_dirs($mib_subdir);
|
||||
|
||||
$rrd_file = strtolower(safename($mib)).'.rrd';
|
||||
if (stristr($mib_name_table, "UBNT")) {
|
||||
list($mib,) = explode(":", $mib_name_table, 2);
|
||||
//$mib_dirs = mib_dirs($mib_subdir);
|
||||
$rrd_file = strtolower(safename($mib)).'.rrd';
|
||||
} else {
|
||||
list($mib,$file) = explode(":", $mib_name_table, 2);
|
||||
$rrd_file = strtolower(safename($file)).'.rrd';
|
||||
}
|
||||
|
||||
$rrdcreate = '--step 300 ';
|
||||
$oidglist = array();
|
||||
@@ -267,9 +270,15 @@ function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_gra
|
||||
$oiddsname = $param[1];
|
||||
$oiddsdesc = $param[2];
|
||||
$oiddstype = $param[3];
|
||||
$oiddsopts = $param[4];
|
||||
|
||||
if (strlen($oiddsname) > 19) { $oiddsname = truncate($oiddsname, 19, ''); }
|
||||
$rrdcreate .= ' DS:'.$oiddsname.':'.$oiddstype.':600:U:100000000000';
|
||||
|
||||
if (empty($oiddsopts)) {
|
||||
$rrd_options = "600:U:100000000000";
|
||||
}
|
||||
|
||||
$rrdcreate .= ' DS:'.$oiddsname.':'.$oiddstype.':'.$oiddsopts;
|
||||
|
||||
if ($oidindex != '')
|
||||
{
|
||||
|
||||
@@ -3,15 +3,34 @@
|
||||
echo(" Siklu Wireless ");
|
||||
|
||||
$mib_oids = array(
|
||||
'rfAverageRssi' => array('1', 'rfAverageRssi', 'Signal Strength', 'GAUGE'),
|
||||
'rfAverageCinr' => array('1', 'rfAverageCinr', 'Signal to noise ratio', 'GAUGE'),
|
||||
'rfModulationType' => array('1', 'rfModulationType', 'Modulation Type', 'GAUGE'),
|
||||
'rfAverageRssi' => array('1', 'rfAverageRssi', 'Signal Strength', 'GAUGE'),
|
||||
'rfAverageCinr' => array('1', 'rfAverageCinr', 'Signal to noise ratio', 'GAUGE'),
|
||||
'rfOperationalFrequency' => array('1', 'rfOperFreq', 'Operational Frequency', 'GAUGE'),
|
||||
);
|
||||
|
||||
$mib_graphs = array();
|
||||
|
||||
array_push($mib_graphs, 'siklu_rfAverageRssi', 'siklu_rfAverageCinr', 'siklu_rfModulationType');
|
||||
$mib_graphs = array('siklu_rfAverageRssi', 'siklu_rfAverageCinr', 'siklu_rfOperationalFrequency');
|
||||
|
||||
unset($graph, $oids, $oid);
|
||||
|
||||
poll_mib_def($device, 'RADIO-BRIDGE-MIB', 'siklu', $mib_oids, $mib_graphs, $sgraphs);
|
||||
poll_mib_def($device, 'RADIO-BRIDGE-MIB:siklu-wireless', 'siklu', $mib_oids, $mib_graphs, $graphs);
|
||||
|
||||
// Poll interface statistics
|
||||
$mib_oids = array(
|
||||
'rfInPkts' => array('1', 'rfInPkts', 'In Packets', 'DERIVE','600:0:12500000000'),
|
||||
'rfOutPkts' => array('1', 'rfOutPkts', 'Out Packets', 'DERIVE','600:0:12500000000'),
|
||||
'rfInGoodPkts' => array('1', 'rfInGoodPkts', 'Good Packets', 'DERIVE'),
|
||||
'rfInErroredPkts' => array('1', 'rfInErroredPkts', 'Errored Packets', 'DERIVE'),
|
||||
'rfInLostPkts' => array('1', 'rfInLostPkts', 'Lost Packets', 'DERIVE'),
|
||||
'rfInOctets' => array('1', 'rfInOctets', 'In Packets', 'DERIVE','600:0:12500000000'),
|
||||
'rfOutOctets' => array('1', 'rfOutOctets', 'Out Packets', 'DERIVE','600:0:12500000000'),
|
||||
'rfInGoodOctets' => array('1', 'rfInGoodOctets', 'Good Packets', 'DERIVE'),
|
||||
'rfInErroredOctets' => array('1', 'rfInErroredOctets', 'Errored Packets', 'DERIVE'),
|
||||
'rfInIdleOctets' => array('1', 'rfInIdleOctets', 'Lost Packets', 'DERIVE'),
|
||||
'rfOutIdleOctets' => array('1', 'rfOutIdleOctets', 'Lost Packets', 'DERIVE'),
|
||||
);
|
||||
|
||||
$mib_graphs = array('siklu_rfinterfacePkts','siklu_rfinterfaceOtherPkts','siklu_rfinterfaceOctets','siklu_rfinterfaceOtherOctets');
|
||||
|
||||
unset($graph, $oids, $oid);
|
||||
|
||||
poll_mib_def($device, 'RADIO-BRIDGE-MIB:siklu-interface', 'siklu', $mib_oids, $mib_graphs, $graphs);
|
||||
|
||||
Reference in New Issue
Block a user