Sort values in grafana

6,551 views
Skip to first unread message

Kelly Goedert

unread,
Feb 3, 2017, 6:54:04 AM2/3/17
to Prometheus Users
Hello,

when I execute this query 

sort_desc(sprint_hours{projeto_sprint_day=~"Project 3_.*"})

in prometheus expression browser, I get exactly the values I want. But, when I try the same expression in grafana, to plot the chart, the values are all out of order. What can I do to plot them correctly?

Thank you

Kelly

Julius Volz

unread,
Feb 3, 2017, 6:11:28 PM2/3/17
to Kelly Goedert, Prometheus Users
Hi,

sorting by value between series only makes sense at a single instant in time. Once you graph, some series might have a larger value at one point in the graph, but a lower value at another point. Also, whatever the sorting returned by Prometheus is, the position of a line in a graph is only dependent on the x/y values of its points (unless you stack, then it could affect the ordering of which line is stacked ontop of another).

Cheers,
Julius

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CALgae9YdX9t_hE79WkwgreNTkZ2sY6vW5ObzCDjNxQW24fp60g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages