This is 1m read article written by Kuberneteslab. In this article we will discuss about the keep action for keeping certain metrics in Prometheus and dropping everything else.

Prometheus provides rich features like dropping the metrics and keeping the metrics which can specified under job configuration.

To keep the specific metric:

__name__ indicates the metric name by default. With the config above for job-1 it will scrape only metrics which are matching regex provided in configuration.

Metric relabeling is applied to samples as the last step before ingestion. Make sure the configuration uses “metric_relabel_configs”.

Kuberneteslab aims to write open-source blogs. We would like to have useful information be in one place. If you like our work then please donate us to support.

Notify of
Inline Feedbacks
View all comments