influxdata/telegraf

Handle labels in kube_inventory input like the kubernetes input does

Open

#8.546 geöffnet am 12. Dez. 2020

Auf GitHub ansehen
 (1 Kommentar) (7 Reaktionen) (0 zugewiesene Personen)Go (4.161 Forks)batch import
area/k8sfeature requesthelp wantedsize/l

Repository-Metriken

Stars
 (9.892 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 2T 12h) (136 gemergte PRs in 30 T)

Beschreibung

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

Contributor Guide