Schedule icon
Request icon
Return icon
Switch icon
Log icon
SlackIncomingWebhook icon
OutputValues icon

ArangoDB Cluster Health and Supervision Sentinel

Audit ArangoDB multi-model cluster supervision, monitor node health, detect failed cluster members, and dispatch Slack incident alerts via Kestra.

Categories
Infrastructure

Continuously audits distributed ArangoDB multi-model clusters by querying Agency supervision health endpoints, evaluating coordinator and DBServer heartbeat vitality, classifying cluster status, and dispatching incident alerts to Slack.

How it works

  1. probe_cluster_health queries the ArangoDB administrative endpoint /_admin/cluster/health using HTTP authentication to retrieve real-time supervision status for all cluster nodes.
  2. probe_server_role queries /_admin/server/role to verify that the targeted endpoint is operating as an active coordinator.
  3. probe_engine_version queries /_api/version to extract server version and engine attributes.
  4. classify_cluster_status evaluates supervision responses through a Pebble conditional expression:
    • Detects nodes marked as FAILED (prolonged missed heartbeats) and classifies state as CRITICAL_NODE_FAILURE.
    • Detects nodes marked as BAD (transient heartbeat failure) and classifies state as WARNING_DEGRADED_NODE.
    • Confirms all cluster members report GOOD status to classify state as HEALTHY.
    • Identifies unreachable endpoints or non-200 responses to classify state as CLUSTER_UNREACHABLE.
  5. route_by_cluster_status branches workflow execution based on the classification:
    • HEALTHY: Logs cluster identifiers, member node counts, and engine versions.
    • WARNING_DEGRADED_NODE: Alerts operations on Slack with exact node IDs, roles, and endpoints missing heartbeats.
    • CRITICAL_NODE_FAILURE: Dispatches a high-priority Slack alert naming failed coordinators or DBServers requiring immediate remediation.
    • CLUSTER_UNREACHABLE: Alerts on-call engineers that coordinator HTTP endpoints are offline.
  6. log_audit_summary produces structured outputs recording cluster IDs, node counts, and classification states for compliance tracking.
  7. errors catches unexpected task exceptions and posts a diagnostic notice to Slack.

What you get

  • Automated, continuous surveillance of ArangoDB cluster supervision without external monitoring sidecars.
  • Real-time detection of failed DBServers or coordinators before shard replication splits or graph traversal timeouts occur.
  • Detailed Slack incident notifications containing exact node identifiers, assigned roles, and network endpoints.
  • Centralized audit trail capturing cluster metadata, node capacity, and version distribution.
  • Declarative scheduled execution with manual on-demand trigger support.

Who it's for

  • Platform Engineers and Site Reliability Engineers managing distributed ArangoDB clusters in production.
  • Database Administrators responsible for multi-model NoSQL cluster availability and shard consensus.
  • DevSecOps teams automating health verification gates for document, graph, and search workloads.

Why orchestrate this with Kestra

ArangoDB clusters depend on the Agency and Supervision consensus to maintain active shard leases and coordinator routing. If a DBServer fails or an agent drops out, running unmonitored can degrade graph queries and compromise transactional integrity. Kestra delivers automated, declarative orchestration with built-in scheduling, unified credential management, granular failure classification, and auditable execution history across all environments.

Prerequisites

  • A running ArangoDB cluster (or standalone test instance) with HTTP port 8529 accessible from the Kestra worker.
  • Administrative credentials or a JWT token for the target ArangoDB database.
  • An incoming Slack webhook URL for alert delivery.

Secrets

  • ARANGODB_AUTH_TOKEN: Base64-encoded username:password string or token used for HTTP authentication.
  • SLACK_WEBHOOK: Incoming Slack webhook URL used by alert_warning_slack, alert_critical_slack, alert_unreachable_slack, and the errors handler.

Quick start

  1. Configure the ARANGODB_AUTH_TOKEN (e.g. root:open-sesame encoded) and SLACK_WEBHOOK secrets in your Kestra namespace.
  2. Start a local ArangoDB test instance using Docker:
    docker run -d --name arangodb -e ARANGO_NO_AUTH=1 -p 8529:8529 arangodb:latest
    
  3. Execute this flow manually in Kestra setting arangodb_host: "localhost" or "arangodb-coordinator".
  4. The workflow queries cluster endpoints, validates supervision status, classifies HEALTHY, and records audit outputs.
  5. Enable the every_15_minutes trigger to automate continuous background monitoring.

How to extend

  • Add shard synchronization audits by querying /_admin/cluster/shardDistribution to detect unaligned shard replicas.
  • Trigger automated node recycling or pod restarts via the Kestra Kubernetes plugin when CRITICAL_NODE_FAILURE is detected.
  • Route critical alerts to PagerDuty or Opsgenie using dedicated Kestra notification plugins.
  • Track collection-level read/write statistics using io.kestra.plugin.scripts.shell.Commands.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.