Describe the bug
When using AutoKuma with Uptime Kuma v2.x and specifying global defaults via AUTOKUMA__DEFAULT_SETTINGS, the global values for Docker host and Docker container (i.e., "docker":{"host":...,"container":"..."}) are not applied to monitors created from Docker containers.
Fields like parent are applied correctly from global defaults, but docker.host and docker.container are not populated in Kuma, causing monitors to have empty Docker Host / Container mapping and resulting in errors like:
Failed to load docker host config
This occurs even though AutoKuma logs show that containers are discovered, and the global defaults JSON is correctly formed.
Reproduction steps
- Run Uptime Kuma v2.x
- Run AutoKuma with:
AUTOKUMA__DEFAULT_SETTINGS={"parent":100,"docker":{"host":1,"container":"{{container_name}}"}}
AUTOKUMA__DOCKER__LABEL_PREFIX=kuma
- Run a container with labels like:
-l kuma.enable=true
-l kuma.type=docker
- Observe that monitors are created, and
parent is applied, but the Docker host and container fields are blank.
Expected behavior
Global defaults should apply Docker host and container fields so that Docker monitors are correctly created without requiring defining those fields on every container via labels.
Workaround
Using per-container Docker labels (e.g., kuma.<id>.docker.host and kuma.<id>.docker.container) does work as expected, but this defeats the purpose of global defaults.
Environment
- AutoKuma image:
ghcr.io/bigboot/autokuma:master or latest
- Uptime Kuma: version 2.x
AUTOKUMA__DEFAULT_SETTINGS used
Describe the bug
When using AutoKuma with Uptime Kuma v2.x and specifying global defaults via
AUTOKUMA__DEFAULT_SETTINGS, the global values for Docker host and Docker container (i.e.,"docker":{"host":...,"container":"..."}) are not applied to monitors created from Docker containers.Fields like
parentare applied correctly from global defaults, butdocker.hostanddocker.containerare not populated in Kuma, causing monitors to have empty Docker Host / Container mapping and resulting in errors like:This occurs even though AutoKuma logs show that containers are discovered, and the global defaults JSON is correctly formed.
Reproduction steps
AUTOKUMA__DEFAULT_SETTINGS={"parent":100,"docker":{"host":1,"container":"{{container_name}}"}}
AUTOKUMA__DOCKER__LABEL_PREFIX=kuma
-l kuma.enable=true
-l kuma.type=docker
parentis applied, but the Docker host and container fields are blank.Expected behavior
Global defaults should apply Docker host and container fields so that Docker monitors are correctly created without requiring defining those fields on every container via labels.
Workaround
Using per-container Docker labels (e.g.,
kuma.<id>.docker.hostandkuma.<id>.docker.container) does work as expected, but this defeats the purpose of global defaults.Environment
ghcr.io/bigboot/autokuma:masteror latestAUTOKUMA__DEFAULT_SETTINGSused