[Nagiosplug-help] check_http cert expiration w/ addl cert info

Mike Patterson mp72 at excite.com
Tue Sep 18 11:12:23 CEST 2007


Not the prettiest, but I was able to figure out how to return the Common Name (CN) on the cert by adding this code to check_ssl_certificate from NagiosExchange, and adding $cn when returning data in verbose mode.



#--------------------



my $junk='';

my $cn='';

#get Common Name (CN) from cert

open(GETCN,$tmpFile);

while (<GETCN>) {

if (/\/CN=/) {

($junk,$cn) = split(/CN=/,$_);

chomp($cn);

last;

}

}

close(GETCN);

#---------------------

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!






More information about the Help mailing list