Merge pull request #1040 from f0o/issue-1038

Added TLS/SSL Cert checks based on nagios-plugins
This commit is contained in:
Neil Lathwood
2015-05-17 13:26:45 +01:00
+20
View File
@@ -0,0 +1,20 @@
<?php
$cmd = $config['nagios_plugins'] . "/check_ssl_cert -H ";
if( !empty($service['service_ip']) ) {
$cmd .= $service['service_ip'];
} else {
$cmd .= $service['hostname'];
}
$cmd .= " ".$service['service_param'];
$check = shell_exec($cmd);
list($check, $time) = split("\|", $check);
if(strstr($check, "SSL_CERT OK")) {
$status = '1';
} else {
$status = '0';
}
?>