-
Notifications
You must be signed in to change notification settings - Fork 544
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
Nginx/Alertmanager redirect loosing tenant headers #10306
Comments
Hey, I was thinking of doing the same thing of putting the path into the alertmanager url, did you manage to figure out what the issue was or know of a workaround? I'm currently thinking of adding an Ingress and setting the header that way, we're using traefik and it supports setting headers via annotations. |
Nope not yet, did you manage a solution, are you having the same problems? Can you elaborate more about using an ingress, how are you planning to use ingress in this scenario? |
I haven't had the time to reproduce your issue yet. For the Ingress in theory it's possible to add custom headers to each request via annotation. For example in nginx:
|
I can reproduce your problem with the redirect. |
So my understanding is that, here we set the X-Scope-OrgID and we pass that to the alertmanager url/endpoint, but is getting dropped. Now in relation to the ingress point, how would u use here the Ingress, like do you mean creating an ingress for alertmanager url/endpoint or something else?
|
Yes in our setup we have an ingress in front of Alertmanager |
We have this issue which revolves around the gateway/nginx and alertmanager in Mimir, we are trying to set the tenant headers based on the path, and grab them from the path and pass them as a header to the proxy, but those headers are getting lost, we need some input in here.
We are trying to have different paths for tenants, for example if we go to alertmanage/sre-eks the "sre-eks" which is set as a value via "proxy_set_header X-Scope-OrgID sre-eks;" at the alertmanager tenant endpoint, but when that is passed to the proxy via "proxy_pass" is getting lost "proxy_pass http://$alertmanager:{{ include "mimir.serverHttpListenPort" . }}{{ template "mimir.alertmanagerHttpPrefix" . }};"
This is the section of nginx config:
So when we test via browser or do the curl on the endpoint we get redirected to the default alertmanager. Is this REDIRECT that is making the headers lost.
Same happens when do also pass the header:
The text was updated successfully, but these errors were encountered: