Include resource requests and limits in kubernetes
plugin output for containers
#8565
Labels
area/k8s
feature request
Requests for new plugin and for new features to existing plugins
help wanted
Request for community participation, code, contribution
size/l
1 week or more effort
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 Handle labels in kube_inventory input like the kubernetes input does #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.
The text was updated successfully, but these errors were encountered: