Page 1 of 1
OUTPUT: HTTP WARNING: HTTP/1.1 401 Unauthorized
Posted: Fri Nov 07, 2014 12:34 am
by cyient
Hi,
I have trouble monitoring our internal website
Code: Select all
COMMAND: /usr/local/nagios/libexec/check_http -H <IP> -f ok -I <IP> -u "/skill" -S -p 443 -a <domain\username:password>
OUTPUT: HTTP WARNING: HTTP/1.1 401 Unauthorized - 1528 bytes in 0.024 second response time |time=0.023611s;;;0.000000 size=1528B;;;0
How can i overcome the error ?
Re: OUTPUT: HTTP WARNING: HTTP/1.1 401 Unauthorized
Posted: Fri Nov 07, 2014 10:04 am
by tmcdonald
Can you show us the form of the username/password? You don't have to use the real values, just as long as it's the same format. For example if you were passing "someuser:secretpass" you could just put "user:pass". Seeing the domain in there makes me think you are using AD credentials which would not be the case here. You want to use the Basic Auth credentials you have set up in apache.
Re: OUTPUT: HTTP WARNING: HTTP/1.1 401 Unauthorized
Posted: Sat Nov 08, 2014 3:14 am
by cyient
tmcdonald wrote:Can you show us the form of the username/password? You don't have to use the real values, just as long as it's the same format. For example if you were passing "someuser:secretpass" you could just put "user:pass". Seeing the domain in there makes me think you are using AD credentials which would not be the case here. You want to use the Basic Auth credentials you have set up in apache.
But we use AD credentials to access the page.
Re: OUTPUT: HTTP WARNING: HTTP/1.1 401 Unauthorized
Posted: Mon Nov 10, 2014 1:40 pm
by lmiltchev
But we use AD credentials to access the page.
This cannot be done via check_http plugin. You will need to use a different one. I would recommend searching for a suitable plugin on the Nagios Exchange. Maybe give this one a try:
http://exchange.nagios.org/index.php?op ... _http_ntlm
Re: OUTPUT: HTTP WARNING: HTTP/1.1 401 Unauthorized
Posted: Fri Nov 14, 2014 4:38 am
by cyient
lmiltchev wrote:But we use AD credentials to access the page.
This cannot be done via check_http plugin. You will need to use a different one. I would recommend searching for a suitable plugin on the Nagios Exchange. Maybe give this one a try:
http://exchange.nagios.org/index.php?op ... _http_ntlm
I have tried by using the plugin in the below way but could not succeeded.
Code: Select all
./check_http_ntlm http://exampledomain.com/skill <domain\username> <password>
output: Unable to login!|ntlm=1;1;0;0
Suggest me
Re: OUTPUT: HTTP WARNING: HTTP/1.1 401 Unauthorized
Posted: Fri Nov 14, 2014 12:15 pm
by lmiltchev
I haven't tested this plugin personally. It's a 3rd party plugin and we cannot guarantee that it is going to work well with nagios. Have you tried the other plugin (the perl script)?
Are you sure that you passed the correct credentials?