Skip to content

Commit

Permalink
Merge pull request prometheus#1971 from bwplotka/disable-ha-explicit
Browse files Browse the repository at this point in the history
docs/flags: Make it explicit that HA is enabled by default and how to disable it.
  • Loading branch information
stuartnelson3 authored Jul 24, 2019
2 parents ab537b5 + f7f8c47 commit ab11da7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,15 +327,15 @@ amtool config routes --alertmanager.url=http://localhost:9090
## High Availability
AlertManager's high availability is in production use at many companies.
AlertManager's high availability is in production use at many companies and is enabled by default.
> Important: Both UDP and TCP are needed in alertmanager 0.15 and higher for the cluster to work.
To create a highly available cluster of the Alertmanager the instances need to
be configured to communicate with each other. This is configured using the
`--cluster.*` flags.
- `--cluster.listen-address` string: cluster listen address (default "0.0.0.0:9094")
- `--cluster.listen-address` string: cluster listen address (default "0.0.0.0:9094"; empty string disables HA mode)
- `--cluster.advertise-address` string: cluster advertise address
- `--cluster.peer` value: initial peers (repeat flag for each additional peer)
- `--cluster.peer-timeout` value: peer timeout period (default "15s")
Expand Down Expand Up @@ -381,7 +381,6 @@ alerting:

If running Alertmanager in high availability mode is not desired, setting `--cluster.listen-address=` will prevent Alertmanager from listening to incoming peer requests.


## Contributing to the Front-End

Refer to [ui/app/CONTRIBUTING.md](ui/app/CONTRIBUTING.md).
Expand Down
2 changes: 1 addition & 1 deletion cmd/alertmanager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func run() int {
getConcurrency = kingpin.Flag("web.get-concurrency", "Maximum number of GET requests processed concurrently. If negative or zero, the limit is GOMAXPROC or 8, whichever is larger.").Default("0").Int()
httpTimeout = kingpin.Flag("web.timeout", "Timeout for HTTP requests. If negative or zero, no timeout is set.").Default("0").Duration()

clusterBindAddr = kingpin.Flag("cluster.listen-address", "Listen address for cluster.").
clusterBindAddr = kingpin.Flag("cluster.listen-address", "Listen address for cluster. Set to empty string to disable HA mode.").
Default(defaultClusterAddr).String()
clusterAdvertiseAddr = kingpin.Flag("cluster.advertise-address", "Explicit address to advertise in cluster.").String()
peers = kingpin.Flag("cluster.peer", "Initial peers (may be repeated).").Strings()
Expand Down

0 comments on commit ab11da7

Please sign in to comment.