You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prometheus Users
I have a metric that I'd like to sort by numbers.
Currently it is sorted like this: 0, 1, 11, 12, 13... 2, 20,21... etc.
I'd like it to go like this:
0, 1, 2, 3, 3...10, 11, 12... etc.
Is that possible?
Thanks
Stuart Clark
unread,
Nov 30, 2020, 7:27:25 AM11/30/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Tom005, Prometheus Users
How do you mean you have a metric sorted like that?
Do you mean that you have a metric with the given values for a
particular time period?
Or are you referring to the value of one of the metric's labels?
Tom005
unread,
Nov 30, 2020, 8:06:58 AM11/30/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prometheus Users
Sorry, yeah I actually meant the metric labels, I'd like to sort from the metric label in that order.
Stuart Clark
unread,
Nov 30, 2020, 8:29:59 AM11/30/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Tom005, Prometheus Users
On 30/11/2020 13:06, Tom005 wrote:
> Sorry, yeah I actually meant the metric labels, I'd like to sort from
> the metric label in that order.
>
How data is displayed is up to whatever system is doing the API query.
For example Grafana has various sort options.
Tom005
unread,
Nov 30, 2020, 8:31:54 AM11/30/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prometheus Users
Right, I am using grafana to display. Is there a way to do that do you know?
Appreciate that it might be going slightly off topic away from Prometheus.
Stuart Clark
unread,
Nov 30, 2020, 8:38:12 AM11/30/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Tom005, Prometheus Users
On 30/11/2020 13:31, Tom005 wrote:
> Right, I am using grafana to display. Is there a way to do that do you
> know?
> Appreciate that it might be going slightly off topic away from
> Prometheus.
>
Exactly how you do it will depend on the visualisation you are using and
the version. For example for a table you can use the transform options
to convert labels into fields and decide what to show, click on the
field to sort. You can also set the default sorting.
Tom005
unread,
Nov 30, 2020, 8:44:35 AM11/30/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prometheus Users
Ok yeah, I can see that and I can do that.
I'm actually using the graph visualisation though, which I need. Is there a way to sort from that?
Stuart Clark
unread,
Nov 30, 2020, 9:02:44 AM11/30/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Tom005, Prometheus Users
On 30/11/2020 13:44, Tom005 wrote:
> Ok yeah, I can see that and I can do that.
> I'm actually using the graph visualisation though, which I need. Is
> there a way to sort from that?
>
I'm not an expert, so you might be better asking the Grafana people, but
google does mention how to do it via the JSON, but I'm sure there is a
way in the UI: