New to Kestra?
Use blueprints to kickstart your first workflows.
Monitor Typesense collections on a schedule for zero-hit search outages, document depletion drift, and cluster reachability failures with Slack alerting.
Silent failures in customer-facing search infrastructure are among the most difficult
production outages to catch with standard infrastructure health checks. A Typesense
process can report 200 OK on its HTTP /health endpoint while the underlying collection
has been wiped by a faulty ingestion batch, corrupted during a schema migration, or
depleted due to an unhandled upstream filter drop. When customers type common queries,
they receive empty search result pages while synthetic ping probes report all systems green.
This blueprint implements a production-grade sentinel pattern that actively validates search result integrity, catalog depth, and facet availability inside Typesense on an automated schedule.
io.kestra.plugin.core.trigger.Schedule triggers the workflow
every 30 minutes, or upon manual execution by platform engineers.probe_search_canary (io.kestra.plugin.typesense.Search) executes a representative
query (such as shoes) with allowFailure: true so network timeouts or deleted collections
do not crash the flow before classification occurs.probe_facet_distribution (io.kestra.plugin.typesense.FacetSearch) evaluates the
multi-facet category distribution across the collection to confirm index breadth.classify_sentinel_status (io.kestra.plugin.core.debug.Return) evaluates probe outputs
using Pebble logic, categorizing status into PROBE_FAILED, ZERO_HITS,
LOW_INVENTORY_DRIFT, or HEALTHY.route_by_sentinel_status (io.kestra.plugin.core.flow.Switch) routes downstream actions:ZERO_HITS: Dispatches a high-priority Slack incident notification.LOW_INVENTORY_DRIFT: Dispatches a Slack warning flagging catalog depletion.PROBE_FAILED: Dispatches an unreachable cluster or missing collection alert.HEALTHY: Emits an operational confirmation log with total hit metrics.log_audit_summary (io.kestra.plugin.core.log.Log) records an immutable audit trail
entry with execution ID and verified document counts.errors handler catches unexpected orchestration faults and routes them to Slack.Script-based search monitoring typically requires cron servers, unmanaged secrets, and custom alerting scripts that fail silently when network errors occur. Kestra provides native Typesense tasks, declarative secret injection, robust conditional branching via Pebble expressions, and built-in Slack notification dispatching within a single auditable workflow.
typesense/typesense:27.1).TYPESENSE_API_KEY: API key with search permissions on the target Typesense collection (required).SLACK_WEBHOOK: Slack Incoming Webhook URL used for dispatching alert notifications (required).TYPESENSE_API_KEY and SLACK_WEBHOOK secrets in your Kestra namespace.docker run -p 8108:8108 -v /tmp/typesense-data:/data typesense/typesense:27.1 --data-dir /data --api-key=xyzevery_30_minutes schedule trigger to establish automated monitoring.ZERO_HITS is detected.ForEach loop to validate multiple business-critical collections sequentially.