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

feat(inputs.prometheus): Allow explicit scrape configuration without annotations #11962

Merged
merged 10 commits into from
Nov 22, 2022

Conversation

redbaron
Copy link
Contributor

@redbaron redbaron commented Oct 7, 2022

resolves #11961

allow scraping pods without requiring prometheus.io/ annotations

@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Oct 7, 2022

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@redbaron redbaron changed the title Prom explicit scrape feat(inputs.prometheus): allow explicit scrape configuration withtout annotations Oct 7, 2022
@redbaron
Copy link
Contributor Author

redbaron commented Oct 7, 2022

!signed-cla

…heus.io annotations

When `scrape_config` is present and enabled all pods matched by label and field selector
as well as namespace filter will be scraped using configuration (scheme, port, path)
specified in the `scrape_config`.

Pod annotations continue to override plugin configuration, therefore pods can still exclude
themselves from scraping with `prometheus.io/scrape=false` annotation or alter scrape
URL as they did before.
@redbaron
Copy link
Contributor Author

@powersj , would you mind to take a look?

@redbaron redbaron requested a review from powersj November 8, 2022 16:20
@redbaron
Copy link
Contributor Author

redbaron commented Nov 8, 2022

I am not sure why readme linters are failing, I didn't update files it is failing on

Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thank you for the updates, this is looking great, just some re-ording of the readme to request

plugins/inputs/prometheus/README.md Outdated Show resolved Hide resolved
@powersj powersj added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Nov 16, 2022
@powersj
Copy link
Contributor

powersj commented Nov 16, 2022

Readme linter is failing due to other un-related plugins

@redbaron
Copy link
Contributor Author

redbaron commented Nov 16, 2022

Docs are much more clear now, thanks!

@telegraf-tiger
Copy link
Contributor

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.

Thanks for the nice PR @redbaron! One small question/comment...

plugins/inputs/prometheus/kubernetes.go Outdated Show resolved Hide resolved
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 update @redbaron!

@srebhan srebhan changed the title feat(inputs.prometheus): allow explicit scrape configuration withtout annotations feat(inputs.prometheus): Allow explicit scrape configuration without annotations Nov 22, 2022
@srebhan srebhan added area/prometheus plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins feature request Requests for new plugin and for new features to existing plugins labels Nov 22, 2022
@srebhan srebhan merged commit c3562ae into influxdata:master Nov 22, 2022
@redbaron redbaron deleted the prom-explicit-scrape branch November 22, 2022 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/prometheus feature request Requests for new plugin and for new features to existing plugins 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.

[inputs.prometheus] should allow scraping withing requiring pod annotations
3 participants