I'd like the kubernetes input plugin to include the resource limits and requests as fields in the kubernetes_pod_container measurement.
Proposal:
The kubernetes input should include resource limits and requests in the kubernetes_pod_container measurement. Currently, the only way to get this information is to also run the kube_inventory input plugin, however, this is sub-optimal for a few reasons:
The kube_inventory plugin doesn't apply the same pod-specific tags that the kubernetes plugin does (see #8546)
Running the kube_inventory plugin means making a bunch of extra API requests, even if the only additional information you're looking for is the resource limits.
The kubernetes plugin is already fetching all of the necessary information as part of the same API request with which it gets the pod labels, names, etc. It just doesn't include the information in the emitted metrics.
Current behavior:
Resource usage comes from the kubernetes plugin, and resource requests/limits come from the kube_inventory plugin.
Desired behavior:
I can get resource usage and resource requests from a single plugin.
Use case:
If I want to compare container resource usage against resource limits and requests, I have to use two different input plugins. These two plugins tag their emitted metrics differently, and so they can't be combined with pivot, instead requiring otherwise-unecessary joins in InfluxDB when querying.
Leaving aside the question of whether it's necessary to have two different plugins for different subsets of Kubernetes metrics (I could go either way on that), I think resource limits and requests should be part of the same measurement as resource usage; it's very likely you'll want to work on these two fields at the same time, so it's useful to have them in the same plugin so they get the same tags, the same timestamps, etc.
Feature Request
I'd like the
kubernetes
input plugin to include the resource limits and requests as fields in thekubernetes_pod_container
measurement.Proposal:
The
kubernetes
input should include resource limits and requests in thekubernetes_pod_container
measurement. Currently, the only way to get this information is to also run thekube_inventory
input plugin, however, this is sub-optimal for a few reasons:kube_inventory
plugin doesn't apply the same pod-specific tags that thekubernetes
plugin does (see #8546)kube_inventory
plugin means making a bunch of extra API requests, even if the only additional information you're looking for is the resource limits.kubernetes
plugin is already fetching all of the necessary information as part of the same API request with which it gets the pod labels, names, etc. It just doesn't include the information in the emitted metrics.Current behavior:
Resource usage comes from the
kubernetes
plugin, and resource requests/limits come from thekube_inventory
plugin.Desired behavior:
I can get resource usage and resource requests from a single plugin.
Use case:
If I want to compare container resource usage against resource limits and requests, I have to use two different input plugins. These two plugins tag their emitted metrics differently, and so they can't be combined with
pivot
, instead requiring otherwise-unecessaryjoin
s in InfluxDB when querying.Leaving aside the question of whether it's necessary to have two different plugins for different subsets of Kubernetes metrics (I could go either way on that), I think resource limits and requests should be part of the same measurement as resource usage; it's very likely you'll want to work on these two fields at the same time, so it's useful to have them in the same plugin so they get the same tags, the same timestamps, etc.