'How to update counter value in Pushgateway?

I don't understand how can I update Counter type metrics in pushgateway. For example

registry = CollectorRegistry()
Counter('rows', 'rows info', registry=registry).inc(0.555)
push_to_gateway(host,
                job='batch_job',
                registry=registry,
                timeout=10)

And I get after first push enter image description here

Then I push again but value 0.555 don't change. I want to get 1.11 in this case (want to accumulate values in this metrics). Try to use push_add_to_gateway, but result is the same.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source