New to Kestra?
Use blueprints to kickstart your first workflows.
Audits Ceph cluster health for down OSD daemons and degraded placement groups, alerting storage engineers on Slack before I/O requests block.
In distributed software-defined storage architectures powered by Ceph (Ceph RBD, CephFS, and RGW), Object Storage Daemons (OSDs) handle physical disk read, write, and replication operations. Data objects are distributed across placement groups (PGs) according to CRUSH algorithm rules.
When underlying NVMe, SSD, or spinning drives experience hardware controller dropouts, SATA timeouts, or kernel panics, the associated OSD daemons transition into down state. Surviving OSDs initiate peering and recovery sequences to recreate missing replica copies across surviving drives. However, if multiple OSDs go down simultaneously or network saturation blocks peering, placement groups enter peering or undersized_degraded states. During this period, client read and write operations targeting affected PGs block indefinitely, freezing hypervisor VMs and Kubernetes persistent volumes.
This blueprint provides an automated Ceph storage reliability sentinel. Running on a recurrent fifteen-minute schedule, it queries the Ceph Manager REST API, audits the cluster OSD map and placement group status, evaluates metrics against safe thresholds, and delivers real-time Slack alerts with exact troubleshooting commands to storage engineers before I/O blocks occur.
poll_ceph_health trigger (io.kestra.plugin.core.trigger.Schedule) initiates the metric scan every fifteen minutes.scan_ceph_osd_health task (io.kestra.plugin.scripts.python.Script) invokes /api/health/minimal, extracting total OSDs, down OSD counts, and degraded placement group numbers.evaluate_osd_failures flowable task (io.kestra.plugin.core.flow.If) evaluates whether any down OSDs or degraded placement groups breach cluster reliability SLAs.alert_slack_ceph_osd_failure (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) dispatches an actionable incident card detailing exact mitigation commands (ceph osd tree, ceph health detail).log_healthy_ceph_cluster records nominal cluster health.export_ceph_health_manifest task emits structured telemetry JSON for SRE observability dashboards.flowchart TD
A[Schedule: Every 15 Minutes] --> B[scan_ceph_osd_health: Ceph Manager API]
B --> C{Down OSDs or Degraded PGs?}
C -- Yes --> D[alert_slack_ceph_osd_failure: Slack Webhook]
C -- No --> E[log_healthy_ceph_cluster: Log]
D --> F[export_ceph_health_manifest: Return JSON]
E --> F
| Name | Type | Default | Description |
|---|---|---|---|
ceph_mgr_endpoint |
STRING | "http://localhost:8003" |
Base HTTP endpoint exposing the Ceph Manager API. |
max_down_osd_threshold |
INT | 1 |
Maximum allowable down OSD daemons before alerting. |
cluster_fsid |
STRING | "ceph-production-cluster" |
Logical cluster identifier for alerting context. |
slack_channel |
STRING | "#ceph-storage-reliability" |
Slack channel destination for distributed storage alerts. |
{{ outputs.scan_ceph_osd_health.vars.has_failure }}: Boolean flag indicating if cluster health breached thresholds.{{ outputs.scan_ceph_osd_health.vars.down_osds }}: Count of OSD daemons currently in DOWN status.{{ outputs.scan_ceph_osd_health.vars.total_osds }}: Total number of OSD daemons in the cluster.{{ outputs.scan_ceph_osd_health.vars.degraded_pgs }}: Count of placement groups in degraded or undersized state.{{ outputs.scan_ceph_osd_health.outputFiles['ceph_health_report.json'] }}: Structured JSON diagnostic report.ceph-mgr restful or dashboard module enabled on port 8003 or 8443.SLACK_WEBHOOK_URL: Slack Incoming Webhook endpoint URL with permissions to post messages.SLACK_WEBHOOK_URL in your Kestra namespace secrets.ceph_mgr_endpoint with your Ceph Manager endpoint address.ceph osd set noout while investigating network interfaces.ceph osd set noout during rolling cluster kernel upgrades.