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

Add namespace configuration to Prometheus plugin #5306

Closed
simoelmou opened this issue Jan 17, 2019 · 5 comments
Closed

Add namespace configuration to Prometheus plugin #5306

simoelmou opened this issue Jan 17, 2019 · 5 comments
Labels
area/k8s feature request Requests for new plugin and for new features to existing plugins
Milestone

Comments

@simoelmou
Copy link

Feature Request

Opening a feature request kicks off a discussion.

Proposal:

Add namespace configuration to Prometheus plugin

Current behavior:

Currently, Prometheus input plugin allows retrieving metrics from the pods of all the namespaces in a cluster.

Desired behavior:

There should be a configuration where you can specify the namespace(s) that you want to retrieve metrics from. This would allow deploying telegraf in the case where the permissions are limited to only some certain namespaces.

Use case: [Why is this important (helps with prioritizing requests)]

This is a quick win because it's simple to implement and also allows to use Prometheus input plugin in a limited environment where it's usually the case in enterprises.

@goller
Copy link
Contributor

goller commented Jan 17, 2019

@simoelmou I like that idea. It also helps scale in a way as different telegrafs could be configured for different namespaces.

@glinton glinton added feature request Requests for new plugin and for new features to existing plugins area/k8s labels Jan 17, 2019
@glinton glinton added this to the 1.10.0 milestone Jan 17, 2019
@danielnelson
Copy link
Contributor

It may be possible to do this currently with a properly configured kube_config file, it looks like you will need to define a context and set the current-context option to select it.

@danielnelson danielnelson modified the milestones: 1.10.0, 1.11.0 Feb 4, 2019
@simoelmou
Copy link
Author

@danielnelson In an Openshift environment that would be complicated to put in place, especially in a production cluster. At the moment I created a fork of the plugin that would only monitor the pods of the namespace where telegraf is deployed.

@danielnelson
Copy link
Contributor

Closed in #5697

@guai
Copy link

guai commented Feb 16, 2023

Hi
Is there an option so telegraf watched only for the namespace it is deployed in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/k8s feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

No branches or pull requests

5 participants