Environment Variable Configuration¶
CertMonitor reads one environment variable, ENABLED_VALIDATORS, at import time to set which validators run when you don't pass enabled_validators explicitly. Handy for configuring CI jobs, containers, or cron monitors without changing code.
ENABLED_VALIDATORS¶
A comma-separated list of validator names:
from certmonitor import CertMonitor
# No enabled_validators arg -> falls back to ENABLED_VALIDATORS, then to defaults
with CertMonitor("example.com") as monitor:
monitor.get_cert_info()
print(monitor.get_enabled_validators())
Precedence¶
The enabled set is resolved in this order:
- The
enabled_validators=[...]argument toCertMonitor(...), if given. - Otherwise the non-empty
ENABLED_VALIDATORSenvironment variable captured when the configuration module was imported. - Otherwise the built-in defaults:
expiration,hostname,root_certificate.
Turning on post-quantum checks fleet-wide
To enable the opt-in PQ validators across every monitor without touching code:
Names must be valid
An unknown name produces a per-validator result with status: "error" and error: "UnknownValidator" rather than an exception, so a typo fails the run instead of silently skipping the check. Check the validator list for the exact names.