Advice on recording rule "interval" when working around subquery range limitation

19 views
Skip to first unread message

franck102

unread,
May 13, 2020, 1:14:28 PM5/13/20
to Prometheus Users
Hi all,

I am trying to record hourly increases over a metric obtained using a subquery to merge cAdvisor metrics with kube-pol-labels metric from kube-state-metric:

container_cpu_usage_seconds_total
* on(pod) group_left(<pod labels I want>) kube_pod_labels{<some filtering based on pod labels>}


increase(<subquery above>[1h])
 
and the advice is to use a recording rule to record the subquery.

I can't figure out how to configure the rule interval though? Conceptually what I would like is "generate one sample for every new sample received since the last rule evaluation"... is there any way to achieve this either explicitly, or implicitly?

Thanks!
Franck
Reply all
Reply to author
Forward
0 new messages