Trigger icon
OutputValues icon
Search icon
If icon
SlackIncomingWebhook icon
Fail icon
Log icon

Quickwit Error Surge and Incident Triage Sentinel

Monitor Quickwit log indexes with event-driven search triggers, detect sudden application error bursts, and alert Slack to escalate production incidents.

Categories
Infrastructure

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.

How it works

  1. 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.
  2. sample_and_aggregate_errors (io.kestra.plugin.core.output.OutputValues) extracts error counts, execution microsecond durations, and sample message payloads from trigger.documents.
  3. 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.
  4. evaluate_surge_severity (io.kestra.plugin.core.output.OutputValues) classifies the event as CRITICAL_SURGE or WARNING_ANOMALY based on the configured surge_threshold.
  5. route_incident_triage (io.kestra.plugin.core.flow.If) routes execution flow:
    • If a critical surge is identified, 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.
    • If the surge is sub-threshold, log_moderate_anomaly (io.kestra.plugin.core.log.Log) writes an audit receipt to execution logs.

What you get

  • Event-driven incident detection powered by native Quickwit index polling with automated watermark state management.
  • Contextual incident triage comparing instantaneous error spikes against historical 15-minute baselines.
  • Automated Slack alerting enriched with exact index names, error counts, timestamps, and representative error payloads.
  • Strict operational gate keeping production teams aware of rapid service failure cascades.

Who it's for

  • Site Reliability Engineers (SREs) and platform teams monitoring cloud-native microservice health.
  • DevOps engineers operating Quickwit on object storage (Amazon S3, MinIO, Google Cloud Storage).
  • Incident commanders triaging production deployment regressions and distributed tracing anomalies.

Why orchestrate this with Kestra

  • Native Trigger Watermarking: The Quickwit search trigger automatically tracks high-water mark timestamps in Kestra KV storage, eliminating complex state-tracking boilerplate.
  • Combined Search & Ingestion: Seamlessly combine native search queries with downstream alerting, incident webhook dispatch, or automated rollbacks.
  • Low-Latency Incident Gating: Eliminates long polling delays by reacting within 60 seconds of error log indexing.
  • Zero Data Loss Observability: Complete execution history, query latencies, and payload captures are stored in Kestra audit logs.

Prerequisites

  • A running Quickwit cluster reachable via HTTP, deployable locally via Docker:
    docker run --rm -p 7280:7280 quickwit/quickwit:latest run
    
  • A Quickwit index (e.g., app-logs) configured with a timestamp field.
  • A Slack incoming webhook URL for incident notifications.

Secrets

  • 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.

Quick start

  1. Deploy Quickwit locally using the official quickwit/quickwit:latest Docker image.
  2. Configure namespace secrets QUICKWIT_URL and SLACK_WEBHOOK_URL in your Kestra namespace.
  3. Import this blueprint into your Kestra instance under namespace company.platform.
  4. Trigger a manual test run or ingest sample error logs into Quickwit to verify trigger execution and Slack alerting.

How to extend

  • Automated Deployment Rollback: Chain an io.kestra.plugin.kubernetes.kubectl.RolloutUndo task to automatically roll back bad Kubernetes deployments when error surges exceed critical thresholds.
  • PagerDuty Escalation: Replace or augment the Slack notification with io.kestra.plugin.pagerduty.PagerDutyAlert to trigger high-urgency on-call phone paging during off-hours.
  • Multi-Service Filtering: Customize the trigger query to target specific critical payment, checkout, or auth microservices.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.