mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-11-09 02:04:45 +08:00
volume: get metrics configuration from master
fix https://github.com/chrislusf/seaweedfs/issues/1354
This commit is contained in:
@@ -28,8 +28,8 @@ type VolumeServer struct {
|
||||
FixJpgOrientation bool
|
||||
ReadRedirect bool
|
||||
compactionBytePerSecond int64
|
||||
MetricsAddress string
|
||||
MetricsIntervalSec int
|
||||
metricsAddress string
|
||||
metricsIntervalSec int
|
||||
fileSizeLimitBytes int64
|
||||
isHeartbeating bool
|
||||
stopChan chan bool
|
||||
@@ -97,8 +97,9 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
|
||||
}
|
||||
|
||||
go vs.heartbeat()
|
||||
glog.V(0).Infof("volume server sends metrics to %s every %d seconds", vs.metricsAddress, vs.metricsIntervalSec)
|
||||
hostAddress := fmt.Sprintf("%s:%d", ip, port)
|
||||
go stats.LoopPushingMetric("volumeServer", hostAddress, stats.VolumeServerGather, vs.MetricsAddress, vs.MetricsIntervalSec)
|
||||
go stats.LoopPushingMetric("volumeServer", hostAddress, stats.VolumeServerGather, vs.metricsAddress, vs.metricsIntervalSec)
|
||||
|
||||
return vs
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user