New to Kestra?
Use blueprints to kickstart your first workflows.
Monitor active Datadog alerts with Kestra. Automatically query alerting monitors, synchronize incident tickets on GitHub, and alert SRE teams on Slack.
Production incidents frequently trigger multiple cascading alerts across Datadog monitors. Without centralized orchestration, engineers must manually cross-reference dashboards, open tracking tickets, and ping response channels. This blueprint polls Datadog's API for monitors in an active Alert state matching service and environment tags, automatically creates a consolidated GitHub incident issue with full monitor metadata, and dispatches an actionable Slack notification.
every_fifteen_minutes (io.kestra.plugin.core.trigger.Schedule) executes the audit periodically (shipped disabled for safe manual testing).probe_datadog_alerts (io.kestra.plugin.scripts.python.Script) interrogates the Datadog API (GET /api/v1/monitor) with specified tag filters and extracts monitors in overall_state: Alert.branch_on_active_alerts (io.kestra.plugin.core.flow.If) evaluates whether alert_count > 0:then: Automatically files a GitHub tracking issue via create_incident_github_issue (io.kestra.plugin.github.issues.Create) and dispatches a notification via notify_sre_slack (io.kestra.plugin.slack.notifications.SlackIncomingWebhook).else: Emits an informational log entry (log_all_monitors_healthy) confirming all monitors are healthy.log_audit_complete (io.kestra.plugin.core.log.Log) prints an audit log recording the monitor count for the run.errors block alerts Slack if API tokens are invalid or network connectivity fails.Kestra bridges monitoring systems (Datadog), engineering issue trackers (GitHub), and team communication platforms (Slack) into a single declarative workflow. It manages API credentials securely, provides auditability for every inspection cycle, and simplifies incident alerting without custom cron daemons or fragile microservices.
DATADOG_API_KEY: Datadog API key for authentication.DATADOG_APP_KEY: Datadog Application key for querying monitors.GITHUB_TOKEN: GitHub token used to open incident issues.SLACK_WEBHOOK: Slack incoming webhook URL for incident notifications.datadog_site (STRING, default datadoghq.com): Datadog site domain (datadoghq.com, datadoghq.eu, us3.datadoghq.com, etc.).monitor_tags (STRING, default env:prod,service:backend): Comma-separated tag filter used to restrict audited monitors.github_repository (STRING, default my-org/sre-incidents): GitHub repository (owner/repo) where incident tickets are created.outputs.probe_datadog_alerts.vars.alert_count: The number of monitors discovered in Alert status.outputs.probe_datadog_alerts.vars.has_alerts: Boolean indicator if any active alerts exist.outputs.probe_datadog_alerts.vars.alerting_monitors: List of monitor summary objects (id, name, type, message).DATADOG_API_KEY, DATADOG_APP_KEY, GITHUB_TOKEN, and SLACK_WEBHOOK secrets.datadog_site and monitor_tags to match your environment.every_fifteen_minutes schedule trigger to establish automated continuous incident monitoring.priority:p1) to route high-severity alerts to an urgent war room.