Hi Luke,
In principle it is possible to take any value that you see anywhere in a show command and put it in an OID. This can be done by using the Utility MIB and an event script that runs periodically to read the value and put it in the OID.
Please see https://www.juniper.net/documentation/en_US/release-independent/nce/topics/reference/general/chassis-cluster-utility-mib.html
The sample script there is SLAX, but nowadays we can use Python as well, which you may prefer.
To quickly test the Utility MIB feature itself, you can do like this:
root> request snmp utility-mib set instance testing1 object-type integer object-value 10
Utility mib result: successfully populated utility mib database
root> request snmp utility-mib set instance testing2 object-type integer object-value 20
Utility mib result: successfully populated utility mib database
root> show snmp mib walk jnxUtilData ascii
jnxUtilIntegerValue."testing1" = 10 <<<<<< yes, it works!
jnxUtilIntegerValue."testing2" = 20 <<<<<< yes, it works!
Regards,
Casper
------------------------------
Casper Rijnders
------------------------------
Original Message:
Sent: 06-06-2023 13:24
From: LUKE BURROWS
Subject: SRX320 VDSL Card - OID Issue
Hello there,
I am trying to use SNMP to pull out the upload and download speed of some Juniper SRX 320 routers running Junos 21.3R1.9 .
This is what I am trying to use SNMP to gether for a monitoring solution.
> show interfaces extensive pt-1/0/0 | match bit
Bit rate (kbps) : 79999 0 20000 0
The ifIndex of this inferface is 539 and when I run mib walk filtering out for anything to do with 539 I get thise information
>show snmp mib walk 1 | match 539
ifIndex.539 = 539
ifDescr.539 = pt-1/0/0
ifType.539 = 97
ifMtu.539 = 1492
ifSpeed.539 = 20000000
ifPhysAddress.539 = 74 e7 98 84 92 2d
ifAdminStatus.539 = 1
ifOperStatus.539 = 1
ifLastChange.539 = 17347
ifInOctets.539 = 29758270
ifInUcastPkts.539 = 495971
ifInNUcastPkts.539 = 0
ifInDiscards.539 = 0
ifInErrors.539 = 1
ifInUnknownProtos.539 = 0
ifOutOctets.539 = 3070064
ifOutUcastPkts.539 = 85974
ifOutNUcastPkts.539 = 0
ifOutDiscards.539 = 0
ifOutErrors.539 = 0
ifOutQLen.539 = 0
ifSpecific.539 = 0.0
+900 other lines
Now I have managed to find the OID for the value of 20000 which is the upload speed. "ifSpeed.539 = 20000000" (1.3.6.1.2.1.2.2.1.5.539) and I have succesfully pulled that into our monitoring solution and we can monitor the upload speed.
What I am having trouble with is the other value "79999" that is the Download speed and I can not find any OID or MIB referencing that number on pt-1/0/0 and its something we really want to be able to use with out monitoring solution.
Does anyone know how I can use SNMP to pull that data because a MIB / OID seems to just not exist for that value.
------------------------------
LUKE BURROWS
------------------------------