adjust for metrics port

This commit is contained in:
Chris Lu
2020-09-24 10:21:23 -07:00
parent d2d3aec3e1
commit 4856bce0ee
7 changed files with 30 additions and 34 deletions

View File

@@ -54,7 +54,6 @@ type FilerOption struct {
recursiveDelete bool
Cipher bool
Filers []string
MetricsHttpPort int
}
type FilerServer struct {
@@ -158,8 +157,7 @@ func (fs *FilerServer) maybeStartMetrics() {
}
}
go stats.StartMetricsServer(stats.FilerGather, fs.option.MetricsHttpPort)
go stats.LoopPushingMetric("filer", stats.SourceName(fs.option.Port), stats.FilerGather, fs.metricsAddress, fs.metricsIntervalSec)
go stats.LoopPushingMetric("filer", stats.SourceName(fs.option.Port), fs.metricsAddress, fs.metricsIntervalSec)
}
func readFilerConfiguration(grpcDialOption grpc.DialOption, masterAddress string) (metricsAddress string, metricsIntervalSec int, err error) {

View File

@@ -46,7 +46,6 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
readRedirect bool,
compactionMBPerSecond int,
fileSizeLimitMB int,
metricsHttpPort int,
) *VolumeServer {
v := util.GetViper()
@@ -98,8 +97,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
}
go vs.heartbeat()
go stats.StartMetricsServer(stats.VolumeServerGather, metricsHttpPort)
go stats.LoopPushingMetric("volumeServer", fmt.Sprintf("%s:%d", ip, port), stats.VolumeServerGather, vs.metricsAddress, vs.metricsIntervalSec)
go stats.LoopPushingMetric("volumeServer", fmt.Sprintf("%s:%d", ip, port), vs.metricsAddress, vs.metricsIntervalSec)
return vs
}