Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How can i see all the tags related to a metric? #816

Closed
kennedyoliveira opened this issue Apr 9, 2018 · 3 comments
Closed

[Question] How can i see all the tags related to a metric? #816

kennedyoliveira opened this issue Apr 9, 2018 · 3 comments
Labels

Comments

@kennedyoliveira
Copy link

Hello,

the tittle says pretty much all, for example, suppose i have a metric with name http.server.request how can i see all the related tags for this metric?

Thanks.

@brharrington
Copy link
Contributor

You can query the tags api. To get the list of tag keys:

/api/v1/tags?q=name,http.server.request,:eq

Then you can call it with a particular tag key to get the list of values for that key:

/api/v1/tags/${key}?q=name,http.server.request,:eq

@kennedyoliveira
Copy link
Author

Thank you @brharrington that worked! Another question regarding this approach, is it possible to get tags over a specific time? Because for example, there is one metric related to it, instance-id that represents a AWS instance, and then it return thousands of it, is it possible to get the tags related to the last 3 hours or 6 hours?

I hope I expressed myself clear enough.

@brharrington
Copy link
Contributor

Missed the follow up question, no it is not currently possible because of how the metadata is stored. The index used for querying tags doesn't have access to the data values over time, just a reference to the ids to lookup. This allows us to get a more compact index with contiguous time series over a longer time range. It is something we are considering in a future version, see #598.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants