So from my understanding, given a grouping key specified in the url and a
metric m1 that exists in the data with the grouping key but /is not/ in the
payload. Under put, that metric would be deleted since put overrides all
the data for the grouping key. Push on the other hand will leave m1 alone,
thats whats meant be "but only metrics with the same name as the newly
pushed metrics are replaced"

Another way to see this clearly is this line from the docs "A PUT request
with an empty body effectively deletes all metrics with the specified
grouping key."

On Fri, Jun 26, 2020 at 6:57 AM Roman Ratsun <[email protected]>
wrote:

> https://github.com/prometheus/pushgateway#post-method
> POST works exactly like the PUT method but only metrics with the same
> name as the newly pushed metrics are replaced (among those with the same
> grouping key).
>
> I don't understand this definition. When I send request by post method the
> metrics are replaced and when I send request by put the metric are
> replaced. *What is the difference?* And ofcourse I send post and put with
> the same grouping key.
>
> --
> 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/88e7aded-2e24-4fb2-9f2f-e8ba624f4ba4o%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/88e7aded-2e24-4fb2-9f2f-e8ba624f4ba4o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Mat Arye, Timescale-Prometheus
<https://github.com/timescale/timescale-prometheus> Team Lead
See what we're working on (feedback welcome!): tsdb.co/prom-design-doc

-- 
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/CADsUR0DCKHCiCJ79HiOAzPn0yPCP7T1yjD1QMHx%3D0eTic%2Bvo6A%40mail.gmail.com.

Reply via email to