Re: [prometheus-users] Prometheus (metric) relabel config with inverse regex match / negative lookahead

2021-06-21 Thread Julien Pivotto
On 21 Jun 12:20, Julian v.d Berkmortel wrote: > Thank you, this works like a charm! > > Op vrijdag 18 juni 2021 om 19:57:42 UTC+2 schreef Julien Pivotto: > > > On 18 Jun 10:24, Julian v.d Berkmortel wrote: > > > Right now I'm scraping metrics from a Node Exporter. Some of the metrics > > > which

Re: [prometheus-users] Prometheus (metric) relabel config with inverse regex match / negative lookahead

2021-06-21 Thread Julian v.d Berkmortel
Thank you, this works like a charm! Op vrijdag 18 juni 2021 om 19:57:42 UTC+2 schreef Julien Pivotto: > On 18 Jun 10:24, Julian v.d Berkmortel wrote: > > Right now I'm scraping metrics from a Node Exporter. Some of the metrics > > which the Node Exporters exports have a `mountpoint` label. > >

Re: [prometheus-users] Prometheus (metric) relabel config with inverse regex match / negative lookahead

2021-06-18 Thread Aliaksandr Valialkin
Try the following relabeling rules: - source_labels: [mountpoint] regex: '(/home|/var/domains)/something.*' target_label: __keep replacement: yes - source_labels: [mountpoint] regex: '' target_label: __keep replacement: yes - source_labels: [__keep] regex: yes action: keep The fir

Re: [prometheus-users] Prometheus (metric) relabel config with inverse regex match / negative lookahead

2021-06-18 Thread Julien Pivotto
On 18 Jun 10:24, Julian v.d Berkmortel wrote: > Right now I'm scraping metrics from a Node Exporter. Some of the metrics > which the Node Exporters exports have a `mountpoint` label. > > I'd like to drop time series that have this label and **do not** match a > regular expression. I tried using

[prometheus-users] Prometheus (metric) relabel config with inverse regex match / negative lookahead

2021-06-18 Thread Julian v.d Berkmortel
Right now I'm scraping metrics from a Node Exporter. Some of the metrics which the Node Exporters exports have a `mountpoint` label. I'd like to drop time series that have this label and **do not** match a regular expression. I tried using the `keep` action (as I'd like to keep time series that