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

Targets added twice, causing OOO samples #313

Closed
tomwilkie opened this issue Feb 11, 2019 · 4 comments
Closed

Targets added twice, causing OOO samples #313

tomwilkie opened this issue Feb 11, 2019 · 4 comments
Labels
component/agent type/bug Somehing is not working as expected

Comments

@tomwilkie
Copy link
Contributor

We see targets added multiple times in promtail, where is should only happen once. Can't for the life of me see why.

@tomwilkie
Copy link
Contributor Author

Ah it is because they have an app and a name label - good catch @woodsaj!

@tomwilkie
Copy link
Contributor Author

Want to unify the syncers to dedupe targets across scrapeconfigs, but then won't know how to remove them...

@woodsaj
Copy link
Member

woodsaj commented Feb 11, 2019

@tomwilkie cant we just fix the scrape_configs so that we only add the pods once.
eg, add the following to https://github.com/grafana/loki/blob/master/production/ksonnet/promtail/promtail.libsonnet#L131

          // Drop pods with a 'name' and an 'app' label.  They will have already been added by 
          // the scrape_config that matches on the 'name' label
          {
            source_labels: ['__meta_kubernetes_pod_label_name'],
            action: 'drop',
            regex: '.+',
          },

@cyriltovena
Copy link
Contributor

seems to be fixed.

@chaudum chaudum added the type/bug Somehing is not working as expected label Jun 14, 2023
periklis added a commit to periklis/loki that referenced this issue Jul 5, 2024
mraboosk pushed a commit to mraboosk/loki that referenced this issue Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/agent type/bug Somehing is not working as expected
Projects
None yet
Development

No branches or pull requests

4 participants