How to exclude all labels containing '3scale' in their name during FEDERATION phase

28 views
Skip to first unread message

Fabio Marzotti

unread,
May 25, 2020, 3:22:43 PM5/25/20
to Prometheus Users
Hi, I need to exclude all labels containing an error name. For example those starting with '3scale'.
This in order to avoid this error during federation phase:

"prometheus       | level=warn ts=2020-05-25T18:15:57.094907355Z caller=scrape.go:867 component="scrape manager" scrape_pool=yyyyyyyyyyyy target="https://xxxxxxxxx:443/federate?match%5B%5D=%7B__name__%3D~%22.%2B%22%7D" msg="append failed" err="expected label name, got \"INVALID\""

May be is the match phase in  any case after federation process and then I'll get the same error ??

Thanks for the support, 

Fabio
  



Fabio Marzotti

unread,
May 26, 2020, 2:50:02 AM5/26/20
to Fabio Marzotti, Prometheus Users
Hi, thanks for your answer. That is a label name with mistake, I know this is an error but is a metric supplied by third parts software, so I can't modify it. I'm looking a way to exclude it from federation process..... how can do it?
thanks!


Il giorno lun 25 mag 2020 alle ore 21:34 Julien Pivotto <roidel...@prometheus.io> ha scritto:
As per https://prometheus.io/docs/concepts/data_model/,
metric names must match regex [a-zA-Z_:][a-zA-Z0-9_:]*
and therefore must not start with a number.

regards,



>
> Thanks for the support,
>
> Fabio
>   
>
>
>
> --
> 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-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/3ccfa579-360e-4b56-b7a6-8aae153315fe%40googlegroups.com.


--
Julien Pivotto
@roidelapluie

Fabio Marzotti

unread,
May 26, 2020, 3:38:47 AM5/26/20
to Fabio Marzotti, Prometheus Users
I'm not sure but in that way you match only metric name and not label name, right?
My issue is on label name.

Fabio


Il giorno mar 26 mag 2020 alle ore 08:56 Julien Pivotto <roidel...@prometheus.io> ha scritto:
On 26 May 08:49, Fabio Marzotti wrote:
> Hi, thanks for your answer. That is a label name with mistake, I know this
> is an error but is a metric supplied by third parts software, so I can't
> modify it. I'm looking a way to exclude it from federation process..... how
> can do it?
> thanks!

Maybe something like: match[]={__name__=~"[^0-9].*"}

Julien Pivotto

unread,
May 26, 2020, 6:58:28 PM5/26/20
to Fabio Marzotti, Prometheus Users
On 26 May 09:38, Fabio Marzotti wrote:
> I'm not sure but in that way you match only metric name and not label name,
> right?
> My issue is on label name.

Oh yes you are right.

That is not possible.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAEZQCtuh_fTY3cOow7qvSbbGmKK2RcDArevkpq_O1NJO7J32-A%40mail.gmail.com.

--
Julien Pivotto
@roidelapluie

Julien Pivotto

unread,
May 26, 2020, 6:58:28 PM5/26/20
to Fabio Marzotti, Prometheus Users
On 25 May 12:22, Fabio Marzotti wrote:
As per https://prometheus.io/docs/concepts/data_model/,
metric names must match regex [a-zA-Z_:][a-zA-Z0-9_:]*
and therefore must not start with a number.

regards,


>
> Thanks for the support,
>
> Fabio
>
>
>
>
> --
> 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-use...@googlegroups.com.

Julien Pivotto

unread,
May 26, 2020, 6:58:31 PM5/26/20
to Fabio Marzotti, Prometheus Users
On 26 May 08:49, Fabio Marzotti wrote:
> Hi, thanks for your answer. That is a label name with mistake, I know this
> is an error but is a metric supplied by third parts software, so I can't
> modify it. I'm looking a way to exclude it from federation process..... how
> can do it?
> thanks!

Maybe something like: match[]={__name__=~"[^0-9].*"}

>
>
> --
> 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-use...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages