Advertisement
Nrejve

yaml4

Jan 5th, 2021
678
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.97 KB | None | 0 0
  1. apiVersion: v1
  2. kind: ConfigMap
  3. metadata:
  4.   creationTimestamp: null
  5.   name: prometheus-rules-conf
  6.   namespace: monitoring
  7. data:
  8.   redis_rules.yml: |
  9.     groups:
  10.     - name: redis_rules
  11.       rules:
  12.       - record: redis:command_call_duration_seconds_count:rate2m
  13.         expr: sum(irate(redis_command_call_duration_seconds_count[2m])) by (cmd, environment)
  14.       - record: redis:total_requests:rate2m
  15.         expr: rate(redis_commands_processed_total[2m])
  16.   redis_alerts.yml: |
  17.     groups:
  18.     - name: redis_alerts
  19.       rules:
  20.       - alert: RedisServerDown
  21.         expr: redis_up{app="media-redis"} == 0
  22.         for: 10m
  23.         labels:
  24.           severity: critical
  25.         annotations:
  26.           summary: Redis Server {{ $labels.instance }} is down!
  27.       - alert: RedisServerGone
  28.         expr: absent(redis_up{app="media-redis"})
  29.         for: 1m
  30.         labels:
  31.           severity: critical
  32.         annotations:
  33.           summary: No Redis servers are reporting!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement