Skip to content

Conversation

@Laptop765
Copy link
Contributor

Adds support for excluding containers from monitoring based on regex patterns matching their names. This prevents Docker Compose temporary containers from creating false monitors during stack updates.

  • Add exclude_container_patterns config field to DockerConfig
  • Add regex dependency for pattern matching
  • Implement container name filtering in docker_source.rs
  • Add error handling for invalid regex patterns with warning logs
  • Update README with configuration documentation and examples

Configuration:
AUTOKUMA__DOCKER__EXCLUDE_CONTAINER_PATTERNS="^[a-f0-9]{12}.*"

This pattern excludes containers like d35d88496ce8_stack_service (Docker Compose temporary containers with 12 hex characters, underscore, service name containing underscore) while preserving legitimate containers like mystack_service-name or service_1.

Adds support for excluding containers from monitoring based on regex patterns matching their names. This prevents Docker Compose temporary containers from creating false monitors during stack updates.

- Add exclude_container_patterns config field to DockerConfig
- Add regex dependency for pattern matching
- Implement container name filtering in docker_source.rs
- Add error handling for invalid regex patterns with warning logs
- Update README with configuration documentation and examples

Configuration:
AUTOKUMA__DOCKER__EXCLUDE_CONTAINER_PATTERNS="^[a-f0-9]{12}_.*_"

This pattern excludes containers like `d35d88496ce8_stack_service` (Docker Compose temporary containers with 12 hex characters, underscore, service name containing underscore) while preserving legitimate containers like `mystack_service-name` or `service_1`.
@Laptop765
Copy link
Contributor Author

Hopefully I added enough context to the PR so it's self-explanatory but happy to explain further if needed 🙂

@BigBoot
Copy link
Owner

BigBoot commented Sep 3, 2025

Thank you. The implementation looks solid and there even is updated documentation ❤️

@BigBoot BigBoot merged commit 03b2596 into BigBoot:master Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants