I’m using Grafana version 10.1.6. I’m setting up metricbeat to monitor Elasticsearch/Logstash. In the logstash stats, I’m receiving an array of JSON objects (without any keys) for one of the nested fields. Since it is an array, I’m not directly able to graph it on a panel, and I have tried to parse it using transformations.
Is there any straightforward way to parse the array? The extract fields transformations using JSON format isn’t working, since I would need a way to index the array elements. I tried the JSON array into a string and then extracting the key-value pairs, but that does not seem to catch all the required fields.
I was able to simplify it a bit. I used the transformation “extract fields” on “field_1” using key-value format. Now I have 3 columns (0, 1, 2) with JSON objects. Is there a way I could do something like a union of the columns (with more rows basically)?
Its just that one field that I want to extract data from. I mean there are other (non-nested) fields that metricbeat is sending over which are being parsed normally by grafana (as in, I’m able to view the statistic by just apply a metric over the field).
Yep, that was the plan once I’ve gotten all the columns combined under one column. So right now I have 3 columns, each contain JSON objects with the same structure. If I’m able to combine these columns then I’d be able to extract the data and apply filters as required.
I figured out a solution, I parsed each column individually then used the add binary operation on the field that I wanted to aggregate it to one column. Probably not the most clean solution but it works. Thanks for your help @yosiasz !