aboutsummaryrefslogtreecommitdiff
path: root/weed/command/volume.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2020-09-24 09:50:48 -0700
committerGitHub <noreply@github.com>2020-09-24 09:50:48 -0700
commit2e9099369e603308c703e4a78e48882ca3c5a5fc (patch)
tree67152aa22273e000ed0a35b2c91a9c01587aca08 /weed/command/volume.go
parent2e7c361a0d5fe1217bc00512d7ac7bc5975dfb53 (diff)
parent98e9de6e111a1e4512a9d78d7d44d949af14d6dc (diff)
downloadseaweedfs-2e9099369e603308c703e4a78e48882ca3c5a5fc.tar.xz
seaweedfs-2e9099369e603308c703e4a78e48882ca3c5a5fc.zip
Merge pull request #1489 from kmlebedev/promhttp
Promhttp
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)