-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
scrape_config_files
doesn't work
#34786
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
My best guess is that we don't apply the config to the discovery manager here:
We iterate over |
scrape_config_files
does workscrape_config_files
doesn't work
Thank you for your answer. It worked after adding The only drawback is that OTel cannot replace the environment variables in the scrape_files.yaml. |
If this issue is still available, I'd be happy to work on a fix for that |
It is all yours @bacherfl. Please cc me on the PR and i'll review |
…fig_files` (#34897) **Description:** This PR fixes a bug in the prometheus receiver where the scrape configs provided via `scrape_config_files` were not applied. Using `scrape_config_files` instead of providing the scrape configs directly does come with some limitations regarding the use of env vars, as also mentioned in #34786 (comment). **Link to tracking Issue:** #34786 **Testing:** Added unit tests --------- Signed-off-by: Florian Bacher <[email protected]> Co-authored-by: Antoine Toulme <[email protected]> Co-authored-by: David Ashpole <[email protected]>
…fig_files` (open-telemetry#34897) **Description:** This PR fixes a bug in the prometheus receiver where the scrape configs provided via `scrape_config_files` were not applied. Using `scrape_config_files` instead of providing the scrape configs directly does come with some limitations regarding the use of env vars, as also mentioned in open-telemetry#34786 (comment). **Link to tracking Issue:** open-telemetry#34786 **Testing:** Added unit tests --------- Signed-off-by: Florian Bacher <[email protected]> Co-authored-by: Antoine Toulme <[email protected]> Co-authored-by: David Ashpole <[email protected]>
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Hi @bacherfl It seems that OpAMP already uses UUID, this issue can be closed. |
Component(s)
receiver/prometheus
What happened?
Description
I want to use
scrape_config_files
to add prometheus job. However, I found that the prometheus job defined in this way are not effective, even though the OTel configuration has already been applied. For details on applying, see applyConfigSteps to Reproduce
1、add the
scrape_config_files
in the configuration of prometheus receiver, with the file path specified as scrape_files.yaml.2、add the appropriate
scrape_configs
entries to scrape_files.yaml.3、start OTel
Expected Result
The prometheus job in scrape_files.yaml are executing correctly.
Actual Result
The prometheus job does not work, and the OTel logs do not display the added job.
Collector version
v0.95
Environment information
Environment
OS: darwin/arm64
Compiler: go1.21.9
The same issue occurs when deployed on Kubernetes (k8s)
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: