-
Notifications
You must be signed in to change notification settings - Fork 472
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
Two prometheus receivers cannot be defined. #3034
Comments
You should be able to get cAdvisor metrics via the Target Allocator this way. What specific issue are you running into? The Target Allocator will take all the scrape configs in your prometheus receiver, generate targets, and allocate them. It shouldn't matter what exactly you have in your scrape config definitions. We could allow multiple prometheus receivers with the Target Allocator enabled. The reason we haven't is that we've yet to see a compelling use case for it. Generally speaking, there isn't any reason not to use the Target Allocator for everything. |
@swiatekm-sumo How can I create a ServiceMonitor for a cadvisor that does not exist as a pod, without using the prometheus-operator? 👀 |
You can't, you need a raw scrape config. The one you've written looks correct to me, and I have a very similar one working with the Target Allocator just fine. Which is why I'd like to know what kind of issue prevents you from using it. |
…36063) #### Description Instead of clearing out prometheus scrape configuration I changed the code to copy the initial config every time we sync it from Target Allocator #### Link to tracking issue Fixes #36062 and open-telemetry/opentelemetry-operator#3034 <!--Describe what testing was performed and which tests were added.--> #### Testing tested in kind cluster with custom image <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.--> Co-authored-by: David Ashpole <dashpole@google.com>
…pen-telemetry#36063) #### Description Instead of clearing out prometheus scrape configuration I changed the code to copy the initial config every time we sync it from Target Allocator #### Link to tracking issue Fixes open-telemetry#36062 and open-telemetry/opentelemetry-operator#3034 <!--Describe what testing was performed and which tests were added.--> #### Testing tested in kind cluster with custom image <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.--> Co-authored-by: David Ashpole <dashpole@google.com>
…pen-telemetry#36063) #### Description Instead of clearing out prometheus scrape configuration I changed the code to copy the initial config every time we sync it from Target Allocator #### Link to tracking issue Fixes open-telemetry#36062 and open-telemetry/opentelemetry-operator#3034 <!--Describe what testing was performed and which tests were added.--> #### Testing tested in kind cluster with custom image <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.--> Co-authored-by: David Ashpole <dashpole@google.com>
Component(s)
collector
Is your feature request related to a problem? Please describe.
Two prometheus receivers cannot be defined.
The effect of this is that when I use targetAllocator, all static_configs are overwritten and I cannot get cadvisor metrics in EKS as shown below.
When using the targetAllocator, static_configs are automatically rewritten.
However, there are cases where I want to set static_configs directly.
If I write it like this, the settings for cadvisor will also be changed.
However, defining two receivers like this returns an error.
Describe the solution you'd like
I would like to be able to define multiple prometheus receivers.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: