MinIO clusters managed by KubeBlocks expose Prometheus metrics at /minio/v2/metrics/cluster on port 9000 (api). Authentication is disabled (MINIO_PROMETHEUS_AUTH_TYPE=public).
kubectl v1.21+ installed and configured with cluster accesshelm install minio kubeblocks/minio --version 1.1.0-alpha.0 -n kb-system
demo):
kubectl create ns demo
podMonitorSelector matching label release: prometheuskubectl apply -f - <<EOF
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: minio-pod-monitor
namespace: demo
labels:
release: prometheus
spec:
jobLabel: app.kubernetes.io/managed-by
podTargetLabels:
- app.kubernetes.io/instance
- app.kubernetes.io/managed-by
- apps.kubeblocks.io/component-name
- apps.kubeblocks.io/pod-name
podMetricsEndpoints:
- path: /minio/v2/metrics/cluster
port: api
scheme: http
namespaceSelector:
matchNames:
- demo
selector:
matchLabels:
app.kubernetes.io/instance: minio-cluster
EOF
Verify the PodMonitor is created:
kubectl get podmonitor minio-pod-monitor -n demo
NAME AGE
minio-pod-monitor 10s
| Metric | Description |
|---|---|
minio_bucket_objects_count | Number of objects in a bucket |
minio_bucket_usage_total_bytes | Total bytes used per bucket |
minio_cluster_capacity_raw_total_bytes | Total raw cluster capacity |
minio_cluster_capacity_usable_total_bytes | Total usable cluster capacity |
minio_cluster_capacity_usable_free_bytes | Available usable capacity |
minio_node_disk_total_bytes | Total disk capacity per node |
minio_s3_requests_total | Total S3 API requests |
minio_s3_errors_total | Total S3 API errors |
minio_s3_traffic_received_bytes | Bytes received via S3 |
minio_s3_traffic_sent_bytes | Bytes sent via S3 |
kubectl delete podmonitor minio-pod-monitor -n demo --ignore-not-found