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

Support pod name as additional tag in Prometheus input plugin #16192

Open
zclyne opened this issue Nov 14, 2024 · 0 comments
Open

Support pod name as additional tag in Prometheus input plugin #16192

zclyne opened this issue Nov 14, 2024 · 0 comments
Labels
feature request Requests for new plugin and for new features to existing plugins

Comments

@zclyne
Copy link

zclyne commented Nov 14, 2024

Use Case

We deploy telegraf to scrape istio metrics in the prometheus format and forward them to our internal metric system. The Istio metrics come from multiple istio ingressgateway pods but Istio metrics do not have any existing tag to indicate which source pod they come from. In this case, our internal metric system would automatically aggregate metrics from different pods in a weird way so that the metric become basically unavailable.

I am aware that the Prometheus input plugin supports pod annotation and pod label as extra tag, but not pod name, which seems as useful as labels/annotations to me. Therefore I would like to suggest adding a configuration that injects pod name as an extra metric tag for the prometheus input plugin.

Expected behavior

Have a configuration for the prometheus input plugin called something like pod_name_tag, which takes a boolean value and defaults to false. If it is enabled, pod name is injected to all metrics collected by the prometheus input plugin, for example, source_pod_name: istio-ingressgateway-ase33.

Actual behavior

Pod name cannot be configured to be an extra tag on metrics collected by the prometheus plugin.

Additional info

I am glad to contribute if the community finds this feature request useful and would like to move forward with it. Thanks!

@zclyne zclyne added the feature request Requests for new plugin and for new features to existing plugins label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

No branches or pull requests

1 participant