prometheus / prometheus/alertmanager
Notifiers only return a single error rather than all error.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.6k
- Forks
- 2.5k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 61
Description
What did you do?
Create a configuration with multiple errors in the same receiver.
What did you expect to see?
All errors.
What did you see instead? Under which circumstances?
❯ ./amtool check-config config/testdata/conf.multi-error.yml
Checking 'config/testdata/conf.multi-error.yml' FAILED: one of url or url_file must be configured
System information
No response
Alertmanager version
Alertmanager configuration file
receivers:
- name: 'webhook-critical'
webhook_configs:
- url: 'http://example.com/api'
# ERROR 1: send_resolved is a boolean, but a string is provided.
# The parser hits this and returns an error immediately.
send_resolved: "yes_please"
- url: ''
# ERROR 2: The URL is empty (required field).
# This error is currently hidden because the process stopped above.
http_config:
# ERROR 3: invalid basic_auth (password/password_file are missing).
basic_auth:
username: 'admin'
route:
group_by: ['alertname']
receiver: 'webhook-critical'
Prometheus version
Prometheus configuration file
Logs
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run amtool check-config against config/testdata/conf.multi-error.yml and trace the receiver notifier validation entry point that stops after the first error. Done means the command reports all applicable validation errors in the receiver, including the invalid send_resolved value, empty URL, and incomplete basic_auth configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100