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

Prefix pod labels and annotations scraped by prometheus input plugin #10945

Closed
imranismail opened this issue Apr 7, 2022 · 2 comments
Closed
Labels
area/prometheus feature request Requests for new plugin and for new features to existing plugins

Comments

@imranismail
Copy link
Contributor

imranismail commented Apr 7, 2022

Feature Request

Namespace kubernetes labels and annotations tags scraped by prometheus plugin so that it is easier to exclude it using tagexclude.

Proposal:

Prefix annotation and label tags so that it is easier to process the tags by it's prefix

[[inputs.prometheus]]
  metric_version = 2
  monitor_kubernetes_pods = true
  pod_scrape_scope = "node"
+ pod_label_template = 'pod.label/{{ . }}'
+ pod_annotation_template = 'pod.annotation/{{ . }}'
+ tagexclude = ["pod.annotation/*"]

Current behavior:

<label>=<value>
<annotation>=<value>

Desired behavior:

pod.label/<label>=<value>
pod.annotation/<annotation>=<value>

Use case

[[inputs.prometheus]]
  metric_version = 2
  monitor_kubernetes_pods = true
  pod_scrape_scope = "node"
  tagexclude = ["pod.annotation/*"]
@imranismail imranismail added the feature request Requests for new plugin and for new features to existing plugins label Apr 7, 2022
@powersj
Copy link
Contributor

powersj commented May 17, 2022

next steps: update the PR and continue the review process

@redbaron
Copy link
Contributor

redbaron commented Jun 5, 2023

I believe this is now resolved with #12851

@powersj powersj closed this as completed Jun 5, 2023
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants