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 upImplement HTTP API for getting all label names #2038
Comments
juliusv
added
component/local storage
area/building
labels
Sep 28, 2016
brian-brazil
added
kind/enhancement
and removed
area/building
labels
Oct 26, 2016
This comment has been minimized.
This comment has been minimized.
opsnull
commented
May 12, 2017
|
any updating ? |
This comment has been minimized.
This comment has been minimized.
|
I don't think we'll tackle this before 2.0 as LevelDB is going away completely for that and this feature would have to be rewritten entirely. @fabxc what is your stance on getting something like this into the 2.0 dev branch? However I wouldn't expect this to be too difficult with the 2.0 storage given that we are already keeping indices of labels and their values, right @fabxc ? |
This comment has been minimized.
This comment has been minimized.
|
Yea, that should be reasonably easy to do. I also want to investigate composite indices against metric names then, i.e. "what are all possible values of label |
brian-brazil
added
component/ui
priority/P3
labels
Jul 14, 2017
bergquist
referenced this issue
Jul 25, 2017
Closed
[Feature request] Prometheus adhoc filter support #8253
This comment has been minimized.
This comment has been minimized.
|
@fabxc @gouthamve This just came up again in a discussion with @davkal (it could be useful for the UIs he's building). Do you have any more insight into how to do this efficiently on top of the new storage? To do it properly with minimal overhead, it'd probably need a new TSDB interface function? |
This comment has been minimized.
This comment has been minimized.
|
So the We need to add it to the |
This comment has been minimized.
This comment has been minimized.
|
@gouthamve, that returns all the values, not names. A new function will be needed. See prometheus/tsdb#279 |
codesome
referenced this issue
Aug 28, 2018
Merged
LabelNames() method to get all unique label names #369
This comment has been minimized.
This comment has been minimized.
|
With prometheus/tsdb#369 being merged, I will be adding this API soon! |
codesome
referenced this issue
Nov 7, 2018
Merged
/api/v1/labels endpoint for getting all label names #4835
This comment has been minimized.
This comment has been minimized.
|
the work on tsdb side is done so removed the |
juliusv commentedSep 28, 2016
Would be relevant for grafana/grafana#6038 (cc @bergquist).
Endpoint would be:
GET /api/v1/labelsOutput would be:
{ "status" : "success", "data" : [ "__name__", "job", "instance", "method", "status", "path" ] }This isn't a trivial change, as it requires plumbing all the way down to the storage layer and the LevelDB index accessor functions.