Bird
0
0

This Alertmanager config snippet causes an error: receivers: - name: 'ops' slack_configs: - channel: '#alerts' routes: - receiver: 'ops' match_re: severity: '^(critical|warning)$' What is the likely cause?

medium📝 Debug Q7 of 15
Kubernetes - Monitoring and Logging
This Alertmanager config snippet causes an error: receivers: - name: 'ops' slack_configs: - channel: '#alerts' routes: - receiver: 'ops' match_re: severity: '^(critical|warning)$' What is the likely cause?
AMissing 'group_by' field in route
BInvalid regex syntax in 'match_re'
CIncorrect indentation of 'slack_configs' list under 'receivers'
DReceiver name 'ops' is not allowed
Step-by-Step Solution
Solution:
  1. Step 1: Check YAML indentation for 'slack_configs'

    'slack_configs' must be a list under 'receivers' with correct indentation.
  2. Step 2: Identify indentation error

    In the snippet, 'slack_configs' is indented incorrectly; it should be indented two spaces under 'name', but here it is indented four spaces, causing a YAML error.
  3. Step 3: Re-examine options

    Regex syntax is valid, 'group_by' is optional, and 'ops' is a valid name.
  4. Final Answer:

    Incorrect indentation of 'slack_configs' list under 'receivers' -> Option C
  5. Quick Check:

    YAML indentation errors cause config failures [OK]
Quick Trick: YAML indentation errors cause Alertmanager config failures [OK]
Common Mistakes:
  • Misreading regex as invalid
  • Assuming 'group_by' is mandatory
  • Thinking receiver names have restrictions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes