ualex73 / monitor_docker

Monitor Docker containers from Home Assistant
Apache License 2.0
268 stars 34 forks source link

HA logs - repeated monitor_docker error #10

Closed mwunderling closed 4 years ago

mwunderling commented 4 years ago

Am running HA Core in Docker. I also have watchtower setup to monitor a few other containers but not for HA....to limit breaking changes.

Since installing monitor_docker a few days ago, my HA logs have been filling up with the error msg below. 2 unique lines repeated over and over.

Conflict with Watchtower??

2020-06-22 18:04:56 ERROR (Thread-2) [custom_components.monitor_docker.helpers] watchtower: Can not determine network usage for container ('networks') 2020-06-22 18:04:56 ERROR (Thread-2) [custom_components.monitor_docker.helpers] watchtower: No 'networks' found in raw packet 2020-06-22 18:05:08 ERROR (Thread-2) [custom_components.monitor_docker.helpers] watchtower: Can not determine network usage for container ('networks') 2020-06-22 18:05:08 ERROR (Thread-2) [custom_components.monitor_docker.helpers] watchtower: No 'networks' found in raw packet 2020-06-22 18:05:19 ERROR (Thread-2) [custom_components.monitor_docker.helpers] watchtower: Can not determine network usage for container ('networks') 2020-06-22 18:05:19 ERROR (Thread-2) [custom_components.monitor_docker.helpers] watchtower: No 'networks' found in raw packet 2020-06-22 18:05:32 ERROR (Thread-2) [custom_components.monitor_docker.helpers] watchtower: Can not determine network usage for container ('networks') 2020-06-22 18:05:32 ERROR (Thread-2) [custom_components.monitor_docker.helpers] watchtower: No 'networks' found in raw packet 2020-06-22 18:05:43 ERROR (Thread-2) [custom_components.monitor_docker.helpers] watchtower: Can not determine network usage for container ('networks') 2020-06-22 18:05:43 ERROR (Thread-2) [custom_components.monitor_docker.helpers] watchtower: No 'networks' found in raw packet 2020-06-22 18:05:56 ERROR (Thread-2) [custom_components.monitor_docker.helpers] watchtower: Can not determine network usage for container ('networks') 2020-06-22 18:05:56 ERROR (Thread-2) [custom_components.monitor_docker.helpers] watchtower: No 'networks' found in raw packet

ualex73 commented 4 years ago

Shouldn't be a conflict, but can you confirm if your watchtower is running "network: host" mode or not? I can't see the root-cause, but I make a quick fix to prevent filling up your logging (the network monitoring won't come back). Just grep all the *.py in the "monitor_docker" of the main branch and let me know if that at least solves your filling of the logfile.

mwunderling commented 4 years ago

Ok, biggest hurdle is I wasn't sure why watchtower was appearing in my HA log since I don't have it active on my Home Assistant container. ....but yes, after looking at the docker compose for watchtower network mode was actually "none". Updated and after restart the error appears resolved. Thanks!

ualex73 commented 4 years ago

Thanks for reporting back, and I will test with "network=none" and update the code to ignore this one.

ualex73 commented 4 years ago

I have tested it, and made a 'fix' for it too. Now "network_mode=none" will be automatically ignored during network monitoring.