New to Kestra?
Use blueprints to kickstart your first workflows.
Audits Meilisearch search clusters for indexing task queue backlog and document processing stalls, delivering actionable alerts to engineering on Slack.
Modern search-driven applications rely on Meilisearch for ultra-fast, typo-tolerant search experiences across product catalogs, knowledge bases, and user directories. Meilisearch processes document additions, updates, and schema modifications asynchronously in an internal task queue. Under heavy write spikes, unbatched document uploads, or disk I/O saturation, indexing tasks can stall or accumulate silently behind long-running schema updates. Because search query endpoints continue returning cached or stale results with HTTP 200 responses, standard black-box HTTP monitors fail to detect ingestion pipeline degradation. This sentinel inspects the Meilisearch Tasks API on a 10-minute cadence, tracks queued task volume and the age of in-flight mutations, and alerts platform engineers on Slack before search freshness regressions impact end users.
*/10 * * * *) or runs on-demand via manual execution./tasks with filters for enqueued and processing task statuses.max_enqueued_tasks_threshold or if any single task duration surpasses max_task_age_seconds_threshold.io.kestra.plugin.core.flow.If flowable checks if the cluster is marked stalled and dispatches a Slack alert to #search-platform-alerts.flowchart TD
A[ten_minute_meilisearch_audit Schedule Trigger] --> B[evaluate_indexing_queue Python Script]
B --> C[check_indexing_staleness Flowable If]
C -- Queue Stalled --> D[notify_slack_indexing_stall Webhook]
C -- Queue Nominal --> E[log_indexing_status Log]
D --> E
E --> F[export_indexing_manifest Return]
Meilisearch decouples search querying from indexing via an asynchronous single-threaded batch queue. While this architecture guarantees sub-50ms search query performance, it conceals indexing pipeline stalls behind HTTP 200 responses. Kestra provides scheduled orchestration with native container isolation, secret management for master API keys, conditional flow routing, and multi-channel alerting plugins. By running the sentinel in Kestra, teams avoid spinning up complex external cron runners while gaining full audit logs and execution history.
| Name | Type | Default | Description |
|---|---|---|---|
meilisearch_host |
STRING |
https://search.internal.company.com:7700 |
Base HTTP endpoint of the Meilisearch cluster or cloud instance. |
max_enqueued_tasks_threshold |
INT |
100 |
Maximum allowable pending and processing indexing tasks before flagging an ingestion stall. |
max_task_age_seconds_threshold |
INT |
300 |
Maximum allowable duration in seconds for the oldest processing task before declaring a stuck pipeline. |
target_index_uid |
STRING |
all |
Specific index UID to monitor, or all to audit all active indexes across the cluster. |
alert_on_staleness |
BOOL |
true |
Whether to dispatch automated Slack notifications when indexing stalls or backlogs are detected. |
{{ outputs.evaluate_indexing_queue.vars.total_pending_tasks }}: Total number of pending and processing tasks currently in the Meilisearch queue.{{ outputs.evaluate_indexing_queue.vars.oldest_task_age_seconds }}: Age in seconds of the oldest active indexing task.{{ outputs.evaluate_indexing_queue.vars.is_stalled }}: Boolean flag indicating whether the indexing queue has breached configured thresholds.{{ outputs.export_indexing_manifest.value }}: Structured dictionary containing the complete diagnostic manifest./tasks route.MEILISEARCH_MASTER_KEY: Meilisearch API key or master key with permissions to query task statuses.SLACK_WEBHOOK_URL: Slack Incoming Webhook URL used to dispatch incident notifications.MEILISEARCH_MASTER_KEY and SLACK_WEBHOOK_URL in your Kestra secret manager.company.search namespace.meilisearch_host to your internal Meilisearch endpoint and adjust max_enqueued_tasks_threshold to your workload.MEILISEARCH_MASTER_KEY has permission to inspect tasks across all index UIDs; restricted keys may return 403 Forbidden.DELETE /tasks?statuses=enqueued if runaway rogue tasks block the queue.