volume: get metrics configuration from master

fix https://github.com/chrislusf/seaweedfs/issues/1354
This commit is contained in:
Chris Lu committed 2020-09-19 00:03:00 -07:00
1 parent 2cbd1cf121
commit 2c21eb1971
6 files changed
+30 -17

No files matched your search

+2
View File
@@ -152,6 +152,8 @@ func (s3opt *S3Options) startS3Server() bool {
break
}
}
glog.V(0).Infof("s3 server sends metrics to %s every %d seconds", metricsAddress, metricsIntervalSec)
if metricsAddress != "" && metricsIntervalSec > 0 {
go stats_collect.LoopPushingMetric("s3", stats_collect.SourceName(uint32(*s3opt.port)), stats_collect.S3Gather, metricsAddress, metricsIntervalSec)
}