SSL monitor cPanel DNS only server with Nagios

Erik Ellsinger

Well-Known Member
Sep 25, 2015
58
1
8
Sweden
cPanel Access Level
Root Administrator
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:

Code:
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?
 
Last edited by a moderator:

anton_latvia

Well-Known Member
PartnerNOC
May 11, 2004
403
13
168
Latvia
cPanel Access Level
Root Administrator
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
Hello :)

I am happy to see the issue is now resolved. Thank you for updating us with the outcome.