prometheus / prometheus/alertmanager
amtool: add support for stdin to `config routes test`
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?
$ command-that-outputs-generated-alertmanager-config | docker run --rm \
--entrypoint amtool --name alertmanager -i \
-v $PWD:/work -w /work \
quay.io/prometheus/alertmanager \
config routes test alertname="foo", severity="critical"
What did you expect to see?
Validation of my routes passed via stdin.
Similar to what was added support for in https://github.com/prometheus/alertmanager/pull/1431
What did you see instead? Under which circumstances?
amtool: error: You have to specify one of --config.file or --alertmanager.url flags.
I also tried passing - (common identifier for stdin) as --config.file=-
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
Start at the amtool config routes test entry point and reproduce the documented Docker command that pipes an Alertmanager configuration through stdin. Trace how the command currently requires --config.file or --alertmanager.url; done means a configuration supplied via stdin is validated successfully, including the shown route matcher.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100