Skip to content

Prometheus Monitoring Stack

Kind: reference

The monitoring stack is kube-prometheus-stack in the monitoring namespace: Prometheus, Alertmanager, node-exporter, kube-state-metrics and the Prometheus operator, plus Grafana on hetzner-mgmt. This page lists where to reach it and what it covers. How it is built, alert routing, dashboards and the webshop cluster's differences are on the component page, Prometheus stack.

Sources, read 2026-11-10: components/prometheus-stack/ and cluster/*/prometheus-stack/.

Access

Service Where Login
Grafana https://grafana.prod.skatzi.com (hetzner-mgmt only) Keycloak single sign-on; the login form is disabled. Keycloak group /administrators gets Admin, /developers Editor, everyone else Viewer
Prometheus https://prometheus.prod.skatzi.com (hetzner-mgmt) None configured in this repository: the HTTPRoute sends traffic straight to the Prometheus Service
Alertmanager No public route Read it through the Kubernetes API proxy, see Read Alertmanager and Prometheus on a cluster

The routes are in components/prometheus-stack/grafana/ingress.yaml; the Grafana login settings are under grafana.grafana.ini in components/prometheus-stack/helmrelease.yaml. The webshop cluster has no Grafana and no public Prometheus route, only a read-only query route for eloro CI.

Storage

Prometheus and Grafana use Hetzner Cloud volumes (hcloud-volumes); Alertmanager has none:

  • Prometheus: 10Gi, kept for 30 days or 7 GiB, whichever is reached first (on hetzner-mgmt the size cap applies first, about two weeks of data)
  • Grafana: 10Gi (dashboards and config), the pre-made volume grafana-pv on hetzner-mgmt

Monitoring coverage

Scraped by the chart's own ServiceMonitors (helmrelease.yaml):

  • Nodes, through node-exporter (CPU, memory, disk, network)
  • Kubernetes objects, through kube-state-metrics
  • Kubernetes API server, kubelet and CoreDNS

Not scraped: etcd, kube-scheduler, kube-controller-manager and kube-proxy (disabled in the values). Our own ServiceMonitors (Hubble, cert-manager and the Hetzner CSI driver) are in components/prometheus-stack/config/service-monitors.yaml.

Adding custom metrics

Prometheus selects ServiceMonitors, PodMonitors and PrometheusRules in every namespace, without a label selector (serviceMonitorSelectorNilUsesHelmValues: false and the same for pods and rules). A ServiceMonitor in the monitoring namespace that scrapes a Service in another namespace looks like the ones in service-monitors.yaml:

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: my-app
  namespace: monitoring
spec:
  namespaceSelector:
    matchNames:
      - my-app
  selector:
    matchLabels:
      app.kubernetes.io/name: my-app
  endpoints:
    - port: metrics
      interval: 60s

The example has placeholder names (my-app) and was not applied to a cluster.

Alerting

  • Rules: the chart's default rules (defaultRules.create: true) and our own in components/prometheus-stack/config/prometheus-rules.yaml.
  • Receivers: Alertmanager posts to the Mattermost channel #alerts and, for alerts labelled incident="true", opens Taskbase incident tasks. Routes, silences and the incident path are in Alerting.

Resource usage

The requests of each pod, and the measurements they are based on, are in the comments of components/prometheus-stack/helmrelease.yaml (hetzner-mgmt) and on the component page's Webshop cluster section.

TLS

  • Grafana and Prometheus use the shared certificate prod-services-tls in gateway-system (components/gateway-system/gateway/shared-certificate.yaml, from Let's Encrypt), whose host names hetzner-mgmt sets in cluster/hetzner-mgmt/gateway-system/kustomization.yaml.
  • The HTTPRoute monitoring-redirect sends plain HTTP on /, /api* and /login* to HTTPS with a 301; other HTTP paths are not redirected.

Troubleshooting

Check component status on hetzner-mgmt:

kubectl --context admin@mgmt-cluster get pods -n monitoring
kubectl --context admin@mgmt-cluster get pvc -n monitoring
kubectl --context admin@mgmt-cluster logs -n monitoring -l app.kubernetes.io/name=prometheus -c prometheus

Check the routes and the certificate:

kubectl --context admin@mgmt-cluster get httproute -n monitoring
kubectl --context admin@mgmt-cluster get certificate -n gateway-system prod-services-tls

These commands were not run against a cluster when this page was written (task #2792).