mackerelio/mackerel-agent-plugins

[accesslog] Handle multiple values in apptime

Closed this issue · 2 comments

When using the log format apptime:$upstream_response_time, the response tiem
can be multiple values on retry. This results in failure to parse the log line. Maybe only the last value should be used (or summation?).

ltsv: cannot unmarshal number 0.000, 2.900 into Go value of type float64\n2020/03/24 12:00:00 failed to parse ltsvl

Times of several responses are separated by commas and colons like addresses in the $upstream_addr variable.
http://nginx.org/en/docs/http/ngx_http_upstream_module.html

Thank you for reporting, @itchyny.
This error is raised by https://github.com/Songmu/axslogparser which is used by mackerel-plugin-accesslog, and I opened an issue there Songmu/axslogparser#19.
mackerel-plugin-accesslog should not fail with such logs, so we will investigate the problem more and fix it as soon as possible.

lufia commented

axslogparse was updated on #615