Gpon zte c300/c320

Hi,

How i can monitor temperature from my GPON ZTE C300 / C320?

OID: .1.3.6.1.4.1.3902.1015.2.1.3.2

Regards,
W.

Support needs to be added, please see this as an example : https://github.com/librenms/librenms/blob/master/includes/discovery/sensors/temperatures/ies.inc.php

<?php echo(" ZTE-AN-EQUIP-MIB "); // Chassis temperature $high_limit = 65; $high_warn_limit = 55; $low_warn_limit = 15; $low_limit = 5; $descr = "GPON ZTE Temperature"; $oid = ".1.3.6.1.4.1.3902.1015.2.1.3.2"; // extremeCurrentTemperature $value = snmp_get($device, $oid, '-Oqv', 'ZTE-AN-EQUIP-MIB'); if (is_numeric($value)) { discover_sensor($valid['sensor'], 'temperature', $device, $oid, 1, 'ztegpon-temp', $descr, '1', '1', $low_limit, $low_warn_limit, $high_warn_limit, $high_limit, $value); OK, what's now?

The code is at least missing a closing }

Have you tested it?

Hello, i’m have this device. (C320). What steps i need to add support of them? Have some linux/snmp/php skills, but not have MIBs.

I want to add OLT/ONU GPON ports with optical rx/tx and link-length information.
I found some oids to do that, but how to discover these “virtual” xPON interfaces in LibreNMS?

Got MIBs for these GPON devices, did’n test yet

Mib.7z

@111 Have a look at the documentation on adding device support :
https://docs.librenms.org/Support/Adding-a-Device/

I can’t figure out how to work with ONU GPON interfaces. They have a completely different ideology, not like IF-MIB. Standart IF-MIB covers only GPON OLT interfaces. But each OLT interface can contain up to 128 ONU interfaces (end user devices) that needs to be discovered and polled: Rx/Tx Dbm, Rx/Tx bytes, Optical cable length, ONU statuses and others

ZTE-AN-SMI::zte.1012.3.28.1.1.3.268501248.1 = STRING: “ONU-1:1”
ZTE-AN-SMI::zte.1012.3.28.1.1.3.268501248.2 = STRING: “ONU-1:2”
ZTE-AN-SMI::zte.1012.3.28.1.1.3.268501248.3 = STRING: “ONU-1:3”
ZTE-AN-SMI::zte.1012.3.28.1.1.3.268501248.4 = STRING: “ONU-1:4”
ZTE-AN-SMI::zte.1012.3.28.1.1.3.268501248.5 = STRING: “ONU-1:5”
ZTE-AN-SMI::zte.1012.3.28.1.1.3.268501248.6 = STRING: “ONU-1:6”
ZTE-AN-SMI::zte.1012.3.28.1.1.3.268501248.7 = STRING: “ONU-1:7”
ZTE-AN-SMI::zte.1012.3.28.1.1.3.268501248.8 = STRING: “ONU-1:8”
ZTE-AN-SMI::zte.1012.3.28.1.1.3.268501248.9 = STRING: “ONU-1:9”
ZTE-AN-SMI::zte.1012.3.28.1.1.3.268501504.1 = STRING: “ONU-2:1”
ZTE-AN-SMI::zte.1012.3.28.1.1.3.268501504.2 = STRING: “ONU-2:2”
ZTE-AN-SMI::zte.1012.3.28.1.1.3.268501504.3 = STRING: “ONU-2:3”
ZTE-AN-SMI::zte.1012.3.28.1.1.3.268501504.4 = STRING: “ONU-2:4”
ZTE-AN-SMI::zte.1012.3.28.1.1.3.268501504.5 = STRING: “ONU-2:5”
ZTE-AN-SMI::zte.1012.3.28.1.1.3.268501504.6 = STRING: “ONU-2:6”
ZTE-AN-SMI::zte.1012.3.28.1.1.3.268501504.7 = STRING: “ONU-2:7”
ZTE-AN-SMI::zte.1012.3.28.1.1.3.268501504.8 = STRING: “ONU-2:8”
ZTE-AN-SMI::zte.1012.3.28.1.1.3.268501504.9 = STRING: “ONU-2:9”

The values like 268501248 in OID tree are encoded ONU “address”
gpon-onu-1/2/3:4 - is RACK 1, SHELF 2, OLT PORT 3, ONU NUMBER 4

I know algorithm to encode this value

function encode_gponOnuIndex($shelf=“0”, $slot=“0”, $port=“0”, $onu_num=“0”) {
return( (1 << 30) + (($shelf -1 ) << 21 )+ (($slot - 1) << 20 )+ ( ($port - 1) << 16 )+ ( ($onu_num - 1 ) << 8 ));
}

I would do this type of discovery using LibreNMS “Components” which are a generic way of storing data and polling it. Standard Interface is tighlty linked to IF-MIB and would not be adapted for anything else.
Using Components, you could do a discovery phase (with a new module), a polling phase (again with a new module) and create new WebUI to display this data.

OSPF neighbors are an example of this “Component” usage.

Hi, do you found how to graphs traffic onu interface from OLT?

snmpget -v2c -c public 172.16.2.100 .1.3.6.1.4.1.3902.1015.1010.5.56.1.1.2.2416967936  
.1.3.6.1.4.1.3902.1015.1010.5.56.1.1.3.2416967936
iso.3.6.1.4.1.3902.1015.1010.5.56.1.1.2.2416967936 = Counter64: **2558111**
iso.3.6.1.4.1.3902.1015.1010.5.56.1.1.3.2416967936 = Counter64: **37090910**


172.16.2.100#show interface gpon-onu_1/1/1:1
ONU statistic:
   Input rate :                  0 Bps                0 pps
   Output rate:                155 Bps                1 pps
   Input bandwidth throughput :0.0%
   Output bandwidth throughput: N/A
Interface peak rate:
   Input peak rate :                104 Bps                0 pps
   Output peak rate:              27748 Bps               87 pps
Total statistic:
  Input:
    Bytes:**2558111**              Packets:4162
  Output:
    Bytes:**37092318**             Packets:537759

Hi, what software do you use to graph bandwith per ONU bro?

Hi bro, so, do you have what are the OID to Output rate and Input rate ?,

thanks!

Hi, i’m testing my code…
BTW, i’m added temperature, cpu, memory, ONU/OLT RX dbm

Next, i will try to discover ONU as Interface of OLT, with bandwith and errror counters
Then, i will ask help to push my code to librenms thru GIT

1 Like

Hi there.

Just a tip: If you want to add ONU data (sensors, interfaces, etc) I would make that optional creating a module.

Why? Think in a OLT with, lets say, 300 ONUs. That means you will have a device overview with 300+ sensors that will need to load. And now think in a OLT with 3k ONUs.

I dont own a ZTE but Huawei ones. In my case, polling ONU info would multiply no less than x10 my current sensor count in LibreNMS. And thats only with 1 sensor (ONU RX).

That would kill my current install totally :wink:

Hi Guys!, thanks for your comments!, so, I need only to graph bandwidth for ONU. could you give a example how I need to configure the template to do it please?, Right now I am using Cacti, but I need to improve discovery ONU, because I am configuring one by one ONU OID (Tx, Rx) :woozy_face:.

Thanks in advance!

Hey.

Checked for gpon-onu_1 / 1/1: 1 matches

snmpwalk -v 2c -c public 10.100.101.194 1.3.6.1.4.1.3902.1015.1010.5.56.1
iso.3.6.1.4.1.3902.1015.1010.5.56.1.1.1.2416967936 = Counter64: 0
iso.3.6.1.4.1.3902.1015.1010.5.56.1.1.2.2416967936 = Counter64: 2911646692
iso.3.6.1.4.1.3902.1015.1010.5.56.1.1.3.2416967936 = Counter64: 104337451192
iso.3.6.1.4.1.3902.1015.1010.5.56.1.1.4.2416967936 = Counter64: 23776097
iso.3.6.1.4.1.3902.1015.1010.5.56.1.1.5.2416967936 = Counter64: 76152543

#show interface gpon-onu_1/1/1:1
ONU statistic:
Input rate : 0 Bps 0 pps
Output rate: 0 Bps 0 pps
Input bandwidth throughput :0.0%
Output bandwidth throughput: N/A
Interface peak rate:
Input peak rate : 735007 Bps 1369 pps
Output peak rate: 4476011 Bps 3014 pps
Total statistic:
Input:
Bytes:2911646692 Packets:23776097
Output:
Bytes:104337451192 Packets:76152543

And how to understand how for the next gpon-onu_1 / 1/1: 2, etc.

Hello, sorry to post on an old thread, but can you tell me the OID to get the Power Levels of the ONUs?

Thank you

Hi, do you have this changes in a github tree?

are those based on the 1.2.5 MIB, of you somehow found the 2.1.0 MIB? :slight_smile: