apiVersion: operator.victoriametrics.com/v1beta1
kind: VMRule
metadata:
  name: alerts-kube-prometheus-node-recording.rules
spec:
  groups:
  - name: kube-prometheus-node-recording.rules
    params: {}
    rules:
    - annotations: {}
      expr: sum(rate(node_cpu_seconds_total{mode!="idle",mode!="iowait",mode!="steal"}[3m]))
        BY (instance)
      labels: {}
      record: instance:node_cpu:rate:sum
    - annotations: {}
      expr: sum(rate(node_network_receive_bytes_total[3m])) BY (instance)
      labels: {}
      record: instance:node_network_receive_bytes:rate:sum
    - annotations: {}
      expr: sum(rate(node_network_transmit_bytes_total[3m])) BY (instance)
      labels: {}
      record: instance:node_network_transmit_bytes:rate:sum
    - annotations: {}
      expr: sum(rate(node_cpu_seconds_total{mode!="idle",mode!="iowait",mode!="steal"}[5m]))
        WITHOUT (cpu, mode) / ON(instance) GROUP_LEFT() count(sum(node_cpu_seconds_total)
        BY (instance, cpu)) BY (instance)
      labels: {}
      record: instance:node_cpu:ratio
    - annotations: {}
      expr: sum(rate(node_cpu_seconds_total{mode!="idle",mode!="iowait",mode!="steal"}[5m]))
      labels: {}
      record: cluster:node_cpu:sum_rate5m
    - annotations: {}
      expr: cluster:node_cpu:sum_rate5m / count(sum(node_cpu_seconds_total) BY (instance,
        cpu))
      labels: {}
      record: cluster:node_cpu:ratio
