diff options
Diffstat (limited to 'weed/command/server.go')
| -rw-r--r-- | weed/command/server.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/command/server.go b/weed/command/server.go index aee62290a..91d8d22c6 100644 --- a/weed/command/server.go +++ b/weed/command/server.go @@ -2,6 +2,7 @@ package command import ( "fmt" + stats_collect "github.com/chrislusf/seaweedfs/weed/stats" "os" "runtime" "runtime/pprof" @@ -56,6 +57,7 @@ var ( volumeDataFolders = cmdServer.Flag.String("dir", os.TempDir(), "directories to store data files. dir[,dir]...") volumeMaxDataVolumeCounts = cmdServer.Flag.String("volume.max", "8", "maximum numbers of volumes, count[,count]... If set to zero, the limit will be auto configured.") volumeMinFreeSpacePercent = cmdServer.Flag.String("volume.minFreeSpacePercent", "1", "minimum free disk space (default to 1%). Low disk space will mark all volumes as ReadOnly.") + serverMetricsHttpPort = cmdServer.Flag.Int("metricsPort", 0, "Prometheus metrics listen port") // pulseSeconds = cmdServer.Flag.Int("pulseSeconds", 5, "number of seconds between heartbeats") isStartingFiler = cmdServer.Flag.Bool("filer", false, "whether to start filer") @@ -136,6 +138,7 @@ func runServer(cmd *Command, args []string) bool { peers := strings.Join(peerList, ",") masterOptions.peers = &peers + // ip address masterOptions.ip = serverIp masterOptions.ipBind = serverBindIp filerOptions.masters = &peers @@ -167,6 +170,7 @@ func runServer(cmd *Command, args []string) bool { } runtime.GOMAXPROCS(runtime.NumCPU()) + go stats_collect.StartMetricsServer(*serverMetricsHttpPort) folders := strings.Split(*volumeDataFolders, ",") |
