Re: auto reply 200 on stats URL just for logs

From: Willy Tarreau <w#1wt.eu>
Date: Tue, 12 Jul 2011 10:01:57 +0200


On Tue, Jul 12, 2011 at 08:56:12AM +0200, Damien Hardy wrote:
> > frontend XXX
> > mode http
> > monitor-uri /test
> >
> > All checks to /test will return a 200 OK. Its used so that haproxy can be
> > tested by other components (eg: keepalived).
> >
> > Regards,
> > Willy
> >
>
> Yes but if I refer to the doc there is no log entries when someone
> request monitor uri and this is what à want for my stats platform.

Then you can use the errorfile method : you send your request to a backend without any server (which will produce an error 503) and you use "errorfile 503 /path/to/file" to return this file instead of the error 503. Some people use this to serve a few static files.

> Maybe haproxy could send the well know tiny "transparent pixel" on
> demand without even go through caching servers. #featurerequest :)

I'm not sure what well known method you're speaking about. However, the "return" feature is planned in the roadmap in order to be able to return static contents or a specific file. It's just not implemented yet.

Regards,
Willy Received on 2011/07/12 10:01

This archive was generated by hypermail 2.2.0 : 2011/07/12 10:15 CEST