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.