SSL monitor cPanel DNS only server with Nagios
I have installed a certificate for the cPanel DNS Only webinterface (WHM). And I have a Nagios server which I want to use to monitor the certificate so I get alerted when it's about to expire.
That is no problem for a normal cPanel server but it doesn't seem to work on a DNS only server. This is my command:
The server doesn't seem to respond at port 443, anyone got a suggestion on how to solve this?
define command {
command_name check_ssl_expiry
command_line $USER1$/check_http -H $ARG1$ -S --sni -f follow -C 14,7 -p $ARG2$
}
And this is my service definition:
define service{
use generic-service-daily
host_name ns1.example.net
service_description Certificate ns1.example.net
check_command check_ssl_expiry!ns1.example.net!443
}
The server doesn't seem to respond at port 443, anyone got a suggestion on how to solve this?
-
WHM does not listen on port 443. What if you try port 2087 instead? 0 -
Tried port 2087 instead now but that doesn't work either. All I get is a socket timeout message in Nagios. 0 -
Did you try running it from nagios server's console? I might still have old plugins, so some parameters wont work, but this line works fine /usr/local/nagios/libexec/check_http -H web1.cpanel.guru -S -f follow -C 7 -p 2087 0 -
May firewall on dns-admin does not let you connect? 0 -
Oh yeah, stupid me. Forgot to open port 2087 on my Nagios server, everything works now! 0 -
Hello :) I am happy to see the issue is now resolved. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
6 comments