check_http with auth issue

Ray Kiddy ray at ganymede.org
Fri Jan 21 06:38:54 CET 2011


On Jan 20, 2011, at 1:35 PM, stan wrote:

> Hi,
> We're having problems with Nagios3 (3.2.0) reporting 'HTTP WARNING HTTP/1.1 401 Unauthorized' for check_http queries to a several switched CDUs of the same type. All these CDUs have HTTP Server = enabled, Authentication= Basic. 
> 
> Running check_http from the command line returns an OK status:
> /usr/lib/nagios/plugins/check_http -I ppcr23ps1 --authorization=user:passwd
> HTTP OK HTTP/1.1 200 OK - 763 bytes in 0.267 seconds
> 

We had a similar problem. We have several CNAME entries for different names for some of our hosts. We were using a host definition that included the IP address. Then we switched to a host definition that was using the DNS name only.

Also, be careful of certain characters in your password digest. If an ampersand appears in the password digest (and they seem to pop up about 1/3 of the time), you have to protect it with a backslash. We were running the check_http command the same way, but were of course putting single-quotes around the password digest and, gee, there is no problem.....

These may not be your issue, but they may point you to something else. Good luck.

cheers - ray

> check_http is reporting OK status for all the other devices we're checking from this Nagios3 server.
> 
> This Nagios3 server is an internal server in a distributed nagios configuration, and we have 1 identical CDU configured on the main nagios server outside the firewall (the external nagios is 3.1.0). The check_http on the Nagios 3.1.0 server (external) does not give the WARNING 401 Unauthorized message. It displays HTTP OK HTTP 1.1 200 OK. 
> 
> To verify that the CDU config was not the problem or the firmware version
> wasn't the problem on the 2 new CDUs being configd for the internal server, we added the external CDU
> (already reporting OK on nagios 3.1.0) to the Nagios3 configuration & did a check_http. Like the other 2 units, the command line reports HTTP OK but nagios displays the 401 warning.
> 
> We've run from the command line check_http -v and it's identical on both servers (everything is OK). 
> However, the header on the devices that do not get the 401 warning start
> with a Server: descrip and Connection: close before the Content-Type 
> 
> CDU:
> 
> STATUS: HTTP/1.1 200 OK
> **** HEADER ****
> Content-Type: text/html
> (the rest of the header info follows)
> 
> All other devices:
> 
> STATUS: HTTP/1.1 200 OK
> **** HEADER ****
> Server: Embedded Web Server    (or whatever server description per device)
> Connection: close
> Content-Type: text/html
> (the rest of the header info follows)
> 
> Any ideas why it works on 3.1.0 and not 3.2.0?
> Thanks
> 
> 
> -- 
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
> 
> ------------------------------------------------------------------------------
> Protect Your Site and Customers from Malware Attacks
> Learn about various malware tactics and how to avoid them. Understand 
> malware threats, the impact they can have on your business, and how you 
> can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
> 


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list