Home Directory Plugins Network Protocols HTTP check_ssl_certificate

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

check_ssl_certificate

Rating
2 votes
Favoured:
2
Hits
144166
Files:
FileDescription
check_ssl_certificateversion 1.2
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
This script checks the expiration of an SSL certificate.
This script will check SSL certificates to see if they have expired. It is known to work with imap (w/starttls), imaps, pop (w/starttls), pops, https, ldap (w/starttls) and ldaps. It requires the openssl program (from the OpenSSL toolkit). The current version is 1.2.
Reviews (2)
Hi,

Thanks for the plugin.

I have extended it so that it can also check certificates in a file - plus a few minor improvements.

You are welcome to grab my version from https://subversion.ceres.auckland.ac.nz/BeSTGRID/df/scripts/check_ssl_certificate

Cheers,
Vlad

PS: The set of changes in this
# 2014-03-26 Vladimir Mencl
# - add support for checking a certificate in the file (-f)
# - add option for supporting a full DN instead of just CN (-D)
# - support both 32-bit and 64-bit platforms with "use lib" path
# - move some verbose ouput under DEBUG (-d)
# - FIX: add missing exit for expired certificate as per comment on plugin
# page
# - use POSIX:floor() instead of int() for rounding daysLeft
# (not to get "0 days left" for certificates that just expired)

--
Vladimir Mencl, Ph.D.
E-Research Services and Systems Consultant
BlueFern Computing Services
University of Canterbury
Private Bag 4800
Christchurch 8140
New Zealand

http://www.bluefern.canterbury.ac.nz
mailto:vladimir.mencl@canterbury.ac.nz
Phone: +64 3 364 3012
Mobile: +64 21 997 352
Fax: +64 3 364 3002
bylexiyntax, May 4, 2011
2 of 2 people found this review helpful
Does exactly what I wanted, checking the date on ssl certificates and informing me if they are about to expire.

After expiration it reports the certificate as good. The culprit is a missing exit statement in the expired check; see the diff output below for a fix.

@@ -156,2 +156,3 @@
print "$PROGNAME: CRITICAL - $cn expired " . abs($daysLeft) . " day(s) ago.\n";
+ exit $ERRORS{'CRITICAL'};
} elsif ($daysLeft