New to Kestra?
Use blueprints to kickstart your first workflows.
List DigitalOcean monitoring alert policies on a schedule and alert Slack naming the real ones that are disabled.
A DigitalOcean monitoring alert policy that gets disabled during an incident, a maintenance window, or a debugging session does not announce itself, the resource it watches keeps running, nothing in the DigitalOcean UI flags it as a gap, and the policy simply stops firing. This blueprint lists every alert policy on the account on a schedule, counts the real ones that are disabled, and alerts Slack naming exactly which ones, never an invented count.
probe_alert_policies (io.kestra.plugin.digitalocean.monitoring.alertpolicy.List)
lists every alert policy on the account, with allowFailure: true so a bad or
expired API token does not stop the flow before it can be classified as
PROBE_FAILED below.classify_alert_policy_status (io.kestra.plugin.core.debug.Return) returns
PROBE_FAILED when the probe did not return at all, CRITICAL or WARNING from the
real count of policies where enabled is false, against the two thresholds,
HEALTHY otherwise.route_by_alert_policy_status (io.kestra.plugin.core.flow.Switch) branches on that
status: HEALTHY logs it, the other three alert Slack, WARNING and CRITICAL name
the real disabled policy types and UUIDs, never an invented list. A defaults branch
logs anything unexpected.log_audit_summary always runs last. The errors block posts to Slack if the flow
itself fails outside the gate logic above.monitoring.alertpolicy.List and its pagination.DigitalOcean has no built-in alert for "an alert policy itself is disabled", that is exactly the kind of meta-monitoring gap a dashboard will not catch since a disabled policy produces no signal at all. Kestra adds the schedule, the threshold policy, and the Slack alert naming the real policies as one declarative, auditable flow.
DIGITALOCEAN_TOKEN: personal access token used by the probe task.
SLACK_WEBHOOK: Slack incoming webhook URL used by the alert tasks and the errors
block.
In Kestra OSS, set these as base64-encoded environment variables, for example
SECRET_DIGITALOCEAN_TOKEN, SECRET_SLACK_WEBHOOK.
disabled_count_warning_threshold (INT, default 1): Number of disabled alert policies at or above which the account is classified WARNING.disabled_count_critical_threshold (INT, default 3): Number of disabled alert policies at or above which the account is classified CRITICAL.{{ outputs.probe_alert_policies.total }}: Total number of alert policies discovered on the account.{{ outputs.probe_alert_policies.rows }}: List of alert policy maps containing uuid, type, and enabled boolean flags.{{ outputs.classify_alert_policy_status.value }}: The resulting compliance classification (HEALTHY, WARNING, CRITICAL, or PROBE_FAILED).WARNING naming the
policy you just disabled.HEALTHY.every_morning trigger.alerts.slack and alerts.email list, an
enabled policy with no notification channel configured is as silent as a disabled one.entities/tags against your own list of production droplet IDs or
tags to flag a production resource with no alert policy covering it at all, not only
an existing policy that got disabled.io.kestra.plugin.core.flow.Loop per DigitalOcean team if you
manage several teams' accounts from one Kestra instance.enabled reflects the policy's own setting, not whether its notification channel
(Slack, email, PagerDuty) is itself working, a policy can be enabled and still not
reach anyone if its webhook URL is stale.probe_alert_policies follows
pagination automatically, but an account with an extremely large number of policies
will make more than one API call per run.