I’m having some trouble getting a Dashboard to display my data.
I’m trying to create an XY Chart to plot a bunch of lines.
The data will be one line per Id , the x-axis will be the log timestamp, and the y-axis a numeric value from the log.
So far I have a query which will fetch the data using {container="someContainer"} | json | keep timestamp, id, value.
The XY Chart currently just shows Err.
I’ve been trying to apply data transforms - currently using Extract fields followed by Group by (which is configured as Id: Group by, timestamp: Calculate (All Values) and value: Calculate (All Values)) - with no luck.
The visualization axis settings don’t pick up any of the 3 labels so I can’t manually select them.
What would really help is the chart’s specifying, somewhere, the exact format they expect data.
There are really nice debugging tools which allow us to see the format of the data produced by queries but it’s still a guessing game as to what format charts expect (sorry if this information already exists somewhere, I’ve been struggling to find it)
I understand, and you make a fair point.
However, sorry I kind of diverted the conversation away from my primary question: how can I select those fields in the XY Chart axis selection? I’m assuming I’m missing a data transform of some kind? Or perhaps it’s something else?
Can you click the upper right question mark and let me know what it says under help? For Grafana Cloud, I’d expect something like “Grafana Cloud (fast)” or “Grafana Cloud (steady)”
What you’re gonna want to do is flip on the table view for your data after you extract fields to parse out what you need. Anything with a cursive “A” At the front is a string and will need to be converted to a number or time field to work for XY. In my case, the time field is already parsed because Grafana just does it, but if I want my status field to be part of the chart, I need to make it a number.
If you cant get this working, if you can send me an example of a log line (redact anything sensitive) I can try to build a regex to help you get stuff out of it
Okay sounds good - but yeah basically TLDR any data in that table view will need the little square symbol before the field name to work for XY, except for the time field which has a lil clock
One last question: does XY Chart support groups of data?
I’ve got a load of log lines which are grouped by an Id field (using the Group By transformation), meaning the value is an array of numbers and I want to display one line, on the chart, per group.
Is this supported? Or is it a feature request?