I’m struggling with inserting timestamp in influxdb (I've asked this question on influxdb forum and slack channel but no one answered).
This is example of json log
{"@timestamp":"2022-12-26T04:27:24-05:00","client_ip":"xx.xx.xx.xx","domain":" somedomain.com ","request":"/404","responsetime":"0.001","host":"xx.xx.xx.xx","status":"404"}
And this is my input.plugin
[[inputs.tail]]
files = ["/var/log/nginx/json.access.log"]
from_beginning = true
name_override = "nginxjson"
json_name_key = "nginxjson"
data_format = "json"
json_time_key = "@timestamp"
json_time_format = "2006-01-02T15:04:05Z07:00"
tag_keys = ["client_ip", "domain", "request", "host", "status"]
json_string_fields = ["@timestamp", "responsetime"]
I’ve tried also with timestamp as tag, but same, no errors and timestamp doesn’t write to influxdb, nothing happens, every other field or string is inserting normally. If needed, I can provide more info. I'm using latest influxdb version 2.6 and telegraf 1.24