I’m trying to parse an array with several measurements but I’m unable to solve it. I tried to find a solution but it seems that json_v2 is unable to do what I want. I’m here to ask if I oversaw a feature or if I have to find a completely different solution to fetch my data.
The problem is that that in the rxInfo array only the second values are used. Solutions I found through googling was that the array might need to be flattened first. But I can’t change the format of this. If I write my own application to receive the values I don’t need Telegraf anymore I can directly push to the database.
This is most likely because you have no tags that differentiate the first and second array items. Internally your current config should create metrics like:
I would have expected that it would create something like 0_rssi and 1_rssi. I’m not sure if tags are a good solution.
Anyway I would need a tag like rxInfo with the value 0 and 1. So the iterator should become the value. I also don’t know how many items are in the array. It depends on how many gateways received the message. I can’t find info on how I can use the array iterator in any way in the documentation.
That is my main issue. The documentation just does not apply to the usecase here. Arrays are apparently not thought about.
Hi,
thanks for your suggestion. Really appreciated.
I tied to put the iterator of the array into a tag, but I can’t find any info on how to do that. As you suggested that, do you know the approach to do so?