Reputation: 21
Good evening,
I'm using HAProxy (ver 1.4.24) as a load balancer for ~3000 requests per second. I am trying to log only 5xx responses, but I am unable to achive that. I am using the following configuration:
This configuration also logs 2xx requests, as long as 5xx and 4xx. I need only 5xx and 4xx, or just 5xx.
Thanks,
Upvotes: 2
Views: 2339
Reputation: 1759
There is an option called "dontlog-normal" in HAProxy to log only errors (whatever type of errors).
Just enable it in your defaults section. Note in HAProxy 1.5, you have a new http-request set-log-level that you could use to disable logging when the status code is 2xx. This can simply be triggered by ACLs.
Baptiste
Upvotes: 3