-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
querier: Federated Thanos Targets Page #1375
Comments
My 2 cents: I would love this feature but only if Prometheus had an API which exposed all of this information. AFAICT it doesn't exist ATM. I wouldn't want to attach ourselves to the
WDYT? |
The documentation describes api endpoint to get information about targets https://prometheus.io/docs/prometheus/latest/querying/api/#targets which expose values for both types of labels - discovered and formed by job relabeling. |
@2nick thanks for looking into it (I haven't when I wrote the original comment)! Then we could probably make a new method in the StoreAPI which returns these (if any exist) and Thanos Query could have this information, and show it in the web UI. |
Nice ideas! So the use case you provided is:
Why query is not acceptable? What about having Grafana dashboard for this? (:
Disagree - StoreAPI is a generic form of getting metric data in an efficient way. Targets strictly relate to pulling based collectors/scrapers. This means that for now only Prometheus would be implementing this (or Thanos sidecar). I think if anything, it will have to be another gRPC service. However, I mentioned some solution - Grafana dashboard (: As you can track every metric to the Prometheus/Metric source thanks to external labels. Would that solve your use case @d-ulyanov ? |
So you'll be OK if such functionality will be implemented as part of Thanos sidecar but as particular gRPC service with it's own API (maybe smth like "PrometheusProxyAPI")? Because it does not look like that is possible to get "labels before relabeling" using only metrics data and this info is really valuable for debugging some types of issues/investigations. |
maybe, but do you need this? You only need to find out the correct Prometheus that was the source and compose a link to |
I have mixed feelings about this. I feel a combination of Prometheus providing more/better logs about scrapes in combination with the |
Yes, we are actively using additionalScrapeConfigs to add jobs for non-k8s targets with custom relabelings/certificates/other options which can't be configured with ServiceMonitor and it's really useful information for debugging some cases. Also we can implement better targets page to have a more convenient way to work with targets then browser search-by-page (like rich UI with nice seach/filter-by-labels/labels view) and we think that Thanos query can be a good choice to make a single place to ease understanding of infrastructure and investigating issues for really complex prometheus installations. For example at the moment we have like 4 environments with role-based (5 roles), sharded (each role has 4 shards) and replicated (each shard has it's own replica) Prometheus instances to collect not only k8s applications but also some software which is installed on bare metal servers (win/*nix). :) |
@bwplotka @brancz @GiedriusS thanks for your replies, guys. Grafana dashboard is a disputable solution here because in this case we should explain to our users where they should go to check their targets :) Additional GRPC service sounds reasonable for us, WDYT @bwplotka ? |
Thanks. Especially the input for the use cases and user experience is quite useful!
Before Thanos, you needed to do that as well right? E.g `hey, it seems like this metric is from cluster=XYZ. So please go to "http://prometheus.xyz.example.com:9090/targets" to see what's wrong with your scrape configuration? We are not saying "no" but we are trying to understand first what's the best user and operator experience here. For example:
Need to think about it more. What if |
Okay, I agree with @bwplotka, Targets page adds pretty controversial Prometheus functionality to Thanos. Let's close this issue at the moment, we'll use the dashboard or smth like that. |
cc @d-ulyanov While it being controversial, we actually started work on Federated Rules API #2200 (Proposal to come! cc @s-urbaniak), so might want to like on Federated Targets as well in similar way ❤️ |
This issue/PR has been automatically marked as stale because it has not had recent activity. Please comment on status otherwise the issue will be closed in a week. Thank you for your contributions. |
Hello 👋 Looks like there was no activity on this issue for last 30 days. |
Still needed (: and planned to do! Help wanted
…On Sun, 17 May 2020 at 22:05, stale[bot] ***@***.***> wrote:
Hello 👋 Looks like there was no activity on this issue for last 30 days.
*Do you mind updating us on the status?* Is this still reproducible or
needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity for next week, this issue will be closed (we
can always reopen an issue if we need!). Alternatively, use remind command
<https://probot.github.io/apps/reminders/> if you wish to be reminded at
some point in future.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1375 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVA3O57NNPAHB2I2TGOJO3RSBGS3ANCNFSM4IJWTNEQ>
.
|
fwiw I've also come around to agree that with deduping functionality this actually fits pretty well in Thanos |
Hello 👋 Looks like there was no activity on this issue for the last two months. |
PR is almost there, #3350 |
Signed-off-by: Alexander Tunik <[email protected]>
Signed-off-by: Alexander Tunik <[email protected]>
Signed-off-by: Alexander Tunik <[email protected]>
Signed-off-by: Alexander Tunik <[email protected]>
Signed-off-by: Alexander Tunik <[email protected]>
Signed-off-by: Alexander Tunik <[email protected]>
Signed-off-by: Alexander Tunik <[email protected]>
Signed-off-by: Alexander Tunik <[email protected]>
Signed-off-by: Alexander Tunik <[email protected]>
Signed-off-by: Alexander Tunik <[email protected]>
Signed-off-by: Alexander Tunik <[email protected]>
Signed-off-by: Alexander Tunik <[email protected]>
Signed-off-by: Alexander Tunik <[email protected]>
Signed-off-by: Alexander Tunik <[email protected]>
Signed-off-by: Alexander Tunik <[email protected]>
We have the API, now it's just a matter of adding a new page to Thanos Query. I propose something like "Federated Targets" or something (: |
@GiedriusS you won't believe, but in "New UI" targets page is fully functional :) I tested my api with it, simply typing http://localhost:9090/new/targets |
Haha cool. I am not that surprised tbh because it will work as long as we follow the Prometheus API (same route, same data format). Looks like the only work remaining is to add the link to Querier's nav bar. :) |
Wooo! Amazing! 🤗 So what is left to do?
Isn't that simpler to make React UI a new default? Which will solve this too? |
By adding the link in querier's navbar I meant navbar in the new UI. We have the page working it's just that we are not advertising it. Created #4045 to fix this :) |
I believe this one is done. Close now. |
Hey, Thanos team :)
It would be great to have Prometheus-like "targets" page but from all connected Prometheuses.
From time to time it's pretty inconvenient to spend time finding which Prom scrapes some target, especially if your Prom setup is big (we have ~30 instances).
It would be much easier to filter targets on a special page instead of writing query
up{service=~...}
.What do you think, guys?
The text was updated successfully, but these errors were encountered: