Commands icon
If icon
SlackIncomingWebhook icon
Schedule icon

Cloudflare Zero Trust Tunnel Active Edge Connection Sentinel

Audits Cloudflare Zero Trust tunnels to detect edge connection drops and connector daemon failures.

Categories
CloudInfrastructure

How it works

This workflow connects to the Cloudflare REST API (/accounts/{account}/cfd_tunnel/{tunnel}/connections) using an administrative API token to audit Cloudflare Tunnel (cloudflared) edge connections. Cloudflare Tunnels expose private web applications and internal APIs to Cloudflare's global anycast edge without opening public inbound firewall ports. Each healthy tunnel daemon maintains four active connections across redundant edge datacenters. When daemon pods crash, egress firewalls block outbound UDP/QUIC traffic, or DNS resolutions fail, connections drop into pending reconnect status. This sentinel audits edge redundancy and dispatches incident alerts.

What you get

  • Real-time tracking of Cloudflare Zero Trust tunnel edge connection health.
  • Protection against internal service blackholes and edge routing failures.
  • Automated Slack incident notifications detailing active edge connections.

Who it's for

  • Cloud Infrastructure and Network Security Engineers operating Zero Trust access.
  • SREs safeguarding internal ingress routing and private API gateways.
  • DevOps Teams maintaining cloudflared daemons on Kubernetes.

Why orchestrate this with Kestra

  • Automated Network Surveillance: Regularly audits tunnel connectivity on a scheduled cadence.
  • Encrypted Credential Protection: Safely injects Cloudflare API tokens via Kestra secrets.
  • Incident Orchestration: Notifies platform engineers directly in team collaboration channels.

Prerequisites

  • Cloudflare Account ID and Tunnel UUID.
  • Cloudflare API token with Tunnel:Read permissions.
  • Slack incoming webhook URL configured in SLACK_WEBHOOK secret.

Quick start

  1. Import this blueprint into your Kestra workspace.
  2. Add CLOUDFLARE_API_TOKEN and SLACK_WEBHOOK secrets.
  3. Specify account_id and tunnel_id.
  4. Enable the schedule trigger for continuous tunnel surveillance.

How to extend

  • Automatically trigger a cloudflared deployment restart in Kubernetes.
  • Audit all tunnels in an account via /accounts/{account}/cfd_tunnel.
  • Route critical alerts to PagerDuty or Opsgenie.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.