Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a HAProxy setup in front of Apache webservers for load balancing. Health checks for these webservers are also configured in HAProxy.

option httpchk  HEAD /healthcheck.txt HTTP/1.0

Is it possible to transfer these health check requests to backend webservers as LB-Check, User-agent or any other option, so that I can distinguish them from other log entries?

(I don't want to go for the dontlog" option, as I don't want to miss these entries.)

share|improve this question

1 Answer 1

up vote 2 down vote accepted

you're already requesting what i assume to be a unique file name for the health check, so why do you need something else?

but to answer your question, you can abuse the HTTP/1.0 bit as follows:

option httpchk HEAD /healthcheck.txt HTTP/1.0\r\nUser-agent:\ LB-Check
share|improve this answer
    
Thanks. Works perfect. –  Joseph Sep 7 '12 at 13:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.