On 23 Jun 09:13, Senthil wrote:
> So like this?
> 
>     metric_relabel_configs:
>     - source_labels: ['id']
>       regex: 'id'
>       action: labeldrop


Source labels is not used with labeldrop.


> 
> On Thursday, June 23, 2022 at 12:11:44 PM UTC-4 Julien Pivotto wrote:
> 
> > On 23 Jun 09:07, Senthil wrote:
> > > We noticed that Prometheus is taking huge memory and slow. So by 
> > referring 
> > > to the internet 
> > > [
> > https://www.robustperception.io/dropping-metrics-at-scrape-time-with-prometheus/]
> >  
> >
> > > we removed the "id" using the below lines. 
> > > 
> > > metric_relabel_configs:
> > > - source_labels: ['id']
> > > regex: '.*'
> > > action: drop
> > > 
> > > But that removed all columns, how we can remove only the Id? 
> > > 
> > > Thanks
> >
> > Please try
> >
> > - regex: 'id'
> > action: labeldrop
> >
> >
> > but make sure the metrics stays unique after removing the label.
> >
> >
> > Regards,
> >
> > > 
> > > -- 
> > > 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/38da0cf5-bb4c-488e-ab6b-08fdca0af0a4n%40googlegroups.com
> > .
> >
> >
> > -- 
> > Julien Pivotto
> > @roidelapluie
> >
> 
> -- 
> 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/8024bcff-3538-4cbf-aa43-177a981d145an%40googlegroups.com.


-- 
Julien Pivotto
@roidelapluie

-- 
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/YrSSXVSWFcozPcNq%40nixos.

Reply via email to