Schedule icon
Get icon
Search icon
If icon
SlackIncomingWebhook icon
Log icon

Quickwit Search Latency and Error Budget Sentinel

Audit Quickwit search latency and error log volume. Evaluate query SLA thresholds and trigger Slack alerts when performance degrades.

Categories
DataInfrastructure

Quickwit indexes petabytes of distributed logs, events, and OpenTelemetry traces into immutable splits stored on object storage. When data ingestion volume spikes, split counts fragment, or search worker nodes encounter resource contention, search query execution latency can silently degrade past acceptable service level agreements (SLAs), while application error bursts accumulate unnoticed.

This blueprint provides an automated Day 2 operations sentinel that inspects Quickwit index metadata, executes a canary search query to measure real-time execution duration in microseconds, audits recent error log document volume across a rolling lookback window, and triggers automated Slack alerts when operational budgets breach.

How it works

  1. periodic_sentinel_schedule triggers the sentinel workflow on a 15-minute cron schedule (disabled by default so connection endpoints and thresholds can be configured).
  2. probe_index_metadata calls io.kestra.plugin.quickwit.index.Get to retrieve index metadata, verifying the target index exists and reading its UID and configuration.
  3. probe_error_volume invokes io.kestra.plugin.quickwit.search.Search with a query targeting severity:ERROR OR status:>=500 starting from now() - lookback_minutes. It inspects outputs.probe_error_volume.total to quantify recent error volume.
  4. probe_canary_latency executes a wildcard canary query using io.kestra.plugin.quickwit.search.Search with fetchType: NONE to measure the raw search processing duration via outputs.probe_canary_latency.elapsedTimeMicros.
  5. evaluate_slo_and_error_budget uses io.kestra.plugin.core.flow.If to check if canary latency in milliseconds exceeds latency_sla_ms or if the error document count exceeds error_budget_count.
  6. When a breach occurs, evaluate_alert_mode checks alert_mode: ALERT posts a formatted Slack notification via io.kestra.plugin.slack.notifications.SlackIncomingWebhook, while AUDIT_ONLY logs the violation without paging on-call staff.
  7. When performance is nominal, log_healthy_status records a healthy audit entry.
  8. log_sentinel_audit_complete runs at the conclusion of every execution to maintain an unbroken audit trail of sentinel passes.
  9. A flow-level errors handler catches connection errors or unreachable endpoints and alerts operators that the monitoring sentinel is offline.

What you get

  • Automated, continuous monitoring of Quickwit search query latency and error document spikes without deploying external monitoring daemons.
  • Dual-budget evaluation: covers both query responsiveness (latency SLA) and application health (log error budget).
  • Dry-run capability via AUDIT_ONLY mode to benchmark baseline cluster performance before enabling live alerting channels.
  • Out-of-band error handling that catches network partitions or cluster downtime and prevents silent monitoring failures.
  • Comprehensive execution metrics recorded directly in Kestra for auditability and compliance reporting.

Who it's for

  • Site Reliability Engineers (SREs) and DevOps engineers maintaining self-hosted Quickwit clusters for log management and trace storage.
  • Platform engineers responsible for search latency SLAs across enterprise observability stacks.
  • Data platform administrators seeking automated health gates and anomaly alerting on analytical search engines.

Why orchestrate this with Kestra

Quickwit does not provide native scheduled alerting or multi-channel notification dispatching out of the box. Kestra provides declarative, version-controlled workflow orchestration with built-in secret masking, conditional branching, native Slack integrations, and full execution history tracking. Managing the sentinel as a Kestra blueprint replaces fragile bash cron jobs with a resilient, observable automation pipeline.

Prerequisites

  • A running Quickwit instance (version 0.8.0 or later) reachable over HTTP/HTTPS from the Kestra worker environment.
  • A Quickwit index populated with searchable log or trace documents.
  • A Slack incoming webhook URL for dispatching alerts.

Secrets

  • SLACK_WEBHOOK: Incoming webhook URL for the target Slack channel (required for live alerting).

Note for Kestra Open-Source (OSS): Secrets are configured as base64-encoded environment variables formatted as SECRET_<NAME> (e.g. SECRET_SLACK_WEBHOOK).

Inputs

Name Type Default Allowed Values Description
quickwit_url STRING "http://localhost:7280" Reachable Quickwit REST URL Base URL of the Quickwit REST API service
index_id STRING "app-logs" Valid index identifier Identifier of the Quickwit index to audit
lookback_minutes INT 15 Positive integer Rolling time window in minutes to evaluate error volume
latency_sla_ms INT 500 Positive integer Maximum acceptable query duration in milliseconds
error_budget_count INT 25 Positive integer Maximum error documents allowed before triggering alert
alert_mode SELECT "ALERT" "ALERT", "AUDIT_ONLY" Alerting behavior mode on threshold breach

Outputs

  • {{ outputs.probe_index_metadata.indexUid }}: Server-generated unique identifier of the target Quickwit index.
  • {{ outputs.probe_canary_latency.elapsedTimeMicros }}: Search query execution duration in microseconds.
  • {{ outputs.probe_error_volume.total }}: Total matching error log documents within the lookback window.

Quick start

  1. Start a local Quickwit container on port 7280 (avoiding host port 8080):

    docker run -d
    --name quickwit-sentinel
    -p 7280:7280
    quickwit/quickwit:latest run

  2. Connect the Quickwit container to the Kestra Docker network:

    docker network connect YOUR_KESTRA_NETWORK quickwit-sentinel

    Identify your network name using docker network ls.

  3. Create a sample index and ingest sample documents following the official Quickwit tutorial:

    curl -X POST http://localhost:7280/api/v1/indexes
    -H "Content-Type: application/yaml"
    --data-binary @tutorial-index-config.yaml

  4. Configure the SLACK_WEBHOOK secret in your Kestra environment.

  5. Import this blueprint into your Kestra instance.

  6. Run the flow manually with alert_mode: AUDIT_ONLY to establish baseline search latency and verify connectivity.

  7. Enable periodic_sentinel_schedule to begin automated 15-minute operational sweeps.

How to extend

  • Add automated index split compaction by triggering a POST request to /api/v1/indexes/{index_id}/compact when latency degrades.
  • Route alerts to PagerDuty or Microsoft Teams based on error severity using complementary notification plugins.
  • Integrate with a subflow to dynamically adjust ingest throttling or scale replica searcher nodes when latency remains elevated across consecutive runs.
  • Store historical latency and error counts in DuckDB or PostgreSQL for weekly SLA compliance reports.

Links

Pitfalls

  • Port conflict: Quickwit runs on HTTP port 7280 by default. Ensure port 7280 is used in the JDBC/REST URL, and never bind container ports to 8080 to prevent collision with Kestra web UI.
  • Network isolation: When running Kestra and Quickwit in separate Docker containers, localhost:7280 will resolve to the Kestra container itself. Use the container hostname (e.g. http://quickwit-sentinel:7280) on a shared Docker bridge network.
  • Index naming: Quickwit enforces strict validation on index IDs (lowercase alphanumeric characters, underscores, and hyphens). Verify the index ID exists before activating schedules.
  • Large result payloads: When executing search queries, keep maxHits small (maxHits: 5) and use fetchType: NONE or fetchType: FETCH with limited limits to avoid exceeding Kestra memory limits.
See How

New to Kestra?

Use blueprints to kickstart your first workflows.