influxdata/telegraf

Handle labels in kube_inventory input like the kubernetes input does

Open

#8546 aperta il 12 dic 2020

Vedi su GitHub
 (1 commento) (7 reazioni) (0 assegnatari)Go (4161 fork)batch import
area/k8sfeature requesthelp wantedsize/l

Metriche repository

Star
 (9892 star)
Metriche merge PR
 (Merge medio 2g 12h) (136 PR mergiate in 30 g)

Descrizione

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).

Guida contributor