ualex73 / monitor_docker

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

Feature Request: Get more Host Metrics? #35

Closed CM000n closed 4 years ago

CM000n commented 4 years ago

Hello, first of all thank you for this great custom component!

I was just wondering if it would be possible to get more information about the general usage of the Docker Host via the method currently in use? For example, total CPU usage, load or total RAM usage of the host. It would be nice to get all this information from this one custom component without having to use other tools.

Best Regards

ualex73 commented 4 years ago

👍 The component is using the Docker API and it only has Docker information like containers, images, etc. You can see the total memory/cpu used by all containers together, but it isn't possible to see the host information itself. For that i would recommend to use Glances: https://hub.docker.com/r/nicolargo/glances

CM000n commented 4 years ago

Hi @ualex73 ,

thank you very much for your feedback. Too bad, but I almost thought so. :-(

I tried Glances once, but it caused more load on my system than any other real work process. It makes little sense to me if the monitoring process consumes more resources than the processes it is supposed to monitor ;-)

That's why I increased the query interval for the Docker Monitoring Custom Component to 30s, because it increased the CPU load for me noticeably with the 10s interval.

Looks like I will stay with my current colllectD to PostgreSQL DB solution for now. It causes almost no additional system load for me: https://github.com/nickbabcock/pg-collectd

Anyway. Thanks for your great work and the hints.