Page 1 of 1

check_http - Receiving 200 OK message for wrong credentials

Posted: Wed Jul 03, 2019 10:14 am
by fsbeaunix
Hello,

I'm trying to enable the monitoring for one of our application console url using check_http plugin. But when I run the script below I'm getting
STATUS: HTTP/1.1 200 OK response. Although this is the response I'm looking for, I get the same response when I enter the wrong credentials. Please advise what changes I have to make to my script.

Below is the url and the script format I used to do the health check for the application console.

url for the console:
http://servername.domain.com:port/

Script used for health check:
./check_http -v -H servername.domain.com -p port -u http://servername.domain.com:port/console/App.html\#home -a "username:password"

Thank you,

Re: check_http - Receiving 200 OK message for wrong credenti

Posted: Wed Jul 03, 2019 12:22 pm
by cdienger
The -a option simply inserts the credentials into the HTTP request header and the site determines what to respond with. The site may not actually need the creds to return a 200 response. What is the output if you run it without this option?

Re: check_http - Receiving 200 OK message for wrong credenti

Posted: Tue Jul 09, 2019 10:29 am
by fsbeaunix
Hello,
I removed the option to enter the credentials and ran the script. It gave STATUS: HTTP/1.1 200 OK response. I also enabled the monitoring for lower environments and brought down the instance to see what status it will give. I got a Connection Refused and HTTP CRITICAL - Unable to open TCP socket response.

I'm just concerned about the health check of the instance and not the application so I'm good with this approach so far. Thank you!!

Re: check_http - Receiving 200 OK message for wrong credenti

Posted: Tue Jul 09, 2019 10:37 am
by scottwilkerson
fsbeaunix wrote:Hello,
I removed the option to enter the credentials and ran the script. It gave STATUS: HTTP/1.1 200 OK response. I also enabled the monitoring for lower environments and brought down the instance to see what status it will give. I got a Connection Refused and HTTP CRITICAL - Unable to open TCP socket response.

I'm just concerned about the health check of the instance and not the application so I'm good with this approach so far. Thank you!!
Great,

Locking thread