Schedule icon
Request icon
Switch icon
SlackIncomingWebhook icon
If icon
Log icon

ZincSearch Index Health & Storage Capacity Sentinel

Audit ZincSearch index storage depth, detect unpruned index bloat and health degradation, alert on Slack, and safely enforce storage capacity quotas.

Categories
Infrastructure

ZincSearch is a modern, lightweight, open-source search engine written in Go as a resource-efficient alternative to Elasticsearch for full-text search and log analytics. Requiring less than 100 megabytes of memory to index millions of records, ZincSearch is widely adopted across lightweight Kubernetes clusters, edge nodes, and developer environments. In production log aggregation and telemetry pipelines, unattended indexes can rapidly accumulate millions of documents, exhausting container volume capacity and triggering unrecoverable disk saturation. This blueprint establishes an automated operational sentinel that continuously verifies ZincSearch engine health, audits index storage usage against enterprise capacity limits, routes incident alerts to Slack, and provides guarded automated pruning of stale ephemeral indexes.

How it works

  1. periodic_zincsearch_audit (io.kestra.plugin.core.trigger.Schedule) initiates automated surveillance every 15 minutes. Shipped disabled so initial manual verification can be performed first.
  2. probe_server_health (io.kestra.plugin.core.http.Request) invokes GET /healthz to verify node uptime and indexing core responsiveness.
  3. probe_index_registry (io.kestra.plugin.core.http.Request) invokes GET /api/index with basic authentication to inspect all registered indexes, document tallies, and storage volume sizes.
  4. classify_index_storage (io.kestra.plugin.core.flow.Switch) analyzes probe results:
    • INSTANCE_UNHEALTHY: Fires when the health check endpoint returns a non-200 code or error status, routing an emergency Slack alert via io.kestra.plugin.slack.notifications.SlackIncomingWebhook.
    • STORAGE_QUOTA_EXCEEDED: Fires when index storage approaches capacity bounds, notifying the SRE channel. If auto_purge_stale_indexes is enabled with dry_run disabled, executes purge_ephemeral_index (DELETE /api/index/{name}) to safely reclaim disk space.
    • HEALTHY: Confirms nominal engine responsiveness and healthy storage margins.
  5. log_audit_summary (io.kestra.plugin.core.log.Log) writes an immutable audit record documenting evaluated index counts and operational health.
  6. Global errors handler catches network connection drops or invalid credentials, immediately dispatching a probe failure alert to Slack.

What you get

  • Continuous monitoring of ZincSearch server responsiveness and index storage growth.
  • Early warning before unmanaged log indexes saturate disk volumes and halt search ingestion.
  • Safe guarded index pruning: dry_run defaults to true to ensure zero unexpected data loss during rollout.
  • Automated Slack incident routing with host details, index tallies, and storage capacity metrics.

Who it's for

  • Platform Engineers and SREs maintaining lightweight observability stacks on Kubernetes and edge hardware.
  • DevOps Teams operating ZincSearch as a drop-in log search engine for CI/CD pipelines.
  • Cloud Infrastructure Administrators managing disk quotas and preventing runaway storage costs.

Why orchestrate this with Kestra

ZincSearch provides native REST endpoints but lacks built-in alerting, scheduling, or multi-step self-healing workflows. Relying on custom shell scripts or ad-hoc cron jobs introduces single points of failure, credential exposure, and zero audit lineage. Kestra delivers a declarative, version-controlled YAML blueprint with native scheduling, credential protection through secret masking, conditional branching, and complete execution observability.

Prerequisites

  • A running ZincSearch server (version 0.4.0+) accessible over HTTP. ZincSearch provides an official open-source Docker image (zincsearch/zincsearch:latest) requiring no commercial license.
  • An incoming Slack webhook URL for operational notifications.

Secrets

  • SLACK_WEBHOOK_URL: Slack incoming webhook URL for operational alert notifications.
  • ZINCSEARCH_ADMIN_USER: Administrative username for authenticating to the ZincSearch REST API.
  • ZINCSEARCH_ADMIN_PASSWORD: Administrative password for authenticating to the ZincSearch REST API.

Quick start

  1. Start a local ZincSearch test container:
    docker run -d --name zincsearch-test -p 4080:4080 -e ZINC_FIRST_ADMIN_USER=admin -e ZINC_FIRST_ADMIN_PASSWORD=ComplexPassword123! zincsearch/zincsearch:latest
    
  2. Configure SLACK_WEBHOOK_URL, ZINCSEARCH_ADMIN_USER, and ZINCSEARCH_ADMIN_PASSWORD in your Kestra namespace secrets.
  3. Import this blueprint into Kestra and trigger an execution with default inputs (dry_run: true).
  4. Verify that log_healthy_state logs nominal index counts and capacity status.
  5. Test quota alerting by creating a sample test index and populating documents:
    curl -X POST http://localhost:4080/api/index -u admin:ComplexPassword123! -H "Content-Type: application/json" -d '{"name": "test-log-index", "storage_type": "disk"}'
    
  6. Re-run the flow to observe alert_storage_quota_slack firing.
  7. Enable periodic_zincsearch_audit to activate recurring 15-minute surveillance.

How to extend

  • Add Prometheus metric exports via io.kestra.plugin.prometheus to track index storage expansion trends and document velocity over time.
  • Integrate with PagerDuty via io.kestra.plugin.pagerduty.notifications.PagerDutyAlert for high-severity search cluster outages.
  • Add automated index snapshots to S3 using io.kestra.plugin.aws.s3.Upload before index pruning to preserve cold log archives.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.