Metric for Ingress Route

1/3/2020

I have two Ingress (Contour managing Envoy) host header based routes (among others) where both the routes point to the same service.

spec:
  rules:
  - host: foo.com
    http:
      paths:
      - backend:
          serviceName: s1
          servicePort: http
        path: /
  - host: bar.com
    http:
      paths:
      - backend:
          serviceName: s1
          servicePort: http
        path: /
...
  tls:
  - hosts:
    - foo.com
    - bar.com
    secretName: secret

Is there an existing metric (in Kubernetes, Contour, Envoy) to know how many requests are being routed through each of the two rules, i.e., how many requests are hitting foo.com and how many are hitting bar.com?

-- siberiancrane
envoyproxy
heptio-contour
kubernetes
kubernetes-ingress

1 Answer

1/3/2020

Per host metrics is not exposed by envoy for cardinality explosion issue

So your only option is to explore possibility of application exposing it as Prometheus metrics.

-- Arghya Sadhu
Source: StackOverflow