Passing web.enable-lifecycle flag in container instances YAML file, but prometheus isn't enabling the lifecycle API
I have a container group running prometheus. I'd like to enable the lifecycle API, which would allow me to reload prometheus' config by hitting an endpoint, but even though I'm passing the flag in my YAML file, the API is not enabled.
Here is my YAML file. I'm using this by running the following command:
az container create --resource-group MY_RESOURCE_GROUP --file MY_YAML_FILE.yml
apiVersion
location
name
type
properties
-
-
-
-
-
-
-
-
Prometheus properly boots up with this YAML file, but calling
http://IP_ADDRESS/-/reload
returns Lifecycle API is not enabled
which should be enabled with this command: --web.enable-lifecycle
I believe the issue is in my command array:
command:
- /bin/prometheus
- --web.enable-lifecycle
- --config.file=/etc/prometheus/prometheus.yml
I have the lifecycle API working properly locally in a docker-compose file, with the following command:
command:
-
-
I assumed they should be the same, but perhaps the syntax is different in Azure's YAML file.
I also don't fully understand why /bin/prometheus
is needed. When using this in my docker-compose file, I only need to pass the flags into the commands array. In azure, prometheus will not boot up without /bin/prometheus
(unless the commands array is omitted completely)
Here is a reference to the YAML I'm using: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-reference-yaml