I am trying to store dbm measures in ONTs from a GPON OLT device through a private mib. It happens that I am not iterrogating OLT interfaces, since the ONTs are not strictly interfaces, but remote devices that OLT queries for the value through an specific object like these:
Issue #1 is I would like to store separated dbm readings for each ONT but gouped by GPON interface. Each GPON interface index is, for example, 269550080.1 and 269550080.2, while the ONT index per interface is 269550080.1 and 269550080.2
So I would like to store the GPON interface index in a field and ONT number in a different field together with the value.
How I could do this?
Issue #2 The value is (32)INT. According to the MIB description:
This attribute reports the current measurement of total
optical signal level at 1490 nm. Its value is a 2s complement
integer referred to 1 mW (ie dBm), with 0.002 dB granularity.(2 byte)
I know the dBm in the unit providing 11088 as value is around -7.815dBm (I can not be precise because it fluctuates a bit between readings).
I also know that -7.815dBm is equivalent to 0.1654 mW. So how could I calculate 11088 into 0.1654 then into -7.85
mW into dBm formula is P(dBm) = 10 ⋅ log10( P(mW) / 1mW)
Remove every field from the results except index, agent_host and dbm
From index=269550336.54.1 I need to
2.1) Remove the trailing .1
2.2) Store 269550336 in a field called interface
2.2.2) Translate 269550336 into a readable interface name (for example from a txt containing the translation)
2.3) Store 54 in a field called onu_number
Translate dbm value 11113 into dbm according previous explanation. I think this task has more to be with the representation than with the storing. So is grafana enough open to implement that calculation like a transformation in the query definiton? Like you do in interface speeds with mean() and derivative(1s).
Anyone could help achieving all or part of the above?
To exclude the other fields what you need to do is add field subtables with the OIDs you are interested in, and remove the oid from the table. You can move the interface to a field by adding it to one of the field subtables as well
name = "onu"
name = "interface"
oid = "188.8.131.52.4.1.3902.1012.3.50.12.1"
oid = "<oid for dbn>"
You won’t be able to do the translations in Telegraf currently, nor in Grafana AFAIK. It should be possible to do this with Kapacitor though.