Page 1 of 1
check multiple ssl certificates in one host
Posted: Tue Jan 05, 2021 10:42 am
by supportcl
Hi, we need to monitor the expiration of some SSL certificates, for this we use the nagios plugin check_xi_service_http_cert.
The problem is that we have several domains on the same host (same ip) with several SSL certificates, but it seems that the plugin cannot see the other domains. Is there a way to do it?
Re: check multiple ssl certificates in one host
Posted: Tue Jan 05, 2021 3:05 pm
by dchurch
The plugin checks the CN (as well as alternate DNS names defined in the cert) of the certificate presented when connecting to the SSL server.
In order to get the server to switch what SSL certificate is presented, you can have it check a different host using the
-H option, while pointing it at the IP or hostname of the server using the
-I (i.e. capital i) option:
Code: Select all
/usr/local/nagios/libexec/check_ssl_validity -I prod1.example.com -H myvirtualserverdns1.example.com
/usr/local/nagios/libexec/check_ssl_validity -I prod1.example.com -H myvirtualserverdns2.example.com
Re: check multiple ssl certificates in one host
Posted: Wed Jan 13, 2021 4:48 pm
by dchurch
Just checking in since we haven't heard from you in a while. Did that solve your problem?