error while performing http checks

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ravish78
Posts: 269
Joined: Wed Mar 14, 2012 9:50 am

error while performing http checks

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: error while performing http checks

Post by abrist »

Can you give us an example of the full command? Do you know if the website uses chunked encoding?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ravish78
Posts: 269
Joined: Wed Mar 14, 2012 9:50 am

Re: error while performing http checks

Post 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).
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: error while performing http checks

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ravish78
Posts: 269
Joined: Wed Mar 14, 2012 9:50 am

Re: error while performing http checks

Post 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
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: error while performing http checks

Post 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
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
ravish78
Posts: 269
Joined: Wed Mar 14, 2012 9:50 am

Re: error while performing http checks

Post by ravish78 »

This is complete url we are chekcing for.

https://carrierlogistics.external.xerox ... MultiLogin
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: error while performing http checks

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: error while performing http checks

Post 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!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
ravish78
Posts: 269
Joined: Wed Mar 14, 2012 9:50 am

Re: error while performing http checks

Post by ravish78 »

It works with new plugin.

What is the difference between old and new.
Locked