Metricbeat: Failed to encode event: unsupported float value: NaN

I am trying to inspect docker containers with metricbeat:6.3.0 in docker, and post data to elasticsearch: 6.3.0, and my host is Ubuntu16.04, the metricbeat.yml and docker.yml works when I install metricbeat on host directly. I got the Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: , so I put user: root in docker-compose.yml, the following is the docker-compose.yml:

version: '2'
services:
    metricbeat:
        image: 'docker.elastic.co/beats/metricbeat:6.3.0'
        user: root
        volumes:
            - /proc:/hostfs/proc:ro
            - /sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro
            - /:/hostfs:ro
            - /var/run/docker.sock:/var/run/docker.sock
            - ./metricbeat.yml:/usr/share/metricbeat/metricbeat.yml
            - ./docker.yml:/usr/share/metricbeat/modules.d/docker.yml
        restart: always

then, I got the error as following:

|metricbeat_1  | 2018-07-09T06:50:18.638Z|INFO|cfgfile/reload.go:253|Starting 4 runners ...|
|---|---|---|---|
|metricbeat_1  | 2018-07-09T06:50:18.638Z|INFO|cfgfile/reload.go:214|Loading of config files completed.|
|metricbeat_1  | 2018-07-09T06:50:19.646Z|INFO|elasticsearch/client.go:690|Connected to Elasticsearch version 6.3.0|
|metricbeat_1  | 2018-07-09T06:50:19.651Z|INFO|template/load.go:73|Template already exists and will not be overwritten.|
|metricbeat_1  | 2018-07-09T06:50:24.875Z|ERROR|elasticsearch/client.go:356|Failed to encode event: unsupported float value: NaN|
|metricbeat_1  | 2018-07-09T06:50:24.876Z|ERROR|elasticsearch/client.go:356|Failed to encode event: unsupported float value: NaN|
|metricbeat_1  | 2018-07-09T06:50:24.876Z|ERROR|elasticsearch/client.go:356|Failed to encode event: unsupported float value: NaN|
|metricbeat_1  | 2018-07-09T06:50:26.876Z|ERROR|elasticsearch/client.go:356|Failed to encode event: unsupported float value: NaN|

Can you try enabling debug logging and maybe the logs will provide a bit more information about the event containing the NaN value. In metricbeat.yml you can add

logging.level: debug

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.