fluentd-docs-gitbook icon indicating copy to clipboard operation
fluentd-docs-gitbook copied to clipboard

Examples for HAProxy fails for IPv6

Open larsskj opened this issue 4 years ago • 0 comments

Documentation at this page

https://www.fluentd.org/guides/recipes/haproxy-elasticsearch

show a regex for parsing the standard HAProxy logfile. Unfortunately this fails with IPv6 where loglines look like this:

2021-02-09 17:28:18 +0100 [warn]: #0 pattern not matched: "Feb 9 17:28:18 proxy haproxy[1540]: ::ffff:195.95.239.60:54241 [09/Feb/2021:17:28:18.698] https~ traefik/server_kube02 0/0/1/7/227 206 1601821 - - ---- 33/15/1/0/0 0/0 \"GET /sites/default/files/imagepicker/159/20141026_154037.jpg HTTP/1.1\""

The host runs and supports IPv6 and so do HAProxy. Making a regex that supports both IPv4 and IPv6 isn't easy. :-)

larsskj avatar Feb 09 '21 16:02 larsskj