Open aptonline opened 5 years ago
Any update on this?
I have downgraded to 0.0.4
which has resolved the issue.
Any update on a fix?
I have the same issues, and it seems that you have to use the configurations mentioned in the development-branch now: https://github.com/Sanderhuisman/docker_monitor/tree/develop
Took me some time to figure this out, since I installed the current version with HACS. I think HACS also has options for beta-releases as well.
Following the manual of the development branch, I changed my configuration to the following:
docker_monitor:
hosts:
- name: Docker
url: unix://var/run/docker.sock
I still have some difficulties with the containers, though. It seems like one has to add them explicitely at the moment, which I did according to the manual as well:
docker_monitor:
hosts:
- name: Docker
url: unix://var/run/docker.sock
containers:
home-assistant:
switch: False
sensors:
- status
- uptime
- cpu_percentage_usage
- memory_usage
- memory_percentage_usage
- network_total_up
- network_total_down
zigbee2mqtt:
switch: False
sensors:
- status
- uptime
- cpu_percentage_usage
- memory_usage
- memory_percentage_usage
- network_total_up
- network_total_down
Sensors do not exactly match the names in the config. For the home-assistant container I use the following lovelace card:
entities:
- entity: sensor.docker_home_assistant_cpu_use
- entity: sensor.docker_home_assistant_memory_use
- entity: sensor.docker_home_assistant_memory_use_percent
- entity: sensor.docker_home_assistant_up_time
- entity: sensor.docker_home_assistant_network_total_up
- entity: sensor.docker_home_assistant_network_total_down
title: Docker Containers
show_header_toggle: false
edit: memory and network data is currently empty for me.
Hi @aptonline and @hummelriegel, sorry for the late reply, due to my current health situation I'm not able to work a lot on this component (don't worry, I'm getting better;)).
The latest version (0.1.1) is a complete rewrite of the sensor. The configuration of both is different. This breaking change was mentioned in the readme in the develop branch, but I forgot to mention this in the version release.
I made the release such that I could install the newest version easily but forgot about the impact for other users.
The config from @hummelriegel is correct, and he is also correct that for now, you have to explicitly configure each container. Sensor naming has to do with home-assistant itself, not every character can be used in the name of a sensor (such as the hyphen sign). The hyphen is replaced by an underscore.
Sorry to hear you haven’t been well and thanks for the update.
Here’s to a speedy recovery 👍🏼
Had docker monitor working perfectly until recent update and now it complains that URL is an invalid option:
Invalid config for [docker_monitor]: [url] is an invalid option for [docker_monitor]. Check: docker_monitor->docker_monitor->url. (See /config/configuration.yaml, line 252). Please check the docs at https://home-assistant.io/components/docker_monitor/
I couldn’t see any breaking changes. This is my config: