New to Kestra?
Use blueprints to kickstart your first workflows.
Monitor Quickwit log indexes with event-driven search triggers, detect sudden application error bursts, and alert Slack to escalate production incidents.
Detect sudden application error surges and distributed service degradation in real time using event-driven Quickwit search triggers, evaluate historical baselines, and dispatch high-priority incident triage alerts before outages escalate.
Modern microservice architectures generate millions of log lines per minute. When upstream services degrade, downstream databases stall, or bad deployments roll out, error logs flood indexing pipelines. Polling on a fixed schedule can delay incident response by 10 to 15 minutes. This blueprint leverages Kestra's event-driven io.kestra.plugin.quickwit.search.Trigger to poll the Quickwit log index continuously. It maintains an automated watermark in Kestra KV storage so duplicate errors are never re-evaluated, queries baseline error volume via io.kestra.plugin.quickwit.search.Search, extracts representative stack traces, and pages on-call SREs the moment error thresholds breach.
on_error_log_burst (io.kestra.plugin.quickwit.search.Trigger) polls the target Quickwit index every 60 seconds for documents matching severity:ERROR OR status:[500 TO 599], advancing the watermark to prevent duplicate notifications.sample_and_aggregate_errors (io.kestra.plugin.core.output.OutputValues) extracts error counts, execution microsecond durations, and sample message payloads from trigger.documents.query_cluster_context (io.kestra.plugin.quickwit.search.Search) queries the Quickwit cluster across a 15-minute lookback window to determine background error baseline rates.evaluate_surge_severity (io.kestra.plugin.core.output.OutputValues) classifies the event as CRITICAL_SURGE or WARNING_ANOMALY based on the configured surge_threshold.route_incident_triage (io.kestra.plugin.core.flow.If) routes execution flow:alert_error_surge (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) dispatches a detailed diagnostic alert to Slack with sample messages and baselines, and fail_on_surge (io.kestra.plugin.core.execution.Fail) flags the incident for SLA tracking.log_moderate_anomaly (io.kestra.plugin.core.log.Log) writes an audit receipt to execution logs.docker run --rm -p 7280:7280 quickwit/quickwit:latest run
app-logs) configured with a timestamp field.QUICKWIT_URL: The base HTTP endpoint of the Quickwit cluster (e.g., http://quickwit:7280 or https://quickwit.internal:7280).SLACK_WEBHOOK_URL: The Slack incoming webhook URL for incident response alerting.quickwit/quickwit:latest Docker image.QUICKWIT_URL and SLACK_WEBHOOK_URL in your Kestra namespace.company.platform.io.kestra.plugin.kubernetes.kubectl.RolloutUndo task to automatically roll back bad Kubernetes deployments when error surges exceed critical thresholds.io.kestra.plugin.pagerduty.PagerDutyAlert to trigger high-urgency on-call phone paging during off-hours.