Huawei switch power supply monitor

Hello,
I’m almost sure that the power supply states and voltage of my Huawei switches were going back to librenms. But i just realized that is no longer the case.

Have you the same problem ?

What poller module need to be active for powersupply Counters and state?

Sincerely,
Olivier

Hello,
Anybody have this problem ?
Sincerely,
Olivier

module name is ‘Sensors’
is this happening only with huawei devices ?

Hello,
Thanks for your answer.
Ok for module name ‘Sensors’, it is however activated.
Yes only with Huawei. In “Inventory”, i can see Power Module but without states and sensors.

Below is sensors polling log for cisco switch . Poll your device from webui and capture the sensors part

Load poller module sensors

SQL[SELECT sensor_class FROM sensors WHERE device_id = ? GROUP BY sensor_class [1619] 1.04ms]

SQL[SELECT * FROM sensors WHERE sensor_class = ? AND device_id = ? [“count”,1619] 1.21ms]

SNMP[’/usr/bin/snmpget’ ‘-v2c’ ‘-c’ ‘COMMUNITY’ ‘-OUQntea’ ‘-M’ ‘/opt/librenms/mibs:/opt/librenms/mibs/cisco’ ‘-t’ ‘5’ ‘-r’ ‘10’ ‘udp:HOSTNAME:161’ ‘.1.3.6.1.4.1.9.9.402.1.4.1.0’]

...4*.0 = 19

Checking (snmp) count PoE Devices Connected…

Reporting disabled by user setting

19

SQL[SELECT * FROM sensors WHERE sensor_class = ? AND device_id = ? [“power”,1619] 1.97ms]

SNMP[’/usr/bin/snmpget’ ‘-v2c’ ‘-c’ ‘COMMUNITY’ ‘-OUQntea’ ‘-M’ ‘/opt/librenms/mibs:/opt/librenms/mibs/cisco’ ‘-t’ ‘5’ ‘-r’ ‘10’ ‘udp:HOSTNAME:161’ ‘.1.3.6.1.2.1.105.1.3.1.1.2.1’]

...*.1 = 780

Checking (snmp) power PoE Budget Total - ID 1…

780 W

SQL[SELECT * FROM sensors WHERE sensor_class = ? AND device_id = ? [“state”,1619] 1.74ms]

SNMP[’/usr/bin/snmpget’ ‘-v2c’ ‘-c’ ‘COMMUNITY’ ‘-OUQntea’ ‘-M’ ‘/opt/librenms/mibs:/opt/librenms/mibs/cisco’ ‘-t’ ‘5’ ‘-r’ ‘10’ ‘udp:HOSTNAME:161’ ‘.1.3.6.1.4.1.9.9.13.1.3.1.6.1010’ ‘.1.3.6.1.4.1.9.9.13.1.3.1.6.1011’ ‘.1.3.6.1.4.1.9.9.13.1.3.1.6.1012’ ‘.1.3.6.1.4.1.9.9.13.1.4.1.3.1015’ ‘.1.3.6.1.4.1.9.9.13.1.4.1.3.1016’ ‘.1.3.6.1.4.1.9.9.13.1.4.1.3.1017’ ‘.1.3.6.1.4.1.9.9.13.1.5.1.3.1013’ ‘.1.3.6.1.4.1.9.9.13.1.5.1.3.1014’ ‘.1.3.6.1.4.1.9.9.117.1.1.2.1.2.1013’ ‘.1.3.6.1.4.1.9.9.117.1.1.2.1.2.1014’]

....6.1010 = 1
.
...6.1011 = 1
....6.1012 = 1
.
...3.1015 = 1
....3.1016 = 1
.
...3.1017 = 1
....3.1013 = 1
.
...3.1014 = 1
....1.2.1013 = 2
.
...1.2.1014 = 2

SNMP[’/usr/bin/snmpget’ ‘-v2c’ ‘-c’ ‘COMMUNITY’ ‘-OUQntea’ ‘-M’ ‘/opt/librenms/mibs:/opt/librenms/mibs/cisco’ ‘-t’ ‘5’ ‘-r’ ‘10’ ‘udp:HOSTNAME:161’ ‘.1.3.6.1.4.1.9.9.176.1.1.2.0’ ‘.1.3.6.1.4.1.9.9.176.1.1.4.0’ ‘.1.3.6.1.4.1.9.9.176.1.2.14.0’]

....0 = 14
.
...0 = 2
...*.0 = 8

Checking (snmp) state Switch 1 - Temp Sensor 0, GREEN…

Checking (snmp) state Switch 1 - Temp Sensor 1, GREEN…
Checking (snmp) state Switch 1 - Temp Sensor 2, GREEN…

Checking (snmp) state Switch 1 - FAN 1, Normal…

Checking (snmp) state Switch 1 - FAN 2, Normal…
Checking (snmp) state Switch 1 - FAN 3, Normal…

Checking (snmp) state Switch 1 - Power Supply A, Normal…
Checking (snmp) state Switch 1 - Power Supply B, Normal…
Checking (snmp) state Switch 1 - Power Supply A…

Checking (snmp) state Switch 1 - Power Supply B…
Checking (snmp) state VSS Device State…

Checking (snmp) state VSS Peer State…
Checking (snmp) state VSS Mode…

1 #
1 #
1 #
1 #
1 #
1 #
1 #
1 #
2 #
2 #
14 #
2 #
8 #

SQL[SELECT * FROM sensors WHERE sensor_class = ? AND device_id = ? [“temperature”,1619] 2.23ms]

SNMP[’/usr/bin/snmpget’ ‘-v2c’ ‘-c’ ‘COMMUNITY’ ‘-OUQntea’ ‘-M’ ‘/opt/librenms/mibs:/opt/librenms/mibs/cisco’ ‘-t’ ‘5’ ‘-r’ ‘10’ ‘udp:HOSTNAME:161’ ‘.1.3.6.1.4.1.9.9.91.1.1.1.1.4.1010’ ‘.1.3.6.1.4.1.9.9.91.1.1.1.1.4.1011’ ‘.1.3.6.1.4.1.9.9.91.1.1.1.1.4.1012’ ‘.1.3.6.1.4.1.9.9.13.1.3.1.3.1010’ ‘.1.3.6.1.4.1.9.9.13.1.3.1.3.1011’ ‘.1.3.6.1.4.1.9.9.13.1.3.1.3.1012’]

....1.4.1010 = 30
.
...1.4.1011 = 36
....1.4.1012 = 41
.
...3.1010 = 30
....3.1011 = 36
.
...3.1012 = 41

Checking (snmp) temperature Switch 1 - Temp 0…

Checking (snmp) temperature Switch 1 - Temp 1…
Checking (snmp) temperature Switch 1 - Temp 2…

Checking (snmp) temperature Switch 1 - Temp Sensor 0, GREEN…
Checking (snmp) temperature Switch 1 - Temp Sensor 1, GREEN…
Checking (snmp) temperature Switch 1 - Temp Sensor 2, GREEN…

30 C

36 C
41 C
30 C
36 C

41 C

Runtime for poller module ‘sensors’: 0.9475 seconds with 3368 bytes

SNMP: [5/0.89s] MySQL: [5/0.08s]

Unload poller module sensors

Hi,

Here the result. I can see more informations but never for Power Supply state and voltage.

https://p.libren.ms/view/a1205b74

Below Query is missing

SQL[SELECT * FROM sensors WHERE sensor_class = ? AND device_id = ? [“state”,178]

Can you check sensors enabled at OS level/device level ?

I think it’s enable. Right ?


Hmm Yes enabled

check DB entries for this sensor and device id

select sensor_descr,sensor_oid from sensors where sensor_class=“state” and device_id=178;

MariaDB [librenms]> select sensor_descr,sensor_oid from sensors where sensor_class=“state” and device_id=178;
Empty set (0.003 sec)

So , never fetched these details for this device
if you know the OID for powerstate of Huawei switch, can try below query to see if switch is responding

snmpwalk -v 2c -c snmpstring device ip or hostname oid

example - snmpwalk -v 2c -c public 10.0.0.1 .1.3.6.1.4.1.9.9.13.1.5.1.3

I have search with “SnmpB” Software and i found PwrStatusTable in MIB :

Name: hwPwrStatusTable
Oid: 1.3.6.1.4.1.2011.5.25.31.1.1.18
Composed Type:
Base Type:
Status: current
Access: not-accessible
Kind: Table
SMI Type: OBJECT-TYPE
Module: HUAWEI-ENTITY-EXTENT-MIB
Description: This table lists the status of powers. You can read the status of the powers on the device.

-----SNMP query started-----

1: hwEntityPwrSlot.0.5 0
2: hwEntityPwrSlot.0.6 0
3: hwEntityPwrSn.0.5 5
4: hwEntityPwrSn.0.6 6
5: hwEntityPwrState.0.5 supply(1)
6: hwEntityPwrState.0.6 supply(1)

Can try snmpwalk for this OID manually, and see if switch is responding to query.

if it is responding, then no issue with switch. need to look in to why Libnms is not polling
if switch not responding to this OID, then need to look at the switch

Hello,

It is responding :

Ok. Please capture poller, snmp logs from Webui and see if there was any attempt for this OID
we also wait if any one else had this issue with Huawei,
i do not have huawei switch to test

In found OID in SNMP capture only :

.1.3.6.1.4.1.2011.5.25.31.1.1.18.1.1.0.5 = INTEGER: 0
.1.3.6.1.4.1.2011.5.25.31.1.1.18.1.1.0.6 = INTEGER: 0
.1.3.6.1.4.1.2011.5.25.31.1.1.18.1.2.0.5 = INTEGER: 5
.1.3.6.1.4.1.2011.5.25.31.1.1.18.1.2.0.6 = INTEGER: 6
.1.3.6.1.4.1.2011.5.25.31.1.1.18.1.6.0.5 = INTEGER: 1
.1.3.6.1.4.1.2011.5.25.31.1.1.18.1.6.0.6 = INTEGER: 1

Hmm, not sure where else to look, sensors enabled, switch is responding to OID. but in poller log, no entry for sensor

not a solution but a workaround , can try adding custom OID in device edit page in webui

It doesn’t work :confused:
i’ll try to modify vrp.yaml file for add PowerState information… i don’t know how make this but i will try :slight_smile:
Thanks for your help.

:+1:, Post your findings/ solution. if it works.
if its a bug, our community contributors may look into it

Hello,
Anybody can help me please for modify YAML and/or php file ? :slight_smile:
I tried to look this doc “Health Information - LibreNMS Docs” but i don’t understand where my new sensor it is supposed to appear in Webui ? Maybe there is something else to do?