New to Kestra?
Use blueprints to kickstart your first workflows.
Fire a Kestra flow the moment a Metaplane monitor changes status. Degradations page Discord, recoveries post a note, and stable monitors cost nothing.
Most alerting either spams on every check or stays quiet until someone looks. This blueprint does neither. io.kestra.plugin.metaplane.MonitorResultTrigger polls one monitor on an interval and fires an execution only when the status differs from the previous check, the first evaluation just establishes the baseline. A flip to FAIL or ERROR pages Discord within the polling interval; a flip back to PASS posts a recovery note so nobody keeps investigating a resolved issue. Between changes, the trigger produces no executions at all.
on_status_change (io.kestra.plugin.metaplane.MonitorResultTrigger) polls the monitor every five minutes (interval: PT5M). It compares each result against the previous one and fires only on a change; a monitor that stays PASS, or even stays FAIL, generates nothing.trigger.status, trigger.monitorId, and trigger.checkedAt, the status at the moment of change, the monitor it belongs to, and when the monitor last ran.route_status (io.kestra.plugin.core.flow.If) branches on the new status. PASS means the monitor just recovered from something worse; anything else, FAIL, ERROR, UNKNOWN, or an in-training state, means it just degraded.errors block alerts when the reaction flow itself breaks, because a dead webhook must not convert a status change into silence.A status change is an event, and events deserve workflows, not just notifications. Putting the reaction in Kestra means the response can grow from a Discord message into anything the platform runs, quarantine a table, re-run an upstream load, open a ticket, all versioned in the same flow and all traceable to the exact transition that caused them. The trigger keeps state between polls, so the change detection needs no external storage.
METAPLANE_API_TOKEN: Metaplane API token.DISCORD_WEBHOOK_URL: Discord incoming webhook URL.monitorId with a UUID from your Metaplane workspace.disabled: false on the trigger; the first poll establishes the baseline without firing.interval for critical monitors or relax it for noisy ones to balance latency against API calls.io.kestra.plugin.metaplane.Get before paging, as shown in the incident context fetch blueprint.