Hello thanks for the reply. an example similar to mine is an examples on GitHub testdata links, the multiple_json_input example. under root.station object and #.etd.0.estimate.0.minutes. How can I convert it to get all minutes in each json file rather than first minute in each. I’ve tried #.etd.0.estimate.#.minutes and #.etd.#.estimate.#.minutes as object.field, object.fields, object.tag, and object.object but still no solution. thanks.
Both my editor and telegraf complains, that this is not valid json.
Maybe something went wrong during copy and paste?
Can you provide a full example of your data?
If it is too large for the forum, provide a download link or a github gist or similar.
Phew, this is a tough one.
I had no success either, so far.
The problem seems to be the arrays within the array.
They are ignored by the parser and i don’t know how to properly address them in the config
I agree that there is no example, that covers this use case.
Maybe someone form the developers can help? @jpowers
Since you mentioned getting these into line protocol, my first instinct with something like this is not to use Telegraf, but instead, to use my programming language of choice and the InfluxDB Client Libraries. The Telegraf JSON parsers are great for relatively simple data, but as soon as you get nested and complex data it becomes far too difficult to keep straight, let alone debug.
That would have been my next suggestion as well.
Before you waste many hours trying to configure the parser, I would have written the parser myself faster for such complicated data structures, either in an exec(d) or starlark plugin.