13 Nov 2025
05:54 PM
- last edited on
17 Nov 2025
11:45 AM
by
MaciejNeumann
Hi, I'm hoping I'm missing something simple here, when I run this query I'm using duration() to get a queue time duration, in table it outputs as seconds with the correct type of duration and I can display it as a line graph and the units display correctly. However if I add the commented out maketimeseries command it displays the units in the Y axis as B, where I'd be expecting seconds
fetch logs
| filter source_filename == "/var/log/job-log/job-runner.log"
| parse content, "JSON{STRING:job,ISO8601:time,INT:time_in_queue_seconds}:gl.content"
| fieldsAdd job = gl.content[job], queue_time = duration(gl.content[time_in_queue_seconds], unit:"s"), end_time = gl.content[time]
| filter matchesPhrase(msg, "Removed*")
| fields timestamp = end_time, project, queue_time, runner_type
// | maketimeseries avg(queue_time), interval: 1m
Does anyone know how to display this correctly?
Solved! Go to Solution.
13 Nov 2025 06:59 PM - edited 13 Nov 2025 07:03 PM
Try this
...
| fields timestamp = end_time, project, queue_time, runner_type, graph_queue_time=gl.content[time_in_queue_seconds]
| maketimeseries avg(graph_queue_time), interval: 1mAnd then, in the graph options, set the units and formats for that field.
Regards
14 Nov 2025 12:11 PM
Thanks, that was the answer, I guess I was thrown because B isn't a duration unit, but setting it to ns in the units did the trick.