Schedule icon
Request icon
Switch icon
Log icon
SlackIncomingWebhook icon

Dapr Sidecar Health and State Store Component Sentinel

Audit Dapr sidecar runtime availability, inspect component metadata, verify state store connectivity, and alert via Slack with Kestra orchestration.

Categories
Infrastructure

Continuously audits Dapr (Distributed Application Runtime) sidecar availability, validates runtime metadata and registered components, checks state store connectivity, and dispatches actionable Slack incident notifications upon runtime degradation.

How it works

  1. A recurrent Schedule trigger periodically initiates the sentinel workflow (configured every 2 hours by default, disabled initially for manual configuration).
  2. The probe_sidecar_health task issues a GET request to the Dapr sidecar /v1.0/healthz endpoint to confirm runtime readiness.
  3. The probe_dapr_metadata task fetches the active runtime metadata from /v1.0/metadata to verify registered components, actors, and pub/sub subscriptions.
  4. The probe_state_store task queries a canary state key against /v1.0/state/{storeName}/{key} to confirm read responsiveness of the backing datastore.
  5. The evaluate_dapr_status task uses native Pebble conditional expressions inside a Switch task to classify health into COMPLIANT, SIDECAR_UNHEALTHY, METADATA_UNAVAILABLE, or STATE_STORE_ERROR.
  6. If a failure state is detected, contextual incident notifications are sent via io.kestra.plugin.slack.notifications.SlackIncomingWebhook with diagnostic HTTP codes, and a comprehensive audit trail is recorded in Kestra execution history.

What you get

  • Proactive detection of uninitialized or crashed Dapr sidecar containers across microservice pods.
  • Continuous validation of backing state store connections (e.g., Redis, PostgreSQL, AWS DynamoDB, Azure Cosmos DB).
  • Rapid incident notifications in Slack channels with clear diagnostic status codes.
  • Pre-deployment gating capability to verify Dapr sidecar readiness prior to routing application traffic.
  • Centralized execution history providing an immutable operational audit trail.

Who it's for

  • Platform Engineers and SREs operating Kubernetes clusters running Dapr-enabled microservices.
  • DevOps Teams governing distributed application components and state store configurations.
  • Cloud Architects designing resilient event-driven architectures with Dapr and Kestra.

Why orchestrate this with Kestra

  • Declarative Runtime Governance: Maintain Dapr health policies, alert thresholds, and operational runbooks as revision-controlled YAML workflows.
  • Native Secret Protection: Secure Slack webhook endpoints using Kestra namespace secrets via {{ secret(...) }} without plaintext exposure.
  • Resilient Multi-Path Routing: Automatically distinguish between complete sidecar outages, metadata failures, and isolated state store connectivity drops.
  • End-to-End Auditing: Combine automated schedules, probe metrics, and diagnostic logs into searchable execution records.

Prerequisites

  • A running Dapr sidecar or container runtime with HTTP port exposed (default port 3500).
  • Network reachability from the Kestra worker or runner environment to the Dapr HTTP endpoint.
  • A Slack Incoming Webhook URL configured with permission to post into your target operations channel.

Secrets

  • SLACK_WEBHOOK_URL: Slack Incoming Webhook URL used for routing operational alerts and incidents.

Quick start

  1. Add the SLACK_WEBHOOK_URL secret in your Kestra namespace settings.
  2. Import this blueprint into your Kestra instance (e.g., under namespace company.platform).
  3. Click Execute with default inputs or specify your custom dapr_http_endpoint and target_state_store.
  4. Review the execution output in the Executions tab to confirm that HTTP status codes return successfully.
  5. Activate the scheduled_sentinel_audit trigger to enforce recurrent automated health monitoring.

How to extend

  • Automated Pod Restart: Extend the SIDECAR_UNHEALTHY case with a Kubernetes API task (io.kestra.plugin.kubernetes.pods.Restart) to restart stalled application pods automatically.
  • Pub/Sub Topic Validation: Add a canary publish task (POST /v1.0/publish/{pubsubname}/{topic}) to audit message broker availability alongside state storage.
  • Multi-Store Matrix Sweep: Wrap the state store probe in a Loop task to evaluate multiple state stores (e.g., cache, document store, transactional database) in a single run.
  • PagerDuty Escalation: Route SIDECAR_UNHEALTHY alerts directly to PagerDuty or Opsgenie on-call escalation schedules.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.