mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
21 lines
375 B
PHP
21 lines
375 B
PHP
<?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';
|
|
}
|
|
|
|
?>
|