diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index 45ab3dfc8..52eb697b9 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -5834,8 +5834,7 @@ ssl_cert_proxy | **Optional.** Proxy server to use for connecting ssl_cert_file | **Optional.** Local file path. Works only if `ssl_cert_address` is set to "localhost". ssl_cert_warn | **Optional.** Minimum number of days a certificate has to be valid. ssl_cert_critical | **Optional.** Minimum number of days a certificate has to be valid to issue a critical status. -ssl_cert_cn | **Optional.** Pattern to match the CN of the certificate. -ssl_cert_altnames | **Optional.** Matches the pattern specified in -n with alternate +ssl_cert_cn | **Optional.** Pattern to match the CN or AltName of the certificate. ssl_cert_issuer | **Optional.** Pattern to match the issuer of the certificate. ssl_cert_org | **Optional.** Pattern to match the organization of the certificate. ssl_cert_email | **Optional.** Pattern to match the email address contained in the certificate. diff --git a/itl/plugins-contrib.d/web.conf b/itl/plugins-contrib.d/web.conf index 010c1c1e3..a2952a052 100644 --- a/itl/plugins-contrib.d/web.conf +++ b/itl/plugins-contrib.d/web.conf @@ -396,13 +396,9 @@ object CheckCommand "ssl_cert" { value = "$ssl_cert_critical$" description = "Minimum number of days a certificate has to be valid to issue a critical status" } - "-n" = { + "--match" = { value = "$ssl_cert_cn$" - description = "Pattern to match the CN of the certificate" - } - "--altnames" = { - set_if = "$ssl_cert_altnames$" - description = "Matches the pattern specified in -n with alternate" + description = "Pattern to match the CN or AltNames of the certificate" } "-i" = { value = "$ssl_cert_issuer$" @@ -587,6 +583,7 @@ object CheckCommand "ssl_cert" { vars.ssl_cert_address = "$check_address$" vars.ssl_cert_port = 443 + vars.ssl_cert_cn = "$ssl_cert_altnames$" } object CheckCommand "varnish" {