aboutsummaryrefslogtreecommitdiff
path: root/weed/server/volume_server.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-06-14 00:54:56 -0700
committerChris Lu <chris.lu@gmail.com>2019-06-14 00:54:56 -0700
commit5f6c9825f8032ae34c64b3459f9ff2aff0c5efcd (patch)
tree389ec4acad783fbcc65fa1d192a20e38cae68773 /weed/server/volume_server.go
parenta11525fe4eb501f4c98db6aaf40800edabf30d08 (diff)
downloadseaweedfs-5f6c9825f8032ae34c64b3459f9ff2aff0c5efcd.tar.xz
seaweedfs-5f6c9825f8032ae34c64b3459f9ff2aff0c5efcd.zip
volume server: adds basic metrics
Diffstat (limited to 'weed/server/volume_server.go')
-rw-r--r--weed/server/volume_server.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/weed/server/volume_server.go b/weed/server/volume_server.go
index f0da20323..0bb2f0f6f 100644
--- a/weed/server/volume_server.go
+++ b/weed/server/volume_server.go
@@ -24,6 +24,8 @@ type VolumeServer struct {
FixJpgOrientation bool
ReadRedirect bool
compactionBytePerSecond int64
+ MetricsAddress string
+ MetricsIntervalSec int
}
func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
@@ -36,6 +38,8 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
fixJpgOrientation bool,
readRedirect bool,
compactionMBPerSecond int,
+ metricsAddress string,
+ metricsIntervalSec int,
) *VolumeServer {
v := viper.GetViper()
@@ -80,6 +84,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
}
go vs.heartbeat()
+ startPushingMetric("volumeServer", volumeServerGather, metricsAddress, metricsIntervalSec)
return vs
}