1

I configured haproxy with option log-separate-errors to be able to log errorneous requests in a separate logfile. However, using that option, all requests are then being sent to the logfile, even though I am filtering for syslog level error.

I already double checked that my filtering works, using a custom log format which shows %pri-text% - the messages are indeed sent as syslog level error.

The haproxy instance itself runs fine in production, I dont see any problems at all, the requests are 2xx or 3xx. Any hints how to proceed here with debugging, or what I might be doing wrong?

I am using haproxy 1.4.18.

effhaa
  • 133
  • 1
  • 7

1 Answers1

1

To follow up here:

I was mistaken: Not all requests were sent to the logfile, but most. This was due to the fact that a lot of rather usual things are being considered an error by haproxy, for example the error flags CD-- are just a keep-alive session terminated first by the client, which happens apparently a lot.

I decided to filter this even this is technically an error, since it is nothing I can change or fix, and will just bury really important errors under the sheer load. This is the syslog config I finally used: https://github.com/till/easybib-cookbooks/blob/8a4e0debf814743e9dd3bb603e4845ad88ecd64b/haproxy/templates/default/haproxy-logs.erb

effhaa
  • 133
  • 1
  • 7