apiVersion: v1
kind: ConfigMap
metadata:
  name: prometheus-rules
  namespace: clickvisual
data:
  watchdog.yaml: |
    groups:
    - name: test-rule
      rules:
      - alert: clickvisual_watchdog
        expr: up{instance="localhost:9090", job="prometheus"} > 0
        for: 1m
        labels:
          severity: unk
        annotations:
          summary: "Instance {{ $labels.instance }} 实例数大于 1"
          description: "{{ $labels.instance }}  (当前值: {{ $value }})"