Monitoring Website

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
cesar.garza
Posts: 80
Joined: Mon Aug 19, 2013 3:14 pm

Monitoring Website

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Monitoring Website

Post 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.
pato
Posts: 18
Joined: Thu Oct 10, 2013 6:06 pm
Location: Melbourne, Australia

Re: Monitoring Website

Post 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.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring Website

Post by lmiltchev »

cesar.garza, let us know if pato's suggestion helped you troubleshoot the issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!
cesar.garza
Posts: 80
Joined: Mon Aug 19, 2013 3:14 pm

Re: Monitoring Website

Post 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
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Monitoring Website

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
cesar.garza
Posts: 80
Joined: Mon Aug 19, 2013 3:14 pm

Re: Monitoring Website

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Monitoring Website

Post 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.
Former Nagios employee
Locked