aboutsummaryrefslogtreecommitdiff
path: root/weed/server/master_server.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-06-17 14:51:47 -0700
committerChris Lu <chris.lu@gmail.com>2019-06-17 14:51:47 -0700
commitd8ed73926dc79aaea57e9eb305c718e82dace64c (patch)
treee0dab86e8ddf7a79b2330b9eeb6654378a255df1 /weed/server/master_server.go
parent68d1bef23671f353f65d89b73907edf5ce6918fc (diff)
downloadseaweedfs-d8ed73926dc79aaea57e9eb305c718e82dace64c.tar.xz
seaweedfs-d8ed73926dc79aaea57e9eb305c718e82dace64c.zip
volume servers get metrics address and interval from the master
Diffstat (limited to 'weed/server/master_server.go')
-rw-r--r--weed/server/master_server.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/server/master_server.go b/weed/server/master_server.go
index 95f4218de..180007df7 100644
--- a/weed/server/master_server.go
+++ b/weed/server/master_server.go
@@ -34,6 +34,8 @@ type MasterServer struct {
defaultReplicaPlacement string
garbageThreshold float64
guard *security.Guard
+ metricsAddress string
+ metricsIntervalSec int
Topo *topology.Topology
vg *topology.VolumeGrowth
@@ -56,6 +58,8 @@ func NewMasterServer(r *mux.Router, port int, metaFolder string,
garbageThreshold float64,
whiteList []string,
disableHttp bool,
+ metricsAddress string,
+ metricsIntervalSec int,
) *MasterServer {
v := viper.GetViper()
@@ -80,6 +84,8 @@ func NewMasterServer(r *mux.Router, port int, metaFolder string,
garbageThreshold: garbageThreshold,
clientChans: make(map[string]chan *master_pb.VolumeLocation),
grpcDialOpiton: security.LoadClientTLS(v.Sub("grpc"), "master"),
+ metricsAddress: metricsAddress,
+ metricsIntervalSec: metricsIntervalSec,
}
ms.bounedLeaderChan = make(chan int, 16)
seq := sequence.NewMemorySequencer()