Schedule icon
CollectionInfo icon
Switch icon
Log icon
SlackIncomingWebhook icon

Audit Qdrant Vector Collection Indexing Health and Status

Audit Qdrant vector collection health, status, and HNSW indexing lag with Kestra. Detect degraded indexes and dispatch automated operational Slack alerts.

Categories
AIData

In production AI retrieval-augmented generation (RAG) and semantic search architectures, vector databases like Qdrant ingest continuous streams of high-dimensional embeddings. As new vectors arrive, points remain unindexed in memory buffers until Qdrant's background HNSW segment optimizers consolidate them into search graphs. If indexing threads stall, memory constraints arise, or collection status transitions to Yellow or Red, vector queries fall back to exact brute-force scanning, causing severe query latency spikes and RAG timeouts.

This blueprint implements an automated Day 2 Operations sentinel flow that queries Qdrant collection metadata on a recurring schedule. It inspects operational cluster status, compares total points against indexed vector counts to measure unindexed vector lag, evaluates health against warning thresholds, and dispatches real-time Slack notifications when indexing falls behind SLA targets.

How it works

  1. schedule (io.kestra.plugin.core.trigger.Schedule) triggers the audit pass every 6 hours (disabled by default for initial setup).
  2. probe_collection (io.kestra.plugin.qdrant.CollectionInfo) queries collection metadata over gRPC, extracting operational status, point counts, indexed vector counts, and vector configuration dimensions.
  3. evaluate_health (io.kestra.plugin.core.flow.Switch) evaluates whether collection status is degraded (status != 'Green') or whether unindexed points (pointsCount - indexedVectorsCount) exceed max_unindexed_lag.
  4. When within acceptable operational parameters (HEALTHY), log_healthy_status records the green state and metrics.
  5. When degraded or lagging (DEGRADED), alert_collection_degraded dispatches an operational alert to Slack using io.kestra.plugin.slack.notifications.SlackIncomingWebhook, and log_remediation_guidance logs actionable optimization telemetry.
  6. log_audit_completion writes a final audit recap for execution tracking and lineage.
  7. The flow-level errors block alerts Slack immediately if gRPC connectivity or authentication fails.

What you get

  • Early warning of Qdrant HNSW indexing backlog before query latency impacts live RAG pipelines.
  • Proactive collection status monitoring (Green, Yellow, Red, Grey).
  • Measurement of exact unindexed vector gaps between raw storage and search indexes.
  • Automated Slack incident notifications with point counts and remediation context.
  • Flow-level error alerting safeguarding audit pipeline reliability.

Who it's for

  • AI Engineers and MLOps Teams operating vector search and RAG knowledge bases in production.
  • Platform Engineers and Site Reliability Engineers managing Qdrant vector database clusters.
  • Data Engineers maintaining automated embedding ingestion and vector sync pipelines.

Why orchestrate this with Kestra

Monitoring vector database indexing health with isolated cron scripts requires managing gRPC client dependencies, credential rotation, error handling, and alerting integrations in custom application code. Kestra provides a declarative workflow engine with native Qdrant gRPC integration, centralized secret management, conditional branching, execution history, and native Slack notifications without maintaining custom monitoring infrastructure.

Prerequisites

  • A running Qdrant vector database instance (v1.7.0+ or compatible Qdrant Cloud deployment).
  • An existing Qdrant collection (e.g. enterprise-knowledge-base).
  • A Slack Incoming Webhook URL configured in Kestra secrets.

Local Docker Container Setup

To run Qdrant locally for development and testing while avoiding host port 8080 conflicts:

docker run -d --name qdrant-dev -p 6333:6333 -p 6334:6334 qdrant/qdrant:latest

If Kestra is running inside a Docker network, connect the Qdrant container to Kestra network:

docker network ls
docker network connect YOUR_KESTRA_NETWORK qdrant-dev

Secrets

  • QDRANT_API_KEY: API key or Bearer token for authenticated Qdrant instances (leave blank or placeholder for local dev without auth).
  • SLACK_WEBHOOK: Incoming Webhook URL for Slack alerting.

Note for Kestra Open-Source (OSS): Secrets are provided as base64-encoded environment variables formatted as SECRET_<NAME> on the Kestra server or worker environment.

Inputs

Name Type Default Allowed Values Description
qdrant_host STRING "localhost" Hostname or IP Qdrant gRPC endpoint host
qdrant_port INT 6334 1-65535 Qdrant gRPC service port
collection_name STRING "enterprise-knowledge-base" Any valid collection name Target Qdrant vector collection
max_unindexed_lag INT 100 Positive integer Max allowable unindexed vector gap
remediation_mode SELECT "ALERT_ONLY" "ALERT_ONLY", "OPTIMIZE_LOG" Operational remediation action mode
dry_run SELECT "true" "true", "false" Dry run simulation flag

Outputs

  • {{ outputs.probe_collection.status }}: Operational status of the collection (Green, Yellow, Red, Grey).
  • {{ outputs.probe_collection.pointsCount }}: Approximate total number of points stored in the collection.
  • {{ outputs.probe_collection.indexedVectorsCount }}: Approximate number of vectors indexed for HNSW search.
  • {{ outputs.probe_collection.vectorSize }}: Dimension size of vectors configured for this collection.

Quick start

  1. Configure QDRANT_API_KEY and SLACK_WEBHOOK in your Kestra namespace secrets.
  2. Import this blueprint into your Kestra instance.
  3. Run a manual execution with dry_run: "true" to verify gRPC connectivity and collection metadata extraction.
  4. Enable the schedule trigger to run automated recurring audits.

How to extend

  • Trigger automated index optimization by dispatching an HTTP POST to Qdrant's /collections/{name}/index API.
  • Integrate with PagerDuty or Opsgenie in the DEGRADED branch for critical production RAG outages.
  • Chain a downstream subflow using io.kestra.plugin.core.flow.Subflow to throttle upstream vector embedding ingestion during re-indexing spikes.

Pitfalls

  • gRPC Port Configuration: Qdrant uses port 6333 for HTTP REST and port 6334 for gRPC. The Kestra Qdrant plugin connects over gRPC; ensure port 6334 is exposed and reachable.
  • Initial Ingestion Bursts: Immediately after bulk upserts, indexedVectorsCount naturally lags as background indexing runs. Adjust max_unindexed_lag according to your typical ingestion batch size.
  • Port Conflicts: Ensure port 6333 and 6334 do not conflict with local application services.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.