Possibly related to 2780, telegraf docker plugin errors out when pulling stats from docker
unable to parse 'docker_container_cpu,annotation.kubernetes.io/config.seen=2017-08-08T08:38:22.137024605-07:00,annotation.kubernetes.io/config.source=api,annotation.kubernetes.io/created-by={\"kind\":\"SerializedReference\"\\,\"apiVersion\":\"v1\"\\,\"reference\":{\"kind\":\"DaemonSet\"\\,\"namespace\":\"lk-system\"\\,\"name\":\"splunk-forwarder\"\\,\"uid\":\"ef4fc440-7bad-11e7-967d-005056abb62d\"\\,\"apiVersion\":\"extensions\"\\,\"resourceVersion\":\"123506\"}}': missing fields\nunable to parse ',app=splunk-forwarder,container_image=gcr.io/google_containers/pause-amd64,container_name=k8s_POD_splunk-forwarder-0x41k_lk-system_9c1ae0bc-7c4f-11e7-90dc-005056abb62d_0,container_version=3.0,controller-revision-hash=1134785655,cpu=cpu11,engine_host=xxxx,host=xxxx,io.kubernetes.container.name=POD,io.kubernetes.docker.type=podsandbox,io.kubernetes.pod.name=splunk-forwarder-0x41k,io.kubernetes.pod.namespace=lk-system,io.kubernetes.pod.uid=9c1ae0bc-7c4f-11e7-90dc-005056abb62d,pod-template-generation=1 container_id=\"e9345f77b9367340512726c83186f267223de8dbb5e0055cd010d0d6b2ae7148\",usage_total=0i 1502239585000000000': missing measurement
[[inputs.docker]]
endpoint = "unix:///var/run/docker.sock"
container_names = []
timeout = "180s"
interval = "180s"
It should parse and send metrics to output sink
it fails to parse
We are running kubernetes 1.7
Let me know if you need more information.
Can you retest with the latest release?
Please reopen after testing with latest release.
You need to exclude annotation.kubernetes* from that list, what's happening is sometimes the kubernetes annotations have no value which causes that error.
@pilsy how do you exclude it?
I think adding this option to your docker plugin will work:
[[inputs.docker]]
docker_label_exclude = ["annotation.kubernetes*"]
@danielnelson thank you, got rid of my errors.
I'm on kubernetes 1.8
I added this to the docker README: https://github.com/influxdata/telegraf/commit/ad4a5aa7a0409a528782cbfeb6b0038b629efeb1
Most helpful comment
I think adding this option to your docker plugin will work: