Am trying to replicate the rolling window function for GCP alerting in a MQL query. I'm finding it hard to match the 15 minute rolling window into a MQL query.
See the MQL query below:
fetch k8s_node
| metric 'kubernetes.io/node/cpu/allocatable_utilization'
| filter resource.project_id = 'prd'
| filter true()
| filter true()
| filter true()
| group_by 15m, [value_allocatable_utilization_mean: mean(value.allocatable_utilization)]
| every 15m
| scale '%'
| condition val() > 0.90 '1'
I want to match the 15 min rolling window n alerting. What would be the appropriate "group_by" and "every" to use in MQL.
fetch k8s_node
| metric 'kubernetes.io/node/cpu/allocatable_utilization'
| filter resource.project_id = 'prd'
| filter true()
| filter true()
| filter true()
| group_by 15m, [value_allocatable_utilization_mean: mean(value.allocatable_utilization)]
| every 1
| scale '%'
| condition val() > 0.90 '1'