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