Metricbeat parse docker image labels error


(Jun Zhang) #1

metricbeat parses "docker.image.labels" error,should be 5 labels:

{
  "_index": "metricbeat-power-6.4.1-2018.10.18",
  "_type": "doc",
  "_id": "yD3PhmYBo726M9O3TIlB",
  "_version": 1,
  "_score": null,
  "_source": {
    "@timestamp": "2018-10-18T10:53:25.167Z",
    "metricset": {
      "module": "docker",
      "host": "/var/run/docker.sock",
      "rtt": 49248,
      "name": "image"
    },
    "docker": {
      "image": {
        "labels": {
          "org_label-schema_schema-version": "= 1.0     org.label-schema.name=CentOS Base Image     org.label-schema.vendor=CentOS     org.label-schema.license=GPLv2     org.label-schema.build-date=20180531"
        },
        "id": {
          "current": "sha256:d3923d82ce305febd8a9b4c88e949995ebf4b3c725c7388e389c1b1ae40ee6ed",
          "parent": ""
        },
        "created": "2018-10-11T12:39:24.000Z",
        "size": {
          "regular": 352640809,
          "virtual": 352640809
        },
        "tags": []
      }
    },
    "beat": {
      "hostname": "m7-power-128050",
      "version": "6.4.1",
      "name": "m7-power-128050"
    },
    "host": {
      "name": "m7-power-128050",
      "architecture": "x86_64",
      "os": {
        "codename": "Core",
        "platform": "centos",
        "version": "7 (Core)",
        "family": "redhat"
      },
      "id": "14759c8d771e43a2b10f7402e8060d8a",
      "containerized": true
    }
  },
  "fields": {
    "@timestamp": [
      "2018-10-18T10:53:25.167Z"
    ],
    "docker.image.created": [
      "2018-10-11T12:39:24.000Z"
    ]
  },
  "highlight": {
    "beat.hostname": [
      "@kibana-highlighted-field@m7-power-128050@/kibana-highlighted-field@"
    ],
    "metricset.name": [
      "@kibana-highlighted-field@image@/kibana-highlighted-field@"
    ],
    "metricset.module": [
      "@kibana-highlighted-field@docker@/kibana-highlighted-field@"
    ]
  },
  "sort": [
    1539860005167
  ]
}

(Carlos Pérez Aradros) #2

Hi @Jun_Zhang,

This looks like a bug, what version of Docker are you using? I understand this is a Metricbeat 6.4.1 with the Docker module enabled.


(Jun Zhang) #3

Yes, Docker module enabled.

# docker info
Containers: 4
 Running: 3
 Paused: 0
 Stopped: 1
Images: 130
Server Version: 18.06.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: d64c661f1d51c48782c9cec8fda7604785f93587
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
 seccomp
  Profile: default
Kernel Version: 3.10.0-693.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 40
Total Memory: 251.6GiB
Name: m7-automl-dev01
ID: FLQ6:C4JC:LVUN:G6PQ:M6M4:BOEX:3EHO:HB6A:C7UM:F47I:VCLV:YEBQ
Docker Root Dir: /mnt/disk1/docker/data
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 78
 Goroutines: 104
 System Time: 2018-10-23T22:49:00.676533097+08:00
 EventsListeners: 1
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 docker02:35000
 127.0.0.0/8
Registry Mirrors:
 https://docker.mirrors.ustc.edu.cn/
 https://hub-mirror.c.163.com/
Live Restore Enabled: true

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

(system) #4

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