skip to Main Content

Nginx – How to match optional group in regular expression

I want a regular expression for using in fluentd for parsing nginx error logs. The sample row is: 2024/04/15 09:06:29 [error] 3443790#3443790: *176070165 limiting requests, excess: 2.957 by zone "RequestLimitForCommonApi", client: 77.81.151.129, server: test.com, request: "POST /capi/session/forgot HTTP/1.1", host: "test.com",…

VIEW QUESTION

Javascript – how to split a continues hex string into space delimited hex blocks of 32 tuplets each?

I have a fairly long hex string Buffer.toString("hex") that I want to print to a log file in a block of 32 tuplets each. So basically going from e01102020809020300800202020809020208095f520c8066054445472b44739621e0d003040401d21044454946583532463447444a4d010000d3104445472b445333374f53474b32010000d4104445472b44533337474b563033010000d503040401d6104445472b444342324354473031010000d7104445472b44504450535f5f5f5f0106009000 to e0 11 02 02 08 09 02 03 00 80…

VIEW QUESTION
Back To Top
Search