Apache Pulsar multi-tenant backlog quarantine and priority event router
Drain a multi-tenant Pulsar topic and route each batch by tenant priority tier, logging ENTERPRISE traffic and quarantining the rest, with a Slack report per run.
Triage monitoring alerts automatically with Python-based SRE diagnostics and route critical incidents to PagerDuty and Slack war rooms.
Production incidents demand immediate diagnostics, but waking up engineers for transient glitches or misdiagnosing saturated connection pools drives alert fatigue. This blueprint implements an event-driven incident auto-triage workflow that intercepts alerts via Webhook, executes containerized diagnostic runbooks with Python, and conditionally escalates confirmed critical outages to PagerDuty and Slack while suppressing false alarms.
webhook_alert trigger (io.kestra.plugin.core.trigger.Webhook) accepts real-time incident payloads from monitoring stacks (Prometheus Alertmanager, Datadog, Grafana, AWS CloudWatch).automated_diagnostics task (io.kestra.plugin.scripts.python.Script inside Docker) inspects raw error logs and stack traces against heuristic SRE runbook patterns (database connection starvation, OOM kills, unclassified errors), extracting actionable mitigation actions and an escalation recommendation.evaluate_severity_and_escalate flowable task (io.kestra.plugin.core.flow.If) evaluates whether the diagnosis requires human intervention:trigger_pagerduty_incident (io.kestra.plugin.pagerduty.PagerDutyAlert) using Events API v2 with automatic deduplication, then dispatches an incident briefing card to Slack via dispatch_slack_war_room (io.kestra.plugin.slack.notifications.SlackIncomingWebhook).log_routine_notice (io.kestra.plugin.core.log.Log) without waking on-call personnel.finalize_incident_audit_record task (io.kestra.plugin.core.output.OutputValues) publishes structured triage findings for post-mortem analysis and SLA reporting.errors handler (on_pipeline_failure_fallback) ensures that if the triage pipeline itself fails, an emergency PagerDuty alert is dispatched to safeguard observability reliability.Kestra coordinates webhook ingestion, isolated Docker runtime environments for Python diagnostics, conditional routing logic, and multi-channel alerting into a single auditable execution graph. If a downstream notification fails or logs are malformed, Kestra's execution history provides full replayability and audit traces without maintaining dedicated triage servers.
PAGERDUTY_ROUTING_KEY: 32-character PagerDuty Integration Key for the Events API v2 endpoint.SLACK_WEBHOOK_URL: Slack Incoming Webhook URL for incident notification broadcasting.PAGERDUTY_ROUTING_KEY and SLACK_WEBHOOK_URL in your Kestra namespace secrets.company.sre.then branch.