-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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_ingress_controller_requests metric doesn't seem to be incremented with aliases #3485
Comments
@ElvinEfendi Do you know if this ticket has merit? or am i completely off base here? |
@dcherniv this is an issue. Only the host field are a source for metrics |
server.Alias as well in that loop. That should fix it.
|
@ElvinEfendi PR attached. i can't seem to get past the linuxfoundation.org validation. I sent them an email to reset my email address. |
A tiny change is still required to fix this issue. Please see #3620 (comment) for details |
Tested 0.22.0, just now. Still doesn't appear to show the alias metrics.
I see the curls in the logs:
Ingress resource:
prometheus metric nginx_ingress_controller_requests stay flat for the ingress="dev-service-ingress". but as i soon as i start hitting with domain.com it is instantly incremented.
Also, not sure if it matters but i have the same server-alias configuration on multiple ingress resources within the same namespace, because they are set through pipeline and multiple applications run on the same alias but with different paths. The use case is basically a CDN that fronts multiple services and aggregates them on the same alias1.domain.com without exposing the underlying non-cdn fronted domain.com to customers. |
I'm still seeing this in 0.22.0 as well. Are there any workarounds to get it working with aliases? |
Also experiencing this issue in 0.28.0. #3620 fix does not work? |
#3620 Fix only work with a single alias and not work with alias has regex.
DON'T WORK with regex
DON'T WORK with multiple aliases
Please reopen this issue. |
May I know if can reopen this issue? seem it still can't work with alias has regex and multiple aliases |
NGINX Ingress controller version:
0.21.0
Kubernetes version (use
kubectl version
):Environment:
uname -a
):What happened:
When running a simple test curl against an endpoint, it appears that nginx_ingress_controller_requests prometheus metric is not updated properly if you are hitting the endpoint by alias:
nginx.ingress.kubernetes.io/server-alias: www.domain2.com
It's not a cached response, because i can see the server: nginx/1.15.6. It just appears that the metric doesn't count these requests. When you hit the endpoint by its actual ingress domain, everything works:
What you expected to happen:
Both to count against the metric nginx_ingress_controller_requests
How to reproduce it (as minimally and precisely as possible):
Create an ingress resource, attach an alias to it via nginx.ingress.kubernetes.io/server-alias
Try to hit both endpoints while at the same time checking prometheus metrics and see if nginx_ingress_controller_requests is incremented when you are hitting the alias endpoint.
Anything else we need to know:
The text was updated successfully, but these errors were encountered: