label-exporter

module
v0.0.0-...-fef43ea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2023 License: Apache-2.0

README

label-exporter

Exports pod labels as prometheus metrics to facilitate metric aggregation.

How it works

Configure the comma separed list of label prefix to be exporte with the parameter --label-prefix. The default prefixes are le__ and l__.

For example, to export the labels starting with application.label or application.process, configure the label-exporter command with --label-prefix="application.label,application.process", updating the file: manifest/exporter.yaml.

The main reason to configure label prefixes is to minimize the metric cardinality and avoid prometheus overhead. But, for some use cases, the user might want to expose all pod labels of all pods in the system. To enable that, use the paramenter --expose-all=true.

The prometheus metric will be: pod_label_exporter(pod_name, pod_namespace, ...)

How to build

To create a docker container just do make build_image

Running in a Kind cluster

You will need to load the image with ./script/load-images-to-kind.sh

Deploing

The pre-requisit is to have prometheus already installed. kubectl create -f manifest/

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL