New to Kestra?
Use blueprints to kickstart your first workflows.
Monitor SSL certificate expiry across multiple domains with Kestra. Checks days remaining, tracks alert state in the KV store, and notifies Slack and email.
Catch expiring SSL certificates before browsers do. This blueprint runs a weekly SSL certificate expiry monitor across a configurable list of domains, computes the days remaining until expiration with Python, and fires Slack and email alerts when a certificate crosses your warning threshold. A KV store entry prevents duplicate notifications on every run until the certificate is renewed, so on-call channels stay quiet between real events.
io.kestra.plugin.core.trigger.Schedule trigger fires every Monday at 09:00 UTC (cron: "0 9 * * 1").io.kestra.plugin.core.flow.ForEach iterates over the domains input with concurrencyLimit: 5, checking up to five certificates in parallel.io.kestra.plugin.core.http.Request calls the public ssl-checker.io API to retrieve cert_exp_date and cert_valid.io.kestra.plugin.core.kv.Get reads the per-domain alert state key (ssl_alerted_<domain>) with errorOnMissing: false.io.kestra.plugin.scripts.python.Script parses the expiry timestamp, computes days_left, and sets is_expiring when the cert is below the warning threshold or already invalid.io.kestra.plugin.core.flow.If gates alerting on is_expiring AND the KV state not equal to alerted.io.kestra.plugin.slack.notifications.SlackIncomingWebhook posts a warning to Slack and io.kestra.plugin.email.MailSend sends an HTML email via SMTP on port 465.io.kestra.plugin.core.kv.Set writes alerted to the KV key so the same certificate does not re-alert on the next weekly run.warning_days threshold (default 30) plus detection of already-invalid certificates.ssl-checker.io is a stateless API, it cannot remember which domains you already alerted on, batch them, throttle to a daily window, or notify multiple channels at once. Kestra adds the missing layer: a scheduled trigger, a ForEach with bounded concurrency, retries on transient HTTP failures, KV state to suppress duplicate alerts, declarative YAML versioned in Git, and full execution lineage per domain. Replace the schedule with a webhook or event trigger and the same flow becomes on-demand. Swap Slack for Teams, PagerDuty, or Opsgenie without rewriting the check logic.
plugin-scripts-python, plugin-notifications (Slack), and plugin-email plugins available.Configure these secrets in your Kestra instance or namespace:
SLACK_WEBHOOK_URL, the Slack Incoming Webhook for alert messages.ALERT_EMAIL_FROM, the sender address used by MailSend.ALERT_EMAIL_TO, the recipient address for SSL alerts.SMTP_HOST, the outbound SMTP server (SMTPS on port 465).SMTP_USERNAME, the SMTP user.SMTP_PASSWORD, the SMTP password.domains input default list, or pass domains at execution time.warning_days if 30 days is too aggressive or too lax for your renewal SLA.days_left <= 7) goes to PagerDuty, normal stays in Slack.alerted key automatically once days_left jumps back above the threshold (renewal detected).ssl-checker.io.