monitor_docker icon indicating copy to clipboard operation
monitor_docker copied to clipboard

Problem during start of monitoring

Open darren-harrison-nz opened this issue 1 year ago • 8 comments

Hi, I'm getting a couple of errors showing up in my logs, related to a Docker container which I have, but haven't referenced. I'm not quite sure how monitor_docker even knows about it.

This error originated from a custom integration.

Logger: custom_components.monitor_docker.helpers Source: custom_components/monitor_docker/helpers.py:494 integration: Monitor Docker (documentation, issues) First occurred: 12:26:08 AM (183 occurrences) Last logged: 3:36:09 PM

[Docker] -drupal-drupal-1: Problem during start of monitoring

The second error is about the same container.

This error originated from a custom integration.

Logger: custom_components.monitor_docker.helpers Source: custom_components/monitor_docker/helpers.py:755 integration: Monitor Docker (documentation, issues) First occurred: 12:26:08 AM (183 occurrences) Last logged: 3:36:09 PM

[Docker] -drupal-drupal-1: Container not available anymore (2a) (DockerError(404, 'No such container: -drupal-drupal-1'))

My setup specifies some other containers

name: Docker
containers:
  - home-assistant
  - mosquitto
  - tasmoadmin
rename:
  home-assistant: "Home Assistant"
  mosquitto: MQTT
  tasmoadmin: TasmoAdmin
monitored_conditions:
  - version
  - containers_running
  - containers_total
  - state
  - status
  - memory
scan_interval: 30

The errors are annoying and I can ignore them, but it would be nice to figure out why and stop them. Any ideas?

Thanks, Darren.

darren-harrison-nz avatar Nov 28 '24 02:11 darren-harrison-nz

This still happens?

ualex73 avatar Jan 19 '25 11:01 ualex73

This still happens?

Hi, Yes, this is still happening.

Core 2025.1.2 Frontend 20250109.0 Monitor Docker v 1.18

darren-harrison-nz avatar Jan 20 '25 00:01 darren-harrison-nz

In custom_components/monitor_docker/helpers.py:

            # We will monitor all containers, including excluded ones.
            # This is needed to get total CPU/Memory usage.

I have ephemeral containers for a few automated processes that cause this error as well, and I suspect this is the reason why.

mfugate1 avatar Jan 23 '25 13:01 mfugate1

Correct that is the “reason”. I am thinking of making this configurable, aka monitor all or just monitor allowed containers.

Op do 23 jan 2025 om 14:25 schreef Mike Fugate @.***>

In custom_components/monitor_docker/helpers.py:

        # We will monitor all containers, including excluded ones.
        # This is needed to get total CPU/Memory usage.

I have ephemeral containers for a few automated processes that cause this error as well, and I suspect this is the reason why.

— Reply to this email directly, view it on GitHub https://github.com/ualex73/monitor_docker/issues/166#issuecomment-2609803854, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQASXGJ4AFWBUSXFI2KM3D2MDUVNAVCNFSM6AAAAABSUDYNAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBZHAYDGOBVGQ . You are receiving this because you commented.Message ID: @.***>

ualex73 avatar Jan 23 '25 13:01 ualex73

That almost makes sense, but in my case the containers are there, and always have been. Well, they get updated maybe every couple of weeks but a container with that name is always there.

darren-harrison-nz avatar Jan 23 '25 20:01 darren-harrison-nz

Question ... When you get this error, does the "-drupal-drupal-1" container still exists (with the same name) or did change slightly?

ualex73 avatar Jan 26 '25 10:01 ualex73

Hi, I made a mistake in my last message. I replaced the Drupal stack I had with nginx, so the stack has been stopped and the containers have not been there for a number of months.

darren-harrison-nz avatar Jan 26 '25 20:01 darren-harrison-nz

Same issue here with an old container named "ovh" but it is not list when i do a docker ps -a. Strange issue.

PoVPoV29 avatar Apr 25 '25 14:04 PoVPoV29