Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default configs do not conform to the new environment variable format #2874

Open
Shayfiz opened this issue Oct 14, 2024 · 0 comments
Open

Default configs do not conform to the new environment variable format #2874

Shayfiz opened this issue Oct 14, 2024 · 0 comments

Comments

@Shayfiz
Copy link

Shayfiz commented Oct 14, 2024

Describe the bug
The newest release (v0.41.0) no longer supports the BASH-style environment variable expansion:

Note: Expansion of BASH-style environment variables, such as $FOO, is no longer be supported. Use ${FOO} or ${env:FOO} instead.

Steps to reproduce
Pull the latest image from the public ECR repository and start up the container with the following run command:
--config=/etc/ecs/ecs-amp-prometheus.yaml
Make sure that the env variables for AWS_PROMETHEUS_SCRAPING_ENDPOINT, AWS_PROMETHEUS_ENDPOINT, and AWS_REGION are set.

I did this within an ECS task definition.

What did you expect to see?
I expected the container to start up successfully.

What did you see instead?
I got the following error in my ECS logs;
Error: failed to build pipelines: failed to create "prometheusremotewrite" exporter for data type "metrics": invalid endpoint

Environment
AWS_PROMETHEUS_SCRAPING_ENDPOINT = "0.0.0.0:8000"
AWS_PROMETHEUS_ENDPOINT = The prometeheus endpoint of my prometheus workspace
AWS_REGION = "eu-west-2"

Additional context
The way that I have currently fixed it is to create my own image, which uses a modified version of ecs-amp-prometheus.yaml. Within that, all environment variable references were replaced with the new format, e.g.: $AWS_REGION to "${AWS_REGION}". The container starts up successfully when that custom image is used.

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

No branches or pull requests

1 participant