<commit_before>apiVersion: v1
kind: ConfigMap
metadata:
  name: prometheus-alertmanager

data:
  alertmanager.yml: |
    global:
      resolve_timeout: 16m

    templates:
      - ./*.tmpl

    inhibit_rules:
    # More severe alerts mute less urgent ones.
    - source_match:
        severity: 'critical'
      target_match:
        severity: 'warning'
      equal: ['region', 'alertname', 'cluster']

    - source_match_re:
        severity: 'critical|warning'
      target_match:
        severity: 'info'
      equal: ['region', 'alertname', 'cluster']

    - source_match_re:
        severity: 'critical'
        context: '.+'
      target_match_re:
        severity: 'warning'
        context: '.+'
      equal: ['region', 'context', 'cluster']

    - source_match_re:
        severity: 'critical|warning'
        context: '.+'
      target_match_re:
        severity: 'info'
        context: '.+'
      equal: ['region', 'context', 'cluster']

    - source_match_re:
        alertname: '.*KubeletDown'
      target_match_re:
        alertname: 'PodNotReady|ManyPodsNotReadyOnNode'
      equal: ['node']

    route:
      group_by: ['region', 'alertname', 'cluster']
      group_wait: 1m
      group_interval: 7m
      repeat_interval: 12h
      receiver: dev-null

      # Route Hierarchie:
      # - execution is top down (check here: https://prometheus.io/webtools/alerting/routing-tree-editor/)
      # - 1. custom setup for alerts with duty receivers, always 'continue: true'
      # - 2. duty setup blocks must end with 'continue: false' - it shall grep all relevant alerts
      # - 3. qa/staging/labs (should be non congruent to duty channels), must end with 'continue: false'
      # - 4. specific custom setup for alerts NOT covered in Duty, must end with 'continue: false'
      # - all undefined routes should be routed to dev_null (if too many: fix alert focus or duty filter)
      routes:

      # ======= CUSTOM ALERT NOTIFICATION ON DUTY RELEVANT ALERTS ======= 

      # owner: <NAME> / <NAME>
      - receiver: slack_nannies
        continue: false<commit_msg>[alertmanager] add service to grouping<commit_after>apiVersion: v1
kind: ConfigMap
metadata:
  name: prometheus-alertmanager

data:
  alertmanager.yml: |
    global:
      resolve_timeout: 16m

    templates:
      - ./*.tmpl

    inhibit_rules:
    # More severe alerts mute less urgent ones.
    - source_match:
        severity: 'critical'
      target_match:
        severity: 'warning'
      equal: ['region', 'alertname', 'cluster']

    - source_match_re:
        severity: 'critical|warning'
      target_match:
        severity: 'info'
      equal: ['region', 'alertname', 'cluster']

    - source_match_re:
        severity: 'critical'
        context: '.+'
      target_match_re:
        severity: 'warning'
        context: '.+'
      equal: ['region', 'context', 'cluster']

    - source_match_re:
        severity: 'critical|warning'
        context: '.+'
      target_match_re:
        severity: 'info'
        context: '.+'
      equal: ['region', 'context', 'cluster']

    - source_match_re:
        alertname: '.*KubeletDown'
      target_match_re:
        alertname: 'PodNotReady|ManyPodsNotReadyOnNode'
      equal: ['node']

    route:
      group_by: ['region', 'service', 'alertname', 'cluster']
      group_wait: 1m
      group_interval: 7m
      repeat_interval: 12h
      receiver: dev-null

      # Route Hierarchie:
      # - execution is top down (check here: https://prometheus.io/webtools/alerting/routing-tree-editor/)
      # - 1. custom setup for alerts with duty receivers, always 'continue: true'
      # - 2. duty setup blocks must end with 'continue: false' - it shall grep all relevant alerts
      # - 3. qa/staging/labs (should be non congruent to duty channels), must end with 'continue: false'
      # - 4. specific custom setup for alerts NOT covered in Duty, must end with 'continue: false'
      # - all undefined routes should be routed to dev_null (if too many: fix alert focus or duty filter)
      routes:

      # ======= CUSTOM ALERT NOTIFICATION ON DUTY RELEVANT ALERTS ======= 

      # owner: <NAME> / <NAME>
      - receiver: slack_nannies
        continue: false
{'fraction_non_alphanumeric': 0.11489058039961941, 'fraction_numerical': 0.005233111322549952, 'mean_word_length': 2.486733001658375, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '8283', 'n_tokens_mistral': 1332, 'n_tokens_neox': 1259, 'n_words': 370}