Added support for RIEDO data concentrator (#11237)

* Riedo E3Meter DataConcentrator

* Riedo E3Meter DataConcentrator Image

* logos

* name

* Freq + Power

* Power

* Tests + standalone riedo mib

* tests
This commit is contained in:
PipoCanaja
2020-04-10 13:24:49 +02:00
committed by GitHub
parent ad1c7d0e19
commit 3fb46710a6
10 changed files with 10992 additions and 2 deletions
+8 -2
View File
@@ -155,6 +155,10 @@ class YamlDiscovery
*/
public static function getValueFromData($name, $index, $discovery_data, $pre_cache, $default = null)
{
//create the sub-index values in order to try to match them with precache
foreach (explode('.', $index) as $pos => $sindex) {
$subindex[$pos] = $sindex;
}
if (isset($discovery_data[$name])) {
$name = $discovery_data[$name];
}
@@ -167,12 +171,14 @@ class YamlDiscovery
if (is_array($pre_cache[$name])) {
if (isset($pre_cache[$name][$index][$name])) {
return $pre_cache[$name][$index][$name];
} elseif (isset($pre_cache[$index][$name])) {
return $pre_cache[$index][$name];
} elseif (isset($pre_cache[$index][$name])) { //probably makes no sense here
return $pre_cache[$index][$name]; //same
} elseif (isset($pre_cache[$name][$index])) {
return $pre_cache[$name][$index];
} elseif (count($pre_cache[$name]) === 1) {
return current($pre_cache[$name]);
} elseif (isset($pre_cache[$name][$subindex[0]][$name])) {
return $pre_cache[$name][$subindex[0]][$name];
}
} else {
return $pre_cache[$name];
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

@@ -0,0 +1,83 @@
mib: NETTRACK-E3METER-CTR-SNMP-MIB
modules:
sensors:
pre-cache:
data:
- oid:
- e3IpsLabel
- e3IpsModel
- e3IpsHWVersion
count:
data:
-
oid: e3IpsNetwork
value: e3IpsTotalNodes
num_oid: '.1.3.6.1.4.1.21695.1.10.2.1'
descr: 'Total Nodes'
index: 'TNodes'
-
oid: e3IpsNetwork
value: e3IpsUnknownNodes
num_oid: '.1.3.6.1.4.1.21695.1.10.2.2'
descr: 'Unknown Nodes'
index: 'UNodes'
-
oid: e3IpsNetwork
value: e3IpsActiveNodes
num_oid: '.1.3.6.1.4.1.21695.1.10.2.3'
descr: 'Active Nodes'
index: 'ANodes'
-
oid: e3IpsNetwork
value: e3IpsDeadNodes
num_oid: '.1.3.6.1.4.1.21695.1.10.2.4'
descr: 'Dead Nodes'
index: 'DNodes'
temperature:
data:
-
oid: e3IpsSensorEntry
value: e3IpsSensorTemperatureCelsius
num_oid: '.1.3.6.1.4.1.21695.1.10.5.1.4.{{ $index }}'
descr: 'Sensor {{ $subindex1 }}, {{ $e3IpsLabel }}'
group: 'Model {{ $e3IpsModel }} rev{{ $e3IpsHWVersion }}, {{ $e3IpsLabel }}'
index: '{{ $index }}'
divisor: 10
skip_values:
-
oid: e3IpsSensorType
op: '!='
value: '1'
-
oid: e3IpsSensorTemperatureCelsius
op: '='
value: '0'
frequency:
data:
-
oid: e3IpsMeterEntry
value: e3IpsFrequency
num_oid: '.1.3.6.1.4.1.21695.1.10.4.1.11.{{ $index }}'
descr: 'Phase {{ $subindex1 }}, {{ $e3IpsLabel }}'
group: 'Model {{ $e3IpsModel }} rev{{ $e3IpsHWVersion }}, {{ $e3IpsLabel }}'
index: '{{ $index }}'
divisor: 1000
skip_values:
-
oid: e3IpsFrequency
op: '='
value: '0'
power:
data:
-
oid: e3IpsMeterEntry
value: e3IpsPAvg
num_oid: '.1.3.6.1.4.1.21695.1.10.4.1.18.{{ $index }}'
descr: 'Phase {{ $subindex1 }}, {{ $e3IpsLabel }}'
group: 'Model {{ $e3IpsModel }} rev{{ $e3IpsHWVersion }}, {{ $e3IpsLabel }}'
index: '{{ $index }}'
skip_values:
-
oid: e3IpsFrequency
op: '='
value: '0'
+13
View File
@@ -0,0 +1,13 @@
os: e3meterdc
text: 'E3 Meter DataConcentrator'
type: power
icon: riedo
mib_dir:
- riedo
over:
- { graph: device_power, text: Power }
- { graph: device_temperature, text: Temperature }
discovery:
-
sysObjectID:
- '.1.3.6.1.4.1.21695'
+33
View File
@@ -0,0 +1,33 @@
<?php
/**
* e3meter.inc.php
*
* LibreNMS os poller module for Zyxel devices
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2020 PipoCanaja
* @author PipoCanaja
*/
$oids = ['NETTRACK-E3METER-CTR-SNMP-MIB::e3ConcentratorFWVersion'];
$e3meter = snmp_get_multi_oid($device, $oids, '-OUQnt');
$version = $e3meter['.1.3.6.1.4.1.21695.1.10.1.1'];
unset(
$zyxel
);
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff