Handle labels in kube_inventory input like the kubernetes input does
#8,546 创建于 2020年12月12日
仓库指标
- Star
- (9,892 star)
- PR 合并指标
- (平均合并 2天 12小时) (30 天内合并 136 个 PR)
描述
Feature Request
The Kubernetes input plugin can turn pod labels into tags on the kubernetes_pod_container measurement. For example, if you set label_include = ["app.kubernetes.io/name"], then all your measurements will get a tag with the value of that field.
The Kubernetes Inventory plugin also produces a measurement named kubernetes_pod_container, but this feature isn't available for that plugin. This makes it harder than necessary to aggregate across these two metrics sources (for example, to compare the kubernetes_pod_container.memory_usage_bytes field from the kubernetes plugin with the kubernetes_pod_container.resource_requests_memory_bytes field from the kube_inventory plugin.
Proposal:
Copy the label_include and label_exclude functionality from the kubernetes plugin to the kube_inventory plugin.
...or just merge them into a single plugin, if at all possible; having them as separate plugins (that can't even really be deployed together) is kind of a PITA.
Current behavior:
kube_inventory plugin doesn't allow you to turn labels into tags.
Desired behavior:
kube_inventory plugin allows you to turn labels into tags, just like the kubernetes plugin does.
Use case:
I want to build a dashboard in InfluxDB that displays current resource usage, resource request, and resource limit, all on the same graph. However, I want to be able to use a filter to limit the displayed metrics to pods of a given label value. I can already do this for the metrics generated by the kubernetes plugin (aka the resource usage), but I can't do it for metrics from the kube_inventory plugin (the requests and limits).