Adding a custom MIBs to my Huawei device

Tags: #<Tag:0x00007fec7b2e7290>

Speaking about poor SNMP implementations, don’t hesitate to open cases to Huawei support. With proper documentation, you can obtain patches correcting some wrong SNMP behaviours (like SNMP replies not following the MIB files, etc etc).
I did it successfully twice so far.

So can you give this patches to community ?

They are released by huawei on their download pages.

The point here is : don’t hesitate to ask them if something is not following the mibs or if a faulty / buggy behaviour is discovered.

Show them (with a simple snmpwalk) that their device is not behaving correctly, and that should be enough to get a patch developped.

Hi all,

I have a Huawei MA5600T OLT already in LibreNMS. I appreciate if anyone can help our guide me on how to implement in LibreNMS a discovery for the ONTs and get traffic (in/out) like a normal port in a network device.


As a first step, I would suggest that you play with snmpwalk and understand the logik. Once you have it, think about the way to parse it and get the data you want.
Then, come back here to see how to implement it :slight_smile:

@PipoCanaja Will be possible to add new table or something where we can store information about traffic of gpon ports, i know which one oids are for statistics, i can get custom graph of that ports, but when i am using 6 ports of one gpon card than i need to make 6 custom graphs for that and this is only possible with manally adding them etc.

here is the oid for simple received and send traffic of OLT gpon ports. There is of course get mcast, unicast information etc.

and here is a custom graph for that

So, question is how to implement it to the os, and get that information automatically

Hi @jozefrebjak
You already have the “components” mecanism. You could create a new discovery module that would create the necessary components. And a new page to display the resulting data in the device. Like OSPF discovery does, if I remember well (there is no OSPF table).


Dont you have the OLT GPON Ports graphs?

I do have them in my Ports list of our Huawei’s OLTs.

In my case, they are disabled as they return 32bits counters instead of 64 so it get overruned in less than 5 min. Which translates into incorrect info and gaps.

If your GPON ports have less than 100MBit/s of bw you should not have any issue.

So, how to enable it ? I am getting information only from electrical ports,

I think I remember.

Try this in your config.php
$config['os']['smartax']['bad_ifXEntry'][] = '';

Hi @PipoCanaja,

I can figure out this already. I implemented in zabbix a template with an external script to make discovery for a ONT Service Port, and create all items that I want to monitor. But I want this on LibreNMS, the problem is that I don’t know the places in structure to code or include custom code.

In LibreNMS, based on smartax OS, we get the Ethernet and GPON ports and also traffic for each one.
I need to include something in discovery to get the Service Ports (SPID) and ONT ID belongs to each GPON port (SPID).
Question 1 - How can I develop this discovery on LibreNMS per GPON Port?

After I can get all service ports I can add OID’s for diferente types of information.
Question 2 - I need to know where i can add this? On poller?

I have all OID and know to parse to get values from the SPID.
For example, to monitor the traffic on ONT with SPID:

.{#SPID} - ifHCOutOctets
.{#SPID} - ifHCInOctets
… etc…

I really appreciate some one can help me to code this on LibreNMS:

  • add discovery for Service Ports per GPON port;
  • what kind of structure to use to save this information on DB;
  • Extend the smartax poller to get the values for ONT;


Hi @rcampoz
Basically, if the port is available into standard ifMib, then better to keep it with all other interfaces.
If the port is not into standard ifMib, then the ‘Components’ are the way to go.
During discovery, you can create the components and during polling the data is collected.
Last step is to create the proper page to display it.

You can have a look in the Cisco OTV code




That will give you examples.

Be sure what you want to do.

If you have a large number of ONTs, lets say 3k, that will be like polling 3k devices but in a single one.

You are right, but I believe that monitor GPON ports traffic on OLT will be not a problem, I can monitor what I need with a custom graphs, but it’s a manual job and its not suitable for everyone, because we are using one frame with one card, or two, somebody can use all possible slots etc with a different number of ports

The reply was not for you.

Did you tried what I told you about $config['os']['smartax']['bad_ifXEntry'][] = ''; ?

Hi @TheGreatDoc,

I understand your point and agree. For this it must be possible to enable or disable polling for Service Ports or ONTs. I have normal and corporate clients in OLT, and the point is to monitor the corporate clients, so just that Service Ports will be polled.

It should be possible.

What you are looking for is a custom poller module (lets call it ONT Ports) where you walk and store ONTs GPON/ID.

Then, a new html page should be also created to show all this info in GUI.

By default, all polling should be disabled and then manually enabled via GUI like the per port polling.

CON: If you have thousands ONTs, will be really hard to identify to which customer belongs each one.

@TheGreatDoc No it’s doesn’t work for me, nothing changed.

Hello, thanks to this post I have managed to get more information from my OLT, but I have no traffic information in the gpon ports. It happens to me like you.
In other systems (cacti) I have no problems.
Have you found a solution?

Thank you!