aboutsummaryrefslogtreecommitdiff
path: root/weed/server/volume_server.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-09-19 00:03:00 -0700
committerChris Lu <chris.lu@gmail.com>2020-09-19 00:03:00 -0700
commit2c21eb19719d06a2fbf0b9e75cba46aa5e4e01c2 (patch)
treebdac398e1103157b6ec2482503c603eaa6bcb62c /weed/server/volume_server.go
parent2cbd1cf121921fd4c7f5c53ad0f0e64eaa85bcf4 (diff)
downloadseaweedfs-2c21eb19719d06a2fbf0b9e75cba46aa5e4e01c2.tar.xz
seaweedfs-2c21eb19719d06a2fbf0b9e75cba46aa5e4e01c2.zip
volume: get metrics configuration from master
fix https://github.com/chrislusf/seaweedfs/issues/1354
Diffstat (limited to 'weed/server/volume_server.go')
-rw-r--r--weed/server/volume_server.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/weed/server/volume_server.go b/weed/server/volume_server.go
index c600da21e..b5594faab 100644
--- a/weed/server/volume_server.go
+++ b/weed/server/volume_server.go
@@ -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
}