You are looking at the documentation of a prior release. To read the documentation of the latest release, please visit here.

New to KubeDB? Please start here.

Monitoring Milvus with KubeDB

KubeDB has native support for monitoring via Prometheus. This guide will give you an overview of how monitoring works for a Milvus database.

Before You Begin

  • You should be familiar with the following KubeDB concepts:

How Monitoring Works

Milvus components expose Prometheus metrics on port 9091. KubeDB wires those metrics up for you through spec.monitor:

spec:
  monitor:
    agent: prometheus.io/operator
    prometheus:
      serviceMonitor:
        labels:
          release: prometheus
        interval: 10s
  • spec.monitor.agent: prometheus.io/operator tells KubeDB to integrate with the Prometheus Operator.
  • spec.monitor.prometheus.serviceMonitor.labels are applied to the generated ServiceMonitor. They must match the serviceMonitorSelector of your Prometheus object so the operator picks it up (here, release: prometheus).
  • spec.monitor.prometheus.serviceMonitor.interval sets the scrape interval.

When monitoring is enabled, KubeDB creates and maintains:

  1. The primary Milvus service, which exposes gRPC (19530), metrics (9091), and REST (8080).
  2. A dedicated stats Service named <db>-stats that exposes the metrics port (9091) and carries the kubedb.com/role: stats label.
  3. A ServiceMonitor named <db>-stats that selects the stats service and scrapes its metrics port at /metrics.

The Prometheus Operator then reconciles the ServiceMonitor into the running Prometheus configuration and begins scraping Milvus metrics.

In the next doc, we will see a step-by-step guide on monitoring a Milvus database using the Prometheus Operator.