-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Description
The proposed amtool (prometheus/alertmanager#636) uses a different CLI/flag package than our other CLI components. This causes friction when using our different tools.
This tool uses cobra/viper, which is the de-facto standard for CLIs in Go nowadays I suppose. It allows nice UX with subcommands and flags specified at those subcommand levels. The flag format is also what one expects in general.
Prometheus, promtool and Alertmanager OTOH are using Go's standard flag package, which is weird at best and limited in functionality. People probably got used to it by now but we probably shouldn't introduce tools with different flag formats etc.
So A) move amtool to stdlib flag (and hack something around for proper subcommands) or B) eventually move Alertmanager, promtool, and Prometheus (2.0+) to cobra.
It would be somewhat disruptive but is probably a saner solution in the long run. For most people it merely means updating their deployment recipes, which they have to anyway for Prometheus 2.0.