Sanderhuisman / docker_monitor

Apache License 2.0
15 stars 5 forks source link

NET usage error spamming HA log #1

Closed Morphy99 closed 5 years ago

Morphy99 commented 5 years ago

I'm getting this in the HA log constantly: [custom_components.docker_monitor] Cannot grab NET usage for container 08849f316920fc12362fbdbdgdashdgasjdggsd4f151eb778d6af05a1836b0495 ('networks')

I don't have network monitoring enabled either: monitored_conditions:

Sanderhuisman commented 5 years ago

The log you mention is logged under the info level. Often, components report updates using this logging mechanism. In production, you normally do not want to see this information such that you set the global log level to warning or error.

But I will revise the logging of the component;)

Morphy99 commented 5 years ago

Yea I get that. It is like every 10 seconds though so it just makes it harder to go through the HA logs when debugging. Thanks for looking at it :)

ualex73 commented 5 years ago

@Morphy99 I suspect your container is running in network mode "host". In such situation Docker doesn't give any network stats (I fixed that warning in my version, it auto-detects the network mode and decide on that to report or not).

Sanderhuisman commented 5 years ago

If you have a fix, just make a pull request and I will get it in;)

ualex73 commented 5 years ago

https://github.com/Sanderhuisman/docker_monitor/pull/4

But it should be technically gone, with the new develop version ... don't include the network items ;-)

Sanderhuisman commented 5 years ago

Fixed in the development branch