-
Notifications
You must be signed in to change notification settings - Fork 1
Description
When haproxy writes logs like:
PROCESS_NAME[PID]: CLIENT_ID:CLIENT_PORT [REQUEST_DATE] FRONTEND_NAME BACKEND_NAME/ -1/-1/-1/-1/0 STATUS_CODE BYTES_READ - - SC-- 0/0/0/0/0 0/0 {333.333.333.333:80} "HTTP_REQUEST"
The regex:
/^(?<time>[^ ]*\s*[^ ]* [^ ]*) (?<ps>\w+)\[(?<pid>\d+)\]: ((?<c_ip>[\w\.]+):(?<c_port>\d+) \[(?<hatime>.+)\] (?<f_end>[\w-]+)~ (?<b_end>[\w-.]+)\/(?<b_server>[\w-]+) (?<tq>\d+)\/(?<tw>\d+)\/(?<tc>\d+)\/(?<tr>\d+)\/(?<tt>\d+) (?<status_code>\d+) (?<bytes>\d+) (?<req_cookie>\S+) (?<res_cookie>\S+) (?<t_state>[\w-]+) (?<actconn>\d+)\/(?<feconn>\d+)\/(?<beconn>\d+)\/(?<srv_conn>\d+)\/(?<retries>\d+) (?<srv_queue>\d+)\/(?<backend_queue>\d+) \{?(?<req_headers>[^}]*)\}? ?\{?(?<res_headers>[^}]*)\}? ?"(?<request>[^"]*)"|(?<message>.+))/
of the parse parser_haproxy.rb is not working
The point is to detect angular brackets <> for the NOSRV 503 status code