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

Cortex Prometheus Frontend changed behaviour in 1.1.0 #2742

Closed
itatabitovski opened this issue Jun 18, 2020 · 9 comments
Closed

Cortex Prometheus Frontend changed behaviour in 1.1.0 #2742

itatabitovski opened this issue Jun 18, 2020 · 9 comments
Labels

Comments

@itatabitovski
Copy link

itatabitovski commented Jun 18, 2020

With Cortex 1.0.0 it was possible to access the prometheus/thanos-query interface of -frontend.downstream-url by accessing http://<cortex>:9091/graph in your browser. This was convenient for quick queries and general access (Alerts,Rules,Configuration,Targets, Discovery, Stores, ...) to the backend.

In Cortex 1.1.0 this does not work any more and cortex returns 404 page not found.

@pstibrany
Copy link
Contributor

Thanks for creating issue from this Slack discussion.

@pracucci
Copy link
Contributor

@jtlisi This may be related to the API refactoring we did?

@pstibrany
Copy link
Contributor

As discussed on that Slack thread, I don't think we ever wanted to proxy all paths to downstream Prometheus. So the question is: should we add that and make it a stable feature?

I'm fine with doing it under some specific path, e.g. /downstream/* would be forwarded to Prometheus (removing /downstream/ first). But then Prometheus needs to be configured with this option.

Having access to /graph may imply that Prometheus will use Cortex for queries -- but in fact, it will not, unless Cortex is configured with empty same /downstream/ API prefix.

I would prefer to support API forwards only (eg. for usage from Grafana) to avoid the extra complexity.

@midnightconman
Copy link

This breaks the prometheus link in grafana panel editor for people using cortex (I don't think that was the intended behavior)... is this a bug or a feature?

@pracucci
Copy link
Contributor

This breaks the prometheus link in grafana panel editor for people using cortex (I don't think that was the intended behavior)... is this a bug or a feature?

Could you share a screenshot about which link is broken, please? I would like to better understand it.

@midnightconman
Copy link

midnightconman commented Jul 22, 2020

Sure :D The prometheus link in this screenshot (on the right hand side):

image

This is grafana 6.6, but I think the link is the same in 7.x

@pracucci
Copy link
Contributor

Sorry for the late reply.

We could map the /graph endpoint in the query-frontend, so that it would be passed to the downstream URL. This would solve the case of Grafana link, but not the general issue that any request is not proxied anymore.

@jtlisi This change was due to the single binary mode. The question is: should query-frontend (when running standalone) proxy any request to the downstream URL or not?

@bwplotka
Copy link
Contributor

bwplotka commented Aug 11, 2020

Ah thanks @yeya24 for linking. Yes. I think in Thanos version of query frontend we should be proxying rest to downstream, I think it's nice behavior of query frontend being transparent.

As per Cortex one, I believe once thanos query-frontend exists, Cortex can even disable downstream URL flag as it's no longer needed - thus reducing support burden of this path 🤔 Up to you (:

If still downstream URL needs to be supported, maybe we can share between Thanos & Cortex some passthrough handler as well as routing code (:

@stale
Copy link

stale bot commented Oct 10, 2020

This issue has been automatically marked as stale because it has not had any activity in the past 60 days. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 10, 2020
@stale stale bot closed this as completed Oct 25, 2020
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

5 participants