Problem on check_http(s) usage

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
prabakaran
Posts: 8
Joined: Fri Aug 03, 2012 4:48 am

Problem on check_http(s) usage

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Problem on check_http(s) usage

Post 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).
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked