Page 1 of 2

error while performing http checks

Posted: Mon Jan 27, 2014 10:13 am
by ravish78
Team,

We are reciving "HTTP CRITICAL - Error on receive" while performing http checks.Url is accessible and also reachable from nagios server.

Can you please let us know how to fix it.

Re: error while performing http checks

Posted: Mon Jan 27, 2014 10:34 am
by abrist
Can you give us an example of the full command? Do you know if the website uses chunked encoding?

Re: error while performing http checks

Posted: Mon Jan 27, 2014 10:49 am
by ravish78
Below is example

./check_http -S --ssl -c 15 -t 15 -f follow -H carrierlogistics.external.xerox.com -v
GET / HTTP/1.0
User-Agent: check_http/v2053 (nagios-plugins 1.4.13)
Connection: close
Host: carrierlogistics.external.xerox.com

HTTP CRITICAL - Error on receive


Not sure of the second part (chunked encoding).

Re: error while performing http checks

Posted: Mon Jan 27, 2014 11:16 am
by abrist
Can you try using the -I switch instead of -H?
ravish78 wrote:./check_http -S --ssl -c 15 -t 15 -f follow -I carrierlogistics.external.xerox.com -v

Re: error while performing http checks

Posted: Mon Jan 27, 2014 11:19 am
by ravish78
I get same output

./check_http -S --ssl -c 15 -t 15 -f follow -I carrierlogistics.external.xerox.com -v
GET / HTTP/1.0
User-Agent: check_http/v2053 (nagios-plugins 1.4.13)
Connection: close

HTTP CRITICAL - Error on receive


Even from other nagios server i receive same error.

./check_http -S --ssl -c 15 -t 15 -f follow -I carrierlogistics.external.xerox.com -v
GET / HTTP/1.0
User-Agent: check_http/v1991 (nagios-plugins 1.4.12)
Connection: close
HTTP CRITICAL - Error on receive

Re: error while performing http checks

Posted: Mon Jan 27, 2014 1:47 pm
by sreinhardt
I'm wondering if this is an IIS7 issue. I have the exact same things happening even if I add a user agent string or alter the timeout. Additionally, when loading via a web browser, it never finishes loading the page, I believe this may have something to do with the close statement you are getting from the server in check_http

Re: error while performing http checks

Posted: Mon Jan 27, 2014 1:53 pm
by ravish78
This is complete url we are chekcing for.

https://carrierlogistics.external.xerox ... MultiLogin

Re: error while performing http checks

Posted: Mon Jan 27, 2014 2:20 pm
by abrist
Ravish, lets try this with the newest plugins build:

Code: Select all

cd /tmp
wget https://github.com/nagios-plugins/nagios-plugins/archive/master.zip
yum install -y unzip
unzip master
cd nagios-plugins-master/
tools/setup
./configure
make all
cd plugins
./check_http -S --ssl -c 15 -t 15 -f follow -I carrierlogistics.external.xerox.com
Did this check work?
EDIT, you should be able to just use -H as well:

Code: Select all

./check_http -S --ssl -c 15 -t 15 -f follow -H carrierlogistics.external.xerox.com

Re: error while performing http checks

Posted: Mon Jan 27, 2014 3:57 pm
by sreinhardt
Note after abrists post, if it works you would need to move the new plugin to the libexec folder.

Code: Select all

mv /usr/local/nagios/libexec/check_http /usr/local/nagios/libexec/check_http.old
cp /tmp/nagios-plugins-master/plugins/check_http /usr/local/nagios/libexec/
All set to use without any changes to XI or your current commands!

Re: error while performing http checks

Posted: Tue Jan 28, 2014 2:41 pm
by ravish78
It works with new plugin.

What is the difference between old and new.