mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
newdevice: Added support for Mimosa A5 (#7287)
* device: add support for Mimosa A5 Frequency and Tx/Rx Power Unfortunately, we would have to walk the client table to get any client stats such as count. * remove sysdescr after checking stats * Forgot the mib new files
This commit is contained in:
committed by
Neil Lathwood
parent
8bacb053c9
commit
66f9411adc
@@ -86,6 +86,9 @@ class Mimosa extends OS implements
|
||||
*/
|
||||
public function discoverWirelessFrequency()
|
||||
{
|
||||
$sensors = array();
|
||||
|
||||
// ptp radios
|
||||
$polar = $this->getCacheByIndex('mimosaPolarization', 'MIMOSA-NETWORKS-BFIVE-MIB');
|
||||
$freq = $this->getCacheByIndex('mimosaCenterFreq', 'MIMOSA-NETWORKS-BFIVE-MIB');
|
||||
|
||||
@@ -97,19 +100,35 @@ class Mimosa extends OS implements
|
||||
$descr = 'Frequency: $s Chain';
|
||||
}
|
||||
|
||||
foreach ($freq as $frequency => $index) {
|
||||
return array(
|
||||
new WirelessSensor(
|
||||
'frequency',
|
||||
$this->getDeviceId(),
|
||||
'.1.3.6.1.4.1.43356.2.1.2.6.1.1.6.' . $index,
|
||||
'mimosa',
|
||||
$index,
|
||||
sprintf($descr, $this->getPolarization($polar[$index])),
|
||||
$frequency
|
||||
)
|
||||
foreach ($freq as $index => $frequency) {
|
||||
$sensors[] = new WirelessSensor(
|
||||
'frequency',
|
||||
$this->getDeviceId(),
|
||||
'.1.3.6.1.4.1.43356.2.1.2.6.1.1.6.' . $index,
|
||||
'mimosa',
|
||||
$index,
|
||||
sprintf($descr, $this->getPolarization($polar[$index])),
|
||||
$frequency
|
||||
);
|
||||
}
|
||||
|
||||
// ptmp radios
|
||||
$ptmpRadioName = $this->getCacheByIndex('mimosaPtmpChPwrRadioName', 'MIMOSA-NETWORKS-PTMP-MIB');
|
||||
$ptmpFreq = snmpwalk_group($this->getDevice(), 'mimosaPtmpChPwrCntrFreqCur', 'MIMOSA-NETWORKS-PTMP-MIB');
|
||||
|
||||
foreach ($ptmpFreq as $index => $frequency) {
|
||||
$sensors[] = new WirelessSensor(
|
||||
'frequency',
|
||||
$this->getDeviceId(),
|
||||
'.1.3.6.1.4.1.43356.2.1.2.9.3.3.1.7.' . $index,
|
||||
'mimosa',
|
||||
$index,
|
||||
$ptmpRadioName[$index],
|
||||
$frequency['mimosaPtmpChPwrCntrFreqCur']
|
||||
);
|
||||
}
|
||||
|
||||
return $sensors;
|
||||
}
|
||||
|
||||
private function getPolarization($polarization)
|
||||
@@ -152,11 +171,13 @@ class Mimosa extends OS implements
|
||||
*/
|
||||
public function discoverWirelessPower()
|
||||
{
|
||||
$sensors = array();
|
||||
|
||||
// ptp radios
|
||||
$polar = $this->getCacheByIndex('mimosaPolarization', 'MIMOSA-NETWORKS-BFIVE-MIB');
|
||||
$oids = snmpwalk_cache_oid($this->getDevice(), 'mimosaTxPower', array(), 'MIMOSA-NETWORKS-BFIVE-MIB');
|
||||
$oids = snmpwalk_cache_oid($this->getDevice(), 'mimosaRxPower', $oids, 'MIMOSA-NETWORKS-BFIVE-MIB');
|
||||
|
||||
$sensors = array();
|
||||
foreach ($oids as $index => $entry) {
|
||||
$sensors[] = new WirelessSensor(
|
||||
'power',
|
||||
@@ -178,6 +199,36 @@ class Mimosa extends OS implements
|
||||
);
|
||||
}
|
||||
|
||||
// ptmp radios
|
||||
$ptmpRadioName = $this->getCacheByIndex('mimosaPtmpChPwrRadioName', 'MIMOSA-NETWORKS-PTMP-MIB');
|
||||
$ptmpTxPow = snmpwalk_group($this->getDevice(), 'mimosaPtmpChPwrTxPowerCur', 'MIMOSA-NETWORKS-PTMP-MIB');
|
||||
|
||||
foreach ($ptmpTxPow as $index => $entry) {
|
||||
$sensors[] = new WirelessSensor(
|
||||
'power',
|
||||
$this->getDeviceId(),
|
||||
'.1.3.6.1.4.1.43356.2.1.2.9.3.3.1.10.' . $index,
|
||||
'mimosa-tx',
|
||||
$index,
|
||||
'Tx Power: ' . $ptmpRadioName[$index],
|
||||
$entry['mimosaPtmpChPwrTxPowerCur']
|
||||
);
|
||||
}
|
||||
|
||||
$ptmpRxPow = snmpwalk_group($this->getDevice(), 'mimosaPtmpChPwrMinRxPower', 'MIMOSA-NETWORKS-PTMP-MIB');
|
||||
|
||||
foreach ($ptmpRxPow as $index => $entry) {
|
||||
$sensors[] = new WirelessSensor(
|
||||
'power',
|
||||
$this->getDeviceId(),
|
||||
'.1.3.6.1.4.1.43356.2.1.2.9.3.3.1.12.' . $index,
|
||||
'mimosa-rx',
|
||||
$index,
|
||||
'Min Rx Power: ' . $ptmpRadioName[$index],
|
||||
$entry['mimosaPtmpChPwrMinRxPower']
|
||||
);
|
||||
}
|
||||
|
||||
return $sensors;
|
||||
}
|
||||
|
||||
|
@@ -7,5 +7,5 @@ over:
|
||||
- { graph: device_processor, text: 'CPU Usage' }
|
||||
- { graph: device_mempool, text: 'Memory Usage' }
|
||||
discovery:
|
||||
- sysDescr:
|
||||
- Mimosa
|
||||
- sysObjectId:
|
||||
- .1.3.6.1.4.1.43356
|
||||
|
90
mibs/mimosa/MIMOSA-MIB-TC
Normal file
90
mibs/mimosa/MIMOSA-MIB-TC
Normal file
@@ -0,0 +1,90 @@
|
||||
MIMOSA-MIB-TC DEFINITIONS ::= BEGIN
|
||||
|
||||
-- Copyright (C) 2017, Mimosa Networks, Inc. All Rights Reserved.
|
||||
--
|
||||
-- Mimosa Networks MIB
|
||||
-- Revision: 1.00
|
||||
-- Date: February 15, 2017
|
||||
--
|
||||
-- Mimosa Networks, Inc.
|
||||
-- 469 El Camino Real, Suite 100
|
||||
-- Santa Clara, CA 95050
|
||||
-- support@mimosa.co
|
||||
--
|
||||
-- This MIB defines the base MIB specification for Mimosa Network's
|
||||
-- products.
|
||||
--
|
||||
-- Mimosa reserves the right to make changes to this MIB specification as
|
||||
-- well as other information related to this specification without prior
|
||||
-- notice. The user of this specification should consult Mimosa Networks,
|
||||
-- to determine if any such changes have been made.
|
||||
--
|
||||
-- Current MIBs are available from Mimosa Networks at the following URLs:
|
||||
--
|
||||
-- http://help.mimosa.co
|
||||
--
|
||||
-- In no event shall Mimosa Networks, Inc. be liable for any indirect,
|
||||
-- consequential, special or incidental damages whatsoever (including
|
||||
-- but not limited to lost profits or lost revenue) arising out of or
|
||||
-- related to this specification or the information contained in it.
|
||||
-- This non-liability extends to even if Mimosa Networks Inc. has been
|
||||
-- advised of, known, or should have known, the potential for such damages.
|
||||
-- Mimosa Networks, Inc. hereby grants end-users, and other parties a
|
||||
-- a non-exclusive license to use this MIB specification in order to
|
||||
-- manage products of Mimosa Networks, Inc.
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY, Integer32 FROM SNMPv2-SMI
|
||||
TEXTUAL-CONVENTION FROM SNMPv2-TC
|
||||
mimosa FROM MIMOSA-NETWORKS-BASE-MIB;
|
||||
|
||||
mimosaMibTC MODULE-IDENTITY
|
||||
LAST-UPDATED "201702150000Z"
|
||||
ORGANIZATION "Mimosa Networks
|
||||
www.mimosa.co"
|
||||
CONTACT-INFO
|
||||
"postal:
|
||||
Mimosa Networks, Inc.
|
||||
469 El Camino Real, Suite 100
|
||||
Santa Clara, CA 95050
|
||||
email: support@mimosa.co"
|
||||
DESCRIPTION
|
||||
"Mimosa device MIB definitions"
|
||||
REVISION "201702150000Z"
|
||||
DESCRIPTION
|
||||
"First Revision of Textual Conventions defined for MIMOSA-MIB modules."
|
||||
::= { mimosa 3 }
|
||||
|
||||
-- *****************************************************************
|
||||
-- *** Mimosa Textual Conventions ***
|
||||
-- *****************************************************************
|
||||
|
||||
DecimalOne ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "d-1"
|
||||
STATUS current
|
||||
DESCRIPTION "Fixed point, one decimal"
|
||||
SYNTAX Integer32
|
||||
|
||||
DecimalTwo ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "d-2"
|
||||
STATUS current
|
||||
DESCRIPTION "Fixed point, two decimals"
|
||||
SYNTAX Integer32
|
||||
|
||||
DecimalFive ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "d-5"
|
||||
STATUS current
|
||||
DESCRIPTION "Fixed point, five decimals"
|
||||
SYNTAX Integer32
|
||||
|
||||
Mimosa5GHzFrequency ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION "Represents the frequency in the range of 4800 to 6200"
|
||||
SYNTAX Integer32 (4800..6200)
|
||||
|
||||
Mimosa5GHzChannelNumber ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION "Reprensents the channel Wifi ChannelWidth"
|
||||
SYNTAX Integer32
|
||||
|
||||
END
|
1036
mibs/mimosa/MIMOSA-NETWORKS-PTMP-MIB
Normal file
1036
mibs/mimosa/MIMOSA-NETWORKS-PTMP-MIB
Normal file
File diff suppressed because it is too large
Load Diff
3
tests/snmpsim/mimosa_a5.snmprec
Normal file
3
tests/snmpsim/mimosa_a5.snmprec
Normal file
@@ -0,0 +1,3 @@
|
||||
1.3.6.1.2.1.1.1.0|4|MIMOSA A5-360-14
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.43356.1.1.3
|
||||
|
Reference in New Issue
Block a user