cert_expiry_sweep
Inspect TLS certificate expiry for proxy targets, categorize by days-to-expiry (expired, critical, warning, ok), and receive renewal hints to prevent downtime.
Instructions
[READ] TLS cert inventory bucketed by days-to-expiry + renewal hints.
The flagship cert sweep for traefik/caddy targets: collects the TLS domain inventory, live-probes each domain's served leaf cert (bounded handshake), and buckets by expiry: expired / critical / warning / ok — with a platform-specific renewal hint (ACME resolver / storage checks). Pass 'certs' for pure analysis over {domain, daysToExpiry} rows. haproxy targets return the support matrix's teaching note.
Args: warn_days: Days-to-expiry at/below which a cert is a warning (default 30). critical_days: Days at/below which a cert is critical (default 7). port: TLS port to probe (default 443). certs: Injected rows {domain, daysToExpiry, notAfter?}; skips pull+probe. target: Proxy target name from config; omit for the default.
Returns dict: {certsEvaluated, expired, critical, warning, ok, unknown, certificates (soonest first), thresholds, renewalHint, note}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | ||
| certs | No | ||
| target | No | ||
| warn_days | No | ||
| critical_days | No |