Hey @murrant,
Thanks for your reply. It’s better, but I still have a problem.
Here’s my /opt/librenms/resources/definitions/os_discovery/comware.yaml
file:
mib: HH3C-LswDEVM-MIB:HH3C-ENTITY-EXT-MIB:HH3C-STACK-MIB
modules:
os:
sysDescr_regex: '/Version (?<version>[0-9.]+).*(Release|ESS) (?<features>[R0-9P]+).*[\n ](HPE |HPE FF |HP |H3C )(?<hardware>.*)[\r ][\n ]/'
sensors:
pre-cache:
data:
-
oid:
- entPhysicalName
state:
data:
-
oid: hh3cdevMFanStatusTable
value: hh3cDevMFanStatus
num_oid: '.1.3.6.1.4.1.25506.8.35.9.1.1.1.2.{{ $index }}'
descr: 'Fan {{ $index }}'
index: '{{ $index }}'
states:
- { value: 1, descr: active, graph: 1, generic: 0 }
- { value: 2, descr: deactive, graph: 1, generic: 2 }
- { value: 3, descr: not-install, graph: 1, generic: 3 }
- { value: 4, descr: unsupport, graph: 1, generic: 1 }
-
oid: hh3cdevMPowerStatusTable
value: hh3cDevMPowerStatus
num_oid: '.1.3.6.1.4.1.25506.8.35.9.1.2.1.2.{{ $index }}'
descr: 'Power Supply {{ $index }}'
index: '{{ $index }}'
states:
- { value: 1, descr: active, graph: 1, generic: 0 }
- { value: 2, descr: deactive, graph: 1, generic: 2 }
- { value: 3, descr: not-install, graph: 1, generic: 3 }
- { value: 4, descr: unsupport, graph: 1, generic: 1 }
power:
data:
-
oid: hh3cEntityExtPowerEntry
value: hh3cEntityExtCurrentPower
num_oid: '.1.3.6.1.4.1.25506.2.6.1.3.1.1.3.{{ $index }}'
descr: '{{ $entPhysicalName }} Power Usage'
index: 'hh3cEntityExtCurrentPower.{{ $index }}'
divisor: 1000
skip_values: 0
count:
data:
-
oid: hh3cStackMemberNum
num_oid: '.1.3.6.1.4.1.25506.2.91.1.2.0'
descr: 'Members'
index: '0'
Test with CMD ./discovery.php -h 4086 -m sensors
:
LibreNMS Discovery
swader1e1.u-pem.fr 4086 comware
#### Load disco module core ####
OS: HPE Comware (comware)
>> Runtime for discovery module 'core': 0.0870 seconds with 79960 bytes
>> SNMP: [1/0.07s] MySQL: [0/0.00s] RRD: [0/0.00s]
#### Unload disco module core ####
#### Load disco module sensors ####
Caching data: os sensors
ENTITY-SENSOR: Caching OIDs: entPhysicalDescr entPhysicalName entPhySensorType entPhySensorScale entPhySensorPrecision entPhySensorValue entPhySensorOperStatus
Airflow:
Ber:
Bitrate:
Charge:
Chromatic_dispersion:
Cooling:
Count: Members: Cur 3, Low: , Low Warn: , Warn: , High:
+
Current: Comware
Dbm: Comware
Delay:
Eer:
Fanspeed:
Frequency:
Humidity:
Load:
Loss:
Percent:
Power:
Power_consumed:
Power_factor:
Pressure:
Quality_factor:
Runtime:
Signal:
Snr:
State: .........
Temperature: Comware
Tv_signal:
Voltage: Comware
Waterflow:
>> Runtime for discovery module 'sensors': 11.5400 seconds with 990368 bytes
>> SNMP: [15/11.43s] MySQL: [16/0.18s] RRD: [0/0.00s]
#### Unload disco module sensors ####
Discovered in 19.745 seconds
SNMP [17/11.56s]: Snmpget[2/0.13s] Snmpwalk[15/11.43s]
SQL [19/0.21s]: Select[16/0.17s] Insert[2/0.03s] Update[1/0.01s]
RRD [0/0.00s]:
Seems good, but the graph is NOK:
Also, do you have an idea for rename from “Count” to another text ?
Thanks !