aboutsummaryrefslogtreecommitdiff
path: root/weed/command/volume.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/command/volume.go')
-rw-r--r--weed/command/volume.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/command/volume.go b/weed/command/volume.go
index 92f83f945..82f2658c3 100644
--- a/weed/command/volume.go
+++ b/weed/command/volume.go
@@ -56,6 +56,7 @@ type VolumeServerOptions struct {
minFreeSpacePercents []float32
pprof *bool
preStopSeconds *int
+ metricsHttpPort *int
// pulseSeconds *int
}
@@ -80,6 +81,7 @@ func init() {
v.compactionMBPerSecond = cmdVolume.Flag.Int("compactionMBps", 0, "limit background compaction or copying speed in mega bytes per second")
v.fileSizeLimitMB = cmdVolume.Flag.Int("fileSizeLimitMB", 1024, "limit file size to avoid out of memory")
v.pprof = cmdVolume.Flag.Bool("pprof", false, "enable pprof http handlers. precludes --memprofile and --cpuprofile")
+ v.metricsHttpPort = cmdVolume.Flag.Int("metricsPort", 0, "Prometheus metrics listen port")
}
var cmdVolume = &Command{
@@ -207,6 +209,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
*v.fixJpgOrientation, *v.readRedirect,
*v.compactionMBPerSecond,
*v.fileSizeLimitMB,
+ *v.metricsHttpPort,
)
// starting grpc server
grpcS := v.startGrpcService(volumeServer)