I don't know if this has been proposed before, so I'd like to raise it here 
before taking it to github or prometheus-developers.

There are cases where binary operators could act between range vectors and 
scalars, but this is not currently allowed today (except by using 
subqueries, which end up resampling the timeseries). Simple examples:

up[10m] == 1    # filtering

foo[10m] * 8    # arithmetic

I think the semantics of these are obvious. The operation would take place 
between each value in the range vector and the scalar, and the timestamp of 
each result value would equal the timestamp of each value in the input 
range vector.

Use cases would include things like:

count_over_time(up[10m] == 1)    # how many times was there a successful 
scrape in last 10 minutes?

-- 
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/72f1d082-0817-4bdf-81ca-a02c3ae19484n%40googlegroups.com.

Reply via email to