QubitProducts / exporter_exporter

A reverse proxy designed for Prometheus exporters
Apache License 2.0
338 stars 55 forks source link

Support additional metadata #70

Closed sebinjohn closed 3 years ago

sebinjohn commented 3 years ago

There is already an issue for this here: https://github.com/QubitProducts/exporter_exporter/issues/36. Adding an additional use case for it here.

I have a setup where a host has

I also have exporter exporter as a proxy to all the exporters on the host.

the same setup is deployed in dev, staging and production environments.

I see lot of value in adding common properties like "environment" added (as extra metadata) to all the exported metrics. One immediate benefit is that the same prometheus job can be used to scrape from all environments.

tcolgate commented 3 years ago

In the prometheus world you would normally uses target scrape relabelling for this purpose. You use some feature of the target discovery you are using to expose a label for your environment, and then use a rewrite rule to add that label to each target. We don't want to do this on expexp for the same reason that all those indididual exporters don't offer the same functionality. It's just not needed in most production deploys.