aboutsummaryrefslogtreecommitdiff
path: root/weed/server/volume_server.go
diff options
context:
space:
mode:
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 4f21234dd..6cf654738 100644
--- a/weed/server/volume_server.go
+++ b/weed/server/volume_server.go
@@ -41,8 +41,6 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
fixJpgOrientation bool,
readRedirect bool,
compactionMBPerSecond int,
- metricsAddress string,
- metricsIntervalSec int,
) *VolumeServer {
v := viper.GetViper()
@@ -88,7 +86,10 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
go vs.heartbeat()
hostAddress := fmt.Sprintf("%s:%d", ip, port)
- stats.StartPushingMetric("volumeServer", hostAddress, stats.VolumeServerGather, metricsAddress, metricsIntervalSec)
+ go stats.LoopPushingMetric("volumeServer", hostAddress, stats.VolumeServerGather,
+ func() (addr string, intervalSeconds int) {
+ return vs.MetricsAddress, vs.MetricsIntervalSec
+ })
return vs
}