Page 1 of 1

Monitoring Website

Posted: Wed Apr 23, 2014 2:59 pm
by cesar.garza
Hey People, need some help on website monitoring.I know there are tons of information out there but i am not satisfy. I am using check_http to monitor my website and getting 200 response back. However, i am getting the 200 response without the authentication (username/password) and with authentication that make me un-satisfy. It should fail without the credentials.

Code: Select all

./check_http -H 10.10.10.10 -u https://something something.com/hhhhhhhhhh/#/yyyyyyyy/xxxxx -f -S -w 0.0050 -c 0.100
thanks

Re: Monitoring Website

Posted: Wed Apr 23, 2014 3:00 pm
by slansing
Well if it can get through without authentication it's giving you the correct response... Can you access that page manually through a browser? What does it give you? If it is a portal/landing page type then it would make sense to get a 200 because you can resolve it, and load the page. If authentication is required to load the page content, let us know.

Re: Monitoring Website

Posted: Wed Apr 23, 2014 6:07 pm
by pato
cesar.garza wrote:i am getting the 200 response without the authentication
I'm assuming that some sort of login page or custom 403 page is being served here, which check_http (correctly) interprets as OK. You could try the –invert-regex option to search for content unique to that page - a match would trigger a CRITICAL status for the check.

Re: Monitoring Website

Posted: Thu Apr 24, 2014 10:11 am
by lmiltchev
cesar.garza, let us know if pato's suggestion helped you troubleshoot the issue.

Re: Monitoring Website

Posted: Thu Apr 24, 2014 10:24 am
by cesar.garza
Pato, Can you give me a sample command that i can put in my command.cfg. I think you are on right track because check_http should pass the username/password and then check for the url (up or down).
thanks

Re: Monitoring Website

Posted: Thu Apr 24, 2014 4:27 pm
by sreinhardt
You should be able to append "-r [regex] --invert-regex". This will search for the string in [regex] if found return critical, if not return OK.

Re: Monitoring Website

Posted: Tue Apr 29, 2014 10:22 am
by cesar.garza
I tried this but it came with 404 Not Found also i am not feeling comfortable to use this because its not passing authorization (user/pass).
./check_http -H 10.10.10.10 -u "something something here.com" -r 'Source' --invert-regex

Re: Monitoring Website

Posted: Tue Apr 29, 2014 4:41 pm
by tmcdonald
Can you post the full check you are running that returns the 404? If you are getting a 404 it makes me think you are passing the wrong URL. And as for the user/pass, check_http doesn't know if a login succeeded or failed unless you tell it what to look for. A 200 HTTP reply just means the page was served correctly, regardless of what is in it. Error codes are a different layer from login success pages.