thanos-io / thanos

Highly available Prometheus setup with long term storage capabilities. A CNCF Incubating project.
https://thanos.io
Apache License 2.0
13.14k stars 2.1k forks source link

thanos query-frontend web.external-prefix #4351

Open ebini opened 3 years ago

ebini commented 3 years ago

Describe the solution you'd like

i would like to have thanos query frontend also to have the option "web.external-prefix"

to make it accessible behind a reverse proxy

at the moment i get (v0.21.1) thanos: error: unknown long flag '--web.external-prefix'

Thanks in advance

yeya24 commented 3 years ago

Valid request. Help wanted.

matej-g commented 3 years ago

@yeya24 happy to take this one

yeya24 commented 3 years ago

@yeya24 happy to take this one

Nice. Please go ahead!

stale[bot] commented 3 years ago

Hello 👋 Looks like there was no activity on this issue for the last two months. 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 in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

jphx commented 3 years ago

I just ran into this myself. I use a web request prefix for every deployed component to be made available to users (Prometheus, Alert Manager, Grafana, Thanos Query). I need to use prefixes in order to configure our request routing. Since the Frontend component doesn't support it, however, I can't deploy it, which is quite disappointing.

stale[bot] commented 2 years ago

Hello 👋 Looks like there was no activity on this issue for the last two months. 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 in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

matej-g commented 2 years ago

I think this is still a valid request, although unfortunately I didn't have the time to address it.

From my understanding, this is a bit more complicated to do for Query Frontend, since it's more of a rounder tripper and does not expose it's own UI.

ataahua commented 2 years ago

Add me to the list of requestors. Very useful potential feature.

stale[bot] commented 2 years ago

Hello 👋 Looks like there was no activity on this issue for the last two months. 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 in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

stale[bot] commented 2 years ago

Hello 👋 Looks like there was no activity on this issue for the last two months. 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 in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

jphx commented 2 years ago

This is still a desired enhancement.

alialperak commented 1 year ago

Due to nature of query-frontend actually you don't need a prefix configuration here. You need to set --web.external-prefix for query component only to make it work behind a reverse proxy.

jphx commented 1 year ago

Yes, and I'd like to deploy query-frontend to make it available behind a proxy also. But I can't at the moment because it doesn't support a prefix. See https://github.com/thanos-io/thanos/issues/4351#issuecomment-944502946.

alialperak commented 1 year ago

@jphx my answer is same for your use case also. You need to set --web.external-prefix for query component only to make query-frontend work behind a reverse proxy. You can thank me later.

jphx commented 1 year ago

I do that currently, @alialperak, but it doesn't solve the problem. I use a router that routes requests based on the path prefix. The query component supports using a prefix, so I can correctly route requests to the query component, but the frontend component doesn't, so I can't route requests to the frontend. I could choose to route the query component's prefix to the frontend instead of the query component, making the query component unreachable, but since we have a genuine need to make the query component available as well, that doesn't solve the problem for us.