skills/kubeblocks-observability-existing-stack/SKILL.md
Integrate KubeBlocks database metrics into an existing Prometheus / Grafana stack. Use this when the monitoring base already exists and the remaining work is scrape configuration, dashboards, and alerting readiness.
npx skillsauth add apecloud/kubeblocks-skills kubeblocks-observability-existing-stackInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this path when Prometheus or Grafana already exists in the environment and the task is to integrate database metrics, not bootstrap a new monitoring stack.
Always state which readiness level has been reached:
metrics-readyscrape-readydashboard-readyalerting-readyDo not claim "monitoring is done" unless the achieved level matches the user's expectation.
- [ ] Step 1: Confirm the existing monitoring stack
- [ ] Step 2: Verify exporter / metrics endpoints
- [ ] Step 3: Add scrape configuration
- [ ] Step 4: Confirm dashboards / alerts if requested
kubectl get pods -A | grep -E 'prometheus|grafana' || true
kubectl get servicemonitor,podmonitor -A 2>/dev/null || true
Answer:
ServiceMonitor or PodMonitorkubectl get pods -n <ns> -l app.kubernetes.io/managed-by=kubeblocks
kubectl describe pod -n <ns> <pod-name> | grep -A2 -E 'http-metrics|metrics' || true
If exporter pods or http-metrics endpoints do not exist, stop and say observability is not yet metrics-ready.
For Prometheus Operator, prefer ServiceMonitor / PodMonitor aligned with the existing stack's label conventions.
Example PodMonitor:
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: kb-database-monitor
namespace: monitoring
spec:
namespaceSelector:
matchNames:
- <db-namespace>
selector:
matchLabels:
app.kubernetes.io/managed-by: kubeblocks
podMetricsEndpoints:
- port: http-metrics
path: /metrics
interval: 30s
If scrape config exists and Prometheus targets are healthy, the result is at least scrape-ready.
Only claim dashboard-ready when:
Only claim alerting-ready when alert rules are configured and routed to a real notification path.
devops
Expand persistent volume storage for KubeBlocks database clusters via OpsRequest. Requires the StorageClass to support volume expansion (allowVolumeExpansion=true). Use when the user needs more disk space, wants to increase storage, expand volumes, or resize PVCs. NOT for changing CPU/memory (see vertical-scaling) or adding more replicas (see horizontal-scaling). Note that volume shrinking is not supported by Kubernetes.
data-ai
Scale CPU and memory resources for KubeBlocks database clusters via OpsRequest (vertical scaling). Supports in-place updates when the feature gate is enabled. Use when the user wants to change, increase, decrease, resize, or adjust CPU or memory resources of a database cluster. NOT for adding/removing replicas or shards (see horizontal-scaling) or expanding disk storage (see volume-expansion).
data-ai
Upgrade the KubeBlocks operator itself via Helm. Covers update operator, upgrade to v1.0, update kubeblocks version, and CRD updates. Use when the user wants to upgrade KubeBlocks, update the operator, or upgrade to a new KubeBlocks release. NOT for upgrading database engine versions (see minor-version-upgrade).
development
Diagnostic guide for KubeBlocks-managed database clusters. Use when the user reports troubleshoot, debug, diagnose, not working, error, failed, stuck, CrashLoopBackOff, cluster exception, or similar problems with their database cluster. This skill guides the agent through diagnostic steps — it does NOT perform actions.