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

fix(inputs.prometheus): respect selectors when scraping pods #12278

Merged
merged 1 commit into from
Nov 28, 2022

Conversation

redbaron
Copy link
Contributor

Required for all PRs

field and labels selectors were ignored unless pod_scrape_scope = "node" was specified, this breaks monitor_kubernetes_pods_method != "annotations" (default), because then all pods become candidate for scraping.

This PR enables field and label selectors. I am keeping existing behaviour where field and label selectors are not used with default pod scraping (monitor_kubernetes_pods_method == "annotations") for now, but I'd prefer any pod scraping to respect selectors same as it currently respects namespace.

@telegraf-tiger telegraf-tiger bot added fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Nov 24, 2022
@redbaron redbaron changed the title fix(inputs.promethes): respect selectors when scraping pods fix(inputs.prometheus): respect selectors when scraping pods Nov 24, 2022
Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for the quick fix @redbaron!

@srebhan srebhan assigned srebhan and powersj and unassigned srebhan Nov 24, 2022
@srebhan srebhan added area/prometheus ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. labels Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/prometheus fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants