Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upConsider supporting sorting by label value #414
Comments
This comment has been minimized.
This comment has been minimized.
|
The console templates already support sorting by label with the sortByLabel function, and a sortByValue would make sense too. I'm not sure it makes sense for prometheus API itself to offer this, as this is a presentation issue rather than a calculation. It gets into questions about what ordering properties the various operators and functions should have. |
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil The reason why I'd prefer this as a query-language function so far, is:
|
This comment has been minimized.
This comment has been minimized.
|
What was he running the ad-hoc query with? The output of the /query interface isn't human-readable. |
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil He was using the tabular view under /graph. |
This comment has been minimized.
This comment has been minimized.
|
I think there should be an ordering on the table output on /graph (e.g. sort the full name of the metric), done in say the JS. |
This comment has been minimized.
This comment has been minimized.
|
See #432 |
brian-brazil
added
the
feature-request
label
Dec 16, 2015
brian-brazil
referenced this issue
Jan 20, 2016
Closed
Feature request: `sort_metric()` or similar #1328
This comment has been minimized.
This comment has been minimized.
|
Sorry, I looked for dups, but didn't see this one. I agree with the discussion in #432 that this should be in one layer only. As you don't know where further consumption of the results happens, e.g. Grafana, via HTTP API, etc, I do think that this should be done in PromQL itself as that opens one canonical way of sorting for all further processing methods. |
This comment has been minimized.
This comment has been minimized.
fabxc
added
kind/enhancement
and removed
feature request
labels
Apr 28, 2016
This comment has been minimized.
This comment has been minimized.
|
This is the default in 2.0. I think this issue can be closed @brian-brazil @fabxc |
brian-brazil
closed this
Jun 14, 2017
simonpasquier
pushed a commit
to simonpasquier/prometheus
that referenced
this issue
Oct 12, 2017
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 23, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
juliusv commentedDec 2, 2014
Mainly for display reasons (tabular view), it would be sometimes useful to not sort by the value of timeseries, but by a given label value.
Example: list all apps in a PaaS and their memory usage. It would be nice to be able to sort by application name ("app" label).
/cc @grobie