There are a couple of active checks that allow to check the age of a SSL certificate (for HTTP, FTP, TCP and SMTP).
WATO currently only configures a single threshold, that makes the check CRITICAL if the validity of the certificate is shorter than this value.
All the four nagios plugins, though, also support a second threshold that issues a WARNING first.
0002-warn-for-cert_days.patch (1.78 KB)
0001-warn-for-cert_days.patch (4.76 KB)
···
--------------------------------------------------------------------------------
check_smtp, check_tcp, check_ftp:
-D, --certificate=INTEGER[,INTEGER]
Minimum number of days a certificate has to be valid.
1st is #days for warning, 2nd is critical (if not specified - 0).
--------------------------------------------------------------------------------
check_http:
-C, --certificate=INTEGER[,INTEGER]
Minimum number of days a certificate has to be valid. Port defaults to 443
(when this option is used the URL is not checked.)
...
CHECK CERTIFICATE: check_http -H www.verisign.com -C 14
When the certificate of 'www.verisign.com' is valid for more than 14 days,
a STATE_OK is returned. When the certificate is still valid, but for less than
14 days, a STATE_WARNING is returned. A STATE_CRITICAL will be returned when
the certificate is expired.
CHECK CERTIFICATE: check_http -H www.verisign.com -C 30,14
When the certificate of 'www.verisign.com' is valid for more than 30 days,
a STATE_OK is returned. When the certificate is still valid, but for less than
30 days, but more than 14 days, a STATE_WARNING is returned.
A STATE_CRITICAL will be returned when certificate expires in less than 14 days
--------------------------------------------------------------------------------
The attached patches would change WATO to expect two values for "cert_days", for a WARNING and for a CRITICAL threshold, and would change the four Check_MK checks to use both values with the plugins.
Problem is: This is an incompatible change of "cert_days" (from a single integer to a tuple); WATO will complain that it is not able to understand the old configuration.
Is there a way to implement such a change in a smooth way?
Best regards,
Gregor Hoffleit
--
MediaSupervision Software Consulting GmbH - www.mediasupervision.de
Niederlassung: Carl-Theodor-Str. 5, 68723 Schwetzingen
Tel: +49 (0)6221 705079-22, E-Mail: gregor.hoffleit@mediasupervision.de
Hauptsitz: Georg-Friedrich-Händel-Str. 13, 69214 Eppelheim / Heidelberg
Amtsgericht Mannheim HRB 336821; Geschäftsführer: Reinhard Kratzke