Extracting not-accessible field in SNMP within Telegraf


I am trying to SNMP poll a Juniper device using JUNIPER-COS-MIB::jnxCosQstatTable OID and export that to InfluxDB. The link to this MIB is:


The problem I have, is that when data is returned for 100s of interfaces, there is no unique ID to distnisush the data between the interfaces. This results in just one row being inserted into the database (they overwrite each other).

I’d like to use ‘jnxCosQstatIfIndex’ as ‘interface_index’, and ‘jnxCosQstatQueueNr’ as ‘interface_queue’, to make them unique, however, they are both ‘not-accessible’ according to the SNMP MIB documentation.

Example data from my snmpwalk.

  • 1076 is the jnxCosQstatIfIndex
  • values 0 - 7 is the jnxCosQstatQueueNr
JUNIPER-COS-MIB::jnxCosQstatQedPkts.1076.0 = Counter64: 1302
JUNIPER-COS-MIB::jnxCosQstatQedPkts.1076.1 = Counter64: 0
JUNIPER-COS-MIB::jnxCosQstatQedPkts.1076.2 = Counter64: 0
JUNIPER-COS-MIB::jnxCosQstatQedPkts.1076.3 = Counter64: 5509539
JUNIPER-COS-MIB::jnxCosQstatQedPkts.1076.4 = Counter64: 14619
JUNIPER-COS-MIB::jnxCosQstatQedPkts.1076.5 = Counter64: 0
JUNIPER-COS-MIB::jnxCosQstatQedPkts.1076.6 = Counter64: 0
JUNIPER-COS-MIB::jnxCosQstatQedPkts.1076.7 = Counter64: 0
JUNIPER-COS-MIB::jnxCosQstatQedPktRate.1076.0 = Counter64: 0
JUNIPER-COS-MIB::jnxCosQstatQedPktRate.1076.1 = Counter64: 0
JUNIPER-COS-MIB::jnxCosQstatQedPktRate.1076.2 = Counter64: 0
JUNIPER-COS-MIB::jnxCosQstatQedPktRate.1076.3 = Counter64: 14
JUNIPER-COS-MIB::jnxCosQstatQedPktRate.1076.4 = Counter64: 0
JUNIPER-COS-MIB::jnxCosQstatQedPktRate.1076.5 = Counter64: 0
JUNIPER-COS-MIB::jnxCosQstatQedPktRate.1076.6 = Counter64: 0
JUNIPER-COS-MIB::jnxCosQstatQedPktRate.1076.7 = Counter64: 0

My question is, how can I insert those two values for each row? I can’t seem to work it out. My telegraf config is very simple:

    name = "jnxCosQstatTable"
    oid = "JUNIPER-COS-MIB::jnxCosQstatTable"