On Thu, 10 Dec 2020 at 22:38, Jimmy the Greek <matthewcer...@gmail.com>
wrote:

> Looking to use relabeling with remote_write to limit metrics forwarded to
> remote endpoint.
>
> The following guide shows some examples:
>
> https://medium.com/quiq-blog/prometheus-relabeling-tricks-6ae62c56cbda
>
> What I am looking to do is forward only metrics from a specific job and
> drop everything else. Seeing as I don't want to have to update the config
> every time a new job is added to exclude that is it possible to have a
> default rule that if not matched drops the metrics.
>
> Something like
>
> metric_relabel_configs:
> - source_labels: [job]
>   regex: 'ambassador'
>   action: keep
>

This action is sufficient, anything not kept will be dropped.

Brian


> - source_labels: [job]
>   regex: '.+'
>   action: drop
>
> Does Prometheus stop evaluating the rules after the first one matches or
> will it end up matching both rules.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to prometheus-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/e85cc082-b0d0-47f0-834e-a6914c9470f1n%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/e85cc082-b0d0-47f0-834e-a6914c9470f1n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Brian Brazil
www.robustperception.io

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAHJKeLr_a1Y9_XFTGZv0MVzYEM0XOY1TvkFm1obPnJW%3D6YpYxg%40mail.gmail.com.

Reply via email to