Resiliency & Monitoring
Prometheus metrics, Grafana dashboards, disk capacity alert thresholds, and incident response runbooks.
On This Page
Application-Level Capacity Guard
MinioCapacityGuard is the first line of defence. Before every write, it reads the MinIO Prometheus metrics endpoint, computes disk usage percentage, and throws StorageCapacityException (HTTP 507) if usage meets or exceeds the configured threshold.
| Setting | Default | Behaviour |
|---|---|---|
WriteStopThresholdPercent | 90.0 | Block all writes at or above this percentage |
WriteStopThresholdPercent = 0 | — | Disable the guard entirely (useful for local dev) |
Prometheus Metrics
MinIO exposes a Prometheus-compatible metrics endpoint at {Endpoint}/minio/v2/metrics/cluster. The capacity guard reads two metrics:
| Metric | Description |
|---|---|
minio_node_disk_used_bytes | Total bytes currently used across all disks |
minio_node_disk_total_bytes | Total disk capacity across all disks |
minio_bucket_objects_count | Object count per bucket (useful for monitoring growth) |
minio_bucket_usage_total_bytes | Actual bytes stored per bucket |
minio_s3_requests_total | Total S3 API request count by type (GET, PUT, DELETE) |
minio_s3_errors_total | Total API errors — useful for detecting connectivity issues |
Enable public Prometheus access in your MinIO Docker configuration:
environment:
MINIO_PROMETHEUS_AUTH_TYPE: public
Alert Thresholds
Three alert levels are defined for disk usage. Each requires a different response:
| Level | Threshold | Severity | Required Action |
|---|---|---|---|
| Info | ≥ 70% | Warning | Review storage growth rate. Plan capacity expansion within 30 days. |
| Warn | ≥ 85% | High | Immediate capacity review. Expand or archive within 7 days. |
| Critical | ≥ 95% | Critical | Emergency — application writes blocked at 90%. Act immediately. |
Prometheus Alert Rules
groups:
- name: bizfirst-storage
rules:
- alert: StorageDiskHigh
expr: |
sum(minio_node_disk_used_bytes) /
sum(minio_node_disk_total_bytes) * 100 >= 70
for: 5m
labels:
severity: warning
team: infra
annotations:
summary: "MinIO disk usage above 70%"
description: "Current usage: {{ $value | humanizePercentage }}"
- alert: StorageDiskCritical
expr: |
sum(minio_node_disk_used_bytes) /
sum(minio_node_disk_total_bytes) * 100 >= 85
for: 2m
labels:
severity: high
team: infra
annotations:
summary: "MinIO disk usage above 85% — action required"
description: "Current usage: {{ $value | humanizePercentage }}"
- alert: StorageDiskEmergency
expr: |
sum(minio_node_disk_used_bytes) /
sum(minio_node_disk_total_bytes) * 100 >= 95
for: 1m
labels:
severity: critical
team: infra
annotations:
summary: "MinIO disk at 95% — writes will stop at 90%"
description: "Current usage: {{ $value | humanizePercentage }}"
- alert: StorageHighErrorRate
expr: rate(minio_s3_errors_total[5m]) > 0.05
for: 3m
labels:
severity: warning
annotations:
summary: "MinIO S3 error rate elevated"
- alert: StorageBackupMissed
expr: time() - bizfirst_last_backup_timestamp > 90000
for: 0m
labels:
severity: high
annotations:
summary: "Storage backup has not run in over 25 hours"
Grafana Dashboard
Import the following panel configuration into Grafana (connected to your Prometheus data source):
| Panel | Query | Visualization |
|---|---|---|
| Disk Usage % | sum(minio_node_disk_used_bytes)/sum(minio_node_disk_total_bytes)*100 | Gauge (thresholds at 70/85/95) |
| Disk Used (GB) | sum(minio_node_disk_used_bytes)/1e9 | Stat |
| Disk Free (GB) | sum(minio_node_disk_free_bytes)/1e9 | Stat |
| Objects per Bucket | minio_bucket_objects_count | Bar chart |
| Request Rate | rate(minio_s3_requests_total[5m]) | Time series |
| Error Rate | rate(minio_s3_errors_total[5m]) | Time series |
Health Endpoints
| Endpoint | Purpose | Expected Response |
|---|---|---|
GET /minio/health/live | Liveness — MinIO process is running | HTTP 200 |
GET /minio/health/ready | Readiness — MinIO is ready to serve requests | HTTP 200 |
GET /minio/v2/metrics/cluster | Prometheus metrics scrape endpoint | HTTP 200 + text/plain metrics |
# Quick health check from the application container
curl -f http://minio:9000/minio/health/live && echo "MinIO is healthy"
Incident Runbooks
Runbook 1 — Disk at 85–90% (StorageDiskCritical alert)
Check current usage
mc admin info localIdentify largest buckets/prefixes
mc du local/bizfirst-files --depth 2Trigger manual lifecycle run
mc ilm tier ls local
mc admin lifecycle start local/bizfirst-filesExpand volume if needed
Add a new data volume to the MinIO container, or extend the Docker volume on the host.
Runbook 2 — StorageCapacityException in application logs
Application writes are already blocked. The disk is at or above WriteStopThresholdPercent (default 90%).
- Immediately review disk usage via MinIO console or
mc admin info local. - If growth is from a runaway process, stop the process first.
- Delete or archive large unnecessary objects to bring usage below the threshold.
- The capacity guard will automatically resume writes once usage drops below the threshold on the next write attempt.
WriteStopThresholdPercent above 95% risks MinIO running completely out of disk space, which causes data corruption. Fix the underlying capacity issue instead.
Runbook 3 — MinIO container down
- Check container status:
docker ps -a | grep minio - Inspect logs:
docker logs bizfirst-minio --tail 100 - Common causes: out of disk space, port conflict, corrupted data volume.
- Restart:
docker start bizfirst-minio - If data is corrupted, restore from last restic backup. See Point-in-Time Restore.
Disaster Recovery Targets
| Scenario | RPO | RTO | Method |
|---|---|---|---|
| MinIO container restart (no data loss) | 0 | < 2 min | Docker restart |
| Host disk failure (data volume lost) | < 24 hrs | < 4 hrs | restic restore from B2 |
| Accidental object deletion | < 24 hrs | < 1 hr | Selective restic restore |
| Full host loss | < 24 hrs | < 8 hrs | New host + restic restore from B2 |