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

config.yaml environment variables ${env:FOO} $FOO #9117

Closed
systems1 opened this issue Dec 15, 2023 · 4 comments
Closed

config.yaml environment variables ${env:FOO} $FOO #9117

systems1 opened this issue Dec 15, 2023 · 4 comments
Labels
bug Something isn't working waiting-for-author

Comments

@systems1
Copy link

systems1 commented Dec 15, 2023

Describe the bug
A clear and concise description of what the bug is.
bash shell ,environment values not interpolating in config.yaml

Steps to reproduce
If possible, provide a recipe for reproducing the error.

use grafana.com prometheus client_auth config file

docker run --rm -p 13133:13133 -p 55679:55679 -p 8888:8888 -p 4317:4317 -v $(pwd)/configdev.yaml:/etc/otelcol-contrib/config.yaml otel/opentelemetry-collector-contrib:0.90.1

What did you expect to see?
A clear and concise description of what you expected to see.

Everything is ready. Begin running and processing data.

What did you see instead?
A clear and concise description of what you saw instead.

Error: failed to build extensions: failed to create extension "basicauth/metrics": no credential source provided
2023/12/15 08:42:11 collector server run finished with error: failed to build extensions: failed to create extension "basicauth/metrics": no credential source provided

Error: failed to build pipelines: failed to create "prometheusremotewrite" exporter for data type "metrics": invalid endpoint
2023/12/15 08:39:45 collector server run finished with error: failed to build pipelines: failed to create "prometheusremotewrite" exporter for data type "metrics": invalid endpoint

Error: failed to build pipelines: failed to create "attributes" processor, in pipeline "metrics": error creating AttrProc. Either field "value", "from_attribute" or "from_context" setting must be specified for 0-th action
2023/12/15 08:37:51 collector server run finished with error: failed to build pipelines: failed to create "attributes" processor, in pipeline "metrics": error creating AttrProc. Either field "value", "from_attribute" or "from_context" setting must be specified for 0-th action

What version did you use?
Version: (e.g., v0.4.0, 1eb551b, etc)
v0.90.1
What config did you use?
Config: (e.g. the yaml config file)
attaching config file with comments of variables not working

Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
ubuntu 20 ,bash

Additional context
Add any other context about the problem here.

http://localhost:13133 didnt work
http://localhost:55679 didnt work
http://localhost:8888/metrics works
configdev.yaml.txt

#5228 (comment)

extensions:
  basicauth/metrics:
    client_auth:
      username: "xxxx"
      #password: "xxxxxxx"
      #username: ${env:PROM_USERNAME} #didnt work
      password: ${env:PROM_PASSWORD}  #worked
processors:
  batch:
    timeout: 10s
  attributes:
    actions:
      - action: insert
        key: env
        #value: dev               #worked
        #value: ${env:DEPLOY_ENV} #didnt work
        #value: $DEPLOY_ENV       #worked
        value: ${DEPLOY_ENV}      #worked
@systems1 systems1 added the bug Something isn't working label Dec 15, 2023
@systems1
Copy link
Author

validate config file not returning any output working or non working config file
./otelcol-contrib validate --config=file:./configdev.yaml
:>./otelcol-contrib -v
otelcol-contrib version 0.91.0

@mx-psi
Copy link
Member

mx-psi commented May 20, 2024

@systems1 Is this still an issue? I edited your issue description for clarity. I am not able to reproduce, and, as it currently stands it is hard to understand what went wrong. Could you let us know if this is still causing trouble?

@systems1
Copy link
Author

systems1 commented May 26, 2024

@mx-psi this issue is related to #10161
used opentelemetry-collector-contrib docker image

@mx-psi
Copy link
Member

mx-psi commented Aug 27, 2024

#10161 is closed. I am going to close this since we were unable to reproduce, but if you have more details that can help us reproduce please let me know @systems1 and I can reopen this. Tahnks!

@mx-psi mx-psi closed this as not planned Won't fix, can't repro, duplicate, stale Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting-for-author
Projects
None yet
Development

No branches or pull requests

2 participants