ACM Certificate Expiry Compliance Sentinel
List every issued ACM certificate on a schedule and alert Slack with domain, expiry date, and renewal eligibility before any certificate expires.
Audits Varnish Cache metrics for backend connection failures, thread exhaustion, and VCL panics, alerting SREs on Slack before edge caching outages.
In high-performance content delivery architectures, Varnish HTTP Cache accelerates web applications and APIs by serving cached responses with microsecond latencies directly from host memory. Varnish monitors upstream application origins using active VCL backend probes (.probe) and health check directors.
When backend web applications undergo deployments, experience connection timeouts, or exhaust thread pools, Varnish marks directors as unhealthy. If connection failures surge (MAIN.backend_fail) or faulty VCL C-code extensions trigger child process panics (MAIN.panic), Varnish falls back to synthetic HTTP 503 Gateway Timeout pages, bypassing cached assets and dropping user traffic.
This blueprint provides an automated edge caching availability sentinel. Running on a recurrent ten-minute schedule, it interrogates Prometheus exporter metrics exposing live varnishstat counters, quantifies backend failures, unhealthy director states, and child panics, and delivers actionable Slack alerts with exact varnishadm diagnostic commands to on-call infrastructure engineers.
poll_varnish_health trigger (io.kestra.plugin.core.trigger.Schedule) initiates the metric scan every ten minutes.scan_varnish_backend_metrics task (io.kestra.plugin.scripts.python.Script) queries the Varnish Prometheus exporter, extracting backend_fail, backend_unhealthy, and panic counters.evaluate_varnish_panics flowable task (io.kestra.plugin.core.flow.If) evaluates whether backend connection drops or thread creation failures exceed safe limits.alert_slack_varnish_panic (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) dispatches an actionable incident card detailing exact diagnostic commands (varnishadm backend.list, varnishadm panic.show).log_healthy_varnish_cache logs healthy cache status.export_varnish_manifest task emits structured telemetry JSON for SRE observability dashboards.flowchart TD
A[Schedule: Every 10 Minutes] --> B[scan_varnish_backend_metrics: Varnish Exporter API]
B --> C{Backend Fails or Panics Detected?}
C -- Yes --> D[alert_slack_varnish_panic: Slack Webhook]
C -- No --> E[log_healthy_varnish_cache: Log]
D --> F[export_varnish_manifest: Return JSON]
E --> F
| Name | Type | Default | Description |
|---|---|---|---|
varnish_stats_url |
STRING | "http://localhost:9131/metrics" |
Prometheus metrics endpoint exposing varnishstat. |
max_backend_fail_threshold |
INT | 5 |
Maximum allowable backend connection failures before alert. |
target_instance_id |
STRING | "varnish-edge-node-01" |
Logical identifier of the Varnish caching node. |
slack_channel |
STRING | "#edge-caching-alerts" |
Slack channel destination for edge caching alerts. |
{{ outputs.scan_varnish_backend_metrics.vars.has_issue }}: Boolean flag indicating if anomalies were detected.{{ outputs.scan_varnish_backend_metrics.vars.backend_fail }}: Count of backend connection failures.{{ outputs.scan_varnish_backend_metrics.vars.backend_unhealthy }}: Count of unhealthy backend directors.{{ outputs.scan_varnish_backend_metrics.vars.main_panics }}: Number of child worker panics recorded.{{ outputs.scan_varnish_backend_metrics.outputFiles['varnish_health_report.json'] }}: Structured JSON diagnostic report.prometheus-varnish-exporter running on port 9131.SLACK_WEBHOOK_URL: Slack Incoming Webhook endpoint URL with permissions to post messages.SLACK_WEBHOOK_URL in your Kestra namespace secrets.varnish_stats_url to point to your Prometheus Varnish exporter endpoint.prometheus-varnish-exporter has read access to /var/lib/varnish/<hostname> shared memory log files (vsm) to extract metrics.backend_unhealthy to avoid false alarms.varnishadm panic.clear after copying panic backtraces to S3.varnishadm vcl.use <previous_vcl> when panics occur after a reload.