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(kubernetes): Add kubernetes input plugin #1847

Merged
merged 1 commit into from
Oct 17, 2016

Conversation

jchauncey
Copy link

Required for all PRs:

  • CHANGELOG.md updated (we recommend not updating this until the PR has been approved by a maintainer)
  • Sign CLA (if not already signed)
  • README.md updated (if adding a new plugin)

closes #1774

@jchauncey jchauncey force-pushed the kubernetes-plugin branch 2 times, most recently from 2375690 to 75bedbf Compare October 4, 2016 14:35
@sparrc sparrc added plugin request feature request Requests for new plugin and for new features to existing plugins labels Oct 4, 2016
@sparrc sparrc added this to the 1.1.0 milestone Oct 4, 2016
Copy link
Contributor

@dgnorton dgnorton left a comment

Choose a reason for hiding this comment

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

@jchauncey thanks for the PR!

A couple requests:

  • example yaml file for configuring telegraf to run as daemon set
  • example output / line protocol

"namespace": pod.PodRef.Namespace,
"name": container.Name,
"pod": pod.PodRef.Name,
"uid": pod.PodRef.UID,
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this and the other uid tags have very high or unlimited cardinality?

Copy link
Author

Choose a reason for hiding this comment

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

yes. everytime a pod dies and comes back it would have a new uuid. Same thing with pod name

@jchauncey jchauncey force-pushed the kubernetes-plugin branch 2 times, most recently from bfa0203 to 1b1bf56 Compare October 14, 2016 20:44
Copy link
Author

@jchauncey jchauncey left a comment

Choose a reason for hiding this comment

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

Done

"namespace": pod.PodRef.Namespace,
"name": container.Name,
"pod": pod.PodRef.Name,
"uid": pod.PodRef.UID,
Copy link
Author

Choose a reason for hiding this comment

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

yes. everytime a pod dies and comes back it would have a new uuid. Same thing with pod name

@sparrc
Copy link
Contributor

sparrc commented Oct 14, 2016

@jchauncey I'm concerned this plugin will generate stats with very high cardinality, it appears that you are storing a UUID as a tag for every:

  • container
  • pod
  • volume

In a typical kubernetes setup, how frequently would you expect new UUIDs of each of these to get generated? how frequently in a high-volume kubernetes setup?

@jchauncey
Copy link
Author

It largely depends. We could remove the uuid but we will still have high cardinality with the pod name because it has a unique identifier which changes every time the pod dies.

Im guess over a month there may be a few hundred pod uuids created on a moderately sized cluster.

@sstarcher
Copy link

sstarcher commented Oct 14, 2016

I can tell you we churn around 3-5k pods a day. I would like to see options to limit the amount of churn for specific pods.

@jchauncey
Copy link
Author

What I could do is have a flag that allows you to exclude pod name from the
metrics and remove uuid altogether

On Oct 14, 2016 6:19 PM, "Shane Starcher" notifications@github.com wrote:

I can tell you we churn around 3-5k pods a day.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1847 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAaRGOcmpDO6-GgxlHO909-a753PBVJrks5qz__igaJpZM4KNvsU
.

@sparrc
Copy link
Contributor

sparrc commented Oct 14, 2016

@jchauncey AFAICT simply excluding the pod name & uuid will only lead to duplicate metrics overwriting each other. If flags are added they will need to completely disable to per-pod and per-container metrics from being gathered.

Does kubernetes not provide any sort of aggregated metrics? From what I can see in this PR the metrics are all very high cardinality.

@jchauncey
Copy link
Author

No that's the point of this plugin is to get detailed pod metrics.

On Oct 14, 2016 6:58 PM, "Cameron Sparr" notifications@github.com wrote:

@jchauncey https://github.com/jchauncey AFAICT simply excluding the pod
name & uuid will only lead to duplicate metrics overwriting each other. If
flags are added they will need to completely disable to per-pod and
per-container metrics from being gathered.

Does kubernetes not provide any sort of aggregated metrics? From what I
can see in this PR the metrics are all very high cardinality.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1847 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAaRGHZ5dEO2K14ZmrWbsOVW90T2GbXIks5q0AkxgaJpZM4KNvsU
.

@jchauncey
Copy link
Author

@sparrc @dgnorton Updated pr with the changes we discussed in slack

Copy link
Contributor

@dgnorton dgnorton left a comment

Choose a reason for hiding this comment

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

👍 lgtm - @jchauncey thank you for contributing this plugin and all the quick code review updates!

@dgnorton dgnorton merged commit 91f48e7 into influxdata:master Oct 17, 2016
@rikatz
Copy link

rikatz commented Oct 17, 2016

Yeay!! This is a great plugin!!! 👍

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

Successfully merging this pull request may close these issues.

Input Plugin Request: Kubernetes
5 participants