OUTPUT: HTTP WARNING: HTTP/1.1 401 Unauthorized

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
cyient
Posts: 116
Joined: Thu May 08, 2014 4:45 am

OUTPUT: HTTP WARNING: HTTP/1.1 401 Unauthorized

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

Re: OUTPUT: HTTP WARNING: HTTP/1.1 401 Unauthorized

Post 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.
Former Nagios employee
cyient
Posts: 116
Joined: Thu May 08, 2014 4:45 am

Re: OUTPUT: HTTP WARNING: HTTP/1.1 401 Unauthorized

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: OUTPUT: HTTP WARNING: HTTP/1.1 401 Unauthorized

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
cyient
Posts: 116
Joined: Thu May 08, 2014 4:45 am

Re: OUTPUT: HTTP WARNING: HTTP/1.1 401 Unauthorized

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: OUTPUT: HTTP WARNING: HTTP/1.1 401 Unauthorized

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked