Added TLS/SSL Cert checks based on nagios-plugins

This commit is contained in:
f0o
2015-05-17 10:07:31 +00:00
parent 83a3335c6d
commit 119ef8ed86

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';
}
?>