diff options
| author | Chris Lu <chris.lu@gmail.com> | 2019-06-14 00:54:56 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2019-06-14 00:54:56 -0700 |
| commit | 5f6c9825f8032ae34c64b3459f9ff2aff0c5efcd (patch) | |
| tree | 389ec4acad783fbcc65fa1d192a20e38cae68773 /weed/command/volume.go | |
| parent | a11525fe4eb501f4c98db6aaf40800edabf30d08 (diff) | |
| download | seaweedfs-5f6c9825f8032ae34c64b3459f9ff2aff0c5efcd.tar.xz seaweedfs-5f6c9825f8032ae34c64b3459f9ff2aff0c5efcd.zip | |
volume server: adds basic metrics
Diffstat (limited to 'weed/command/volume.go')
| -rw-r--r-- | weed/command/volume.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/command/volume.go b/weed/command/volume.go index c775ac5cf..5726528d5 100644 --- a/weed/command/volume.go +++ b/weed/command/volume.go @@ -45,6 +45,8 @@ type VolumeServerOptions struct { cpuProfile *string memProfile *string compactionMBPerSecond *int + metricsAddress *string + metricsIntervalSec *int } func init() { @@ -66,6 +68,8 @@ func init() { v.cpuProfile = cmdVolume.Flag.String("cpuprofile", "", "cpu profile output file") v.memProfile = cmdVolume.Flag.String("memprofile", "", "memory profile output file") v.compactionMBPerSecond = cmdVolume.Flag.Int("compactionMBps", 0, "limit background compaction or copying speed in mega bytes per second") + v.metricsAddress = cmdVolume.Flag.String("metrics.address", "", "Prometheus gateway address") + v.metricsIntervalSec = cmdVolume.Flag.Int("metrics.intervalSeconds", 15, "Prometheus push interval in seconds") } var cmdVolume = &Command{ @@ -161,6 +165,8 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v v.whiteList, *v.fixJpgOrientation, *v.readRedirect, *v.compactionMBPerSecond, + *v.metricsAddress, + *v.metricsIntervalSec, ) listeningAddress := *v.bindIp + ":" + strconv.Itoa(*v.port) |
