Apologies for late reply. Just seeing this now...
On 25.07.22 00:47, Markos Fragkakis wrote:
>
> What does "metrics with the same name" mean? Let's say I have 2 consecutive
> pushes with the payloads below. What using POST would do vs using PUT?
> Which are the "metrics with the same name" that would be replaced? Would it
> be `external_ats_metric1`, regardless the fact that there are different
> labels in the 2nd push?
Yes, just the metric name matters, not its labels.
After POSTing the 2nd push, you would end up with all the
external_ats_metric1 lines from the 2nd push (but none from the 1st),
the external_ats_metric2 lines from the 1st push, and the
external_ats_metric3 lines from the 2nd push.
If you use PUT, you would end up with only the lines from the 2nd
push.
All of this assumes you are pushing using the same grouping labels.
> PUSH #1
>
> # TYPE external_ats_metric1 gauge
> external_ats_metric1{app=\"foo\",component=\"component1\",priority=\"low\"}
> 1
> external_ats_metric1{app=\"foo\",component=\"component2\",priority=\"low\"}
> 2
> external_ats_metric1{app=\"foo\",component=\"component3\",priority=\"low\"}
> 3
>
> # TYPE external_ats_metric2 gauge
> external_ats_metric2{app=\"foo\",component=\"component1\",priority=\"low\"}
> 1
> external_ats_metric2{app=\"foo\",component=\"component2\",priority=\"low\"}
> 2
> external_ats_metric2{app=\"foo\",component=\"component3\",priority=\"low\"}
> 3
>
> PUSH #2
>
> # TYPE external_ats_metric1 gauge
> external_ats_metric1{app=\"foo\",component=\"component4\",priority=\"low\"}
> 1
> external_ats_metric1{app=\"foo\",component=\"component5\",priority=\"low\"}
> 2
> external_ats_metric1{app=\"foo\",component=\"component6\",priority=\"low\"}
> 3
>
> # TYPE external_ats_metric3 gauge
> external_ats_metric3{app=\"foo\",component=\"component1\",priority=\"low\"}
> 1
> external_ats_metric3{app=\"foo\",component=\"component2\",priority=\"low\"}
> 2
> external_ats_metric3{app=\"foo\",component=\"component3\",priority=\"low\"}
> 3
>
> --
> 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/7d3796e9-6592-47af-8ed4-6c593ea67d36n%40googlegroups.com.
--
Björn Rabenstein
[PGP-ID] 0x851C3DA17D748D03
[email] [email protected]
--
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/YzWejWYXtRTkabdT%40mail.rabenste.in.