diff options
| author | Konstantin Lebedev <lebedev_k@tochka.com> | 2020-09-24 17:45:39 +0500 |
|---|---|---|
| committer | Konstantin Lebedev <lebedev_k@tochka.com> | 2020-09-24 17:45:39 +0500 |
| commit | 324e44d4b3dffc1197bf8f6c6ec49297ace44c2b (patch) | |
| tree | edf0b2b4d990e4085d58ab084270912fd9fb5e77 /weed/command/volume.go | |
| parent | 3e52329cee39f3a83f58d3896514547093ff0cf8 (diff) | |
| download | seaweedfs-324e44d4b3dffc1197bf8f6c6ec49297ace44c2b.tar.xz seaweedfs-324e44d4b3dffc1197bf8f6c6ec49297ace44c2b.zip | |
add start metrics server
Diffstat (limited to 'weed/command/volume.go')
| -rw-r--r-- | weed/command/volume.go | 3 |
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) |
