mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
YAMLized version of previous PR for Ericsson SSR 80xx routers (#15834)
* Ericsson IPOS Yaml * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Ericsson IPOS MIBs * Ericsson IPOS - Serial & Hardware detection * Ericsson IPOS - Remove mempool from overview * SSR8020 SNMPrec * Ericsson IPOS SSR 8020 Test * Delete tests/snmpsim/ericsson-ipos_ssr8020.snmpwalk * SSR8020 SNMPrec * Add storage to overview * Move to new SnmpQuery * SnmpQuery() instead of snmp_* * Delete mibs/ericsson directory * Create ERICSSON-TOP-MIB * Add files via upload
This commit is contained in:
142
includes/definitions/discovery/ericsson-ipos.yaml
Normal file
142
includes/definitions/discovery/ericsson-ipos.yaml
Normal file
@@ -0,0 +1,142 @@
|
||||
mib: ERICSSON-ROUTER-ENVMON-MIB:ERICSSON-ROUTER-CPU-METER-MIB:ERICSSON-ROUTER-OPTICAL-TRANSCEIVER-MIB:ERICSSON-ROUTER-SYS-RESOURCES-MIB
|
||||
modules:
|
||||
os:
|
||||
version: SNMPv2-MIB::sysDescr.0
|
||||
hardware: ENTITY-MIB::entPhysicalDescr.1
|
||||
serial: ENTITY-MIB::entPhysicalDescr.2
|
||||
serial_regex: '/SN:(?<serial>[^ ]+)/'
|
||||
processors:
|
||||
data:
|
||||
-
|
||||
oid: eriRouterCpuMeterMIBObjects
|
||||
value: eriRouterCpuMeterFiveMinuteAvg
|
||||
num_oid: '.1.3.6.1.4.1.193.218.2.6.1.3.{{ $index }}'
|
||||
descr: '5 minute average'
|
||||
-
|
||||
oid: eriRouterCpuMeterMIBObjects
|
||||
value: eriRouterCpuMeterFiveMinutePeak
|
||||
num_oid: '.1.3.6.1.4.1.193.218.2.6.1.6.{{ $index }}'
|
||||
descr: '5 minute peak'
|
||||
sensors:
|
||||
pre-cache:
|
||||
data:
|
||||
-
|
||||
snmp_flags: '-OQUsbe'
|
||||
oid:
|
||||
- eriRouterOpticalTransceiverPortTable
|
||||
- eriRouterOpticalTransceiverCardSlot
|
||||
- eriRouterOpticalTransceiverPort
|
||||
state:
|
||||
data:
|
||||
-
|
||||
oid: eriRouterFanStatusTable
|
||||
num_oid: '.1.3.6.1.4.1.193.218.2.4.1.1.1.4.{{ $index }}'
|
||||
descr: eriRouterFanDescr
|
||||
value: eriRouterFanStatus
|
||||
states:
|
||||
- { value: 1, descr: Normal, graph: 1, generic: 0 }
|
||||
- { value: 2, descr: Failed, graph: 1, generic: 2 }
|
||||
- { value: 3, descr: Absent, graph: 1, generic: 0 }
|
||||
- { value: 4, descr: Unknown, graph: 1, generic: 3 }
|
||||
-
|
||||
oid: eriRouterPowerStatusTable
|
||||
num_oid: '.1.3.6.1.4.1.193.218.2.4.1.2.1.4.{{ $index }}'
|
||||
descr: eriRouterPowerDescr
|
||||
value: eriRouterPowerStatus
|
||||
states:
|
||||
- { value: 1, descr: Normal, graph: 1, generic: 0 }
|
||||
- { value: 2, descr: Failed, graph: 1, generic: 2 }
|
||||
- { value: 3, descr: Absent, graph: 1, generic: 0 }
|
||||
- { value: 4, descr: Unknown, graph: 1, generic: 3 }
|
||||
fanspeed:
|
||||
data:
|
||||
-
|
||||
oid: EriRouterFanSpeed
|
||||
value: eriRouterFanSpeedCurrent
|
||||
num_oid: '.1.3.6.1.4.1.193.218.2.4.1.5.1.3.{{ $index }}'
|
||||
descr: eriRouterFanUnitDescr
|
||||
temperature:
|
||||
data:
|
||||
-
|
||||
oid: eriRouterEntityTempSensorTable
|
||||
value: eriRouterEntityTempCurrent
|
||||
num_oid: '.1.3.6.1.4.1.193.218.2.4.1.6.1.3.{{ $index }}'
|
||||
descr: eriRouterEntityTempDescr
|
||||
-
|
||||
oid: eriRouterOpticalTransceiverParamTable
|
||||
value: eriRouterOpticalTransceiverCurrentValue
|
||||
high_limit: eriRouterOpticalTransceiverMaxAlarmValue
|
||||
warn_limit: eriRouterOpticalTransceiverMaxWarningValue
|
||||
low_limit: eriRouterOpticalTransceiverMinAlarmValue
|
||||
low_warn_limit: eriRouterOpticalTransceiverMinWarningValue
|
||||
snmp_flags: '-OQUsbe'
|
||||
num_oid: '.1.3.6.1.4.1.193.218.2.50.1.2.1.3.{{ $index }}'
|
||||
index: 'eriRouterOpticalTransceiverTemp.{{ $index }}'
|
||||
group: 'Optic Temperature'
|
||||
divisor: 1000
|
||||
descr: 'Slot {{ $eriRouterOpticalTransceiverCardSlot:0 }} / Port {{ $eriRouterOpticalTransceiverPort:0 }}'
|
||||
skip_values:
|
||||
-
|
||||
oid: eriRouterOpticalTransceiverParamType
|
||||
op: '!='
|
||||
value: 3
|
||||
current:
|
||||
data:
|
||||
-
|
||||
oid: eriRouterOpticalTransceiverParamTable
|
||||
value: eriRouterOpticalTransceiverCurrentValue
|
||||
high_limit: eriRouterOpticalTransceiverMaxAlarmValue
|
||||
warn_limit: eriRouterOpticalTransceiverMaxWarningValue
|
||||
low_limit: eriRouterOpticalTransceiverMinAlarmValue
|
||||
low_warn_limit: eriRouterOpticalTransceiverMinWarningValue
|
||||
snmp_flags: '-OQUsbe'
|
||||
num_oid: '.1.3.6.1.4.1.193.218.2.50.1.2.1.3.{{ $index }}'
|
||||
index: 'eriRouterOpticalTransceiverBiasCurrent.{{ $index }}'
|
||||
group: 'Optic Bias Current'
|
||||
divisor: 1000000
|
||||
descr: 'Slot {{ $eriRouterOpticalTransceiverCardSlot:0 }} / Port {{ $eriRouterOpticalTransceiverPort:0 }}'
|
||||
skip_values:
|
||||
-
|
||||
oid: eriRouterOpticalTransceiverParamType
|
||||
op: '!='
|
||||
value: 4
|
||||
dbm:
|
||||
data:
|
||||
-
|
||||
oid: eriRouterOpticalTransceiverParamTable
|
||||
value: eriRouterOpticalTransceiverCurrentValue
|
||||
high_limit: eriRouterOpticalTransceiverMaxAlarmValue
|
||||
warn_limit: eriRouterOpticalTransceiverMaxWarningValue
|
||||
low_limit: eriRouterOpticalTransceiverMinAlarmValue
|
||||
low_warn_limit: eriRouterOpticalTransceiverMinWarningValue
|
||||
snmp_flags: '-OQUsbe'
|
||||
num_oid: '.1.3.6.1.4.1.193.218.2.50.1.2.1.3.{{ $index }}'
|
||||
index: 'eriRouterOpticalTransceiverRxPower.{{ $index }}'
|
||||
group: 'Optic Rx Power'
|
||||
divisor: 1000
|
||||
descr: 'Slot {{ $eriRouterOpticalTransceiverCardSlot:0 }} / Port {{ $eriRouterOpticalTransceiverPort:0 }}'
|
||||
skip_values:
|
||||
-
|
||||
oid: eriRouterOpticalTransceiverParamType
|
||||
op: '!='
|
||||
value: 2
|
||||
voltage:
|
||||
data:
|
||||
-
|
||||
oid: eriRouterOpticalTransceiverParamTable
|
||||
value: eriRouterOpticalTransceiverCurrentValue
|
||||
high_limit: eriRouterOpticalTransceiverMaxAlarmValue
|
||||
warn_limit: eriRouterOpticalTransceiverMaxWarningValue
|
||||
low_limit: eriRouterOpticalTransceiverMinAlarmValue
|
||||
low_warn_limit: eriRouterOpticalTransceiverMinWarningValue
|
||||
snmp_flags: '-OQUsbe'
|
||||
num_oid: '.1.3.6.1.4.1.193.218.2.50.1.2.1.3.{{ $index }}'
|
||||
index: 'eriRouterOpticalTransceiverVcc.{{ $index }}'
|
||||
group: 'Optic Vcc'
|
||||
divisor: 1000
|
||||
descr: 'Slot {{ $eriRouterOpticalTransceiverCardSlot:0 }} / Port {{ $eriRouterOpticalTransceiverPort:0 }}'
|
||||
skip_values:
|
||||
-
|
||||
oid: eriRouterOpticalTransceiverParamType
|
||||
op: '!='
|
||||
value: 6
|
@@ -7,7 +7,7 @@ mib_dir: ericsson
|
||||
over:
|
||||
- { graph: device_bits, text: 'Device Traffic' }
|
||||
- { graph: device_processor, text: 'CPU Usage' }
|
||||
- { graph: device_mempool, text: 'Memory Usage' }
|
||||
- { graph: device_storage, text: 'Device Storage' }
|
||||
discovery:
|
||||
-
|
||||
sysObjectID:
|
||||
@@ -17,6 +17,9 @@ discovery:
|
||||
- .1.3.6.1.4.1.193.218.1.43 # { ericssonProducts 6x71 } -- Ericsson 6371 and 6471
|
||||
- .1.3.6.1.4.1.193.218.1.44 # { ericssonProducts 6273 } -- Ericsson 6273
|
||||
- .1.3.6.1.4.1.193.218.1.45 # { ericssonProducts 6671 } -- Ericsson 6671
|
||||
- .1.3.6.1.4.1.193.218.1.17 # SSR 8020
|
||||
- .1.3.6.1.4.1.193.218.1.18 # SSR 8010
|
||||
- .1.3.6.1.4.1.193.218.1.19 # SSR 8004
|
||||
sysDescr_regex:
|
||||
- '/^Ericsson\s+IPOS/'
|
||||
discovery_modules:
|
||||
|
25
includes/discovery/storage/ericsson-ipos.inc.php
Normal file
25
includes/discovery/storage/ericsson-ipos.inc.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (c) 2024 Rudy Broersma <tozz@kijkt.tv>
|
||||
*
|
||||
* 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. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*
|
||||
* eriRouterSRStorageSize is reported in KBytes
|
||||
*/
|
||||
|
||||
if ($device['os'] == 'ericsson-ipos') {
|
||||
$eri_filesystem = SnmpQuery::hideMib()->walk('ERICSSON-ROUTER-SYS-RESOURCES-MIB::eriRouterSRStorageTable')->table(1);
|
||||
|
||||
if (is_array($eri_filesystem)) {
|
||||
echo 'Ericsson IPOS Filesystem:';
|
||||
foreach ($eri_filesystem as $index => $eri_fs) {
|
||||
$used = round(($eri_fs['eriRouterSRStorageSize'] / 100) * $eri_fs['eriRouterSRStorageUtilization'], 0);
|
||||
discover_storage($valid_storage, $device, $index, 'eriRouterSRStorage', 'ericsson-ipos', $eri_fs['eriRouterSRStorageDescr'], $eri_fs['eriRouterSRStorageSize'], 1024, $used);
|
||||
}
|
||||
}
|
||||
unset($eri_fs);
|
||||
}
|
20
includes/polling/storage/ericsson-ipos.inc.php
Normal file
20
includes/polling/storage/ericsson-ipos.inc.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (c) 2024 Rudy Broersma <tozz@kijkt.tv>
|
||||
*
|
||||
* 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. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
if ($storage['storage_type'] === "eriRouterSRStorage") {
|
||||
$data_used = SnmpQuery::hideMib()->get('ERICSSON-ROUTER-SYS-RESOURCES-MIB::eriRouterSRStorageUtilization.'.$storage['storage_index'])->value();
|
||||
$data_size = SnmpQuery::hideMib()->get('ERICSSON-ROUTER-SYS-RESOURCES-MIB::eriRouterSRStorageSize.'.$storage['storage_index'])->value();
|
||||
|
||||
$storage['size'] = $data_size;
|
||||
$storage['used'] = round(($storage['storage_size'] / 100) * $data_used, 0);
|
||||
$storage['free'] = round($storage['storage_size'] - $used, 0);
|
||||
$storage['units'] = 1024;
|
||||
}
|
Reference in New Issue
Block a user