monitor_docker: Memory Usage not being detected

Hello

The memory percentage is not currently being picked up for any of my containers

This is my config

monitor_docker:
  - name: RPI4
    url: tcp://192.168.1.251:10303
    monitored_conditions:
      - version
      - containers_running
      - containers_stopped
      - state
      - status
      - uptime
      - image
      - cpu_percentage
      - memory_percentage

My /etc/systemd/system/docker.service.d/remote-api.conf looks like this

[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:10303 -H unix:///var/run/docker.sock

All the other conditions bring back values bar memory which stays at unknown

Here is the log

2020-07-22 23:04:09 ERROR (Thread-3) [custom_components.monitor_docker.helpers] mosquitto: Can not determine memory usage for container ('usage')
2020-07-22 23:04:09 ERROR (Thread-3) [custom_components.monitor_docker.helpers] {}: Raw 'memory_stats' mosquitto

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 34 (14 by maintainers)

Most upvoted comments

@kzaoaai Just what does it do? (And so do I really want it, if I have other stuff going on on my Rpi4/64)

It enables the memory group on RPi, which is disabled by default since it adds some memory overhead (insignificant from what I’ve seen). https://downey.io/blog/exploring-cgroups-raspberry-pi/

@hajo62 ok, if you see memory in “docker stats”, then the Docker API has the information (then monitor_docker can use it). Good to hear it is resolved (and stays that way 😉)