Logging check response

2018-03-20 Thread Andreas Mock
Hi all,

I don't get the http-check (ssl) up and running.

Is there a way to log the content returned by a check run
so that I can get a hint on the problem?

haproxy 1.8

Best regards
Andreas




Re: Logging check response

2018-03-20 Thread PiBa-NL

Hi Andreas,
Op 20-3-2018 om 12:21 schreef Andreas Mock:

Hi all,

I don't get the http-check (ssl) up and running.

Is there a way to log the content returned by a check run
so that I can get a hint on the problem?

haproxy 1.8

Best regards
Andreas



I'm not sure if logging of the content is possible easily..

But if you look at the status code on the stats page, and then take also 
into account that http-check does by default not send SNI nor a Host 
header. You should be able to mimic the requested check url with a CURL 
request. And can likely guess what is going on..


Hope it helps..

Regards,

PiBa-NL (Pieter)




Re: Logging check response

2018-03-20 Thread Aaron West
Just another idea, you could utilize the external check feature to
script something that does the check and logs the output:

https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#option%20external-check


Aaron West

Loadbalancer.org Ltd.

www.loadbalancer.org

+1 888 867 9504 / +44 (0)330 380 1064
aa...@loadbalancer.org

LEAVE A REVIEW | DEPLOYMENT GUIDES | BLOG



Re: Logging check response

2018-03-21 Thread Willy Tarreau
Hi,

On Tue, Mar 20, 2018 at 09:55:31PM +0100, PiBa-NL wrote:
> Hi Andreas,
> Op 20-3-2018 om 12:21 schreef Andreas Mock:
> > Hi all,
> > 
> > I don't get the http-check (ssl) up and running.
> > 
> > Is there a way to log the content returned by a check run
> > so that I can get a hint on the problem?
> > 
> > haproxy 1.8
> > 
> > Best regards
> > Andreas
> > 
> > 
> I'm not sure if logging of the content is possible easily..

I thought that option log-health-checks did it but I'm not seeing in the
code where the contents would be captured. In the case above it would
probably not be enough though, but it might be worth trying to get a bit
more info.

A very long time ago I wanted to implement a "show checks" command which
would report a full dump of the last check for each server, a bit like we
have for "show errors". It would just eat a bit of memory but doesn't look
that difficult to do. It's just that it was lower in my priority list than
the rest and till now nobody else beat me to it.

> But if you look at the status code on the stats page, and then take also
> into account that http-check does by default not send SNI nor a Host header.
> You should be able to mimic the requested check url with a CURL request. And
> can likely guess what is going on..

This is actually a pretty good point and it is a very likely cause for
such an issue.

cheers,
Willy