Yes, I want to remove the instance, I tried sum without(instance)
sum_over_time(augmento{coins="xxx"}[20m]), but there was an error

{"status":"error","errorType":"bad_data","error":"parse error at char 24:
unexpected identifier \"sum_over_time\" in aggregation, expected \"(\""}

Julien Pivotto <[email protected]> 于2020年6月12日周五 下午3:57写道:

> On 12 Jun 09:53, Christian Hoffmann wrote:
> > Hi,
> >
> >
> > On 6/12/20 1:07 AM, li yun wrote:
> > > I execute the following query
> > > |
> > >
> label_replace(sum_over_time(augmento{coins="xxx"}[20m]),"instance","","","")
>
> Hi,
>
> You probably want:
>
> sum without(instance) sum_over_time(augmento{coins="xxx"}[20m])
>
> > > |
> > >
> > > Got the following error:
> > >
> > > vector cannot contain metrics with the same labelset
> > >
> > > What am I doing wrong? thank you very much for your help
> >
> > Looks like the attempted removal of the instance label would lead to
> > multiple results with the same label combinations, which isn't allowed.
> >
> > What are you trying to do?
> > What do your results look like without the label_replace call?
> >
> > Maybe you are looking for some aggregation function (min, max, avg,
> topk)?
> >
> > Kind regards,
> > Christian
> >
> > --
> > 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/1ebab6b0-af3f-2a07-3897-4889e520f847%40hoffmann-christian.info
> .
>
> --
> 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/CAO63JBYd3NAjqJjGkeLsVP%3DPAhLnjGWgKCNPZdh0aW9%2BwPEGEw%40mail.gmail.com.

Reply via email to