HAProxy community

Haproxy backend server health check writing logs

my backend web servers are IIS servers, with HAproxy hosted in front on CentOS.
My question is, how can i purge the logs for health check on backend servers because its writing the logs for every second.


By default, HAProxy only logs a fail health check if the server was UP and a successful health check if the server was DOWN.

To troubleshoot the issue you would need to base your investigation around below questions:

  1. How have you configured your inter, rise and fall parameters?
  2. Have you enabled log-health-checks parameter?

Therefore, could you please share your haproxy configuration for further investigation?


i have not enabled " option log-health-checks" but rest of the parameters are enabled. here is my config
mode http
#option httpchk GET / HTTP/1.1\r\nHost:localhost
option log-health-checks
option forwardfor
option http-server-close
balance source
cookie SERVERID insert indirect nocache
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-Proto https
http-request set-header Host <name.com>

    server web1 192.xxx.xx.xx:443  check inter 1s fall 1 rise 1 ssl verify none 
    server web2 192.xxx.xx.xx:443  check inter 1s fall 1 rise 1 ssl verify none

Hello sgreddy,

Below are the two parameters those you would need to tune to resolve the issue:

  1. Increase the value for inter parameter : The value set for inter parameter is the interval between two consecutive health checks. In your configuration the value set is 1 sec, which means the health check would be performed every second.
  1. Disable log-health-checks: When this parameter is enabled, haproxy starts logging any change in the status of health check or the server health in every check. In your configuration, this option is enabled, which means the status of every health check performed is logged.

Therefore, the resolution depends on your requirement. If you wish to log every health check, I would recommend you to increase the value for inter parameter. Else, you may simply disable log-health-checks.

Hope this is helpful !