Skip to content

Commit 77f54c2

Browse files
dm: add dm hosts to node_exporter list (#1654)
1 parent c1bd929 commit 77f54c2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/cluster/spec/monitoring.go

+2
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ func (i *MonitorInstance) InitConfig(
271271
for i := 0; i < servers.Len(); i++ {
272272
master := reflect.Indirect(servers.Index(i))
273273
host, port := master.FieldByName("Host").String(), master.FieldByName("Port").Int()
274+
uniqueHosts.Insert(host)
274275
cfig.AddDMMaster(host, uint64(port))
275276
}
276277
}
@@ -279,6 +280,7 @@ func (i *MonitorInstance) InitConfig(
279280
for i := 0; i < servers.Len(); i++ {
280281
worker := reflect.Indirect(servers.Index(i))
281282
host, port := worker.FieldByName("Host").String(), worker.FieldByName("Port").Int()
283+
uniqueHosts.Insert(host)
282284
cfig.AddDMWorker(host, uint64(port))
283285
}
284286
}

0 commit comments

Comments
 (0)