Can't get this JSON structure working #164
-
Hi guys, I'm having trouble with this JSON structure:
If I target only the time and value samples into the following two fields, its a great start: However, all the samples get combined together with no way to differenciate between the two different CPU cores. I'd love to use the Is what I'm after doable with this plugin? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
I'm not sure it's possible to achieve using JSON Paths only. Would it work if you created two separate Grafana queries and used filters to return a subset of the samples in each query? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Hi Marcus,
Just thought I'd loop back to say that I found a way utilising filtering and the ^ function in JSONPath Plus.
My fields now look like this:
Figured I'd filter using !=0 on timeSinceEpoch as it shouldn't go back to 0 :)
The table view shows the additional 'name' column which has a CPU-x for each sample array value:
Using the experimental Group by function and selecting the new name data groups them as expected:
and in turn, so does the graph:
Thanks again for this amazing plugin 👍