Page MenuHomePhabricator

Switch HAProxy/Benthos to rfc5424
Closed, ResolvedPublic

Description

Considering both HAProxy and Benthos can use rfc5424 log format, where fields are explicitly named, we could avoid parsing (with grok) the syslog messages and having a nice improvement in Benthos performances.

Event Timeline

Change #1035440 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] benthos:cache: switch to rfc5424 format

https://gerrit.wikimedia.org/r/1035440

Change #1035440 merged by Fabfur:

[operations/puppet@production] benthos:cache: switch to rfc5424 format

https://gerrit.wikimedia.org/r/1035440

Change #1036276 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] benthos:cache: fix processing syntax

https://gerrit.wikimedia.org/r/1036276

Change #1036276 merged by Fabfur:

[operations/puppet@production] benthos:cache: fix processing syntax

https://gerrit.wikimedia.org/r/1036276

Change #1036711 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] benthos:cache: switch to rfc5424 format

https://gerrit.wikimedia.org/r/1036711

Change #1036711 merged by Fabfur:

[operations/puppet@production] benthos:cache: switch to rfc5424 format

https://gerrit.wikimedia.org/r/1036711

Mentioned in SAL (#wikimedia-operations) [2024-05-29T14:37:31Z] <fabfur> enabled puppet on A:cp as https://gerrit.wikimedia.org/r/c/operations/puppet/ /1036711 has been reverted (not applied anywhere but cp4037) (T365718)

This has been reverted due to a bug in HAProxy regarding how log variables are escaped in the rfc5424 format using the E flag.

See:

Our experience with this is unterminated log lines (especially for long/complex query strings) that are then "merged" with next log lines and failed to parse by Benthos.

Even if this happens just on a fraction of requests, it's enough to temporary stop the rolling out of this change and wait for the fix to be backported to our version or find a workaround.

Mentioned in SAL (#wikimedia-operations) [2024-06-12T13:49:07Z] <fabfur> depooled cp4037 to test benthos/haproxy configuration (T365718)

Change #1047442 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] benthos:cache: switch to rfc5424 format

https://gerrit.wikimedia.org/r/1047442

Change #1047442 merged by Fabfur:

[operations/puppet@production] benthos:cache: switch to rfc5424 format

https://gerrit.wikimedia.org/r/1047442

Change #1047536 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] benthos:cache: fixed typo in field name

https://gerrit.wikimedia.org/r/1047536

Change #1047536 merged by Fabfur:

[operations/puppet@production] benthos:cache: fixed typo in field name

https://gerrit.wikimedia.org/r/1047536

Change #1047545 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] benthos:cache: delete message if sequence number is missing

https://gerrit.wikimedia.org/r/1047545

Change #1047545 merged by Fabfur:

[operations/puppet@production] benthos:cache: delete message if sequence number is missing

https://gerrit.wikimedia.org/r/1047545

Change #1048024 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] haproxy:cache: raise max uri len to 2048B

https://gerrit.wikimedia.org/r/1048024

Change #1048024 merged by Fabfur:

[operations/puppet@production] haproxy:cache: raise max uri len to 2048B

https://gerrit.wikimedia.org/r/1048024

Change #1049498 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] benthos:cache: added catch resource to log errors in parse_log

https://gerrit.wikimedia.org/r/1049498

Change #1049498 merged by Fabfur:

[operations/puppet@production] benthos:cache: added catch resource to log errors in parse_log

https://gerrit.wikimedia.org/r/1049498

Change #1049944 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] benthos:cache: moving parse_log directive to input

https://gerrit.wikimedia.org/r/1049944

Change #1049944 merged by Fabfur:

[operations/puppet@production] benthos:cache: moving parse_log directive to input

https://gerrit.wikimedia.org/r/1049944

Change #1050258 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] benthos:cache: using tcp socket to send syslog messages from haproxy

https://gerrit.wikimedia.org/r/1050258

Change #1050258 merged by Fabfur:

[operations/puppet@production] benthos:cache: using tcp socket to send syslog messages from haproxy

https://gerrit.wikimedia.org/r/1050258

Change #1050361 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] benthos:cache: using tcp proto for syslog messages from haproxy

https://gerrit.wikimedia.org/r/1050361

Change #1050361 merged by Fabfur:

[operations/puppet@production] benthos:cache: using tcp proto for syslog messages from haproxy

https://gerrit.wikimedia.org/r/1050361

Change #1050401 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] benthos:cache: apparently linter has lost the ability to skip envvar

https://gerrit.wikimedia.org/r/1050401

Change #1050401 merged by Fabfur:

[operations/puppet@production] benthos:cache: apparently linter has lost the ability to skip envvar

https://gerrit.wikimedia.org/r/1050401

Change #1051198 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] benthos:cache: encode referer field as hex

https://gerrit.wikimedia.org/r/1051198

Change #1051198 merged by Fabfur:

[operations/puppet@production] benthos:cache: encode problematic fields as b64url

https://gerrit.wikimedia.org/r/1051198

Change #1052052 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] benthos:cache: fix typo in bloblang assignment

https://gerrit.wikimedia.org/r/1052052

Change #1052052 merged by Fabfur:

[operations/puppet@production] benthos:cache: fix typo in bloblang assignment

https://gerrit.wikimedia.org/r/1052052

Mentioned in SAL (#wikimedia-operations) [2024-07-04T08:45:33Z] <fabfur> enable puppet on A:cp-ulsfo (T365718)