Unable to add Huawei VRP switches


I’m having issues adding Huawei VRP switchblades to LibreNMS. addhost.php reports that it does not get a SNMP response but a snmpwalk using the same credentials works. Looked into the code and isSNMPable in includes/functions.php seems to lookup sysObjectID.0 and Huawei returns an empty response to this lookup. Changed sysObjectID.0 to sysDescr.0 and that seems to work.

I don’t like making changes to built-in files like this so I was wondering what the correct solution is. includes/definitions/vrp.yaml already mentions sysDescr instead of sysObjectID, shouldn’t isSNMPable check this YAML file?

# sudo -u librenms ./validate.php 
Component | Version
--------- | -------
LibreNMS  | 1.45-8-g7a422e9
DB Schema | 270
PHP       | 7.2.11
MySQL     | 5.5.60-MariaDB
RRDTool   | 1.4.8
SNMP      | NET-SNMP 5.7.2

[OK]    Composer Version: 1.7.2
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct
[WARN]  Your local git contains modified files, this could prevent automatic updates.
        You can fix this with ./scripts/github-remove
        Modified Files:

# includes/functions.php (Original line commented out)
function isSNMPable($device)
    global $config;

    $pos = snmp_check($device);
    if ($pos === true) {
        return true;
    } else {
        #$pos = snmp_get($device, "sysObjectID.0", "-Oqv", "SNMPv2-MIB");
        $pos = snmp_get($device, "sysDescr.0", "-Oqv", "SNMPv2-MIB");
        if ($pos === '' || $pos === false) {
            return false;
        } else {
            return true;

# includes/definitions/vrp.yaml 
os: vrp
group: vrp
text: 'Huawei VRP'
type: network
icon: huawei
    - { graph: device_bits, text: 'Device Traffic' }
    - { graph: device_processor, text: 'Processor Usage' }
    - { graph: device_mempool, text: 'Memory Usage' }
    - huawei
    - sysDescr:
        - VRP (R) Software
        - VRP Software Version
        - Software Version VRP
        - Versatile Routing Platform Software

The reason sysObjectID is used is that it is required to be implemented. You should file a bug with the vendor.

Changing this to something else would probably break other buggy devices.

Yeah, that’s what I thought after looking it up. Filing a bug isn’t really feasible for these devices right now so I’ll guess I’ll just go ahead with the edited isSNMPable


What devices are you using ? Do you have the last version of firmware running on them ?


E9000 chassis with cx911 blade and no, not the latest firmware. I’m guessing updating fixes the problem but nobody here has any knowledge about these boxes so kinda risky. Huawei has been a bad trip for us and we’re planning to get rid of them next year.

My company tried these E9000 but did not get them so I have no experience on them. If there is a patch to apply, (the kind of patch that does not require a reload) I would go for them (saved me a couple of time on the switches).

If not, I would simply open a case with them. They usually answer pretty fast. At least, you’ll know if there is a solution already or not.


Thanks for the help.

Working with many Huawei devices (around 2000, mainly AR2220) without any issue, maybe your device (OID) isn’t implemented yet?