See full request for check_http

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
warhansen
Posts: 14
Joined: Tue May 12, 2015 5:46 am

See full request for check_http

Post by warhansen »

Hi,

So we recently started getting all our sites on to SSL. We are using HAproxy in the front. When I do a request to HAproxy I see the request coming in, but no response is being received.

Is there a way to show the full string

Code: Select all

check_http -S --sni -H xxx.xxx.xxx -u /stuff/

is sending? When I use -v I simply get "Connection closed" but I need to see the actual request check_http is sending.

Thank you.

Warren.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: See full request for check_http

Post by rkennedy »

The -v will show you the full headers, could you post it for us to look at? This should help to identify the issue. You may need to specify the -I parameter to specify which IP to request the hostname off of specifically.

Code: Select all

[root@centos7x64 libexec]# ./check_http -H google.com
HTTP OK: HTTP/1.1 301 Moved Permanently - 559 bytes in 0.108 second response time |time=0.107636s;;;0.000000 size=559B;;;0
You have new mail in /var/spool/mail/root
[root@centos7x64 libexec]# ./check_http -H google.com -v
GET / HTTP/1.1
User-Agent: check_http/v2.0.3 (nagios-plugins 2.0.3)
Connection: close
Host: google.com
Accept: */*


http://google.com:80/ is 559 characters
STATUS: HTTP/1.1 301 Moved Permanently
**** HEADER ****
Location: http://www.google.com/
Content-Type: text/html; charset=UTF-8
Date: Wed, 23 Nov 2016 16:42:03 GMT
Expires: Fri, 23 Dec 2016 16:42:03 GMT
Cache-Control: public, max-age=2592000
Server: gws
Content-Length: 219
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Connection: close
**** CONTENT ****
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>
Former Nagios Employee
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: See full request for check_http

Post by dwhitfield »

I'm also curious...what does nmap say on whatever port you are using for ssl (I'd assume 443)?
warhansen
Posts: 14
Joined: Tue May 12, 2015 5:46 am

Re: See full request for check_http

Post by warhansen »

Hi,

So it turns out HA Proxy was screwing around. I had to create a curl script to do the check for me.

Thank you.

Warren.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: See full request for check_http

Post by dwhitfield »

It sounds like this issue has been resolved. Is it okay if we lock this thread? Thanks for choosing the Nagios forums!
Locked