-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow timestamp RFC
names in json parser's json_time_format
#4928
Comments
working with: |
Thanks for the suggestion, I do like the idea of allowing the |
RFC
names in json parser's json_time_format
I've struggled with this for quite some time myself.
I also tried:
...but telegraf seems unable to parse the timestamps. Are timestamps in the format "2021-02-17T21:21:23.890Z" not supported? I cannot find any examples of them in the stdlib, linked in the previous post, but I wanted to check if this really is the case. |
It's supported. For that format, use |
Thanks! It worked! |
Relevant telegraf.conf:
System info:
Telegraf 1.8.1
Linux ip-172-40-16-175 4.15.0-1021-aws #21-Ubuntu SMP Tue Aug 28 10:23:07 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 16.04
Expected behavior:
I add to kafka json message , with golang
These timsteamp are formated like that:
timestring.Format(time.RFC3339)
I use time library in golangActual behavior:
for
json_time_format = "2018-10-26T13:30:33Z"
I got :
for
json_time_format = "RFC3339"
error: parsing time "2018-10-26T13:30:33Z" as "RFC3339": cannot parse "2018-10-26T13:30:33Z" as "RFC"
Additional info:
telegraf parser json drove me nuts
The text was updated successfully, but these errors were encountered: