-
Notifications
You must be signed in to change notification settings - Fork 459
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
[target-allocator] Target allocator assigns target to multiple collectors #1038
Comments
@jaronoff97 any chance this is related to the issue we were discussing earlier? |
I think this is related to both #1037 and #1034. The first part of the expected behavior
I think the second issue here ( |
@jaronoff97 Here is the collector config I'm running:
|
with the merging of #1039 that will help with potentially missing targets. I also have a fix in the works to improve the target allocator's stability in allocation to help prevent these scenarios. I also believe the work done by @kristinapathak in #1040 will help resolve this as well. |
@jaronoff97 Thank you for working on the fixes! I ran TA with the latest changes and while the targets assigned to each collector are more consistent now, I believe there is still an issue with duplicate targets due to the prometheus exporter I'm monitoring being run as a sidecar. There are 2 targets being discovered via endpoints: one for the actual exporter container and one for the other container in the pod. This caused both collectors to scrape all of the endpoints, as one collector would have the target for the exporter container and the second collector would have the target for the other container. But both of these targets resolve to the same address because of this relabel config:
Is it possible to have the TA apply the relabel configs prior to allocating targets so we can drop any unnecessary targets? I checked the |
Reopening as requested by @kelseyma |
Moving discussion for relabel configs to new issue: #1064. Closing this issue |
I ran the target allocator with discovery via the config yaml (not using CRDs), and saw the TA assigning the same target to multiple collectors. This resulted in a target being scraped multiple times in a minute even though the
scrape_interval
is set to 1m. Also, I have noticed that sometimes it takes the target allocator 15 minutes to refresh and discover the desired endpoints, while other times the TA is able to discover the endpoints right away.What I expected:
Target allocator is able to discover all the endpoints when started. TA assigns each collector a unique set of targets.
What actually happened:
TA discovered some endpoints initially when it was started at 19:02, but it took until the watch routine restart at 19:17 to discover the desired endpoints. Then the first period after discovery looks ok, but following the restart of the watch routine, each subsequent period had at least one target that was duplicated.
collector-0
collector-1
TA logs
The text was updated successfully, but these errors were encountered: