Skip to content

Commit

Permalink
dm: add dm hosts to node_exporter list
Browse files Browse the repository at this point in the history
  • Loading branch information
AstroProfundis committed Dec 6, 2021
1 parent c1bd929 commit ee2a39f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/cluster/spec/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ func (i *MonitorInstance) InitConfig(
for i := 0; i < servers.Len(); i++ {
master := reflect.Indirect(servers.Index(i))
host, port := master.FieldByName("Host").String(), master.FieldByName("Port").Int()
uniqueHosts.Insert(host)
cfig.AddDMMaster(host, uint64(port))
}
}
Expand All @@ -279,6 +280,7 @@ func (i *MonitorInstance) InitConfig(
for i := 0; i < servers.Len(); i++ {
worker := reflect.Indirect(servers.Index(i))
host, port := worker.FieldByName("Host").String(), worker.FieldByName("Port").Int()
uniqueHosts.Insert(host)
cfig.AddDMWorker(host, uint64(port))
}
}
Expand Down

0 comments on commit ee2a39f

Please sign in to comment.