0

I was wondering if is there any way to track different HTTP codes that HAProxy send to clients.

For example, have a log with just a list of different status codes:

200
200
302
404
499
500

Having that, I can graph it with rrdtool or something else.

boris quiroz
  • 1,140
  • 1
  • 7
  • 18

1 Answers1

1

HAProxy provides the status code in the httplog format:

  • "status_code" is the HTTP status code returned to the client. This status is generally set by the server, but it might also be set by haproxy when the server cannot be reached or when its response is blocked by haproxy.

You just need to activate it with option httplog

http://cbonte.github.io/haproxy-dconv/configuration-1.4.html#8.2.3

wlallemand
  • 11
  • 2