apiVersion: v1
kind: ConfigMap
metadata:
  name: external-rules
  labels:
    app.kubernetes.io/name: tidb-cluster
    app.kubernetes.io/instance: test
    app.kubernetes.io/component: monitor
data:
  qps.rules.yml: |-
    groups:
    - name: tikv-qps
      rules:
        - record: tikv_grpc_msg_duration_seconds_count:5m
          expr: sum(rate(tikv_grpc_msg_duration_seconds_count{instance=~".*", type!="kv_gc"}[5m])) by (le, type)