You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to issue #217, nginx log exporter does support the multiple values for the upstream_response_time and I assume for upstream_connect_time and upstream_header_time too.
I'm still facing a parsing error when nginx provides multiples values there. It works fine with other entry.
Apr 05 13:50:47 jira1 prometheus-nginxlog-exporter[64094]: error while parsing line
'[05/Apr/2023:13:50:47 +0200] client=11.11.11.11 remote_user="-" request="GET /url.png HTTP/1.1" request_length=501 status=200 body_bytes_sent=3147 referer="-" user_agent="Some navigator" x_forwarded="1.11.11.11, 1.11.11.11" request_time=0.010 upstream_response_time=0.004, 0.008 upstream_connect_time=0.004, 0.000 upstream_header_time=0.004, 0.004 subnet=11.11.11.11'
: text log parsing err: access log line
'[05/Apr/2023:13:50:47 +0200] client=11.11.11.11 remote_user="-" request="GET /url.png HTTP/1.1" request_length=501 status=200 body_bytes_sent=3147 referer="-" user_agent="Some navigator" x_forwarded="11.11.11.11, 1.11.11.11" request_time=0.010 upstream_response_time=0.004, 0.008 upstream_connect_time=0.004, 0.000 upstream_header_time=0.004, 0.004 subnet=11.11.11.11'
does not match given format
'^\[(?P<time_local>[^]]*)\] client=(?P<remote_addr>[^ ]*) remote_user="(?P<remote_user>[^"]*)" request="(?P<request>[^"]*)" request_length=(?P<request_length>[^ ]*) status=(?P<status>[^ ]*) body_bytes_sent=(?P<body_bytes_sent>[^ ]*) referer="(?P<http_referer>[^"]*)" user_agent="(?P<http_user_agent>[^"]*)" x_forwarded="(?P<http_x_forwarded_for>[^"]*)" request_time=(?P<request_time>[^ ]*) upstream_response_time=(?P<upstream_response_time>[^ ]*) upstream_connect_time=(?P<upstream_connect_time>[^ ]*) upstream_header_time=(?P<upstream_header_time>[^ ]*)'
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
According to issue #217, nginx log exporter does support the multiple values for the upstream_response_time and I assume for upstream_connect_time and upstream_header_time too.
I'm still facing a parsing error when nginx provides multiples values there. It works fine with other entry.
Nginx log format
Nginx log exporter config
According to the exception, the matching issue is there
which extracts
0.004,
instead of0.004, 0.008
I'm using v1.10.0.
I'm pretty sure I read something about it while ago and it was related to the parse format but I can't get my hands on it again.
Note: the last field subnet doesn't look to have any impact on it. It's something we activate on demand since it generates quite a lot of metrics.
Any idea ?
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions