From 77c98b657e846f571ed8caf715b960fd29d75a3b Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> Date: Wed, 19 Jan 2022 21:43:22 +0500 Subject: [PATCH 1/3] master metricsHttpPort --- weed/command/master.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/weed/command/master.go b/weed/command/master.go index fc3e41d8d..0f598f2da 100644 --- a/weed/command/master.go +++ b/weed/command/master.go @@ -2,6 +2,7 @@ package command import ( "github.com/chrislusf/raft/protobuf" + stats_collect "github.com/chrislusf/seaweedfs/weed/stats" "github.com/gorilla/mux" "google.golang.org/grpc/reflection" "net/http" @@ -42,6 +43,7 @@ type MasterOptions struct { metricsAddress *string metricsIntervalSec *int raftResumeState *bool + metricsHttpPort *int } func init() { @@ -61,6 +63,7 @@ func init() { m.disableHttp = cmdMaster.Flag.Bool("disableHttp", false, "disable http requests, only gRPC operations are allowed.") m.metricsAddress = cmdMaster.Flag.String("metrics.address", "", "Prometheus gateway address :") m.metricsIntervalSec = cmdMaster.Flag.Int("metrics.intervalSeconds", 15, "Prometheus push interval in seconds") + m.metricsHttpPort = cmdMaster.Flag.Int("metricsPort", 0, "Prometheus metrics listen port") m.raftResumeState = cmdMaster.Flag.Bool("resumeState", false, "resume previous state on start master server") } @@ -104,6 +107,7 @@ func runMaster(cmd *Command, args []string) bool { glog.Fatalf("volumeSizeLimitMB should be smaller than 30000") } + go stats_collect.StartMetricsServer(*m.metricsHttpPort) startMaster(m, masterWhiteList) return true From 1dced263046005768b2a570d29092d0062ab8bf2 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 19 Jan 2022 22:21:17 -0800 Subject: [PATCH 2/3] Update binaries_dev.yml --- .github/workflows/binaries_dev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/binaries_dev.yml b/.github/workflows/binaries_dev.yml index 5b34b5f4b..6ade2d2d3 100644 --- a/.github/workflows/binaries_dev.yml +++ b/.github/workflows/binaries_dev.yml @@ -20,12 +20,12 @@ jobs: assets: | weed-* - build_dev_linux: + build_dev_linux_windows: needs: cleanup runs-on: ubuntu-latest strategy: matrix: - goos: [linux] + goos: [linux, windows] goarch: [amd64] steps: From 5f3784ee0509d529089e590777d5c9ca24885ddf Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 19 Jan 2022 22:24:57 -0800 Subject: [PATCH 3/3] Update binaries_dev.yml --- .github/workflows/binaries_dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/binaries_dev.yml b/.github/workflows/binaries_dev.yml index 6ade2d2d3..207bb9700 100644 --- a/.github/workflows/binaries_dev.yml +++ b/.github/workflows/binaries_dev.yml @@ -68,7 +68,7 @@ jobs: asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}" build_dev_darwin: - needs: build_dev_linux + needs: build_dev_linux_windows runs-on: ubuntu-latest strategy: matrix: