cadvisor:工厂 "docker" 无法处理容器“/system.slice/kdump.service”

cadvisor : Factory "docker" was unable to handle container "/system.slice/kdump.service"

凝视 cAdvisor 时,我得到 Factory "docker" was unable to handle container "/system.slice/kdump.service"。我想弄明白这些是干什么用的,还有……怎么解决?

任何指点将不胜感激。

我的docker-compose.yml

version: "3.7"

networks:
  web:
    external: true
  internal:
    external: false

volumes:
    prometheus_data: {}

services:
  prometheus:
    image: prom/prometheus:latest
    container_name: prometheus
    volumes:
      - ./prometheus:/etc/prometheus
      - prometheus_data:/prometheus
    command:
      - --config.file=/etc/prometheus/prometheus.yml
      - --storage.tsdb.path=/prometheus
    restart: unless-stopped
    ports:
      - 9090:9090
    networks:
      - internal
    labels:
      org.label-schema.group: "monitoring"

  cadvisor:
    image: gcr.io/cadvisor/cadvisor:latest
    container_name: cadvisor
    privileged: true
    devices:
      - /dev/kmsg
    volumes:
      - /:/rootfs:ro
      - /var/run:/var/run:rw
      - /sys:/sys:ro
      - /var/lib/docker:/var/lib/docker:ro
      - /dev/disk/:/dev/disk:ro
      - /sys/fs/cgroup:/cgroup:ro
      - /sys/fs/cgroup/cpu,cpuacct:/sys/fs/cgroup/cpuacct,cpu:rw
    command: ["-logtostderr", "-docker_only", "-v=4"]
    restart: unless-stopped
    expose:
      - 8080
    networks:
      - internal
    labels:
      - "org.label-schema.group='monitoring'"

我的 cAdvisor 日志

today at 22:27  I0114 21:27:59.216181       1 factory.go:218] Factory "systemd" was unable to handle container "/system.slice/auditd.service"
today at 22:27  I0114 21:27:59.216195       1 factory.go:211] Factory "raw" can handle container "/system.slice/auditd.service", but ignoring.
today at 22:27  I0114 21:27:59.216209       1 manager.go:917] ignoring container "/system.slice/auditd.service"
today at 22:27  I0114 21:27:59.216216       1 factory.go:218] Factory "docker" was unable to handle container "/system.slice/var-lib-docker-containers-338c650e497d25342cd554c2dcddda597a8ae1f6f1af9d38ddffa4768d51c512-shm.mount"
today at 22:27  I0114 21:27:59.216232       1 factory.go:211] Factory "systemd" can handle container "/system.slice/var-lib-docker-containers-338c650e497d25342cd554c2dcddda597a8ae1f6f1af9d38ddffa4768d51c512-shm.mount", but ignoring.
today at 22:27  I0114 21:27:59.216246       1 manager.go:917] ignoring container "/system.slice/var-lib-docker-containers-338c650e497d25342cd554c2dcddda597a8ae1f6f1af9d38ddffa4768d51c512-shm.mount"
today at 22:27  I0114 21:27:59.216255       1 factory.go:218] Factory "docker" was unable to handle container "/system.slice/kdump.service"
today at 22:27  I0114 21:27:59.216264       1 factory.go:218] Factory "systemd" was unable to handle container "/system.slice/kdump.service"
today at 22:27  I0114 21:27:59.216285       1 factory.go:211] Factory "raw" can handle container "/system.slice/kdump.service", but ignoring.
today at 22:27  I0114 21:27:59.216306       1 manager.go:917] ignoring container "/system.slice/kdump.service"
today at 22:27  I0114 21:27:59.216329       1 factory.go:218] Factory "docker" was unable to handle container "/system.slice/var-lib-docker-overlay2-7aee40d9806631c761a0d7a9bb1bfde1a70260590437020231fc16fa6cf8cc9b-merged.mount"
today at 22:27  I0114 21:27:59.216353       1 factory.go:211] Factory "systemd" can handle container "/system.slice/var-lib-docker-overlay2-7aee40d9806631c761a0d7a9bb1bfde1a70260590437020231fc16fa6cf8cc9b-merged.mount", but ignoring.
today at 22:27  I0114 21:27:59.216384       1 manager.go:917] ignoring container "/system.slice/var-lib-docker-overlay2-7aee40d9806631c761a0d7a9bb1bfde1a70260590437020231fc16fa6cf8cc9b-merged.mount"
today at 22:27  I0114 21:27:59.216397       1 factory.go:218] Factory "docker" was unable to handle container "/system.slice/kmod-static-nodes.service"
today at 22:27  I0114 21:27:59.216406       1 factory.go:218] Factory "systemd" was unable to handle container "/system.slice/kmod-static-nodes.service"
today at 22:27  I0114 21:27:59.216419       1 factory.go:211] Factory "raw" can handle container "/system.slice/kmod-static-nodes.service", but ignoring.
today at 22:27  I0114 21:27:59.216432       1 manager.go:917] ignoring container "/system.slice/kmod-static-nodes.service"
today at 22:27  I0114 21:27:59.216446       1 factory.go:218] Factory "docker" was unable to handle container "/system.slice/dev-hugepages.mount"
today at 22:27  I0114 21:27:59.216455       1 factory.go:211] Factory "systemd" can handle container "/system.slice/dev-hugepages.mount", but ignoring.
today at 22:27  I0114 21:27:59.216468       1 manager.go:917] ignoring container "/system.slice/dev-hugepages.mount"
today at 22:27  I0114 21:27:59.216475       1 factory.go:218] Factory "docker" was unable to handle container "/system.slice/var-lib-docker-overlay2-70cd980dc4c48095d4c7060b7626642d71513451d4dd63e896d789ea7b04e394-merged.mount"
today at 22:27  I0114 21:27:59.216489       1 factory.go:211] Factory "systemd" can handle container "/system.slice/var-lib-docker-overlay2-70cd980dc4c48095d4c7060b7626642d71513451d4dd63e896d789ea7b04e394-merged.mount", but ignoring.
today at 22:27  I0114 21:27:59.216502       1 manager.go:917] ignoring container "/system.slice/var-lib-docker-overlay2-70cd980dc4c48095d4c7060b7626642d71513451d4dd63e896d789ea7b04e394-merged.mount"

kdump.service 是系统服务,不是 Docker 容器。您可以阅读更多内容 here。您在日志中看到的是调试信息,告诉您 cAdvisor 没有内核转储服务的处理程序。这不是一个错误,它只是可见的,因为你增加了冗长("-v=4" in your command:)。您可以降低冗长程度或直接忽略这些消息。