volume server: adds basic metrics

This commit is contained in:
Chris Lu
2019-06-14 00:54:56 -07:00
parent a11525fe4e
commit 5f6c9825f8
7 changed files with 61 additions and 8 deletions

View File

@@ -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
}