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
>
> <http://192.168.99.100:9090/graph?g0.expr=container_cpu_usage_seconds_total+%2A+on%28pod%29+group_left%28label_com_fico_meter_tenant%2C+label_com_fico_meter_sub_tenant%2C+label_com_fico_meter_product%2C+label_com_fico_meter_segment%2C+label_com_fico_meter_service%2C+label_com_fico_meter_service_segment%2C+label_com_fico_meter_region%2C+label_com_fico_meter_lifecyle%2C+label_com_fico_meter_solution%29+kube_pod_labels%7Blabel_com_fico_meter_service%3D~%22.%2B%22%2Clabel_com_fico_meter_tenant%3D~%22.%2B%22%7D&g0.tab=1>
>  
> * on(pod) group_left(<pod labels I want>) kube_pod_labels 
> <http://192.168.99.100:9090/graph?g0.expr=container_cpu_usage_seconds_total+%2A+on%28pod%29+group_left%28label_com_fico_meter_tenant%2C+label_com_fico_meter_sub_tenant%2C+label_com_fico_meter_product%2C+label_com_fico_meter_segment%2C+label_com_fico_meter_service%2C+label_com_fico_meter_service_segment%2C+label_com_fico_meter_region%2C+label_com_fico_meter_lifecyle%2C+label_com_fico_meter_solution%29+kube_pod_labels%7Blabel_com_fico_meter_service%3D~%22.%2B%22%2Clabel_com_fico_meter_tenant%3D~%22.%2B%22%7D&g0.tab=1>{<some
>  
> filtering based on pod labels>}


Due to https://github.com/prometheus/prometheus/issues/1227 I can't just 
use 

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

-- 
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/9da5262a-e143-44c3-9a84-dc9750cd6194%40googlegroups.com.

Reply via email to