New to Kestra?
Use blueprints to kickstart your first workflows.
Audit Ceph RGW buckets for a missing critical bucket or unmanaged bucket sprawl and alert Slack before it is missed.
A Ceph RADOS Gateway (RGW) deployment's bucket inventory drifts silently - a backup bucket deleted by a misconfigured lifecycle policy, or a wave of ad hoc bucket creation nobody tracked - and nothing in Ceph itself proactively flags either case. This blueprint lists every bucket in the gateway on a schedule and alerts Slack the moment a named must-always-exist bucket is missing, or the total bucket count crosses a governance threshold.
periodic_inventory_check (io.kestra.plugin.core.trigger.Schedule) runs every 30 minutes, explicitly passing ceph_host, critical_bucket_name, and max_expected_bucket_count through its own inputs: block so the flow is self-contained when the trigger fires. Shipped disabled so a manual run can be verified first.probe_list_buckets (io.kestra.plugin.ceph.rgw.ListBuckets) calls the Ceph Dashboard's own GET /api/rgw/bucket endpoint, capturing the bucket total count and the buckets name list.evaluate_bucket_inventory (io.kestra.plugin.core.flow.If) checks, in order of severity:critical_bucket_name is absent from buckets - alert_critical_bucket_missing fires immediately.total exceeds max_expected_bucket_count - alert_bucket_count_exceeded fires.total is within threshold - log_inventory_healthy records the pass.log_audit_complete always runs last, printing the final total regardless of which branch fired.errors block alerts Slack separately if the flow itself fails outright - an unreachable Ceph Dashboard or invalid credentials.io.kestra.plugin.ceph.rgw.ListBuckets, with no prior blueprint coverage of this plugin's RGW (object gateway) surface in this repository - the existing Ceph blueprints here cover OSD peering, pool replication, RBD snapshots, and overall cluster health, a different subsystem entirely from the S3-compatible object gateway.The Ceph Dashboard shows the current bucket list reactively, but has no built-in "alert me if a specific bucket disappears or the count grows too high" primitive. Kestra supplies the schedule, the CRITICAL_BUCKET_MISSING/BUCKET_COUNT_EXCEEDED/HEALTHY classification as a first-class three-way branch, and an execution history showing exactly when a bucket went missing or the count first crossed the threshold.
ceph_host, and the CEPH_USERNAME/CEPH_PASSWORD secrets).critical_bucket_name for your environment.CEPH_USERNAME / CEPH_PASSWORD: Ceph Dashboard credentials for io.kestra.plugin.ceph.rgw.ListBuckets, matching the secret naming already used by this repository's other Ceph blueprints.SLACK_WEBHOOK_URL: Slack incoming webhook used by both alert branches and the errors block.SECRET_, base64-encoded - for example SECRET_CEPH_PASSWORD=$(echo -n '<your-local-password>' | base64) - and read back in flows with {{ secret('NAME') }}.ceph_host (STRING, default ceph-mgr.internal): Ceph Dashboard host.critical_bucket_name (STRING, must be replaced): the bucket that must always exist.max_expected_bucket_count (INT, default 50): governance threshold on total bucket count.outputs.probe_list_buckets.total (Integer): number of buckets returned (verified field from ListBuckets's own Output class).outputs.probe_list_buckets.buckets (List of String): bucket names in the gateway, only populated with the default FETCH fetch type used here.CEPH_USERNAME, CEPH_PASSWORD, and SLACK_WEBHOOK_URL secrets.log_inventory_healthy fires if the critical bucket exists and total count is within threshold.critical_bucket_name at a bucket name that does not exist, and re-run to confirm alert_critical_bucket_missing fires.max_expected_bucket_count below the gateway's real bucket count, and re-run to confirm alert_bucket_count_exceeded fires.periodic_inventory_check once you trust the check against your real gateway.ceph_host values with io.kestra.plugin.core.flow.Loop to audit multiple RGW gateways in one run.critical_bucket_name over a list input instead of a single value.io.kestra.plugin.ceph.rgw.ListUsers (the same plugin's user-listing equivalent) to audit RGW user inventory for orphaned or unauthorized access-key holders alongside bucket drift.ListBuckets returns bucket names only, not owner, size, or quota - verified directly from its own Output class (total and buckets, nothing else). This sentinel can prove a bucket exists or vanished, but cannot by itself detect a bucket that still exists but has silently exceeded its quota or changed owner.fetchType: STORE (per the task's own documented guidance for "gateways with a large number of buckets") instead of the default FETCH used here, to avoid holding every bucket name in task output; this blueprint intentionally uses FETCH since both critical_bucket_name presence and total need to be evaluated inline.CRITICAL_BUCKET_MISSING fires identically in both cases; the Slack alert is the start of an investigation, not a diagnosis.