Hello!
I’m new to the forum. Was wondering if someone could help me with parsing the Traefik access log, which is in JSON format. I keep getting the same error in Telegraf which does not make much sense to me as I am not from DEV background. The error is “2023-07-01T14:10:40Z E! [processors.parser] could not parse field message: invalid character ‘i’ in literal true (expecting ‘r’)”.
Here is my Telegraf config below. I have commented out some of the syntax but still have the same error with everything uncommented.
[[inputs.docker_log]]
endpoint = “unix:///var/run/docker.sock”
from_beginning = false
container_name_include = [“traefik”]
[[processors.parser]]
name_override = “traefik_access_log”
namepass = [“docker_log”]
parse_fields = [“message”]
merge = “override”
data_format = “json”
#json_string_fields = [
#“ClientHost”,
#“RequestAddr”,
#“RequestCount”,
#“RequestHost”,
#“RequestMethod”,
#“RequestPath”,
#“RequestProtocol”,
#“RequestScheme”,
#“downstream_Content-Type”,
#“request_User-Agent”,
#“time”
#]
#json_time_key = “time”
#json_time_format = “2000-01-01T12:00:00+”
#json_timezone = “UTC”
[[outputs.influxdb_v2]]
urls = [“http://influxdb:8086”] # required
token = “Removed”
organization = “Home”
bucket = “traefik_access_log”
timeout = “5s”
namepass = [“traefik_access_log”]
[[outputs.file]]
files = [“/var/tmp/output/output.txt”]
namepass = [“traefik_access_log”]