ualex73 / monitor_docker

Monitor Docker containers from Home Assistant
Apache License 2.0
289 stars 35 forks source link

Cannot determine memory usage for container ('stats') #81

Closed rphlwnk closed 2 years ago

rphlwnk commented 2 years ago

No memory per container is shown, i have HA running in docker on raspberry and followed the instructions.

pi@raspberrypi:/ $ cat /boot/cmdline.txt
console=serial0,115200 console=tty1 root=PARTUUID=9f89cf0c-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory

All other stats are shown up correct (except from health): image

Installed monitor_docker version is 1.10

Error in HA logs:

This error originated from a custom integration.

Logger: custom_components.monitor_docker.helpers
Source: custom_components/monitor_docker/helpers.py:964
Integration: Monitor Docker (documentation, issues)
First occurred: 12:21:22 (3 occurrences)
Last logged: 12:21:23

[Docker] homeassistant: Cannot determine memory usage for container ('stats')
[Docker] portainer: Cannot determine memory usage for container ('stats')
[Docker] adguardhome: Cannot determine memory usage for container ('stats')
This error originated from a custom integration.

Logger: custom_components.monitor_docker.helpers
Source: custom_components/monitor_docker/helpers.py:971
Integration: Monitor Docker (documentation, issues)
First occurred: 12:21:22 (3 occurrences)
Last logged: 12:21:23

[Docker] homeassistant: Raw 'memory_stats' {}
[Docker] portainer: Raw 'memory_stats' {}
[Docker] adguardhome: Raw 'memory_stats' {}
ualex73 commented 2 years ago

According to your copy-paste, the line in "/boot/cmdline.txt" are 2 lines ... It must be 1 line, can you check this again in your editor?

Also, if you run "docker stats", if you do not see memory here - the monitor_docker cannot retrieve it either.

rphlwnk commented 2 years ago

Thank you, now i can see the memory stats, i thought i had to add it as a second line.