On 24 Mar 03:32, Nabil L. wrote:
> Thanks a lot Julien, I will try the expression based on your feedback.
> 
> In the same time I just realize the "keep" actions drops everything that 
> doesn't match an expression ^^
> 
> 
> Thanks again

Oh yes indeed you need keep.

:)


> 
> 
> 
> Le mardi 24 mars 2020 11:14:29 UTC+1, Nabil L. a écrit :
> >
> > Hi All,
> >
> >
> > I am currently facing with a relabel config issue.
> > I would like to drop all namespaces which not contain the word NAMESPACE1, 
> > For this aim I try with the following regex expression :
> >
> >
> >         relabel_configs:
> >         - source_labels: [__meta_kubernetes_namespace]
> >           regex: '^((?!NAMESPACE1).)*$'
> >           action: drop
> >
> >
> > But I am facing with a syntax error (invalid orunsupported Perl syntax: 
> > `(?!` )
> >
> > level=error ts=2020-03-24T10:07:01.722Z caller=main.go:740 err="error 
> > loading config from \"/etc/prometheus/prometheus.yml\": couldn't load 
> > configuration (--config.file=\"/etc/prometheus/prometheus.yml\"): parsing 
> > YAML file /etc/prometheus/prometheus.yml: error parsing regexp: invalid or 
> > unsupported Perl syntax: `(?!`"
> >
> >
> > Any idea?
> >
> > Thanks 
> >
> > Nabil L.
> >
> 
> -- 
> 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 [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/prometheus-users/3176fa9e-e7a7-4b37-b520-39ae8b0f618c%40googlegroups.com.


-- 
 (o-    Julien Pivotto
 //\    Open-Source Consultant
 V_/_   Inuits - https://www.inuits.eu

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/20200324103346.GA26758%40oxygen.

Attachment: signature.asc
Description: PGP signature

Reply via email to