Hi Team,
We are trying to add http://peoplefinder into monitoring with below details. But we are getting error HTTP WARNING: HTTP/1.1 401 Unauthorized - 1908 bytes in 0.007 second response time
However with the given credentials we are able to login without any issue. Please help on this.
Command:
$USER1$/check_http -H $HOSTADDRESS$ $ARG1$
$ARG1$:
-f ok -I 172.26.x.x -u "/" -p 80 -a "username:password"
FYI: we are using Nagios Xi 5.4.2 version
HTTP WARNING: HTTP/1.1 401 Unauthorized error
HTTP WARNING: HTTP/1.1 401 Unauthorized error
You do not have the required permissions to view the files attached to this post.
Regards,
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Re: HTTP WARNING: HTTP/1.1 401 Unauthorized error
Can you try clicking the "Run Check Command" and pasting the resulting command line here? You can obfuscate username, password, and IP address if you'd like, but leave all other formatting, please.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: HTTP WARNING: HTTP/1.1 401 Unauthorized error
Also, do you know if the site is requiring basic or ntlm auth? check_http only does basic but https://exchange.nagios.org/directory/P ... lm/details does ntml and may help in this situation.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: HTTP WARNING: HTTP/1.1 401 Unauthorized error
Please find below the input on running from check command:
/usr/local/nagios/libexec/check_http -H peoplefinder -f ok -I 172.X.X.X -u "/" -p 80 -a "levi\XXXX:XXXX" HTTP WARNING: HTTP/1.1 401 Unauthorized - 1908 bytes in 0.008 second response time |time=0.007510s;;;0.000000 size=1908B;;;0.
Output on curl:
####====>>> curl -s -S --ntlm -D /tmp/curlTest -u levi\xxxx:xxxx http://peoplefinder
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>You are not authorized to view this page</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<STYLE type="text/css">
BODY { font: 8pt/12pt verdana }
H1 { font: 13pt/15pt verdana }
H2 { font: 8pt/12pt verdana }
A:link { color: red }
A:visited { color: maroon }
</STYLE>
</HEAD><BODY><TABLE width=500 border=0 cellspacing=10><TR><TD>
<h1>You are not authorized to view this page</h1>
You do not have permission to view this directory or page using the credentials that you supplied.
<hr>
<p>Please try the following:</p>
<ul>
<li>Contact the Web site administrator if you believe you should be able to view this directory or page.</li>
<li>Click the <a href="javascript:location.reload()">Refresh</a> button to try again with different credentials.</li>
</ul>
<h2>HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials.<br>Internet Information Services (IIS)</h2>
<hr>
<p>Technical Information (for support personnel)</p>
<ul>
<li>Go to <a href="http://go.microsoft.com/fwlink/?linkid=8180">Microsoft Product Support Services</a> and perform a title search for the words <b>HTTP</b> and <b>401</b>.</li>
<li>Open <b>IIS Help</b>, which is accessible in IIS Manager (inetmgr),
and search for topics titled <b>Authentication</b>, <b>Access Control</b>, and <b>About Custom Error Messages</b>.</li>
</ul>
</TD></TR></TABLE></BODY></HTML>
/usr/local/nagios/libexec/check_http -H peoplefinder -f ok -I 172.X.X.X -u "/" -p 80 -a "levi\XXXX:XXXX" HTTP WARNING: HTTP/1.1 401 Unauthorized - 1908 bytes in 0.008 second response time |time=0.007510s;;;0.000000 size=1908B;;;0.
Output on curl:
####====>>> curl -s -S --ntlm -D /tmp/curlTest -u levi\xxxx:xxxx http://peoplefinder
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>You are not authorized to view this page</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<STYLE type="text/css">
BODY { font: 8pt/12pt verdana }
H1 { font: 13pt/15pt verdana }
H2 { font: 8pt/12pt verdana }
A:link { color: red }
A:visited { color: maroon }
</STYLE>
</HEAD><BODY><TABLE width=500 border=0 cellspacing=10><TR><TD>
<h1>You are not authorized to view this page</h1>
You do not have permission to view this directory or page using the credentials that you supplied.
<hr>
<p>Please try the following:</p>
<ul>
<li>Contact the Web site administrator if you believe you should be able to view this directory or page.</li>
<li>Click the <a href="javascript:location.reload()">Refresh</a> button to try again with different credentials.</li>
</ul>
<h2>HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials.<br>Internet Information Services (IIS)</h2>
<hr>
<p>Technical Information (for support personnel)</p>
<ul>
<li>Go to <a href="http://go.microsoft.com/fwlink/?linkid=8180">Microsoft Product Support Services</a> and perform a title search for the words <b>HTTP</b> and <b>401</b>.</li>
<li>Open <b>IIS Help</b>, which is accessible in IIS Manager (inetmgr),
and search for topics titled <b>Authentication</b>, <b>Access Control</b>, and <b>About Custom Error Messages</b>.</li>
</ul>
</TD></TR></TABLE></BODY></HTML>
Regards,
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Re: HTTP WARNING: HTTP/1.1 401 Unauthorized error
As the message points out a 401 means the site requires authentication. Before going down one path too far, we should confirm what type of authentication it requires and that information is something the site admins should be able to provide.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: HTTP WARNING: HTTP/1.1 401 Unauthorized error
Thanks for your reply.
you want the information ..Type of authentication means NTLM or not ??
you want the information ..Type of authentication means NTLM or not ??
Regards,
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Re: HTTP WARNING: HTTP/1.1 401 Unauthorized error
Correct, is it NTLM, Basic, Kerberos, something else? The site is rejecting the connection due to authentication failure. We need to know what the site expects.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.