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)
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.
There are 2 things:
This makes counters a bit difficult to set up understand sometimes. In your case if you want to increment the value you need to keep track of what you already had pushed before. For example: