Hi all!

(*Django app*)

We have a business entity called *upload*. It has such parameters (labels) 
as 
1. *series* (series1, series2, etc), 
2. *processing_duration* (in seconds)*, *
3. *status *(success, running, terminated),
4. some another labels.

With Prometheus we would like to count:
1. uploads summed by status,
2. average duration by series,
3. something else.

Now I see metrics to look like this to archive our goals:

*upload{series="series1", status="terminated"} 1  # actually the value is 
always 1*

*upload{series="series2", status="terminated"} 1*

*upload{series="series2", status="success"} 1*

*upload_processing_duration{series="series1"} 20 *
*upload_**processing_**duration{series="series2"} 30*

With such metrics queries would be like this:

*sum(upload{status="terminated"}) or sum(upload{series="series1"})*
*avg(upload_duration{series="series1"})*

So as to have such raw (plain, atomic) data in Prometheus one should to push
them as they appear or to save them by one (without overriding) if we use* 
/metrics* 
endpoint which then is being scraped by Prometheus with some interval.

I tried pushgateway but when metrics pushed they stay there with the same 
values
until overriding or deleting. And it happens that Prometheus scrapes the 
same values again 
and again instead of to scrape them and forget delete.

[image: wefwe.jpg]

Could you please say how can I archive such behaviour?


-- 
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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/76b1a66d-b221-4835-864c-e37d37a3c3ee%40googlegroups.com.

Reply via email to