I am trying to setup a Nagios check that hits a web address and logs in via an LDAP user and password. Using a browser, the website returns a pop-up box asking for username and password. I have tried using the check_http plugin with no success.
check_http -H foo.domain.com -u /path_to_secure -S -s “string I am looking for” -a ‘user:password’
The web server log shows the connection coming in but I get an authorization failed (401). We have Sitescope logging into this website and working just fine.
Any ideas or recommendations on how to monitor this?
Proper authorization is required for this area. Either your browser does not perform authorization, or your authorization has failed.
HTTP WARNING: HTTP/1.1 401 Unauthorized
I figured the problem out. Instead of using the -H and putting in the FQDN of the vhost, I put in its IP address and used the -I option. It worked so I knew something was messing up during the resolution of the name. I tried the -H option again, but this time I just used the name without the foo.com at the end. It worked both from command line and in the services.cfg file. Thought I would pass this along.