Fails to parse log containing nginx's $upstream_response_time
Closed this issue · 3 comments
Originally reported in mackerelio/mackerel-agent-plugins#604
According to the recommendation of ltsv.org, apptime
in LTSV log may be nginx's $upstream_response_time
, which can contain multiple values separeted by colons and commas.
However, axslogparser assumes the field is a float64 and fails to parse log.
I think it would be nice if axslogparser can parse log containing such values, while there may be several ways for it to do so.
I did not know this specification!
The question has no single answer, but how do you think it should be parsed when such values are included?
As far as I can think of, it has several choices:
- Add an option to ignore unrecognized values
- Use an aggregated value (maybe sum is good for this case? but I'm not sure what is the best)
- Change the type of
AppTime
field inLog
to*string
or*float64[]
(breaking change)
I think the first one is simple and also applicable for logs formatted in other (for example, partially non-standard) ways.
What do you think? @Songmu