From 6647b8c732dea502c5f33257f45412a6147ec5f5 Mon Sep 17 00:00:00 2001 From: "codesee-maps[bot]" <86324825+codesee-maps[bot]@users.noreply.github.com> Date: Tue, 25 Jul 2023 16:44:52 +0000 Subject: [PATCH 1/3] Install the CodeSee workflow. Learn more at https://docs.codesee.io --- .github/workflows/codesee-arch-diagram.yml | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/codesee-arch-diagram.yml diff --git a/.github/workflows/codesee-arch-diagram.yml b/.github/workflows/codesee-arch-diagram.yml new file mode 100644 index 0000000000..806d41d12f --- /dev/null +++ b/.github/workflows/codesee-arch-diagram.yml @@ -0,0 +1,23 @@ +# This workflow was added by CodeSee. Learn more at https://codesee.io/ +# This is v2.0 of this workflow file +on: + push: + branches: + - main + pull_request_target: + types: [opened, synchronize, reopened] + +name: CodeSee + +permissions: read-all + +jobs: + codesee: + runs-on: ubuntu-latest + continue-on-error: true + name: Analyze the repo with CodeSee + steps: + - uses: Codesee-io/codesee-action@v2 + with: + codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} + codesee-url: https://app.codesee.io From ddb67b5cc54382a1262ecaaf66c7089858450ef3 Mon Sep 17 00:00:00 2001 From: vishwas-sharma2480 Date: Wed, 30 Aug 2023 16:40:01 +0530 Subject: [PATCH 2/3] removed the codesee-arch-diagram.yml~ --- .github/workflows/codesee-arch-diagram.yml | 23 ---------------------- 1 file changed, 23 deletions(-) delete mode 100644 .github/workflows/codesee-arch-diagram.yml diff --git a/.github/workflows/codesee-arch-diagram.yml b/.github/workflows/codesee-arch-diagram.yml deleted file mode 100644 index 806d41d12f..0000000000 --- a/.github/workflows/codesee-arch-diagram.yml +++ /dev/null @@ -1,23 +0,0 @@ -# This workflow was added by CodeSee. Learn more at https://codesee.io/ -# This is v2.0 of this workflow file -on: - push: - branches: - - main - pull_request_target: - types: [opened, synchronize, reopened] - -name: CodeSee - -permissions: read-all - -jobs: - codesee: - runs-on: ubuntu-latest - continue-on-error: true - name: Analyze the repo with CodeSee - steps: - - uses: Codesee-io/codesee-action@v2 - with: - codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} - codesee-url: https://app.codesee.io From 3cb5e7d4bdbee0bb198fc194046f09d747ace127 Mon Sep 17 00:00:00 2001 From: vishwas-sharma2480 Date: Thu, 21 Sep 2023 02:30:56 +0530 Subject: [PATCH 3/3] added a feature which will make the listen interface configurable --- managed/services/agents/node.go | 7 ++++--- managed/services/agents/state.go | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/managed/services/agents/node.go b/managed/services/agents/node.go index ddd51efe2d..0fbcb34b0a 100644 --- a/managed/services/agents/node.go +++ b/managed/services/agents/node.go @@ -32,7 +32,7 @@ import ( // with the basic auth users. var v2_27_99 = version.MustParse("2.27.99") -func nodeExporterConfig(node *models.Node, exporter *models.Agent, agentVersion *version.Parsed) (*agentpb.SetStateRequest_AgentProcess, error) { +func nodeExporterConfig(node *models.Node, exporter *models.Agent, agentVersion *version.Parsed , listenInterface string) (*agentpb.SetStateRequest_AgentProcess, error) { tdp := models.TemplateDelimsPair( pointer.GetString(exporter.MetricsPath), ) @@ -44,8 +44,9 @@ func nodeExporterConfig(node *models.Node, exporter *models.Agent, agentVersion "--web.disable-exporter-metrics", // we enable them as a part of HR metrics - "--web.listen-address=:" + tdp.Left + " .listen_port " + tdp.Right, - } +// "--web.listen-address=:" + tdp.Left + " .listen_port " + tdp.Right, + "--web.listen-address=" + listenInterface + ":" + tdp.Left + " .listen_port " + tdp.Right, +} // do not tweak collectors on macOS as many (but not) of them are Linux-specific if node.Distro != "darwin" { diff --git a/managed/services/agents/state.go b/managed/services/agents/state.go index 96f8f0562c..fcb031bd27 100644 --- a/managed/services/agents/state.go +++ b/managed/services/agents/state.go @@ -190,7 +190,9 @@ func (u *StateUpdater) sendSetStateRequest(ctx context.Context, agent *pmmAgentI return err } - params, err := nodeExporterConfig(node, row, pmmAgentVersion) + //params, err := nodeExporterConfig(node, row, pmmAgentVersion) + listenInterface := "127.0.0.1" // Change this to the desired IP address or interface + params, err := nodeExporterConfig(node, exporter, agentVersion, listenInterface) if err != nil { return err }