Administration

View metrics

The ingress controller exposes the HAProxy Stats page and a Prometheus endpoint on port 1024. When deploying the ingress controller with a NodePort service, this port will be mapped to a random, high-numbered port. Get the NodePort value by listing the service’s details:

nix
kubectl get services --namespace haproxy-controller
nix
kubectl get services --namespace haproxy-controller

The details show that the port is 31912:

output
text
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
haproxy-kubernetes-ingress NodePort 10.96.15.205 <none> 80:30279/TCP,443:30775/TCP,1024:31912/TCP 84s
output
text
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
haproxy-kubernetes-ingress NodePort 10.96.15.205 <none> 80:30279/TCP,443:30775/TCP,1024:31912/TCP 84s

In this example, port 1024 is mapped to NodePort 31912.

HAProxy stats page Jump to heading

View the HAProxy Stats page at the / URL path. Learn more about the HAProxy Stats page in this blog post.

HAProxy Stats Page

Prometheus endpoint Jump to heading

View Prometheus counters at the /metrics URL path. Here is a sample of the metrics published on that page:

output
# HELP haproxy_frontend_bytes_in_total Current total of incoming bytes. # TYPE haproxy_frontend_bytes_in_total counter haproxy_frontend_bytes_in_total{proxy="healthz"} 27468 haproxy_frontend_bytes_in_total{proxy="http"} 565 haproxy_frontend_bytes_in_total{proxy="https"} 0 haproxy_frontend_bytes_in_total{proxy="stats"} 8927 # HELP haproxy_frontend_bytes_out_total Current total of outgoing bytes. # TYPE haproxy_frontend_bytes_out_total counter haproxy_frontend_bytes_out_total{proxy="healthz"} 42840 haproxy_frontend_bytes_out_total{proxy="http"} 26587 haproxy_frontend_bytes_out_total{proxy="https"} 0 haproxy_frontend_bytes_out_total{proxy="stats"} 2856685 # HELP haproxy_frontend_requests_denied_total Total number of denied requests. # TYPE haproxy_frontend_requests_denied_total counter haproxy_frontend_requests_denied_total{proxy="healthz"} 0 haproxy_frontend_requests_denied_total{proxy="http"} 0 haproxy_frontend_requests_denied_total{proxy="https"} 0 haproxy_frontend_requests_denied_total{proxy="stats"} 0
output
# HELP haproxy_frontend_bytes_in_total Current total of incoming bytes. # TYPE haproxy_frontend_bytes_in_total counter haproxy_frontend_bytes_in_total{proxy="healthz"} 27468 haproxy_frontend_bytes_in_total{proxy="http"} 565 haproxy_frontend_bytes_in_total{proxy="https"} 0 haproxy_frontend_bytes_in_total{proxy="stats"} 8927 # HELP haproxy_frontend_bytes_out_total Current total of outgoing bytes. # TYPE haproxy_frontend_bytes_out_total counter haproxy_frontend_bytes_out_total{proxy="healthz"} 42840 haproxy_frontend_bytes_out_total{proxy="http"} 26587 haproxy_frontend_bytes_out_total{proxy="https"} 0 haproxy_frontend_bytes_out_total{proxy="stats"} 2856685 # HELP haproxy_frontend_requests_denied_total Total number of denied requests. # TYPE haproxy_frontend_requests_denied_total counter haproxy_frontend_requests_denied_total{proxy="healthz"} 0 haproxy_frontend_requests_denied_total{proxy="http"} 0 haproxy_frontend_requests_denied_total{proxy="https"} 0 haproxy_frontend_requests_denied_total{proxy="stats"} 0

Do you have any suggestions on how we can improve the content of this page?