Unable to parse the log but online log parser says no error #243
Unanswered
sunilthemaster
asked this question in
Q&A
Replies: 1 comment
-
Sorry for the late response. This may be just a copy&paste issue, but did I spot an additional |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Here is my log msg from Nginx
10.96.5.224 - - [27/Jan/2022:08:32:54 +0000] "GET /nginx_status HTTP/1.1" 200 106 "-" "kube-probe/1.20"
And this is the format am passing to exporter
$remote_addr - - [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"
Error msg says
error while parsing line '10.96.5.224 - - [27/Jan/2022:08:32:54 +0000] "GET /nginx_status HTTP/1.1" 200 106 "-" "kube-probe/1.20"': text log parsing err: access log line '10.96.5.224 - - [27/Jan/2022:08:32:54 +0000] "GET /nginx_status HTTP/1.1" 200 106 "-" "kube-probe/1.20"' does not match given format '^'(?P<remote_addr>[^ ]) - - [(?P<time_local>[^]])] "(?P[^"])" (?P[^ ]) (?P<body_bytes_sent>[^ ]) "(?P<http_referer>[^"])" "(?P<http_user_agent>[^"]*)"'
Whereas, same test via regex checker is passing

Any thoughts/suggestions?
Beta Was this translation helpful? Give feedback.
All reactions