I want to check the availability of a SSL Web site (https) with nagios.
I have add a command to the command.cfg:
define command{
command_name check_http_myserver_Demo
command_line $USER1$/check_http -H www.mydomain.de -u /Demo -p 443 -S
}
Then I have add also a service in the localhost.cfg:
define service {
use local-service
host_name myServer
service_description HTTP myserver Response Check
check_command check_http_myserver_Demo
max_check_attempts 2
normal_check_interval 5
retry_check_interval 1
notification_interval 240
notification_period 24x7
notification_options w,u,c,r
}
If I check the configuration file with "nagios -v nagios.cfg" I'm getting no errors.
The nagios server check of this service is negativ and says "HTTP CRITICAL - Fehler beim Empfangen" (it's german; my translation: "error while receiving"). But the service is definitive available. I can open a browser and can open the URL without problems.
Any ideas?
EDIT:
If I run the check manually I get:
/usr/lib64/nagios/plugins/check_http -v -H www.c-onDocFlow.de -u / -S
GET / HTTP/1.1
User-Agent: check_http/v1.4.15 (nagios-plugins 1.4.15)
Connection: close
Host: www.c-onDocFlow.de
HTTP CRITICAL - Fehler beim Empfangen
Without "-S" it runs ok. Also if I take a other https side (of a other domain) it's ok. May be something is with the certificate wrong, but I cannot see any problem.
openssl s_client -connect servername:443
)