New to KubeDB? Please start here.

Monitoring HanaDB

KubeDB exposes Prometheus metrics for HanaDB through a bundled hanadb_exporter sidecar. You enable it through the spec.monitor field of the HanaDB object.

How it works

When spec.monitor is set, KubeDB adds an exporter container to the database pods and a <db>-stats Service that exposes the metrics endpoint (default port 9668, path /metrics). Two agents are supported:

The spec.monitor field

spec:
  monitor:
    agent: prometheus.io/operator   # or prometheus.io/builtin
    prometheus:
      exporter:
        port: 9668
      serviceMonitor:
        labels:
          release: prometheus
        interval: 10s
  • spec.monitor.agent selects the monitoring agent.
  • spec.monitor.prometheus.exporter.port is the exporter port (9668).
  • spec.monitor.prometheus.serviceMonitor.labels must match the serviceMonitorSelector of your Prometheus Operator instance (commonly release: prometheus).

Next Steps