diff --git a/contrib/prometheus/recording-rules-resource.yml b/contrib/prometheus/recording-rules-resource.yml index a6e939c..abf7262 100644 --- a/contrib/prometheus/recording-rules-resource.yml +++ b/contrib/prometheus/recording-rules-resource.yml @@ -12,10 +12,17 @@ objects: spec: groups: - name: host-metering - interval: 30m + interval: 10m limit: 0 rules: - - record: host:usage:workload:cpu_hours1h - expr: max by(_id) (sum_over_time(system_cpu_logical_count[1h:10m])) / scalar(count_over_time(vector(1)[1h:10m])) + - record: min_system_cpu_logical_count:10m + expr: | + min_over_time( + system_cpu_logical_count{ + product=~".*(^|,)(204)($|,).*", + billing_model="marketplace", + support=~"Premium|Standard|Self-Support|None|" + }[10m] + ) labels: rulesVersion: v0