Skip to content

Commit

Permalink
cluster: fix cannot start alertmanager (#2200)
Browse files Browse the repository at this point in the history
  • Loading branch information
nexustar committed May 17, 2023
1 parent 42d34f3 commit dbba46b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/cluster/spec/alertmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,11 @@ func (i *AlertManagerInstance) InitConfig(
peers = append(peers, utils.JoinHostPort(amspec.Host, amspec.ClusterPort))
}
cfg := &scripts.AlertManagerScript{
WebListenAddr: utils.JoinHostPort(i.GetListenHost(), spec.WebPort),
WebExternalURL: fmt.Sprintf("http://%s", utils.JoinHostPort(spec.Host, spec.WebPort)),
ClusterPeers: peers,
ClusterListenAddr: utils.JoinHostPort(i.GetListenHost(), spec.ClusterPort),
WebListenAddr: utils.JoinHostPort(i.GetListenHost(), spec.WebPort),
WebExternalURL: fmt.Sprintf("http://%s", utils.JoinHostPort(spec.Host, spec.WebPort)),
ClusterPeers: peers,
// ClusterListenAddr cannot use i.GetListenHost due to https://github.com/prometheus/alertmanager/issues/2284 and https://github.com/prometheus/alertmanager/issues/1271
ClusterListenAddr: utils.JoinHostPort(i.GetHost(), spec.ClusterPort),

DeployDir: paths.Deploy,
LogDir: paths.Log,
Expand Down

0 comments on commit dbba46b

Please sign in to comment.