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
KubeDBconcepts:
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/operatortells KubeDB to integrate with the Prometheus Operator.spec.monitor.prometheus.serviceMonitor.labelsare applied to the generatedServiceMonitor. They must match theserviceMonitorSelectorof yourPrometheusobject so the operator picks it up (here,release: prometheus).spec.monitor.prometheus.serviceMonitor.intervalsets the scrape interval.
When monitoring is enabled, KubeDB creates and maintains:
- The primary Milvus service, which exposes gRPC (
19530), metrics (9091), and REST (8080). - A dedicated stats
Servicenamed<db>-statsthat exposes the metrics port (9091) and carries thekubedb.com/role: statslabel. - A
ServiceMonitornamed<db>-statsthat selects the stats service and scrapes itsmetricsport 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.































