-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Open
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.needs-priorityneeds-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.
Description
Related to #3713:
When using server-snippet
, there are no metrics generated. We have a bunch of ingresses without a backend and the traffic is not monitored there. Our use case is having multiple redirectors and proxy_pass defined like this.
Tried setting metrics-per-undefined-host: true
and metrics-per-host: true
without success.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hello-world
annotations:
nginx.ingress.kubernetes.io/server-snippet: |
location ~* ^/$ {
return 200 'hello world';
add_header Content-Type text/plain;
}
spec:
ingressClassName: nginx
tls:
- hosts:
- "hello.my.home"
rules:
- host: hello.my.home
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: dummy-svc
port:
number: 80
You can simulate some load with k6 or curl:
while true; do curl -s -o /dev/null -w "%{http_code}\n" https://hello.my.home/; done
This is the specific metric that we expect to have some data:
sum by (ingress) (irate(nginx_ingress_controller_requests[$__rate_interval]))
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.needs-priorityneeds-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.
Type
Projects
Status
No status