https://milvus.io/docs/monitor.md
文章写的很清晰 ,我这边做一下个人补充,初版可能只是配置,具体的grafana 监控报表后期补一下。
架构如下:
values.yaml 配置 enabled: true 改为true
metrics:
enabled: true
serviceMonitor:
# Set this to `true` to create ServiceMonitor for Prometheus operator
enabled: true
interval: "30s"
scrapeTimeout: "10s"
# Additional labels that can be used so ServiceMonitor will be discovered by Prometheus
additionalLabels: {}
生产的可执行yaml (可直接手动部署)
需要改标签
---
# Source: milvus/templates/servicemonitor.yaml
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: my-release-milvus
labels:
helm.sh/chart: milvus-4.0.31
app.kubernetes.io/name: milvus
app.kubernetes.io/instance: my-release
app.kubernetes.io/version: "2.2.13"
app.kubernetes.io/managed-by: Helm
spec:
endpoints:
- honorLabels: true
interval: 30s
scrapeTimeout: 10s
path: /metrics
port: metrics
namespaceSelector:
matchNames:
- default
selector:
matchLabels:
app.kubernetes.io/name: milvus
app.kubernetes.io/instance: my-release
targetLabels:
- app.kubernetes.io/name
- app.kubernetes.io/instance
- component