我遇到了一个我不明白的问题,提取 td-agent 的配置:
<source>
@type gelf
tag gelf-nr
<parse>
@type json
</parse>
port 12201
</source>
<match gelf-nr**>
@type copy
<store>
@type stdout
</store>
<store>
@type newrelic
api_key XXXXXXXXXXXXXXXXXXXXXXXXXX
</store>
</match>
输出插件 newrelic 总是在抱怨 gelf failed to emit error="time must be a Fluent::EventTime (or Integer): Float" error_class="ArgumentError
我试图将 json 的字段时间戳编辑为纳秒,但这不是导致问题的原因。消息摘录:
2020-09-22 10:00:18.135967969 +0200 gelf-nr: {"version":"1.0","host":"plop-01.stag-21","message":"TEST log plop","level":3,"facility":"plop.log","misc":{"reason":"test erreur","status_code":400,"quote_ids":[1234,5678]},"timestamp":"1600761476000000000","subject"...
我怀疑问题是最初的 2020-09-22 10:00:18.135967969 +0200。你怎么看 ?你能帮忙吗?