Request icon
Switch icon
SlackIncomingWebhook icon
Log icon
Schedule icon

OpenObserve Log Stream and Error Surge Sentinel

Monitor OpenObserve cluster node health and stream error surges, evaluate thresholds with Pebble, and dispatch incident alerts to Slack with Kestra.

Categories
Infrastructure

Automated health gate and error surge sentinel for OpenObserve observability clusters. This workflow continuously probes cluster node availability, queries recent error ingestion counts via Log SQL, classifies cluster state using declarative Pebble logic, and dispatches incident notifications to Slack.

How it works

  1. Scheduled trigger initiates the sentinel routine every hour (or manually on demand with custom parameters).
  2. Probes the OpenObserve /healthz HTTP endpoint to verify node availability and HTTP response status.
  3. Executes a Log SQL search query via the OpenObserve REST search API to count error logs ingested over the preceding 15-minute window.
  4. Evaluates cluster responsiveness and error thresholds using a declarative Pebble expression inside a Switch task.
  5. Branches conditionally to notify Slack on critical node downtime or elevated error surges, or logs an operational status confirmation when healthy.
  6. Emits an immutable audit log entry capturing response codes, stream identifiers, error counts, and overall health status.

What you get

  • Early detection of OpenObserve node unresponsiveness or infrastructure degradation.
  • Automated detection of application error bursts across microservices and log streams.
  • Immediate incident notifications sent to designated Slack operational channels.
  • Centralized audit trail with structured execution history for compliance and SLA tracking.

Who it's for

  • Site Reliability Engineers (SREs) monitoring distributed log management systems.
  • DevOps Teams operating self-hosted OpenObserve or Kubernetes logging pipelines.
  • Platform Engineers seeking automated health gates and anomaly alerting.

Why orchestrate this with Kestra

  • Declarative YAML definition eliminates fragile custom shell scripts and opaque cron configurations.
  • Native Pebble expression language handles robust state classification without external dependencies.
  • Secure credential management injects API tokens and webhooks via encrypted secret stores.
  • Rich UI provides full observability, task-level execution timings, and retry capabilities.

Prerequisites

  • Accessible OpenObserve instance (local Docker container, VM, or Kubernetes cluster).
  • Valid OpenObserve user account or service token with read access to target streams.
  • Slack Incoming Webhook URL configured for incident channel notifications.

Secrets

  • OPENOBSERVE_AUTH_TOKEN: Base64-encoded credentials (username:password) or API token for authenticating OpenObserve REST requests.
  • SLACK_WEBHOOK_URL: HTTPS endpoint for posting notifications to the operations Slack channel.

Quick start

  1. Set the required secrets in your Kestra namespace (OPENOBSERVE_AUTH_TOKEN and SLACK_WEBHOOK_URL).
  2. Import this flow into Kestra and click Execute with default parameters to test cluster connectivity.
  3. Inspect task outputs to ensure the /healthz probe returns HTTP 200 and the query completes.
  4. Enable the hourly_sentinel_schedule trigger to run automated checks continuously.

How to extend

  • Add an automated PagerDuty or Opsgenie webhook branch for high-priority off-hours escalation.
  • Integrate container restart remediation tasks using Kestra Docker or Kubernetes plugins when node health fails.
  • Expand SQL queries to calculate error-to-info ratios across multiple application streams in parallel.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.