Page 1 of 1

Problem on check_http(s) usage

Posted: Mon Apr 08, 2013 2:21 pm
by prabakaran
Hi,
I tried to monitor HTTPS website by using check_http. I can run through terminal and it results "OK" status. Following command is used,
(Sample command)
#./check_http -H api.test.com -u "https://api.test.com/api2.0/checks/" -k "App-Key:tlhgfg34548uhd2h7jjgvs5qjhhmcvw" -a "test@test.com:test@123" -S -t 120

But in Nagios UI, it results "UNKNOWN" status with following error,
check_http: Invalid option - Valid values for SSL Version are 1 (TLSv1), 2 (SSLv2) or 3 (SSLv3)

My command definition is,
define command{
command_name check_monitor_page
command_line $USER1$check_http -H api.test.com -u "https://api.test.com/api2.0/checks/" -k "App-Key:tlhgfg34548uhd2h7jjgvs5qjhhmcvw" -a "test@test.com:test@123" -S -t 120
}
Where & what I missed, how can I resolve this?

Thanks

Re: Problem on check_http(s) usage

Posted: Mon Apr 08, 2013 2:34 pm
by abrist
prabakaran wrote:command_line $USER1$check_http -H api.test.com -u "https://api.test.com/api2.0/checks/" -k "App-Key:tlhgfg34548uhd2h7jjgvs5qjhhmcvw" -a "test@test.com:test@123" -S -t 120
You are missing the SSL version number after the "-S" switch. Have youtried setting to 1,2 or 3?

From: http://nagiosplugins.org/man/check_http
-S, --ssl=VERSION
Connect via SSL. Port defaults to 443. VERSION is optional, and prevents
auto-negotiation (1 = TLSv1, 2 = SSLv2, 3 = SSLv3).