Schedule icon
Script icon
If icon
SlackIncomingWebhook icon
Log icon
Labels icon

MinIO Cluster Disk Healing Sentinel

Audits MinIO distributed object storage drive health via metrics endpoint, alerting DevOps on Slack before offline drives threaten erasure coding quorum.

Categories
DataInfrastructure

This blueprint monitors distributed object storage reliability across MinIO clusters. Scheduled every 10 minutes, it queries the MinIO cluster Prometheus metrics endpoint to inspect drive availability, offline disks, and active background object healing operations, alerting infrastructure and SRE teams on Slack before disk failures breach erasure coding parity limits.

How it works

  1. Recurring Schedule Trigger: The periodic_storage_audit schedule trigger (io.kestra.plugin.core.trigger.Schedule) initiates the audit every 10 minutes.
  2. Cluster Metrics Ingestion: The audit_minio_cluster_health task (io.kestra.plugin.scripts.python.Script) interrogates the MinIO metrics endpoint /minio/v2/metrics/cluster, parsing total drives, offline drives, and healing task counters.
  3. Quorum Risk Gate: The evaluate_storage_quorum flowable task (io.kestra.plugin.core.flow.If) evaluates whether offline drives meet or exceed the critical threshold.
  4. Slack Warning Dispatch: When drive failures are detected, notify_slack_storage_incident (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) dispatches an urgent incident alert with drive counts and remediation CLI commands.
  5. Healthy Confirmation: When all cluster drives operate normally, log_storage_nominal logs nominal storage status.
  6. Manifest Export: The export_storage_manifest task tags the execution with searchable status labels.

Architecture diagram

flowchart TD
    A[Schedule: Every 10 Minutes] --> B[audit_minio_cluster_health: Scrape MinIO Cluster Metrics]
    B --> C{Offline Drives >= Threshold?}
    C -- Yes --> D[notify_slack_storage_incident: Slack Webhook]
    C -- No --> E[log_storage_nominal: Log Nominal State]
    D --> F[export_storage_manifest: Execution Labels]
    E --> F

Use cases

  • Prevent Storage Quorum Collapse: Catch bad hard drives or disconnected NVMe volumes before read or write quorum is permanently lost in multi-node setups.
  • Monitor Self-Healing Operations: Track background healing backlog volume (minio_heal_objects_total) following disk replacements to ensure data parity is restored.
  • Bare-Metal and Kubernetes Storage Reliability: Provide unified visibility into MinIO drives deployed across Kubernetes CSI drivers or bare-metal storage servers.

Inputs

Name Type Default Description
minio_metrics_endpoint STRING http://minio.internal:9000/minio/v2/metrics/cluster Internal cluster metrics endpoint URL for MinIO distributed storage.
max_offline_drives_threshold INT 1 Maximum tolerable count of offline storage drives before triggering critical alert.
slack_channel STRING #storage-sre-alerts Slack channel destination for MinIO storage cluster health alerts.

Expected outputs

  • {{ outputs.audit_minio_cluster_health.vars.total_drives }}: Total count of drives configured across the MinIO cluster.
  • {{ outputs.audit_minio_cluster_health.vars.offline_drives }}: Count of offline or unreachable storage drives.
  • {{ outputs.audit_minio_cluster_health.vars.has_drive_incident }}: Boolean flag indicating if drive health breached threshold.
  • {{ outputs.audit_minio_cluster_health.outputFiles['minio_health_report.json'] }}: Structured JSON report detailing cluster storage drive metrics.

Prerequisites

  • Distributed MinIO cluster with cluster metrics endpoint enabled.
  • MinIO admin credentials with permissions to query Prometheus metrics.
  • Slack Incoming Webhook endpoint URL.

Secrets

  • MINIO_ROOT_USER: MinIO cluster administrative root username.
  • MINIO_ROOT_PASSWORD: MinIO cluster administrative root password.
  • SLACK_WEBHOOK_URL: Slack Incoming Webhook endpoint URL.

Quick start

  1. Configure MINIO_ROOT_USER, MINIO_ROOT_PASSWORD, and SLACK_WEBHOOK_URL in your Kestra namespace secrets.
  2. Import this flow YAML into your Kestra workspace.
  3. Specify your internal MinIO cluster metrics endpoint in minio_metrics_endpoint.
  4. Click Execute in the UI to perform an immediate cluster storage audit.

Common pitfalls and troubleshooting

  • Metrics Authentication: Modern MinIO versions require Bearer token or basic auth headers for /minio/v2/metrics/cluster; ensure administrative secrets are configured.
  • Erasure Parity Configuration: A standard 16-drive MinIO setup with EC:4 can tolerate up to 4 drive failures; setting max_offline_drives_threshold to 1 provides early warning well before data loss risk.
  • Network Partitioning: Transient network partitions between MinIO server nodes can falsely report drives offline; correlate metrics across multiple poll intervals before dispatching hardware replacement tickets.

How to extend

  • Automate mc admin heal execution via Kestra shell tasks when offline drives return to online status.
  • Trigger PagerDuty high-urgency pages if offline drives approach parity loss limits.
  • Export drive telemetry to Prometheus pushgateways or Datadog storage dashboards.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.