Question

Cant get a single value on centreon_plugins on huawei switch 6730

  • 13 November 2023
  • 8 replies
  • 142 views

Userlevel 1
Badge +5

Hello 

I’m using centreon_plugin.pl to monitor huawei switch.

/usr/lib/nagios/plugins/centreon-plugins/src/centreon_plugins.pl --hostname XXX.XXX.XXX.XXX --snmp-username XXXXXXX --snmp-timeout 30 --snmp-version 3 --plugin  network::huawei::snmp::plugin --mode hardware

or 

/usr/lib/nagios/plugins/centreon-plugins/src/centreon_plugins.pl --hostname XXX.XXX.XXX.XXX --snmp-username XXXXXXXX --snmp-timeout 30 --snmp-version 3 --plugin  network::huawei::snmp::plugin --mode cpu --warning-usage=20 --critical-usage=30

 

But I can’t get value.

Is any one have MIBS for this switch and a way to change them ?

 

Best regards


8 replies

Userlevel 5
Badge +14

hello

you are using snmpv3

you need to pass the v3 custom macro to authenticate, or fall back to snmp v2 which is easier to use

 

I put that in the Host SNMP EXTRA OPTION macro for V3 on huawei switch

--snmp-username='xxxx' --authprotocol=SHA --privprotocol=AES --authpassphrase='yyyy' --privpassphrase='zzzzz' --snmp-autoreduce

depending on the model of switch, campus, datacenter, you may have different constraint, but mostly you need 2 different password for auth and priv and the 2 protocol options.

 

(beware that multiple attempts will lock the snmp account on the switch… you need to know how to reset the lock on your switch, there are options to lower the number of retry in centreon, but to debug the snmp v3, you should do that in command line and a shell access on your switch)

 

 

Userlevel 1
Badge +5

Hello 

 

I made test using --snmp-username='xxxx' --authprotocol=SHA --privprotocol=AES --authpassphrase='yyyy' --privpassphrase='zzzzz' --snmp-autoreduce

 

The result are good with -mode interfaces, list-interface or uptime.

But I have the problem with -mode hardware, cpu or mem

 

cpu : UNKNOWN: SNMP Table Request: Cant get a single value

hardware : OK: All 0 components are ok []

Best regards

Userlevel 5
Badge +14

hello

I’m still using an plugin for huawei I didn’t upgrade in the last months, my centreon huawei template only have cpu, memory, uptime and interface, but no hardware check

the cpu is working fine an all model I monitor (57, 58, 67, 68) 

 

the documentation is not talking about “hardware” check : Huawei | Centreon Documentation

the plugin description neither :

 

did you use the template or duplicate a host with another hardware model 

the default net-huawei-SNMP-custom should look like this

 uptime and interface are “standard” snmp on almost every thing, cpu, memory and hardware can be different with some vendor.

Userlevel 5
Badge +14

oh, I did a --list-mode in command line and there is a hardware mode

so I can confirm that on a Cloud Engine (CE68xxx) and on Campus (S57xxx) the hardware and cpu check are working fine (i’m not sure if we have campus S67 switch somewhere)

I don’t know why the template is not existing in the plugin pack, but it’s definitely here in the command (even my old one)

 

If I remember correctly however, configuring a snmp view in v3 and grant access to some system information

(extract from a huawei doc, this is an example where the user can modify the switch, but i

# Configure the MIB view.

[Switch] snmp-agent mib-view included isoview iso

# Configure the user group.

[Switch] snmp-agent group v3 admin privacy read-view isoview write-view isoview notify-view isoview acl 2001 

# Configure the user.

[Switch] snmp-agent usm-user v3 nms2-admin group admin

)

I don’t really know what was done on our switch, it was a long time ago, I’ll ask my network team what they have in their doc when they deploy huawei

 

you can read this starting from this page : Default Settings for SNMP - S300, S500, S2700, S5700, and S6700 V200R023C00 Configuration Guide - Network Management and Monitoring - Huawei

it may not match your OS version but there are example and concept for various snmp versions

 

Userlevel 1
Badge +5

Hello

I have no change, no improvement.

Best regards

Userlevel 4
Badge +12

Hi @S.lhotellier,

If you are getting this message:

UNKNOWN: SNMP Table Request: Cant get a single value

It means that the communication over SNMP protocol works fine, but that the OIDs that the plugin tried to obtain are not supported by this device.

In other words, you configured both your equipment and your host well but your Huawei switch is not yet supported.

 

Please gather all useful information in The Watch Ideas with as much detail as possible and we will pick the most voted topics to add them to our product roadmap.

To develop a plugin/mode, we need the following information:

  • MIB files
  • Full snmpwalk of the enterprise branch (snmpwalk -ObentU -v 2c -c public address .1.3.6.1.4.1 > equipment.snmpwalk)
  • If you have worked on it, SNMP collections.
     

If some information is confidential, such as logins or IP addresses, obfuscate them in what is sent publicly and we'll get in touch with you by private message if this information is needed.

Userlevel 1
Badge +5

Hello I have open the watch idea : 

 

please vote on it

 

Best regards

Userlevel 4
Badge +12

Thanks!

Reply