diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml
index bcba69877d..71ad2974ba 100644
--- a/.github/workflows/devcontainer.yml
+++ b/.github/workflows/devcontainer.yml
@@ -36,24 +36,24 @@ jobs:
ref: ${{ github.event.inputs.branch }}
- name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v2
+ uses: docker/setup-buildx-action@v3
- name: Login to ghcr.io registry
- uses: docker/login-action@v2
+ uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to docker.io registry
- uses: docker/login-action@v2
+ uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push to registries
- uses: docker/build-push-action@v4
+ uses: docker/build-push-action@v5
with:
file: ./devcontainer.Dockerfile
push: true
diff --git a/.github/workflows/managed.yml b/.github/workflows/managed.yml
index 807377494b..ab1c5b8dcf 100644
--- a/.github/workflows/managed.yml
+++ b/.github/workflows/managed.yml
@@ -107,9 +107,6 @@ jobs:
- name: Run debug commands on failure
if: ${{ failure() }}
run: |
- env
- go version
- go env
- pwd
+ env | sort
+ go env | sort
git status
- kubectl version --short --output json
diff --git a/.licenserc.yaml b/.licenserc.yaml
index 60fcfc859e..0db7da52ac 100644
--- a/.licenserc.yaml
+++ b/.licenserc.yaml
@@ -2,8 +2,8 @@ header:
- paths:
- "**/*.go"
paths-ignore:
- - "**/agent/**"
- - "**/admin/**"
+ - "agent/**"
+ - "admin/**"
- "**/mock_*"
- "**/*.pb.go"
- "**/*.pb.gw.go"
@@ -12,62 +12,23 @@ header:
- "**/json/client/**"
- "**/amclient/**"
- "**/ammodels/**"
- - "qan-api2/migrations/"
+ - "qan-api2/migrations/**"
- "managed/services/dbaas/kubernetes/client/kubeclient_interface.go"
- "managed/services/dbaas/olm/operator_service_interface.go"
- "managed/services/dbaas/kubernetes/operator_service_interface.go"
license:
- spdx-id: AGPL-3.0
- content: |
- // Copyright (C) 2019 Percona LLC
- //
- // This program is free software: you can redistribute it and/or modify
- // it under the terms of the GNU Affero General Public License as published by
- // the Free Software Foundation, either version 3 of the License, or
- // (at your option) any later version.
- //
- // This program is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- // GNU Affero General Public License for more details.
- //
- // You should have received a copy of the GNU Affero General Public License
- // along with this program. If not, see .
+ spdx-id: AGPL-3.0-or-later
+ copyright-owner: Percona LLC
+ copyright-year: 2023
- paths:
- - "./agent/**/*.go"
- - "./admin/**/.go"
+ - "agent/**/*.go"
+ - "admin/**/*.go"
paths-ignore:
- "**/*_reform.go"
- "**/mock_*"
- "**/json/client/**"
license:
- content: |
- // Copyright (C) 2019 Percona LLC
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
-
- pattern: |
- // Copyright \(C\) 20\d{2} Percona LLC
- //
- // Licensed under the Apache License, Version 2.0 \(the "License"\);
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
+ spdx-id: Apache-2.0
+ copyright-owner: Percona LLC
+ copyright-year: 2023
diff --git a/admin/agentlocal/agentlocal.go b/admin/agentlocal/agentlocal.go
index 56e4fb3d5a..26a7aa18cc 100644
--- a/admin/agentlocal/agentlocal.go
+++ b/admin/agentlocal/agentlocal.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/cli/cli.go b/admin/cli/cli.go
index 8b5def5d9a..9db76727dc 100644
--- a/admin/cli/cli.go
+++ b/admin/cli/cli.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/cli/flags/global.go b/admin/cli/flags/global.go
index 9a2e42f71b..8ede216a51 100644
--- a/admin/cli/flags/global.go
+++ b/admin/cli/flags/global.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/cmd/bootstrap.go b/admin/cmd/bootstrap.go
index 44b96b0fe0..e302946ecb 100644
--- a/admin/cmd/bootstrap.go
+++ b/admin/cmd/bootstrap.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/cmd/pmm-admin/main.go b/admin/cmd/pmm-admin/main.go
index d2746fdb9a..c376184e68 100644
--- a/admin/cmd/pmm-admin/main.go
+++ b/admin/cmd/pmm-admin/main.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/cmd/pmm-admin/main_test.go b/admin/cmd/pmm-admin/main_test.go
index c434b1f60f..d7dc2e40b1 100644
--- a/admin/cmd/pmm-admin/main_test.go
+++ b/admin/cmd/pmm-admin/main_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/cmd/pmm/main.go b/admin/cmd/pmm/main.go
index 45b6697355..6800636f6d 100644
--- a/admin/cmd/pmm/main.go
+++ b/admin/cmd/pmm/main.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/annotation.go b/admin/commands/annotation.go
index ca39d4c93f..78239a7549 100644
--- a/admin/commands/annotation.go
+++ b/admin/commands/annotation.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/base.go b/admin/commands/base.go
index 66074bf9b3..9289789951 100644
--- a/admin/commands/base.go
+++ b/admin/commands/base.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/base/setup.go b/admin/commands/base/setup.go
index 35d35b82d4..a7dc9a472f 100644
--- a/admin/commands/base/setup.go
+++ b/admin/commands/base/setup.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/base_test.go b/admin/commands/base_test.go
index d7015e3115..0b3f7ac205 100644
--- a/admin/commands/base_test.go
+++ b/admin/commands/base_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/completion.go b/admin/commands/completion.go
index 0e8df896ae..fbbc66b86c 100644
--- a/admin/commands/completion.go
+++ b/admin/commands/completion.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/config.go b/admin/commands/config.go
index 44cf7a0220..eda73cf1a2 100644
--- a/admin/commands/config.go
+++ b/admin/commands/config.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/config_test.go b/admin/commands/config_test.go
index 60da3239b0..792e981221 100644
--- a/admin/commands/config_test.go
+++ b/admin/commands/config_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_agent_external_exporter.go b/admin/commands/inventory/add_agent_external_exporter.go
index 0f658a9d08..8d83d9240e 100644
--- a/admin/commands/inventory/add_agent_external_exporter.go
+++ b/admin/commands/inventory/add_agent_external_exporter.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_agent_mongodb_exporter.go b/admin/commands/inventory/add_agent_mongodb_exporter.go
index 3c3d92ea4a..fb258a39c6 100644
--- a/admin/commands/inventory/add_agent_mongodb_exporter.go
+++ b/admin/commands/inventory/add_agent_mongodb_exporter.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_agent_mysqld_exporter.go b/admin/commands/inventory/add_agent_mysqld_exporter.go
index 3558de47b7..ab828cbfae 100644
--- a/admin/commands/inventory/add_agent_mysqld_exporter.go
+++ b/admin/commands/inventory/add_agent_mysqld_exporter.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_agent_mysqld_exporter_test.go b/admin/commands/inventory/add_agent_mysqld_exporter_test.go
index 390ed2b9ba..3f74a626ce 100644
--- a/admin/commands/inventory/add_agent_mysqld_exporter_test.go
+++ b/admin/commands/inventory/add_agent_mysqld_exporter_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_agent_node_exporter.go b/admin/commands/inventory/add_agent_node_exporter.go
index b6b2a44ea2..982befd0e6 100644
--- a/admin/commands/inventory/add_agent_node_exporter.go
+++ b/admin/commands/inventory/add_agent_node_exporter.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_agent_pmm_agent.go b/admin/commands/inventory/add_agent_pmm_agent.go
index dc7fd315a1..df8057e766 100644
--- a/admin/commands/inventory/add_agent_pmm_agent.go
+++ b/admin/commands/inventory/add_agent_pmm_agent.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_agent_postgres_exporter.go b/admin/commands/inventory/add_agent_postgres_exporter.go
index 9e607fa5fb..3dbca7ca90 100644
--- a/admin/commands/inventory/add_agent_postgres_exporter.go
+++ b/admin/commands/inventory/add_agent_postgres_exporter.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_agent_postgres_exporter_test.go b/admin/commands/inventory/add_agent_postgres_exporter_test.go
index 29465034c4..25554a53fb 100644
--- a/admin/commands/inventory/add_agent_postgres_exporter_test.go
+++ b/admin/commands/inventory/add_agent_postgres_exporter_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_agent_proxysql_exporter.go b/admin/commands/inventory/add_agent_proxysql_exporter.go
index abfe4e55b5..a4c2e7fc4d 100644
--- a/admin/commands/inventory/add_agent_proxysql_exporter.go
+++ b/admin/commands/inventory/add_agent_proxysql_exporter.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_agent_qan_mongodb_profiler_agent.go b/admin/commands/inventory/add_agent_qan_mongodb_profiler_agent.go
index 5dd330f1ea..22fbd3dabf 100644
--- a/admin/commands/inventory/add_agent_qan_mongodb_profiler_agent.go
+++ b/admin/commands/inventory/add_agent_qan_mongodb_profiler_agent.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_agent_qan_mysql_perfschema_agent.go b/admin/commands/inventory/add_agent_qan_mysql_perfschema_agent.go
index cf8939fc6f..82492ad33c 100644
--- a/admin/commands/inventory/add_agent_qan_mysql_perfschema_agent.go
+++ b/admin/commands/inventory/add_agent_qan_mysql_perfschema_agent.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_agent_qan_mysql_slowlog_agent.go b/admin/commands/inventory/add_agent_qan_mysql_slowlog_agent.go
index c74af0a3c7..1ca83e9bbc 100644
--- a/admin/commands/inventory/add_agent_qan_mysql_slowlog_agent.go
+++ b/admin/commands/inventory/add_agent_qan_mysql_slowlog_agent.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_agent_qan_postgres_pgstatements_agent.go b/admin/commands/inventory/add_agent_qan_postgres_pgstatements_agent.go
index 8c04c0f234..8800accb96 100644
--- a/admin/commands/inventory/add_agent_qan_postgres_pgstatements_agent.go
+++ b/admin/commands/inventory/add_agent_qan_postgres_pgstatements_agent.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_agent_qan_postgres_pgstatmonitor_agent.go b/admin/commands/inventory/add_agent_qan_postgres_pgstatmonitor_agent.go
index f18b16506a..53df775c57 100644
--- a/admin/commands/inventory/add_agent_qan_postgres_pgstatmonitor_agent.go
+++ b/admin/commands/inventory/add_agent_qan_postgres_pgstatmonitor_agent.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_agent_rds_exporter.go b/admin/commands/inventory/add_agent_rds_exporter.go
index 772e415228..5d694ec7f2 100644
--- a/admin/commands/inventory/add_agent_rds_exporter.go
+++ b/admin/commands/inventory/add_agent_rds_exporter.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_node_container.go b/admin/commands/inventory/add_node_container.go
index 311d45ea09..18fabfe19a 100644
--- a/admin/commands/inventory/add_node_container.go
+++ b/admin/commands/inventory/add_node_container.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_node_generic.go b/admin/commands/inventory/add_node_generic.go
index ddd71631b3..6bd51dc15a 100644
--- a/admin/commands/inventory/add_node_generic.go
+++ b/admin/commands/inventory/add_node_generic.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_node_remote.go b/admin/commands/inventory/add_node_remote.go
index 0727c2712e..38fef75509 100644
--- a/admin/commands/inventory/add_node_remote.go
+++ b/admin/commands/inventory/add_node_remote.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_node_remote_rds.go b/admin/commands/inventory/add_node_remote_rds.go
index 7bfdba300b..fb045bfbce 100644
--- a/admin/commands/inventory/add_node_remote_rds.go
+++ b/admin/commands/inventory/add_node_remote_rds.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_node_remote_rds_test.go b/admin/commands/inventory/add_node_remote_rds_test.go
index f3ee4163d2..85420b49ca 100644
--- a/admin/commands/inventory/add_node_remote_rds_test.go
+++ b/admin/commands/inventory/add_node_remote_rds_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_service_external.go b/admin/commands/inventory/add_service_external.go
index 995a7bd779..4b957148f6 100644
--- a/admin/commands/inventory/add_service_external.go
+++ b/admin/commands/inventory/add_service_external.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_service_external_test.go b/admin/commands/inventory/add_service_external_test.go
index 8676261dea..659ca3aa4c 100644
--- a/admin/commands/inventory/add_service_external_test.go
+++ b/admin/commands/inventory/add_service_external_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_service_haproxy.go b/admin/commands/inventory/add_service_haproxy.go
index 4aebbf1167..a7fd48b922 100644
--- a/admin/commands/inventory/add_service_haproxy.go
+++ b/admin/commands/inventory/add_service_haproxy.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_service_haproxy_test.go b/admin/commands/inventory/add_service_haproxy_test.go
index bcec05d9f2..599aa69829 100644
--- a/admin/commands/inventory/add_service_haproxy_test.go
+++ b/admin/commands/inventory/add_service_haproxy_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_service_mongodb.go b/admin/commands/inventory/add_service_mongodb.go
index a821db8f63..3314324991 100644
--- a/admin/commands/inventory/add_service_mongodb.go
+++ b/admin/commands/inventory/add_service_mongodb.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_service_mongodb_test.go b/admin/commands/inventory/add_service_mongodb_test.go
index dbe294ddf6..40b4ac16a1 100644
--- a/admin/commands/inventory/add_service_mongodb_test.go
+++ b/admin/commands/inventory/add_service_mongodb_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_service_mysql.go b/admin/commands/inventory/add_service_mysql.go
index 7b13ba8514..ad05f1f057 100644
--- a/admin/commands/inventory/add_service_mysql.go
+++ b/admin/commands/inventory/add_service_mysql.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_service_mysql_test.go b/admin/commands/inventory/add_service_mysql_test.go
index 0d9f02642a..2867984f19 100644
--- a/admin/commands/inventory/add_service_mysql_test.go
+++ b/admin/commands/inventory/add_service_mysql_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_service_postgres_test.go b/admin/commands/inventory/add_service_postgres_test.go
index 6e1927a98c..027d47aba6 100644
--- a/admin/commands/inventory/add_service_postgres_test.go
+++ b/admin/commands/inventory/add_service_postgres_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_service_postgresql.go b/admin/commands/inventory/add_service_postgresql.go
index ac94fc97a6..992c3883af 100644
--- a/admin/commands/inventory/add_service_postgresql.go
+++ b/admin/commands/inventory/add_service_postgresql.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_service_proxysql.go b/admin/commands/inventory/add_service_proxysql.go
index e1db402313..60f50ea6cc 100644
--- a/admin/commands/inventory/add_service_proxysql.go
+++ b/admin/commands/inventory/add_service_proxysql.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/add_service_proxysql_test.go b/admin/commands/inventory/add_service_proxysql_test.go
index 2749b147df..6b2e2ac2e0 100644
--- a/admin/commands/inventory/add_service_proxysql_test.go
+++ b/admin/commands/inventory/add_service_proxysql_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/inventory.go b/admin/commands/inventory/inventory.go
index b45ef031f9..8de367d9f1 100644
--- a/admin/commands/inventory/inventory.go
+++ b/admin/commands/inventory/inventory.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/list_agents.go b/admin/commands/inventory/list_agents.go
index 3234b65b5a..22ffc6da64 100644
--- a/admin/commands/inventory/list_agents.go
+++ b/admin/commands/inventory/list_agents.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/list_nodes.go b/admin/commands/inventory/list_nodes.go
index 4f01842e02..e9febcd072 100644
--- a/admin/commands/inventory/list_nodes.go
+++ b/admin/commands/inventory/list_nodes.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/list_services.go b/admin/commands/inventory/list_services.go
index 15d5fb3269..d3808fb8b8 100644
--- a/admin/commands/inventory/list_services.go
+++ b/admin/commands/inventory/list_services.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/remove_agent.go b/admin/commands/inventory/remove_agent.go
index 36e3e6a901..ff04ba8c02 100644
--- a/admin/commands/inventory/remove_agent.go
+++ b/admin/commands/inventory/remove_agent.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/remove_node.go b/admin/commands/inventory/remove_node.go
index 9b1fa9f87a..6184a5974b 100644
--- a/admin/commands/inventory/remove_node.go
+++ b/admin/commands/inventory/remove_node.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/inventory/remove_service.go b/admin/commands/inventory/remove_service.go
index eb15114de3..551a28ca79 100644
--- a/admin/commands/inventory/remove_service.go
+++ b/admin/commands/inventory/remove_service.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/list.go b/admin/commands/list.go
index d508e9de02..128cd1841f 100644
--- a/admin/commands/list.go
+++ b/admin/commands/list.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/list_test.go b/admin/commands/list_test.go
index df3e279801..2eb4406b4c 100644
--- a/admin/commands/list_test.go
+++ b/admin/commands/list_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/management/add.go b/admin/commands/management/add.go
index 59c623fe3f..e69826e8cb 100644
--- a/admin/commands/management/add.go
+++ b/admin/commands/management/add.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/management/add_external.go b/admin/commands/management/add_external.go
index a65f9f5582..0b9ee64ff4 100644
--- a/admin/commands/management/add_external.go
+++ b/admin/commands/management/add_external.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/management/add_external_serverless.go b/admin/commands/management/add_external_serverless.go
index f9893caa40..f7a7d08c0e 100644
--- a/admin/commands/management/add_external_serverless.go
+++ b/admin/commands/management/add_external_serverless.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/management/add_external_test.go b/admin/commands/management/add_external_test.go
index e06cf6e56d..635f74c813 100644
--- a/admin/commands/management/add_external_test.go
+++ b/admin/commands/management/add_external_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/management/add_haproxy.go b/admin/commands/management/add_haproxy.go
index 36ff6ba026..b6e7c556a6 100644
--- a/admin/commands/management/add_haproxy.go
+++ b/admin/commands/management/add_haproxy.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/management/add_haproxy_test.go b/admin/commands/management/add_haproxy_test.go
index 7e7c5e9299..3f352cd11a 100644
--- a/admin/commands/management/add_haproxy_test.go
+++ b/admin/commands/management/add_haproxy_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/management/add_mongodb.go b/admin/commands/management/add_mongodb.go
index bb455df47d..96af140476 100644
--- a/admin/commands/management/add_mongodb.go
+++ b/admin/commands/management/add_mongodb.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/management/add_mongodb_test.go b/admin/commands/management/add_mongodb_test.go
index c0b9c5424c..53b3622e13 100644
--- a/admin/commands/management/add_mongodb_test.go
+++ b/admin/commands/management/add_mongodb_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/management/add_mysql.go b/admin/commands/management/add_mysql.go
index 13e5cd24ba..08d5fc537d 100644
--- a/admin/commands/management/add_mysql.go
+++ b/admin/commands/management/add_mysql.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/management/add_mysql_test.go b/admin/commands/management/add_mysql_test.go
index ce6e74c4d2..400fbced84 100644
--- a/admin/commands/management/add_mysql_test.go
+++ b/admin/commands/management/add_mysql_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/management/add_postgresql.go b/admin/commands/management/add_postgresql.go
index af61b7a9a4..ca5244183e 100644
--- a/admin/commands/management/add_postgresql.go
+++ b/admin/commands/management/add_postgresql.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/management/add_proxysql.go b/admin/commands/management/add_proxysql.go
index dd4bd8d957..f02a11a5b3 100644
--- a/admin/commands/management/add_proxysql.go
+++ b/admin/commands/management/add_proxysql.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/management/add_test.go b/admin/commands/management/add_test.go
index 58f1e3d62a..72fe768f50 100644
--- a/admin/commands/management/add_test.go
+++ b/admin/commands/management/add_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/management/management.go b/admin/commands/management/management.go
index 5de74c8f43..13398ca7db 100644
--- a/admin/commands/management/management.go
+++ b/admin/commands/management/management.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/management/register.go b/admin/commands/management/register.go
index 95b3bfe98a..93e16cd2d8 100644
--- a/admin/commands/management/register.go
+++ b/admin/commands/management/register.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/management/remove.go b/admin/commands/management/remove.go
index 77575aa849..94b1107e82 100644
--- a/admin/commands/management/remove.go
+++ b/admin/commands/management/remove.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/management/unregister.go b/admin/commands/management/unregister.go
index 2b1a751ec8..7632b34433 100644
--- a/admin/commands/management/unregister.go
+++ b/admin/commands/management/unregister.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/pmm/client/base.go b/admin/commands/pmm/client/base.go
index 24da73a78d..b0546f0646 100644
--- a/admin/commands/pmm/client/base.go
+++ b/admin/commands/pmm/client/base.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/pmm/client/install.go b/admin/commands/pmm/client/install.go
index 391d810a43..baaa9c6689 100644
--- a/admin/commands/pmm/client/install.go
+++ b/admin/commands/pmm/client/install.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/pmm/client/upgrade.go b/admin/commands/pmm/client/upgrade.go
index 9b7fef7480..b61c39c5bc 100644
--- a/admin/commands/pmm/client/upgrade.go
+++ b/admin/commands/pmm/client/upgrade.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/pmm/common/shutdown_result.go b/admin/commands/pmm/common/shutdown_result.go
index f31a7c6a9a..1a53faa94d 100644
--- a/admin/commands/pmm/common/shutdown_result.go
+++ b/admin/commands/pmm/common/shutdown_result.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/pmm/server/base.go b/admin/commands/pmm/server/base.go
index 795be8f5f8..b600baa843 100644
--- a/admin/commands/pmm/server/base.go
+++ b/admin/commands/pmm/server/base.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/pmm/server/docker/base.go b/admin/commands/pmm/server/docker/base.go
index b3e67bf930..32a16a82b5 100644
--- a/admin/commands/pmm/server/docker/base.go
+++ b/admin/commands/pmm/server/docker/base.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/pmm/server/docker/base_test.go b/admin/commands/pmm/server/docker/base_test.go
index 90a366f53e..cc1b042cb4 100644
--- a/admin/commands/pmm/server/docker/base_test.go
+++ b/admin/commands/pmm/server/docker/base_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/pmm/server/docker/common.go b/admin/commands/pmm/server/docker/common.go
index d720203875..d7431fac67 100644
--- a/admin/commands/pmm/server/docker/common.go
+++ b/admin/commands/pmm/server/docker/common.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/pmm/server/docker/deps.go b/admin/commands/pmm/server/docker/deps.go
index 45664aa57b..f87ce886c6 100644
--- a/admin/commands/pmm/server/docker/deps.go
+++ b/admin/commands/pmm/server/docker/deps.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/pmm/server/docker/install.go b/admin/commands/pmm/server/docker/install.go
index 00c4a9f0e9..eec6e3df77 100644
--- a/admin/commands/pmm/server/docker/install.go
+++ b/admin/commands/pmm/server/docker/install.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/pmm/server/docker/install_test.go b/admin/commands/pmm/server/docker/install_test.go
index 472e06f0a4..0a5721b7b5 100644
--- a/admin/commands/pmm/server/docker/install_test.go
+++ b/admin/commands/pmm/server/docker/install_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/pmm/server/docker/upgrade.go b/admin/commands/pmm/server/docker/upgrade.go
index 31e7ebeff9..c8ce3a419b 100644
--- a/admin/commands/pmm/server/docker/upgrade.go
+++ b/admin/commands/pmm/server/docker/upgrade.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/pmm/server/docker/upgrade_test.go b/admin/commands/pmm/server/docker/upgrade_test.go
index e9d9e04099..ea3186bd74 100644
--- a/admin/commands/pmm/server/docker/upgrade_test.go
+++ b/admin/commands/pmm/server/docker/upgrade_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/status.go b/admin/commands/status.go
index 9bce4969f3..b46281f068 100644
--- a/admin/commands/status.go
+++ b/admin/commands/status.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/status_test.go b/admin/commands/status_test.go
index c2426d9319..d83d9def8e 100644
--- a/admin/commands/status_test.go
+++ b/admin/commands/status_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/summary.go b/admin/commands/summary.go
index 998f177d13..270d7b7892 100644
--- a/admin/commands/summary.go
+++ b/admin/commands/summary.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/summary_test.go b/admin/commands/summary_test.go
index 5d84d4ea6c..3ce52965b7 100644
--- a/admin/commands/summary_test.go
+++ b/admin/commands/summary_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/commands/version.go b/admin/commands/version.go
index 1c6194cebb..4e229c62a2 100644
--- a/admin/commands/version.go
+++ b/admin/commands/version.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/helpers/helpers.go b/admin/helpers/helpers.go
index 26abe42e5d..4f90c21ff7 100644
--- a/admin/helpers/helpers.go
+++ b/admin/helpers/helpers.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/logger/text_formatter.go b/admin/logger/text_formatter.go
index 9c992bbe2e..41a722dd19 100644
--- a/admin/logger/text_formatter.go
+++ b/admin/logger/text_formatter.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/pkg/bubbles/progress/size.go b/admin/pkg/bubbles/progress/size.go
index 2dc15d05d5..8384268baa 100644
--- a/admin/pkg/bubbles/progress/size.go
+++ b/admin/pkg/bubbles/progress/size.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/pkg/bubbles/styles/styles.go b/admin/pkg/bubbles/styles/styles.go
index fad7bfdf87..b041119eac 100644
--- a/admin/pkg/bubbles/styles/styles.go
+++ b/admin/pkg/bubbles/styles/styles.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/pkg/client/client.go b/admin/pkg/client/client.go
index cc57ffa3e7..fda402a668 100644
--- a/admin/pkg/client/client.go
+++ b/admin/pkg/client/client.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/pkg/client/tarball/tarball.go b/admin/pkg/client/tarball/tarball.go
index 39ce808ff5..f9651f8bc3 100644
--- a/admin/pkg/client/tarball/tarball.go
+++ b/admin/pkg/client/tarball/tarball.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/pkg/common/common.go b/admin/pkg/common/common.go
index e9611c1474..6e6f3fde15 100644
--- a/admin/pkg/common/common.go
+++ b/admin/pkg/common/common.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/pkg/common/distribution.go b/admin/pkg/common/distribution.go
index 121cb2da74..0606480fe4 100644
--- a/admin/pkg/common/distribution.go
+++ b/admin/pkg/common/distribution.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/pkg/docker/docker.go b/admin/pkg/docker/docker.go
index 04d7fdb7ac..9fe875ab51 100644
--- a/admin/pkg/docker/docker.go
+++ b/admin/pkg/docker/docker.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/admin/pkg/docker/pull_image.go b/admin/pkg/docker/pull_image.go
index 8265d990c6..e28824084b 100644
--- a/admin/pkg/docker/pull_image.go
+++ b/admin/pkg/docker/pull_image.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agentlocal/agent_local.go b/agent/agentlocal/agent_local.go
index 60a6e3325f..d23f2a8224 100644
--- a/agent/agentlocal/agent_local.go
+++ b/agent/agentlocal/agent_local.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -100,7 +100,7 @@ func NewServer(cfg configGetReloader, supervisor supervisor, client client, conf
// Run runs gRPC and JSON servers with API and debug endpoints until ctx is canceled.
//
// Run exits when ctx is canceled, or when a request to reload configuration is received.
-func (s *Server) Run(ctx context.Context) {
+func (s *Server) Run(ctx context.Context, reloadCh chan bool) {
defer s.l.Info("Done.")
serverCtx, serverCancel := context.WithCancel(ctx)
@@ -125,8 +125,10 @@ func (s *Server) Run(ctx context.Context) {
}()
select {
- case <-ctx.Done():
case <-s.reload:
+ s.l.Debug("Agent reload triggered")
+ reloadCh <- true
+ case <-ctx.Done():
}
serverCancel()
diff --git a/agent/agentlocal/agent_local_test.go b/agent/agentlocal/agent_local_test.go
index eb151042e4..858e834072 100644
--- a/agent/agentlocal/agent_local_test.go
+++ b/agent/agentlocal/agent_local_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agentlocal/deps.go b/agent/agentlocal/deps.go
index b948131412..a727541b82 100644
--- a/agent/agentlocal/deps.go
+++ b/agent/agentlocal/deps.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/agents.go b/agent/agents/agents.go
index 5a0648107f..b0ddb0aba4 100644
--- a/agent/agents/agents.go
+++ b/agent/agents/agents.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/agents_test.go b/agent/agents/agents_test.go
index 9801ca46ff..49a11ecaf3 100644
--- a/agent/agents/agents_test.go
+++ b/agent/agents/agents_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/cache/cache.go b/agent/agents/cache/cache.go
index f7aba164a5..fd3708049a 100644
--- a/agent/agents/cache/cache.go
+++ b/agent/agents/cache/cache.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/cache/cache_test.go b/agent/agents/cache/cache_test.go
index fd82ab594a..6299f736bb 100644
--- a/agent/agents/cache/cache_test.go
+++ b/agent/agents/cache/cache_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/cache/metrics.go b/agent/agents/cache/metrics.go
index 5d08951a81..c720e5efef 100644
--- a/agent/agents/cache/metrics.go
+++ b/agent/agents/cache/metrics.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mongodb/internal/profiler/aggregator/aggregator.go b/agent/agents/mongodb/internal/profiler/aggregator/aggregator.go
index 9a2bd129e1..9bb033f840 100644
--- a/agent/agents/mongodb/internal/profiler/aggregator/aggregator.go
+++ b/agent/agents/mongodb/internal/profiler/aggregator/aggregator.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mongodb/internal/profiler/aggregator/aggregator_test.go b/agent/agents/mongodb/internal/profiler/aggregator/aggregator_test.go
index d902885724..6bd641f012 100644
--- a/agent/agents/mongodb/internal/profiler/aggregator/aggregator_test.go
+++ b/agent/agents/mongodb/internal/profiler/aggregator/aggregator_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mongodb/internal/profiler/collector/collector.go b/agent/agents/mongodb/internal/profiler/collector/collector.go
index 0668832223..1ac997d3e9 100644
--- a/agent/agents/mongodb/internal/profiler/collector/collector.go
+++ b/agent/agents/mongodb/internal/profiler/collector/collector.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mongodb/internal/profiler/collector/collector_test.go b/agent/agents/mongodb/internal/profiler/collector/collector_test.go
index e3dcaad8f2..ba3b22eeed 100644
--- a/agent/agents/mongodb/internal/profiler/collector/collector_test.go
+++ b/agent/agents/mongodb/internal/profiler/collector/collector_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mongodb/internal/profiler/monitor.go b/agent/agents/mongodb/internal/profiler/monitor.go
index 1390e6ce60..0dfe03b99b 100644
--- a/agent/agents/mongodb/internal/profiler/monitor.go
+++ b/agent/agents/mongodb/internal/profiler/monitor.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mongodb/internal/profiler/monitors.go b/agent/agents/mongodb/internal/profiler/monitors.go
index 400c37e2a0..1ad90db4bd 100644
--- a/agent/agents/mongodb/internal/profiler/monitors.go
+++ b/agent/agents/mongodb/internal/profiler/monitors.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mongodb/internal/profiler/parser/parser.go b/agent/agents/mongodb/internal/profiler/parser/parser.go
index 12b475f9c8..e926a66c0d 100644
--- a/agent/agents/mongodb/internal/profiler/parser/parser.go
+++ b/agent/agents/mongodb/internal/profiler/parser/parser.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mongodb/internal/profiler/parser/parser_test.go b/agent/agents/mongodb/internal/profiler/parser/parser_test.go
index f46bf36607..834fe7cc19 100644
--- a/agent/agents/mongodb/internal/profiler/parser/parser_test.go
+++ b/agent/agents/mongodb/internal/profiler/parser/parser_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mongodb/internal/profiler/profiler.go b/agent/agents/mongodb/internal/profiler/profiler.go
index 64c98d2e2d..66a6c6a967 100644
--- a/agent/agents/mongodb/internal/profiler/profiler.go
+++ b/agent/agents/mongodb/internal/profiler/profiler.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mongodb/internal/profiler/profiler_test.go b/agent/agents/mongodb/internal/profiler/profiler_test.go
index a050820ecf..304d069ada 100644
--- a/agent/agents/mongodb/internal/profiler/profiler_test.go
+++ b/agent/agents/mongodb/internal/profiler/profiler_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mongodb/internal/profiler/sender/sender.go b/agent/agents/mongodb/internal/profiler/sender/sender.go
index 7e36ba7904..abfe1f8d62 100644
--- a/agent/agents/mongodb/internal/profiler/sender/sender.go
+++ b/agent/agents/mongodb/internal/profiler/sender/sender.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mongodb/internal/profiler/sender/senter_test.go b/agent/agents/mongodb/internal/profiler/sender/senter_test.go
index 162625a79b..0b87235f7d 100644
--- a/agent/agents/mongodb/internal/profiler/sender/senter_test.go
+++ b/agent/agents/mongodb/internal/profiler/sender/senter_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mongodb/internal/report/report.go b/agent/agents/mongodb/internal/report/report.go
index 85d35f7ee8..ef0c2c2337 100644
--- a/agent/agents/mongodb/internal/report/report.go
+++ b/agent/agents/mongodb/internal/report/report.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mongodb/internal/report/report_test.go b/agent/agents/mongodb/internal/report/report_test.go
index 3bef3e859c..534f845521 100644
--- a/agent/agents/mongodb/internal/report/report_test.go
+++ b/agent/agents/mongodb/internal/report/report_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mongodb/mongodb.go b/agent/agents/mongodb/mongodb.go
index 6f34fc74be..f3a0dc8d40 100644
--- a/agent/agents/mongodb/mongodb.go
+++ b/agent/agents/mongodb/mongodb.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mongodb/mongodb_test.go b/agent/agents/mongodb/mongodb_test.go
index cc8a10e668..8cb15a336e 100644
--- a/agent/agents/mongodb/mongodb_test.go
+++ b/agent/agents/mongodb/mongodb_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mysql/perfschema/history.go b/agent/agents/mysql/perfschema/history.go
index 5f35ec9a2b..1e3faf25fa 100644
--- a/agent/agents/mysql/perfschema/history.go
+++ b/agent/agents/mysql/perfschema/history.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mysql/perfschema/models.go b/agent/agents/mysql/perfschema/models.go
index 6bfe62b19c..721f76ff38 100644
--- a/agent/agents/mysql/perfschema/models.go
+++ b/agent/agents/mysql/perfschema/models.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mysql/perfschema/perfschema.go b/agent/agents/mysql/perfschema/perfschema.go
index 2ee59f83c9..a83010ea27 100644
--- a/agent/agents/mysql/perfschema/perfschema.go
+++ b/agent/agents/mysql/perfschema/perfschema.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mysql/perfschema/perfschema_test.go b/agent/agents/mysql/perfschema/perfschema_test.go
index 9db43c60ab..3351673af8 100644
--- a/agent/agents/mysql/perfschema/perfschema_test.go
+++ b/agent/agents/mysql/perfschema/perfschema_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mysql/perfschema/summaries.go b/agent/agents/mysql/perfschema/summaries.go
index ffd7afd9aa..448b2808a8 100644
--- a/agent/agents/mysql/perfschema/summaries.go
+++ b/agent/agents/mysql/perfschema/summaries.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mysql/slowlog/parser/continuous_file_reader.go b/agent/agents/mysql/slowlog/parser/continuous_file_reader.go
index 7904d08739..04be72e572 100644
--- a/agent/agents/mysql/slowlog/parser/continuous_file_reader.go
+++ b/agent/agents/mysql/slowlog/parser/continuous_file_reader.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mysql/slowlog/parser/continuous_file_reader_test.go b/agent/agents/mysql/slowlog/parser/continuous_file_reader_test.go
index d2190bc7e9..f07dfb10d7 100644
--- a/agent/agents/mysql/slowlog/parser/continuous_file_reader_test.go
+++ b/agent/agents/mysql/slowlog/parser/continuous_file_reader_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mysql/slowlog/parser/logger.go b/agent/agents/mysql/slowlog/parser/logger.go
index 689ad527ed..2dd916f83c 100644
--- a/agent/agents/mysql/slowlog/parser/logger.go
+++ b/agent/agents/mysql/slowlog/parser/logger.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mysql/slowlog/parser/logger_test.go b/agent/agents/mysql/slowlog/parser/logger_test.go
index 49fbf171f9..40e9b79f08 100644
--- a/agent/agents/mysql/slowlog/parser/logger_test.go
+++ b/agent/agents/mysql/slowlog/parser/logger_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mysql/slowlog/parser/parser.go b/agent/agents/mysql/slowlog/parser/parser.go
index e7cae9ca1e..514dd8e937 100644
--- a/agent/agents/mysql/slowlog/parser/parser.go
+++ b/agent/agents/mysql/slowlog/parser/parser.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mysql/slowlog/parser/parser_bench_test.go b/agent/agents/mysql/slowlog/parser/parser_bench_test.go
index 624123dd98..26f466ddc0 100644
--- a/agent/agents/mysql/slowlog/parser/parser_bench_test.go
+++ b/agent/agents/mysql/slowlog/parser/parser_bench_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mysql/slowlog/parser/parser_fuzz.go b/agent/agents/mysql/slowlog/parser/parser_fuzz.go
index c19c366420..63e8d46fd9 100644
--- a/agent/agents/mysql/slowlog/parser/parser_fuzz.go
+++ b/agent/agents/mysql/slowlog/parser/parser_fuzz.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mysql/slowlog/parser/parser_test.go b/agent/agents/mysql/slowlog/parser/parser_test.go
index 2e30d4db9f..8031a327ef 100644
--- a/agent/agents/mysql/slowlog/parser/parser_test.go
+++ b/agent/agents/mysql/slowlog/parser/parser_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mysql/slowlog/parser/reader.go b/agent/agents/mysql/slowlog/parser/reader.go
index 89c645bcab..ae47a979d5 100644
--- a/agent/agents/mysql/slowlog/parser/reader.go
+++ b/agent/agents/mysql/slowlog/parser/reader.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mysql/slowlog/parser/simple_file_reader.go b/agent/agents/mysql/slowlog/parser/simple_file_reader.go
index 38f6ab0919..0d32fdad18 100644
--- a/agent/agents/mysql/slowlog/parser/simple_file_reader.go
+++ b/agent/agents/mysql/slowlog/parser/simple_file_reader.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mysql/slowlog/slowlog.go b/agent/agents/mysql/slowlog/slowlog.go
index 05081a68f9..398c117d3f 100644
--- a/agent/agents/mysql/slowlog/slowlog.go
+++ b/agent/agents/mysql/slowlog/slowlog.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/mysql/slowlog/slowlog_test.go b/agent/agents/mysql/slowlog/slowlog_test.go
index e0c78f0208..f049ef1a66 100644
--- a/agent/agents/mysql/slowlog/slowlog_test.go
+++ b/agent/agents/mysql/slowlog/slowlog_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/noop/noop.go b/agent/agents/noop/noop.go
index 3941eb5aed..d10817175b 100644
--- a/agent/agents/noop/noop.go
+++ b/agent/agents/noop/noop.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/noop/noop_test.go b/agent/agents/noop/noop_test.go
index 712cb1a246..ccce01930d 100644
--- a/agent/agents/noop/noop_test.go
+++ b/agent/agents/noop/noop_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/postgres/parser/parser.go b/agent/agents/postgres/parser/parser.go
index a0d67220cc..f57d0918cc 100644
--- a/agent/agents/postgres/parser/parser.go
+++ b/agent/agents/postgres/parser/parser.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/postgres/parser/parser_fuzz.go b/agent/agents/postgres/parser/parser_fuzz.go
index d96ec2fbf1..ef41184880 100644
--- a/agent/agents/postgres/parser/parser_fuzz.go
+++ b/agent/agents/postgres/parser/parser_fuzz.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/postgres/parser/parser_test.go b/agent/agents/postgres/parser/parser_test.go
index 4f4243f56d..289765d567 100644
--- a/agent/agents/postgres/parser/parser_test.go
+++ b/agent/agents/postgres/parser/parser_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/postgres/pgstatmonitor/models.go b/agent/agents/postgres/pgstatmonitor/models.go
index 218fb368ec..db1a502340 100644
--- a/agent/agents/postgres/pgstatmonitor/models.go
+++ b/agent/agents/postgres/pgstatmonitor/models.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/postgres/pgstatmonitor/pgstatmonitor.go b/agent/agents/postgres/pgstatmonitor/pgstatmonitor.go
index 22f84a0f74..4545595db6 100644
--- a/agent/agents/postgres/pgstatmonitor/pgstatmonitor.go
+++ b/agent/agents/postgres/pgstatmonitor/pgstatmonitor.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/postgres/pgstatmonitor/pgstatmonitor_models.go b/agent/agents/postgres/pgstatmonitor/pgstatmonitor_models.go
index bd67c58502..261f5d4a4b 100644
--- a/agent/agents/postgres/pgstatmonitor/pgstatmonitor_models.go
+++ b/agent/agents/postgres/pgstatmonitor/pgstatmonitor_models.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/postgres/pgstatmonitor/pgstatmonitor_test.go b/agent/agents/postgres/pgstatmonitor/pgstatmonitor_test.go
index 9e99e1b9bc..2226e04e8b 100644
--- a/agent/agents/postgres/pgstatmonitor/pgstatmonitor_test.go
+++ b/agent/agents/postgres/pgstatmonitor/pgstatmonitor_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/postgres/pgstatmonitor/stat_monitor_cache.go b/agent/agents/postgres/pgstatmonitor/stat_monitor_cache.go
index 0b3801cd9d..0744b1b18d 100644
--- a/agent/agents/postgres/pgstatmonitor/stat_monitor_cache.go
+++ b/agent/agents/postgres/pgstatmonitor/stat_monitor_cache.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/postgres/pgstatmonitor/stat_monitor_cache_test.go b/agent/agents/postgres/pgstatmonitor/stat_monitor_cache_test.go
index bfaf963560..900ca13f21 100644
--- a/agent/agents/postgres/pgstatmonitor/stat_monitor_cache_test.go
+++ b/agent/agents/postgres/pgstatmonitor/stat_monitor_cache_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/postgres/pgstatstatements/models.go b/agent/agents/postgres/pgstatstatements/models.go
index 8b7b52a5aa..00746732fe 100644
--- a/agent/agents/postgres/pgstatstatements/models.go
+++ b/agent/agents/postgres/pgstatstatements/models.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/postgres/pgstatstatements/pgstatstatements.go b/agent/agents/postgres/pgstatstatements/pgstatstatements.go
index d880eebab8..4a912b7599 100644
--- a/agent/agents/postgres/pgstatstatements/pgstatstatements.go
+++ b/agent/agents/postgres/pgstatstatements/pgstatstatements.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/postgres/pgstatstatements/pgstatstatements_test.go b/agent/agents/postgres/pgstatstatements/pgstatstatements_test.go
index eac93e5d3a..36b0740417 100644
--- a/agent/agents/postgres/pgstatstatements/pgstatstatements_test.go
+++ b/agent/agents/postgres/pgstatstatements/pgstatstatements_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/postgres/pgstatstatements/utils.go b/agent/agents/postgres/pgstatstatements/utils.go
index 71c59b5a06..7c175d9547 100644
--- a/agent/agents/postgres/pgstatstatements/utils.go
+++ b/agent/agents/postgres/pgstatstatements/utils.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/process/process.go b/agent/agents/process/process.go
index 3d47680094..2ebddccf13 100644
--- a/agent/agents/process/process.go
+++ b/agent/agents/process/process.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/process/process_child.go b/agent/agents/process/process_child.go
index d1ed2b3c19..3aab4cd4e7 100644
--- a/agent/agents/process/process_child.go
+++ b/agent/agents/process/process_child.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/process/process_export.go b/agent/agents/process/process_export.go
index 24fb606ffa..b8ea6a8951 100644
--- a/agent/agents/process/process_export.go
+++ b/agent/agents/process/process_export.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/process/process_logger.go b/agent/agents/process/process_logger.go
index 048990c1d3..865a12eaf1 100644
--- a/agent/agents/process/process_logger.go
+++ b/agent/agents/process/process_logger.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/process/process_logger_test.go b/agent/agents/process/process_logger_test.go
index ccf7a53cf2..5312f6b610 100644
--- a/agent/agents/process/process_logger_test.go
+++ b/agent/agents/process/process_logger_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/process/process_noterm.go b/agent/agents/process/process_noterm.go
index f083b19b1c..b221d85afd 100644
--- a/agent/agents/process/process_noterm.go
+++ b/agent/agents/process/process_noterm.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/process/process_test.go b/agent/agents/process/process_test.go
index 719d23138e..d40d555e24 100644
--- a/agent/agents/process/process_test.go
+++ b/agent/agents/process/process_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/supervisor/deps.go b/agent/agents/supervisor/deps.go
index 9058ba6394..c4a6db3397 100644
--- a/agent/agents/supervisor/deps.go
+++ b/agent/agents/supervisor/deps.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/supervisor/ports_registry.go b/agent/agents/supervisor/ports_registry.go
index ffeaac4641..53f04a37ee 100644
--- a/agent/agents/supervisor/ports_registry.go
+++ b/agent/agents/supervisor/ports_registry.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/supervisor/ports_registry_test.go b/agent/agents/supervisor/ports_registry_test.go
index 4a8e4cc5d7..4528a35793 100644
--- a/agent/agents/supervisor/ports_registry_test.go
+++ b/agent/agents/supervisor/ports_registry_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/supervisor/supervisor.go b/agent/agents/supervisor/supervisor.go
index 2a481b9238..d426980942 100644
--- a/agent/agents/supervisor/supervisor.go
+++ b/agent/agents/supervisor/supervisor.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/agents/supervisor/supervisor_test.go b/agent/agents/supervisor/supervisor_test.go
index 33673f0462..5811e34504 100644
--- a/agent/agents/supervisor/supervisor_test.go
+++ b/agent/agents/supervisor/supervisor_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/client/basic_auth.go b/agent/client/basic_auth.go
index ae38d59a5b..5055250fc9 100644
--- a/agent/client/basic_auth.go
+++ b/agent/client/basic_auth.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/client/channel/channel.go b/agent/client/channel/channel.go
index f888043e2f..9ca8634aff 100644
--- a/agent/client/channel/channel.go
+++ b/agent/client/channel/channel.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/client/channel/channel_test.go b/agent/client/channel/channel_test.go
index 510423378f..5f38ed5b0e 100644
--- a/agent/client/channel/channel_test.go
+++ b/agent/client/channel/channel_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/client/client.go b/agent/client/client.go
index 4895879b66..0068324e36 100644
--- a/agent/client/client.go
+++ b/agent/client/client.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -211,6 +211,9 @@ func (c *Client) processActionResults(ctx context.Context) {
for {
select {
case result := <-c.runner.ActionsResults():
+ if result == nil {
+ continue
+ }
resp, err := c.sendAndWaitResponse(result)
if err != nil {
c.l.Error(err)
@@ -230,6 +233,9 @@ func (c *Client) processJobsResults(ctx context.Context) {
for {
select {
case message := <-c.runner.JobsMessages():
+ if message == nil {
+ continue
+ }
c.send(&models.AgentResponse{
ID: 0, // Jobs send messages that don't require any responses, so we can leave message ID blank.
Payload: message,
@@ -245,7 +251,10 @@ func (c *Client) processSupervisorRequests(ctx context.Context) {
for {
select {
case state := <-c.supervisor.Changes():
- resp, err := c.sendAndWaitResponse(state)
+ if state == nil {
+ continue
+ }
+ resp, err := c.sendAndWaitResponse(state)
if err != nil {
c.l.Error(err)
continue
@@ -264,7 +273,10 @@ func (c *Client) processQANRequests(ctx context.Context) {
for {
select {
case collect := <-c.supervisor.QANRequests():
- resp, err := c.sendAndWaitResponse(collect)
+ if collect == nil {
+ continue
+ }
+ resp, err := c.sendAndWaitResponse(collect)
if err != nil {
c.l.Error(err)
continue
diff --git a/agent/client/client_test.go b/agent/client/client_test.go
index c51b3dbdc6..c7cbc8ac6e 100644
--- a/agent/client/client_test.go
+++ b/agent/client/client_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/client/deps.go b/agent/client/deps.go
index 4310931445..21ecbadf43 100644
--- a/agent/client/deps.go
+++ b/agent/client/deps.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/client/pbm.go b/agent/client/pbm.go
index 3534b9d76f..d4191d166b 100644
--- a/agent/client/pbm.go
+++ b/agent/client/pbm.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/client/version.go b/agent/client/version.go
index 7b5961ca0c..b2a7604394 100644
--- a/agent/client/version.go
+++ b/agent/client/version.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/cmd/pmm-agent-entrypoint/main.go b/agent/cmd/pmm-agent-entrypoint/main.go
index 001d7208a8..29205c30d4 100644
--- a/agent/cmd/pmm-agent-entrypoint/main.go
+++ b/agent/cmd/pmm-agent-entrypoint/main.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/commands/clients.go b/agent/commands/clients.go
index fd45ebcb7e..a1552c7a5f 100644
--- a/agent/commands/clients.go
+++ b/agent/commands/clients.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/commands/run.go b/agent/commands/run.go
index 7ec0ae3ba2..eae4ef781d 100644
--- a/agent/commands/run.go
+++ b/agent/commands/run.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -40,14 +40,13 @@ import (
// Run implements `pmm-agent run` default command.
func Run() {
- var cfg *config.Config
- l := logrus.WithField("component", "main")
- ctx, cancel := context.WithCancel(context.Background())
- defer l.Info("Done.")
-
const initServerLogsMaxLength = 32 // store logs before load configuration
logStore := tailog.NewStore(initServerLogsMaxLength)
logrus.SetOutput(io.MultiWriter(os.Stderr, logStore))
+ l := logrus.WithField("component", "main")
+ rootCtx, rootCancel := context.WithCancel(context.Background())
+
+ defer l.Info("Done.")
// handle termination signals
signals := make(chan os.Signal, 1)
@@ -56,73 +55,90 @@ func Run() {
s := <-signals
signal.Stop(signals)
l.Warnf("Got %s, shutting down...", unix.SignalName(s.(unix.Signal))) //nolint:forcetypeassert
- if cfg != nil {
- cleanupTmp(cfg.Paths.TempDir, l)
- }
- cancel()
+ rootCancel()
}()
- configStorage := config.NewStorage(nil)
- configFilepath, err := configStorage.Reload(l)
- if err != nil {
- l.Fatalf("Failed to load configuration: %s.", err)
- }
-
- cfg = configStorage.Get()
-
- cleanupTmp(cfg.Paths.TempDir, l)
- connectionUptimeService := connectionuptime.NewService(cfg.WindowConnectedTime)
- connectionUptimeService.RunCleanupGoroutine(ctx)
v := versioner.New(&versioner.RealExecFunctions{})
- supervisor := supervisor.NewSupervisor(ctx, v, configStorage)
- connectionChecker := connectionchecker.New(configStorage)
- r := runner.New(cfg.RunnerCapacity)
- client := client.New(configStorage, supervisor, r, connectionChecker, v, connectionUptimeService, logStore)
- localServer := agentlocal.NewServer(configStorage, supervisor, client, configFilepath, logStore)
-
- var wg sync.WaitGroup
- wg.Add(3)
- go func() {
- defer wg.Done()
- supervisor.Run(ctx)
- cancel()
- }()
- go func() {
- defer wg.Done()
- r.Run(ctx)
- cancel()
- }()
- go func() {
- defer wg.Done()
- localServer.Run(ctx)
- cancel()
- }()
- client.Run(ctx)
- for {
- _, err = configStorage.Reload(l)
- if err != nil {
- l.Fatalf("Failed to load configuration: %s.", err)
- }
+ configStorage, configFilepath := prepareConfig(l)
+ for {
+ ctx, cancel := context.WithCancel(rootCtx)
cfg := configStorage.Get()
- config.ConfigureLogger(cfg)
- logStore.Resize(cfg.LogLinesCount)
- l.Debugf("Loaded configuration: %+v", cfg)
+ prepareLogger(cfg, logStore, l)
+
+ supervisor := supervisor.NewSupervisor(ctx, v, configStorage)
+ connectionChecker := connectionchecker.New(configStorage)
+ r := runner.New(cfg.RunnerCapacity)
+ client := client.New(configStorage, supervisor, r, connectionChecker, v, prepareConnectionService(ctx, cfg), logStore)
+ localServer := agentlocal.NewServer(configStorage, supervisor, client, configFilepath, logStore)
logrus.Infof("Window check connection time is %.2f hour(s)", cfg.WindowConnectedTime.Hours())
- connectionUptimeService.SetWindowPeriod(cfg.WindowConnectedTime)
+ var wg sync.WaitGroup
+ wg.Add(3)
+ reloadCh := make(chan bool, 1)
+ go func() {
+ defer wg.Done()
+ supervisor.Run(ctx)
+ cancel()
+ }()
+ go func() {
+ defer wg.Done()
+ r.Run(ctx)
+ cancel()
+ }()
+ go func() {
+ defer wg.Done()
+ localServer.Run(ctx, reloadCh)
+ cancel()
+ }()
+ client.Run(ctx)
+
+ processClientUntilCancel(ctx, client, reloadCh)
+
+ cleanupTmp(cfg.Paths.TempDir, l)
+ client.Wait()
+ wg.Wait()
+ select {
+ case <-rootCtx.Done():
+ return
+ default:
+ }
+ }
+}
+
+func processClientUntilCancel(ctx context.Context, client *client.Client, reloadCh chan bool) {
+ for {
clientCtx, cancelClientCtx := context.WithCancel(ctx)
_ = client.Connect(clientCtx)
cancelClientCtx()
- if ctx.Err() != nil {
- break
+
+ select {
+ case <-reloadCh:
+ return
+ case <-ctx.Done():
+ return
+ default:
}
}
- client.Wait()
- wg.Wait()
+}
+
+func prepareConfig(l *logrus.Entry) (*config.Storage, string) {
+ configStorage := config.NewStorage(nil)
+ configFilepath, err := configStorage.Reload(l)
+ if err != nil {
+ l.Fatalf("Failed to load configuration: %s.", err)
+ }
+
+ return configStorage, configFilepath
+}
+
+func prepareLogger(cfg *config.Config, logStore *tailog.Store, l *logrus.Entry) {
+ config.ConfigureLogger(cfg)
+ logStore.Resize(cfg.LogLinesCount)
+ l.Debugf("Loaded configuration: %+v", cfg)
}
func cleanupTmp(tmpRoot string, log *logrus.Entry) {
@@ -139,3 +155,10 @@ func cleanupTmp(tmpRoot string, log *logrus.Entry) {
}
}
}
+
+func prepareConnectionService(ctx context.Context, cfg *config.Config) *connectionuptime.Service {
+ connectionUptimeService := connectionuptime.NewService(cfg.WindowConnectedTime)
+ connectionUptimeService.RunCleanupGoroutine(ctx)
+
+ return connectionUptimeService
+}
diff --git a/agent/commands/setup.go b/agent/commands/setup.go
index 8489a5dbf9..16db5e6fa5 100644
--- a/agent/commands/setup.go
+++ b/agent/commands/setup.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/config/config.go b/agent/config/config.go
index 4e0de3e434..82032d74c4 100644
--- a/agent/config/config.go
+++ b/agent/config/config.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/config/config_test.go b/agent/config/config_test.go
index 8d6470a32a..be2287829a 100644
--- a/agent/config/config_test.go
+++ b/agent/config/config_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/config/logger.go b/agent/config/logger.go
index 570ab0dbfa..a2930f3711 100644
--- a/agent/config/logger.go
+++ b/agent/config/logger.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -63,8 +63,6 @@ func ConfigureLogger(cfg *Config) {
logrus.SetLevel(level)
if level == logrus.TraceLevel {
- // grpclog.SetLoggerV2 is not thread-safe
-
// logrus.SetReportCaller thread-safe: https://github.com/sirupsen/logrus/issues/954
logrus.SetReportCaller(true)
}
diff --git a/agent/config/storage.go b/agent/config/storage.go
index d3c8630ee2..821d425f03 100644
--- a/agent/config/storage.go
+++ b/agent/config/storage.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/connectionchecker/connection_checker.go b/agent/connectionchecker/connection_checker.go
index 280c406844..c59ac148e8 100644
--- a/agent/connectionchecker/connection_checker.go
+++ b/agent/connectionchecker/connection_checker.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/connectionchecker/connection_checker_test.go b/agent/connectionchecker/connection_checker_test.go
index 94aef528fd..cf06e94bc7 100644
--- a/agent/connectionchecker/connection_checker_test.go
+++ b/agent/connectionchecker/connection_checker_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/connectionuptime/service.go b/agent/connectionuptime/service.go
index 5bac5c4555..304c048a58 100644
--- a/agent/connectionuptime/service.go
+++ b/agent/connectionuptime/service.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/connectionuptime/service_test.go b/agent/connectionuptime/service_test.go
index e6ddcc1c41..b244e90618 100644
--- a/agent/connectionuptime/service_test.go
+++ b/agent/connectionuptime/service_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/main.go b/agent/main.go
index 155ddae61d..7bf443c56e 100644
--- a/agent/main.go
+++ b/agent/main.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/main_test.go b/agent/main_test.go
index 4c6cd30161..e3eb03dacf 100644
--- a/agent/main_test.go
+++ b/agent/main_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/maincover_test.go b/agent/maincover_test.go
index aeecdceafc..6a751993f8 100644
--- a/agent/maincover_test.go
+++ b/agent/maincover_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/queryparser/helpers.go b/agent/queryparser/helpers.go
index 2862a2f3b0..e1277106e6 100644
--- a/agent/queryparser/helpers.go
+++ b/agent/queryparser/helpers.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/queryparser/parser.go b/agent/queryparser/parser.go
index a8e4c3e2f3..eb43d26a04 100644
--- a/agent/queryparser/parser.go
+++ b/agent/queryparser/parser.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/queryparser/parser_test.go b/agent/queryparser/parser_test.go
index 6528941277..2b453a6ba3 100644
--- a/agent/queryparser/parser_test.go
+++ b/agent/queryparser/parser_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/action.go b/agent/runner/actions/action.go
index 6ade8f3cf4..5a9625f9c8 100644
--- a/agent/runner/actions/action.go
+++ b/agent/runner/actions/action.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/common.go b/agent/runner/actions/common.go
index 44f8bb5151..e81b843d24 100644
--- a/agent/runner/actions/common.go
+++ b/agent/runner/actions/common.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/common_test.go b/agent/runner/actions/common_test.go
index ea01fd5a72..91b2494739 100644
--- a/agent/runner/actions/common_test.go
+++ b/agent/runner/actions/common_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/mongodb_explain_action.go b/agent/runner/actions/mongodb_explain_action.go
index 93eb10cedb..944572ee59 100644
--- a/agent/runner/actions/mongodb_explain_action.go
+++ b/agent/runner/actions/mongodb_explain_action.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/mongodb_explain_action_test.go b/agent/runner/actions/mongodb_explain_action_test.go
index 1b503b5ff8..1ac5fe2764 100644
--- a/agent/runner/actions/mongodb_explain_action_test.go
+++ b/agent/runner/actions/mongodb_explain_action_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/mongodb_query_admincommand_action.go b/agent/runner/actions/mongodb_query_admincommand_action.go
index c7b8e1a133..2ded20cf5e 100644
--- a/agent/runner/actions/mongodb_query_admincommand_action.go
+++ b/agent/runner/actions/mongodb_query_admincommand_action.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/mongodb_query_admincommand_action_test.go b/agent/runner/actions/mongodb_query_admincommand_action_test.go
index efc306fd77..6318594b5a 100644
--- a/agent/runner/actions/mongodb_query_admincommand_action_test.go
+++ b/agent/runner/actions/mongodb_query_admincommand_action_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/mysql_explain_action.go b/agent/runner/actions/mysql_explain_action.go
index 78e8dd3f7d..2ac3ff4ca5 100644
--- a/agent/runner/actions/mysql_explain_action.go
+++ b/agent/runner/actions/mysql_explain_action.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/mysql_explain_action_test.go b/agent/runner/actions/mysql_explain_action_test.go
index 140fb8eb43..b8e58f5b9a 100644
--- a/agent/runner/actions/mysql_explain_action_test.go
+++ b/agent/runner/actions/mysql_explain_action_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/mysql_query_select_action.go b/agent/runner/actions/mysql_query_select_action.go
index b9bdfcc52b..39833e5b11 100644
--- a/agent/runner/actions/mysql_query_select_action.go
+++ b/agent/runner/actions/mysql_query_select_action.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/mysql_query_select_action_test.go b/agent/runner/actions/mysql_query_select_action_test.go
index 30d778d3d4..e5281478d8 100644
--- a/agent/runner/actions/mysql_query_select_action_test.go
+++ b/agent/runner/actions/mysql_query_select_action_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/mysql_query_show_action.go b/agent/runner/actions/mysql_query_show_action.go
index a00f61b1bd..4081e1898e 100644
--- a/agent/runner/actions/mysql_query_show_action.go
+++ b/agent/runner/actions/mysql_query_show_action.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/mysql_query_show_action_test.go b/agent/runner/actions/mysql_query_show_action_test.go
index f2baefee7d..dd1ce37653 100644
--- a/agent/runner/actions/mysql_query_show_action_test.go
+++ b/agent/runner/actions/mysql_query_show_action_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/mysql_show_create_table_action.go b/agent/runner/actions/mysql_show_create_table_action.go
index c7fd7225a1..7ca727f2c6 100644
--- a/agent/runner/actions/mysql_show_create_table_action.go
+++ b/agent/runner/actions/mysql_show_create_table_action.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/mysql_show_create_table_action_test.go b/agent/runner/actions/mysql_show_create_table_action_test.go
index f61e7abd3a..1c5bb7eaaa 100644
--- a/agent/runner/actions/mysql_show_create_table_action_test.go
+++ b/agent/runner/actions/mysql_show_create_table_action_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/mysql_show_index_action.go b/agent/runner/actions/mysql_show_index_action.go
index d226951bed..1a2bc070fe 100644
--- a/agent/runner/actions/mysql_show_index_action.go
+++ b/agent/runner/actions/mysql_show_index_action.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/mysql_show_index_action_test.go b/agent/runner/actions/mysql_show_index_action_test.go
index 9ddf0f7ed9..00fdbf83b9 100644
--- a/agent/runner/actions/mysql_show_index_action_test.go
+++ b/agent/runner/actions/mysql_show_index_action_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/mysql_show_table_status_action.go b/agent/runner/actions/mysql_show_table_status_action.go
index 2baa53e772..1d7c5331ae 100644
--- a/agent/runner/actions/mysql_show_table_status_action.go
+++ b/agent/runner/actions/mysql_show_table_status_action.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/mysql_show_table_status_action_test.go b/agent/runner/actions/mysql_show_table_status_action_test.go
index 9c82418364..843ed282bf 100644
--- a/agent/runner/actions/mysql_show_table_status_action_test.go
+++ b/agent/runner/actions/mysql_show_table_status_action_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/postgresql_query_select_action.go b/agent/runner/actions/postgresql_query_select_action.go
index 6223aca7d3..4e21de6582 100644
--- a/agent/runner/actions/postgresql_query_select_action.go
+++ b/agent/runner/actions/postgresql_query_select_action.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/postgresql_query_select_action_test.go b/agent/runner/actions/postgresql_query_select_action_test.go
index 74451f4efc..3f52823a17 100644
--- a/agent/runner/actions/postgresql_query_select_action_test.go
+++ b/agent/runner/actions/postgresql_query_select_action_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/postgresql_query_show_action.go b/agent/runner/actions/postgresql_query_show_action.go
index 190c0928d7..c4ab4e2fdb 100644
--- a/agent/runner/actions/postgresql_query_show_action.go
+++ b/agent/runner/actions/postgresql_query_show_action.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/postgresql_query_show_action_test.go b/agent/runner/actions/postgresql_query_show_action_test.go
index e95c8b52ed..afd1196b87 100644
--- a/agent/runner/actions/postgresql_query_show_action_test.go
+++ b/agent/runner/actions/postgresql_query_show_action_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/postgresql_show_create_table_action.go b/agent/runner/actions/postgresql_show_create_table_action.go
index 3a33adce77..ad15129432 100644
--- a/agent/runner/actions/postgresql_show_create_table_action.go
+++ b/agent/runner/actions/postgresql_show_create_table_action.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/postgresql_show_create_table_action_test.go b/agent/runner/actions/postgresql_show_create_table_action_test.go
index ba74a95304..176b70ba9e 100644
--- a/agent/runner/actions/postgresql_show_create_table_action_test.go
+++ b/agent/runner/actions/postgresql_show_create_table_action_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/postgresql_show_index_action.go b/agent/runner/actions/postgresql_show_index_action.go
index 08c21ceb13..b91d823d96 100644
--- a/agent/runner/actions/postgresql_show_index_action.go
+++ b/agent/runner/actions/postgresql_show_index_action.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/postgresql_show_index_action_test.go b/agent/runner/actions/postgresql_show_index_action_test.go
index 32daae5bf3..38516865d1 100644
--- a/agent/runner/actions/postgresql_show_index_action_test.go
+++ b/agent/runner/actions/postgresql_show_index_action_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/process_action.go b/agent/runner/actions/process_action.go
index b8c04d6de2..2b0d16baa9 100644
--- a/agent/runner/actions/process_action.go
+++ b/agent/runner/actions/process_action.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/process_action_test.go b/agent/runner/actions/process_action_test.go
index a80786e7cf..52bcd13cb2 100644
--- a/agent/runner/actions/process_action_test.go
+++ b/agent/runner/actions/process_action_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/pt_mysql_summary_action.go b/agent/runner/actions/pt_mysql_summary_action.go
index a049d45b7f..bce06cc268 100644
--- a/agent/runner/actions/pt_mysql_summary_action.go
+++ b/agent/runner/actions/pt_mysql_summary_action.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/pt_mysql_summary_action_test.go b/agent/runner/actions/pt_mysql_summary_action_test.go
index 3a9deabc18..6226827dbe 100644
--- a/agent/runner/actions/pt_mysql_summary_action_test.go
+++ b/agent/runner/actions/pt_mysql_summary_action_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/query_transform.go b/agent/runner/actions/query_transform.go
index 64f00a6d26..8e0bd2aa33 100644
--- a/agent/runner/actions/query_transform.go
+++ b/agent/runner/actions/query_transform.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/actions/query_transform_test.go b/agent/runner/actions/query_transform_test.go
index 4520dbaeb3..db31e62545 100644
--- a/agent/runner/actions/query_transform_test.go
+++ b/agent/runner/actions/query_transform_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/jobs/backup_location.go b/agent/runner/jobs/backup_location.go
index b77bf1e418..d72b012102 100644
--- a/agent/runner/jobs/backup_location.go
+++ b/agent/runner/jobs/backup_location.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/jobs/common.go b/agent/runner/jobs/common.go
index 57a2c2521c..f110bd309d 100644
--- a/agent/runner/jobs/common.go
+++ b/agent/runner/jobs/common.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/jobs/deps.go b/agent/runner/jobs/deps.go
index b161813b47..8838103192 100644
--- a/agent/runner/jobs/deps.go
+++ b/agent/runner/jobs/deps.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/jobs/errors.go b/agent/runner/jobs/errors.go
index 0010e58982..ce90511e8b 100644
--- a/agent/runner/jobs/errors.go
+++ b/agent/runner/jobs/errors.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/jobs/job.go b/agent/runner/jobs/job.go
index 0543f4f786..6d4c2eabdf 100644
--- a/agent/runner/jobs/job.go
+++ b/agent/runner/jobs/job.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/jobs/mongodb_backup_job.go b/agent/runner/jobs/mongodb_backup_job.go
index 12f4d51620..7c321844b7 100644
--- a/agent/runner/jobs/mongodb_backup_job.go
+++ b/agent/runner/jobs/mongodb_backup_job.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/jobs/mongodb_backup_job_test.go b/agent/runner/jobs/mongodb_backup_job_test.go
index 70e4388275..669b3f6580 100644
--- a/agent/runner/jobs/mongodb_backup_job_test.go
+++ b/agent/runner/jobs/mongodb_backup_job_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/jobs/mongodb_restore_job.go b/agent/runner/jobs/mongodb_restore_job.go
index a95f8e856f..c11ae699d5 100644
--- a/agent/runner/jobs/mongodb_restore_job.go
+++ b/agent/runner/jobs/mongodb_restore_job.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/jobs/mysql_backup_job.go b/agent/runner/jobs/mysql_backup_job.go
index ac1dc27896..fd8b613aee 100644
--- a/agent/runner/jobs/mysql_backup_job.go
+++ b/agent/runner/jobs/mysql_backup_job.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/jobs/mysql_restore_job.go b/agent/runner/jobs/mysql_restore_job.go
index d5b528de22..0c8fb7abca 100644
--- a/agent/runner/jobs/mysql_restore_job.go
+++ b/agent/runner/jobs/mysql_restore_job.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/jobs/pbm_helpers.go b/agent/runner/jobs/pbm_helpers.go
index ff87858da2..0ede95084a 100644
--- a/agent/runner/jobs/pbm_helpers.go
+++ b/agent/runner/jobs/pbm_helpers.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/jobs/pbm_helpers_test.go b/agent/runner/jobs/pbm_helpers_test.go
index 38e8022e72..3fe1bc8be8 100644
--- a/agent/runner/jobs/pbm_helpers_test.go
+++ b/agent/runner/jobs/pbm_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/jobs/pbm_job_logger.go b/agent/runner/jobs/pbm_job_logger.go
index 87b27c4120..e1a1511018 100644
--- a/agent/runner/jobs/pbm_job_logger.go
+++ b/agent/runner/jobs/pbm_job_logger.go
@@ -1,4 +1,4 @@
-// Copyright 2022 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/runner.go b/agent/runner/runner.go
index d3efa8a177..8b89afe18b 100644
--- a/agent/runner/runner.go
+++ b/agent/runner/runner.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/runner/runner_test.go b/agent/runner/runner_test.go
index f731c45be9..b5ed9ddb7a 100644
--- a/agent/runner/runner_test.go
+++ b/agent/runner/runner_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/tailog/store.go b/agent/tailog/store.go
index e558125f7a..02d56a71ea 100644
--- a/agent/tailog/store.go
+++ b/agent/tailog/store.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/tlshelpers/mysql.go b/agent/tlshelpers/mysql.go
index 590cc86b9a..b16352a268 100644
--- a/agent/tlshelpers/mysql.go
+++ b/agent/tlshelpers/mysql.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/backoff/backoff.go b/agent/utils/backoff/backoff.go
index 562c1a93af..7b4717f1f5 100644
--- a/agent/utils/backoff/backoff.go
+++ b/agent/utils/backoff/backoff.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/backoff/backoff_draw.go b/agent/utils/backoff/backoff_draw.go
index 3901d35bd1..a08a2063b9 100644
--- a/agent/utils/backoff/backoff_draw.go
+++ b/agent/utils/backoff/backoff_draw.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/backoff/backoff_test.go b/agent/utils/backoff/backoff_test.go
index 7811ddf94e..fe10a7e0d4 100644
--- a/agent/utils/backoff/backoff_test.go
+++ b/agent/utils/backoff/backoff_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/depstests/depstests.go b/agent/utils/depstests/depstests.go
index 6667361914..7df756679a 100644
--- a/agent/utils/depstests/depstests.go
+++ b/agent/utils/depstests/depstests.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/depstests/protobuf_test.go b/agent/utils/depstests/protobuf_test.go
index c930e0e539..d030b75c4c 100644
--- a/agent/utils/depstests/protobuf_test.go
+++ b/agent/utils/depstests/protobuf_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/errors/errors.go b/agent/utils/errors/errors.go
index a399a59aad..95b750564f 100644
--- a/agent/utils/errors/errors.go
+++ b/agent/utils/errors/errors.go
@@ -1,4 +1,4 @@
-// Copyright 2022 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/mongo_fix/mongo_fix.go b/agent/utils/mongo_fix/mongo_fix.go
index 8811fb450f..ea56431b47 100644
--- a/agent/utils/mongo_fix/mongo_fix.go
+++ b/agent/utils/mongo_fix/mongo_fix.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/mongo_fix/mongo_fix_test.go b/agent/utils/mongo_fix/mongo_fix_test.go
index c27dbfebd9..146a6135de 100644
--- a/agent/utils/mongo_fix/mongo_fix_test.go
+++ b/agent/utils/mongo_fix/mongo_fix_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2021 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/templates/template.go b/agent/utils/templates/template.go
index b585f06817..78f258e448 100644
--- a/agent/utils/templates/template.go
+++ b/agent/utils/templates/template.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/templates/template_test.go b/agent/utils/templates/template_test.go
index 394a8bb194..43aab0ab6c 100644
--- a/agent/utils/templates/template_test.go
+++ b/agent/utils/templates/template_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/tests/db.go b/agent/utils/tests/db.go
index 4d1d8c40db..a38bddc8ee 100644
--- a/agent/utils/tests/db.go
+++ b/agent/utils/tests/db.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/tests/log.go b/agent/utils/tests/log.go
index cedca49584..534a285dc7 100644
--- a/agent/utils/tests/log.go
+++ b/agent/utils/tests/log.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/tests/mongodb.go b/agent/utils/tests/mongodb.go
index 7e435a0d34..6c6364a681 100644
--- a/agent/utils/tests/mongodb.go
+++ b/agent/utils/tests/mongodb.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/tests/mysql.go b/agent/utils/tests/mysql.go
index ee4047f90d..c0cd5e6e0a 100644
--- a/agent/utils/tests/mysql.go
+++ b/agent/utils/tests/mysql.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/tests/postgresql.go b/agent/utils/tests/postgresql.go
index 9e7b73e5c2..e88adb9b68 100644
--- a/agent/utils/tests/postgresql.go
+++ b/agent/utils/tests/postgresql.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/tests/qan.go b/agent/utils/tests/qan.go
index f57dcaa8ff..319950d56f 100644
--- a/agent/utils/tests/qan.go
+++ b/agent/utils/tests/qan.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/truncate/query.go b/agent/utils/truncate/query.go
index 8e46b29f05..3e71f6fecf 100644
--- a/agent/utils/truncate/query.go
+++ b/agent/utils/truncate/query.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/truncate/query_test.go b/agent/utils/truncate/query_test.go
index 27b0b57a61..7be09ebbf0 100644
--- a/agent/utils/truncate/query_test.go
+++ b/agent/utils/truncate/query_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/version/mysql.go b/agent/utils/version/mysql.go
index cc6ae6b33f..358cc5e875 100644
--- a/agent/utils/version/mysql.go
+++ b/agent/utils/version/mysql.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/version/mysql_test.go b/agent/utils/version/mysql_test.go
index 043f6e699a..fac6fc456c 100644
--- a/agent/utils/version/mysql_test.go
+++ b/agent/utils/version/mysql_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/version/postgresql.go b/agent/utils/version/postgresql.go
index 71f5d44eca..f88f906a13 100644
--- a/agent/utils/version/postgresql.go
+++ b/agent/utils/version/postgresql.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/utils/version/postgresql_test.go b/agent/utils/version/postgresql_test.go
index 9d5001f25c..1f7df6ca85 100644
--- a/agent/utils/version/postgresql_test.go
+++ b/agent/utils/version/postgresql_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/versioner/versioner.go b/agent/versioner/versioner.go
index 8cb4a12191..6da2eaa099 100644
--- a/agent/versioner/versioner.go
+++ b/agent/versioner/versioner.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/agent/versioner/versioner_test.go b/agent/versioner/versioner_test.go
index e23ccccd57..b650bdb774 100644
--- a/agent/versioner/versioner_test.go
+++ b/agent/versioner/versioner_test.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/api-tests/helpers.go b/api-tests/helpers.go
index 1b280fd192..5ef69250b9 100644
--- a/api-tests/helpers.go
+++ b/api-tests/helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -211,6 +211,21 @@ func AddRemoteNode(t TestingT, nodeName string) *nodes.AddRemoteNodeOKBody {
return res.Payload
}
+func AddNode(t TestingT, nodeBody *nodes.AddNodeBody) *nodes.AddNodeOKBody {
+ t.Helper()
+
+ params := &nodes.AddNodeParams{
+ Body: *nodeBody,
+ Context: Context,
+ }
+
+ res, err := client.Default.Nodes.AddNode(params)
+ assert.NoError(t, err)
+ require.NotNil(t, res)
+
+ return res.Payload
+}
+
func AddPMMAgent(t TestingT, nodeID string) *agents.AddPMMAgentOKBody {
t.Helper()
diff --git a/api-tests/init.go b/api-tests/init.go
index d581c00fcb..91490bc281 100644
--- a/api-tests/init.go
+++ b/api-tests/init.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/inventory/agents_azure_database_exporter_test.go b/api-tests/inventory/agents_azure_database_exporter_test.go
index 8762c1866a..5228a6169e 100644
--- a/api-tests/inventory/agents_azure_database_exporter_test.go
+++ b/api-tests/inventory/agents_azure_database_exporter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/inventory/agents_external_exporter_test.go b/api-tests/inventory/agents_external_exporter_test.go
index a39632cc46..d1562a148e 100644
--- a/api-tests/inventory/agents_external_exporter_test.go
+++ b/api-tests/inventory/agents_external_exporter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/inventory/agents_mongodb_exporter_test.go b/api-tests/inventory/agents_mongodb_exporter_test.go
index 3485be366a..92e937b248 100644
--- a/api-tests/inventory/agents_mongodb_exporter_test.go
+++ b/api-tests/inventory/agents_mongodb_exporter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/inventory/agents_mysqld_exporter_test.go b/api-tests/inventory/agents_mysqld_exporter_test.go
index 963cbb7781..014c78d2a6 100644
--- a/api-tests/inventory/agents_mysqld_exporter_test.go
+++ b/api-tests/inventory/agents_mysqld_exporter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/inventory/agents_node_exporter_test.go b/api-tests/inventory/agents_node_exporter_test.go
index f1e66e7086..2cfdd8f20a 100644
--- a/api-tests/inventory/agents_node_exporter_test.go
+++ b/api-tests/inventory/agents_node_exporter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/inventory/agents_postgres_exporter_test.go b/api-tests/inventory/agents_postgres_exporter_test.go
index d81f5c80e4..218412fbd4 100644
--- a/api-tests/inventory/agents_postgres_exporter_test.go
+++ b/api-tests/inventory/agents_postgres_exporter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/inventory/agents_proxysql_exporter_test.go b/api-tests/inventory/agents_proxysql_exporter_test.go
index 472360232e..0e1bd10654 100644
--- a/api-tests/inventory/agents_proxysql_exporter_test.go
+++ b/api-tests/inventory/agents_proxysql_exporter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/inventory/agents_rds_exporter_test.go b/api-tests/inventory/agents_rds_exporter_test.go
index 9fd25072a6..7b59c38938 100644
--- a/api-tests/inventory/agents_rds_exporter_test.go
+++ b/api-tests/inventory/agents_rds_exporter_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/inventory/agents_test.go b/api-tests/inventory/agents_test.go
index f760ab10ce..5c785b77e5 100644
--- a/api-tests/inventory/agents_test.go
+++ b/api-tests/inventory/agents_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/inventory/helpers.go b/api-tests/inventory/helpers.go
index 0cc8d4555d..dbce94c22e 100644
--- a/api-tests/inventory/helpers.go
+++ b/api-tests/inventory/helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/inventory/nodes_test.go b/api-tests/inventory/nodes_test.go
index e3adc01ac9..fe7e3142ec 100644
--- a/api-tests/inventory/nodes_test.go
+++ b/api-tests/inventory/nodes_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -31,7 +31,7 @@ import (
"github.com/percona/pmm/api/inventorypb/json/client/services"
)
-func TestNodes(t *testing.T) {
+func TestNodesDeprecated(t *testing.T) {
t.Parallel()
t.Run("List", func(t *testing.T) {
t.Parallel()
@@ -45,7 +45,7 @@ func TestNodes(t *testing.T) {
res, err := client.Default.Nodes.ListNodes(nil)
require.NoError(t, err)
- require.NotZerof(t, len(res.Payload.Generic), "There should be at least one node")
+ require.NotEmptyf(t, res.Payload.Generic, "There should be at least one node")
require.Conditionf(t, func() (success bool) {
for _, v := range res.Payload.Generic {
if v.NodeID == genericNodeID {
@@ -54,7 +54,7 @@ func TestNodes(t *testing.T) {
}
return false
}, "There should be generic node with id `%s`", genericNodeID)
- require.NotZerof(t, len(res.Payload.Remote), "There should be at least one node")
+ require.NotEmptyf(t, res.Payload.Remote, "There should be at least one node")
require.Conditionf(t, func() (success bool) {
for _, v := range res.Payload.Remote {
if v.NodeID == remoteNodeID {
@@ -71,7 +71,7 @@ func TestNodes(t *testing.T) {
Context: pmmapitests.Context,
})
require.NoError(t, err)
- require.NotZerof(t, len(res.Payload.Generic), "There should be at least one generic node")
+ require.NotEmptyf(t, res.Payload.Generic, "There should be at least one generic node")
require.Conditionf(t, func() (success bool) {
for _, v := range res.Payload.Generic {
if v.NodeID == genericNodeID {
@@ -91,6 +91,78 @@ func TestNodes(t *testing.T) {
})
}
+func TestNodes(t *testing.T) {
+ t.Parallel()
+ t.Run("List", func(t *testing.T) {
+ t.Parallel()
+
+ remoteNode := pmmapitests.AddNode(t, &nodes.AddNodeBody{
+ Remote: &nodes.AddNodeParamsBodyRemote{
+ NodeName: pmmapitests.TestString(t, "Test Remote Node for List"),
+ Address: "10.10.10.1",
+ },
+ })
+ remoteNodeID := remoteNode.Remote.NodeID
+ t.Cleanup(func() { pmmapitests.RemoveNodes(t, remoteNodeID) })
+
+ genericNode := pmmapitests.AddNode(t, &nodes.AddNodeBody{
+ Generic: &nodes.AddNodeParamsBodyGeneric{
+ NodeName: pmmapitests.TestString(t, "Test Remote Node for List"),
+ Address: "10.10.10.2",
+ },
+ })
+ genericNodeID := genericNode.Generic.NodeID
+ require.NotEmpty(t, genericNodeID)
+ t.Cleanup(func() { pmmapitests.RemoveNodes(t, genericNodeID) })
+
+ res, err := client.Default.Nodes.ListNodes(nil)
+ require.NoError(t, err)
+ require.NotEmptyf(t, res.Payload.Generic, "There should be at least one node")
+ require.Conditionf(t, func() (success bool) {
+ for _, v := range res.Payload.Generic {
+ if v.NodeID == genericNodeID {
+ return true
+ }
+ }
+ return false
+ }, "There should be a generic node with id `%s`", genericNodeID)
+ require.NotEmptyf(t, res.Payload.Remote, "There should be at least one node")
+ require.Conditionf(t, func() (success bool) {
+ for _, v := range res.Payload.Remote {
+ if v.NodeID == remoteNodeID {
+ return true
+ }
+ }
+ return false
+ }, "There should be a remote node with id `%s`", remoteNodeID)
+
+ res, err = client.Default.Nodes.ListNodes(&nodes.ListNodesParams{
+ Body: nodes.ListNodesBody{
+ NodeType: pointer.ToString(nodes.ListNodesBodyNodeTypeGENERICNODE),
+ },
+ Context: pmmapitests.Context,
+ })
+ require.NoError(t, err)
+ require.NotEmptyf(t, res.Payload.Generic, "There should be at least one generic node")
+ require.Conditionf(t, func() (success bool) {
+ for _, v := range res.Payload.Generic {
+ if v.NodeID == genericNodeID {
+ return true
+ }
+ }
+ return false
+ }, "There should be a generic node with id `%s`", genericNodeID)
+ require.Conditionf(t, func() (success bool) {
+ for _, v := range res.Payload.Remote {
+ if v.NodeID == remoteNodeID {
+ return false
+ }
+ }
+ return true
+ }, "There shouldn't be a remote node with id `%s`", remoteNodeID)
+ })
+}
+
func TestGetNode(t *testing.T) {
t.Parallel()
t.Run("Basic", func(t *testing.T) {
@@ -145,7 +217,7 @@ func TestGetNode(t *testing.T) {
})
}
-func TestGenericNode(t *testing.T) {
+func TestGenericNodeDeprecated(t *testing.T) {
t.Parallel()
t.Run("Basic", func(t *testing.T) {
t.Parallel()
@@ -205,12 +277,76 @@ func TestGenericNode(t *testing.T) {
})
}
-func TestContainerNode(t *testing.T) {
+func TestGenericNode(t *testing.T) {
t.Parallel()
t.Run("Basic", func(t *testing.T) {
t.Parallel()
- nodeName := pmmapitests.TestString(t, "Test Container Node")
+ nodeName := pmmapitests.TestString(t, "Test Generic Node")
+ params := &nodes.AddNodeParams{
+ Body: nodes.AddNodeBody{
+ Generic: &nodes.AddNodeParamsBodyGeneric{
+ NodeName: nodeName,
+ Address: "10.10.10.10",
+ },
+ },
+ Context: pmmapitests.Context,
+ }
+ res, err := client.Default.Nodes.AddNode(params)
+ assert.NoError(t, err)
+ require.NotNil(t, res)
+ require.NotNil(t, res.Payload.Generic)
+ nodeID := res.Payload.Generic.NodeID
+ t.Cleanup(func() { pmmapitests.RemoveNodes(t, nodeID) })
+
+ // Check that the node exists in DB.
+ getNodeRes, err := client.Default.Nodes.GetNode(&nodes.GetNodeParams{
+ Body: nodes.GetNodeBody{NodeID: nodeID},
+ Context: pmmapitests.Context,
+ })
+ require.NoError(t, err)
+ expectedResponse := &nodes.GetNodeOK{
+ Payload: &nodes.GetNodeOKBody{
+ Generic: &nodes.GetNodeOKBodyGeneric{
+ NodeID: res.Payload.Generic.NodeID,
+ NodeName: nodeName,
+ Address: "10.10.10.10",
+ },
+ },
+ }
+ require.Equal(t, expectedResponse, getNodeRes)
+
+ // Check for duplicates.
+ res, err = client.Default.Nodes.AddNode(params)
+ pmmapitests.AssertAPIErrorf(t, err, 409, codes.AlreadyExists, "Node with name %q already exists.", nodeName)
+ if !assert.Nil(t, res) {
+ pmmapitests.RemoveNodes(t, res.Payload.Generic.NodeID)
+ }
+ })
+
+ t.Run("AddNameEmpty", func(t *testing.T) {
+ t.Parallel()
+
+ params := &nodes.AddNodeParams{
+ Body: nodes.AddNodeBody{
+ Generic: &nodes.AddNodeParamsBodyGeneric{NodeName: ""},
+ },
+ Context: pmmapitests.Context,
+ }
+ res, err := client.Default.Nodes.AddNode(params)
+ pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid AddGenericNodeRequest.NodeName: value length must be at least 1 runes")
+ if !assert.Nil(t, res) {
+ pmmapitests.RemoveNodes(t, res.Payload.Generic.NodeID)
+ }
+ })
+}
+
+func TestContainerNodeDeprecated(t *testing.T) {
+ t.Parallel()
+ t.Run("Basic", func(t *testing.T) {
+ t.Parallel()
+
+ nodeName := pmmapitests.TestString(t, "Test Container Node Deprecated")
params := &nodes.AddContainerNodeParams{
Body: nodes.AddContainerNodeBody{
NodeName: nodeName,
@@ -270,7 +406,76 @@ func TestContainerNode(t *testing.T) {
})
}
-func TestRemoteNode(t *testing.T) {
+func TestContainerNode(t *testing.T) {
+ t.Parallel()
+ t.Run("Basic", func(t *testing.T) {
+ t.Parallel()
+
+ nodeName := pmmapitests.TestString(t, "Test Container Node")
+ params := &nodes.AddNodeParams{
+ Body: nodes.AddNodeBody{
+ Container: &nodes.AddNodeParamsBodyContainer{
+ NodeName: nodeName,
+ ContainerID: "docker-id",
+ ContainerName: "docker-name",
+ MachineID: "machine-id",
+ Address: "10.10.1.10",
+ },
+ },
+ Context: pmmapitests.Context,
+ }
+ res, err := client.Default.Nodes.AddNode(params)
+ require.NoError(t, err)
+ require.NotNil(t, res.Payload.Container)
+ nodeID := res.Payload.Container.NodeID
+ defer pmmapitests.RemoveNodes(t, nodeID)
+
+ // Check that the node exists in DB.
+ getNodeRes, err := client.Default.Nodes.GetNode(&nodes.GetNodeParams{
+ Body: nodes.GetNodeBody{NodeID: nodeID},
+ Context: pmmapitests.Context,
+ })
+ require.NoError(t, err)
+ expectedResponse := &nodes.GetNodeOK{
+ Payload: &nodes.GetNodeOKBody{
+ Container: &nodes.GetNodeOKBodyContainer{
+ NodeID: res.Payload.Container.NodeID,
+ NodeName: nodeName,
+ ContainerID: "docker-id",
+ ContainerName: "docker-name",
+ MachineID: "machine-id",
+ Address: "10.10.1.10",
+ },
+ },
+ }
+ require.Equal(t, expectedResponse, getNodeRes)
+
+ // Check for duplicates.
+ res, err = client.Default.Nodes.AddNode(params)
+ pmmapitests.AssertAPIErrorf(t, err, 409, codes.AlreadyExists, "Node with name %q already exists.", nodeName)
+ if !assert.Nil(t, res) {
+ pmmapitests.RemoveNodes(t, res.Payload.Container.NodeID)
+ }
+ })
+
+ t.Run("AddNameEmpty", func(t *testing.T) {
+ t.Parallel()
+
+ params := &nodes.AddNodeParams{
+ Body: nodes.AddNodeBody{
+ Container: &nodes.AddNodeParamsBodyContainer{NodeName: ""},
+ },
+ Context: pmmapitests.Context,
+ }
+ res, err := client.Default.Nodes.AddNode(params)
+ pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid AddContainerNodeRequest.NodeName: value length must be at least 1 runes")
+ if !assert.Nil(t, res) {
+ pmmapitests.RemoveNodes(t, res.Payload.Container.NodeID)
+ }
+ })
+}
+
+func TestRemoteNodeDeprecated(t *testing.T) {
t.Parallel()
t.Run("Basic", func(t *testing.T) {
t.Parallel()
@@ -335,14 +540,89 @@ func TestRemoteNode(t *testing.T) {
})
}
+func TestRemoteNode(t *testing.T) {
+ t.Parallel()
+ t.Run("Basic", func(t *testing.T) {
+ t.Parallel()
+
+ nodeName := pmmapitests.TestString(t, "Test Remote Node")
+ params := &nodes.AddNodeParams{
+ Body: nodes.AddNodeBody{
+ Remote: &nodes.AddNodeParamsBodyRemote{
+ NodeName: nodeName,
+ Az: "eu",
+ Region: "us-west",
+ Address: "10.10.10.11",
+ CustomLabels: map[string]string{"foo": "bar"},
+ },
+ },
+ Context: pmmapitests.Context,
+ }
+ res, err := client.Default.Nodes.AddNode(params)
+ require.NoError(t, err)
+ require.NotNil(t, res.Payload.Remote)
+ nodeID := res.Payload.Remote.NodeID
+ defer pmmapitests.RemoveNodes(t, nodeID)
+
+ // Check node exists in DB.
+ getNodeRes, err := client.Default.Nodes.GetNode(&nodes.GetNodeParams{
+ Body: nodes.GetNodeBody{NodeID: nodeID},
+ Context: pmmapitests.Context,
+ })
+ require.NoError(t, err)
+ expectedResponse := &nodes.GetNodeOK{
+ Payload: &nodes.GetNodeOKBody{
+ Remote: &nodes.GetNodeOKBodyRemote{
+ NodeID: res.Payload.Remote.NodeID,
+ NodeName: nodeName,
+ Az: "eu",
+ Region: "us-west",
+ Address: "10.10.10.11",
+ CustomLabels: map[string]string{"foo": "bar"},
+ },
+ },
+ }
+ require.Equal(t, expectedResponse, getNodeRes)
+
+ // Check duplicates.
+ res, err = client.Default.Nodes.AddNode(params)
+ pmmapitests.AssertAPIErrorf(t, err, 409, codes.AlreadyExists, "Node with name %q already exists.", nodeName)
+ if !assert.Nil(t, res) {
+ pmmapitests.RemoveNodes(t, res.Payload.Remote.NodeID)
+ }
+ })
+
+ t.Run("AddNameEmpty", func(t *testing.T) {
+ t.Parallel()
+
+ params := &nodes.AddNodeParams{
+ Body: nodes.AddNodeBody{
+ Remote: &nodes.AddNodeParamsBodyRemote{NodeName: ""},
+ },
+ Context: pmmapitests.Context,
+ }
+ res, err := client.Default.Nodes.AddNode(params)
+ pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid AddRemoteNodeRequest.NodeName: value length must be at least 1 runes")
+ if !assert.Nil(t, res) {
+ pmmapitests.RemoveNodes(t, res.Payload.Remote.NodeID)
+ }
+ })
+}
+
func TestRemoveNode(t *testing.T) {
t.Parallel()
t.Run("Basic", func(t *testing.T) {
t.Parallel()
nodeName := pmmapitests.TestString(t, "Generic Node for basic remove test")
- node := pmmapitests.AddGenericNode(t, nodeName)
- nodeID := node.NodeID
+ node := pmmapitests.AddNode(t,
+ &nodes.AddNodeBody{
+ Generic: &nodes.AddNodeParamsBodyGeneric{
+ NodeName: nodeName,
+ Address: "10.10.10.1",
+ },
+ })
+ nodeID := node.Generic.NodeID
removeResp, err := client.Default.Nodes.RemoveNode(&nodes.RemoveNodeParams{
Body: nodes.RemoveNodeBody{
@@ -358,11 +638,18 @@ func TestRemoveNode(t *testing.T) {
t.Parallel()
nodeName := pmmapitests.TestString(t, "Generic Node for remove test")
- node := pmmapitests.AddGenericNode(t, nodeName)
+ node := pmmapitests.AddNode(t,
+ &nodes.AddNodeBody{
+ Generic: &nodes.AddNodeParamsBodyGeneric{
+ NodeName: nodeName,
+ Address: "10.10.10.1",
+ },
+ },
+ )
serviceName := pmmapitests.TestString(t, "MySQL Service for agent")
service := addMySQLService(t, services.AddMySQLServiceBody{
- NodeID: node.NodeID,
+ NodeID: node.Generic.NodeID,
Address: "localhost",
Port: 3306,
ServiceName: serviceName,
@@ -371,16 +658,16 @@ func TestRemoveNode(t *testing.T) {
removeResp, err := client.Default.Nodes.RemoveNode(&nodes.RemoveNodeParams{
Body: nodes.RemoveNodeBody{
- NodeID: node.NodeID,
+ NodeID: node.Generic.NodeID,
},
Context: context.Background(),
})
- pmmapitests.AssertAPIErrorf(t, err, 400, codes.FailedPrecondition, `Node with ID %q has services.`, node.NodeID)
+ pmmapitests.AssertAPIErrorf(t, err, 400, codes.FailedPrecondition, `Node with ID %q has services.`, node.Generic.NodeID)
assert.Nil(t, removeResp)
// Check that node and service isn't removed.
getServiceResp, err := client.Default.Nodes.GetNode(&nodes.GetNodeParams{
- Body: nodes.GetNodeBody{NodeID: node.NodeID},
+ Body: nodes.GetNodeBody{NodeID: node.Generic.NodeID},
Context: pmmapitests.Context,
})
assert.NotNil(t, getServiceResp)
@@ -388,7 +675,7 @@ func TestRemoveNode(t *testing.T) {
listAgentsOK, err := client.Default.Services.ListServices(&services.ListServicesParams{
Body: services.ListServicesBody{
- NodeID: node.NodeID,
+ NodeID: node.Generic.NodeID,
},
Context: pmmapitests.Context,
})
@@ -396,11 +683,12 @@ func TestRemoveNode(t *testing.T) {
assert.Equal(t, &services.ListServicesOKBody{
Mysql: []*services.ListServicesOKBodyMysqlItems0{
{
- NodeID: node.NodeID,
+ NodeID: node.Generic.NodeID,
ServiceID: serviceID,
Address: "localhost",
Port: 3306,
ServiceName: serviceName,
+ Cluster: serviceName,
},
},
}, listAgentsOK.Payload)
@@ -408,7 +696,7 @@ func TestRemoveNode(t *testing.T) {
// Remove with force flag.
params := &nodes.RemoveNodeParams{
Body: nodes.RemoveNodeBody{
- NodeID: node.NodeID,
+ NodeID: node.Generic.NodeID,
Force: true,
},
Context: pmmapitests.Context,
@@ -419,15 +707,15 @@ func TestRemoveNode(t *testing.T) {
// Check that the node and agents are removed.
getServiceResp, err = client.Default.Nodes.GetNode(&nodes.GetNodeParams{
- Body: nodes.GetNodeBody{NodeID: node.NodeID},
+ Body: nodes.GetNodeBody{NodeID: node.Generic.NodeID},
Context: pmmapitests.Context,
})
- pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, "Node with ID %q not found.", node.NodeID)
+ pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, "Node with ID %q not found.", node.Generic.NodeID)
assert.Nil(t, getServiceResp)
listAgentsOK, err = client.Default.Services.ListServices(&services.ListServicesParams{
Body: services.ListServicesBody{
- NodeID: node.NodeID,
+ NodeID: node.Generic.NodeID,
},
Context: pmmapitests.Context,
})
@@ -439,23 +727,30 @@ func TestRemoveNode(t *testing.T) {
t.Parallel()
nodeName := pmmapitests.TestString(t, "Generic Node for remove test")
- node := pmmapitests.AddGenericNode(t, nodeName)
+ node := pmmapitests.AddNode(t,
+ &nodes.AddNodeBody{
+ Generic: &nodes.AddNodeParamsBodyGeneric{
+ NodeName: nodeName,
+ Address: "10.10.10.1",
+ },
+ },
+ )
- _ = pmmapitests.AddPMMAgent(t, node.NodeID)
+ _ = pmmapitests.AddPMMAgent(t, node.Generic.NodeID)
removeResp, err := client.Default.Nodes.RemoveNode(&nodes.RemoveNodeParams{
Body: nodes.RemoveNodeBody{
- NodeID: node.NodeID,
+ NodeID: node.Generic.NodeID,
},
Context: context.Background(),
})
- pmmapitests.AssertAPIErrorf(t, err, 400, codes.FailedPrecondition, `Node with ID %q has pmm-agent.`, node.NodeID)
+ pmmapitests.AssertAPIErrorf(t, err, 400, codes.FailedPrecondition, `Node with ID %q has pmm-agent.`, node.Generic.NodeID)
assert.Nil(t, removeResp)
// Remove with force flag.
params := &nodes.RemoveNodeParams{
Body: nodes.RemoveNodeBody{
- NodeID: node.NodeID,
+ NodeID: node.Generic.NodeID,
Force: true,
},
Context: pmmapitests.Context,
@@ -466,19 +761,19 @@ func TestRemoveNode(t *testing.T) {
// Check that the node and agents are removed.
getServiceResp, err := client.Default.Nodes.GetNode(&nodes.GetNodeParams{
- Body: nodes.GetNodeBody{NodeID: node.NodeID},
+ Body: nodes.GetNodeBody{NodeID: node.Generic.NodeID},
Context: pmmapitests.Context,
})
- pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, "Node with ID %q not found.", node.NodeID)
+ pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, "Node with ID %q not found.", node.Generic.NodeID)
assert.Nil(t, getServiceResp)
listAgentsOK, err := client.Default.Agents.ListAgents(&agents.ListAgentsParams{
Body: agents.ListAgentsBody{
- NodeID: node.NodeID,
+ NodeID: node.Generic.NodeID,
},
Context: pmmapitests.Context,
})
- pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, "Node with ID %q not found.", node.NodeID)
+ pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, "Node with ID %q not found.", node.Generic.NodeID)
assert.Nil(t, listAgentsOK)
})
diff --git a/api-tests/inventory/services_test.go b/api-tests/inventory/services_test.go
index 21c83853bf..d019fb0f46 100644
--- a/api-tests/inventory/services_test.go
+++ b/api-tests/inventory/services_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -352,6 +352,7 @@ func TestMySQLService(t *testing.T) {
Address: "localhost",
Port: 3306,
ServiceName: serviceName,
+ Cluster: serviceName,
},
},
}, res)
@@ -372,6 +373,7 @@ func TestMySQLService(t *testing.T) {
Address: "localhost",
Port: 3306,
ServiceName: serviceName,
+ Cluster: serviceName,
},
},
}, serviceRes)
@@ -553,6 +555,7 @@ func TestMongoDBService(t *testing.T) {
ServiceID: serviceID,
NodeID: genericNodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Address: "localhost",
Port: 27017,
},
@@ -573,6 +576,7 @@ func TestMongoDBService(t *testing.T) {
ServiceID: serviceID,
NodeID: genericNodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Address: "localhost",
Port: 27017,
},
@@ -729,6 +733,7 @@ func TestMongoDBService(t *testing.T) {
ServiceID: serviceID,
NodeID: genericNodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Socket: "/tmp/mongodb-27017.sock",
},
},
@@ -770,6 +775,7 @@ func TestPostgreSQLService(t *testing.T) {
DatabaseName: defaultPostgresDBName,
Port: 5432,
ServiceName: serviceName,
+ Cluster: serviceName,
},
},
}, res)
@@ -791,6 +797,7 @@ func TestPostgreSQLService(t *testing.T) {
DatabaseName: defaultPostgresDBName,
Port: 5432,
ServiceName: serviceName,
+ Cluster: serviceName,
},
},
}, serviceRes)
@@ -973,6 +980,7 @@ func TestProxySQLService(t *testing.T) {
Address: "localhost",
Port: 5432,
ServiceName: serviceName,
+ Cluster: serviceName,
},
},
}, res)
@@ -993,6 +1001,7 @@ func TestProxySQLService(t *testing.T) {
Address: "localhost",
Port: 5432,
ServiceName: serviceName,
+ Cluster: serviceName,
},
},
}, serviceRes)
@@ -1184,6 +1193,7 @@ func TestExternalService(t *testing.T) {
ServiceID: serviceID,
NodeID: genericNodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Group: "redis",
},
},
@@ -1203,6 +1213,7 @@ func TestExternalService(t *testing.T) {
ServiceID: serviceID,
NodeID: genericNodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Group: "redis",
},
},
@@ -1334,6 +1345,7 @@ func TestExternalService(t *testing.T) {
ServiceID: serviceID,
NodeID: genericNodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Group: "external",
},
},
diff --git a/api-tests/management/action/explain_test.go b/api-tests/management/action/explain_test.go
index 6dfe108329..23772f2ba0 100644
--- a/api-tests/management/action/explain_test.go
+++ b/api-tests/management/action/explain_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/management/action/ptsummary_test.go b/api-tests/management/action/ptsummary_test.go
index 92b82a252d..205a3f9ad6 100644
--- a/api-tests/management/action/ptsummary_test.go
+++ b/api-tests/management/action/ptsummary_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/management/alerting/alerting_test.go b/api-tests/management/alerting/alerting_test.go
index f68107683f..1a6ffedbb7 100644
--- a/api-tests/management/alerting/alerting_test.go
+++ b/api-tests/management/alerting/alerting_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/management/annotation_test.go b/api-tests/management/annotation_test.go
index 062673b43c..e35272cb74 100644
--- a/api-tests/management/annotation_test.go
+++ b/api-tests/management/annotation_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/management/backup/backups_test.go b/api-tests/management/backup/backups_test.go
index 2faff86eaf..609989133d 100644
--- a/api-tests/management/backup/backups_test.go
+++ b/api-tests/management/backup/backups_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/management/backup/locations_test.go b/api-tests/management/backup/locations_test.go
index 9f82a6a48c..c80087b722 100644
--- a/api-tests/management/backup/locations_test.go
+++ b/api-tests/management/backup/locations_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/management/dbaas/helpers.go b/api-tests/management/dbaas/helpers.go
index 78591afb93..9d5fd87694 100644
--- a/api-tests/management/dbaas/helpers.go
+++ b/api-tests/management/dbaas/helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/management/dbaas/kubernetes_server_test.go b/api-tests/management/dbaas/kubernetes_server_test.go
index 17c90f2908..a6c663ab44 100644
--- a/api-tests/management/dbaas/kubernetes_server_test.go
+++ b/api-tests/management/dbaas/kubernetes_server_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/management/dbaas/psmdb_cluster_test.go b/api-tests/management/dbaas/psmdb_cluster_test.go
index 6a685ce5e5..4044fdfd36 100644
--- a/api-tests/management/dbaas/psmdb_cluster_test.go
+++ b/api-tests/management/dbaas/psmdb_cluster_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/management/dbaas/pxc_cluster_test.go b/api-tests/management/dbaas/pxc_cluster_test.go
index c9c8ab07d3..c12f3f665c 100644
--- a/api-tests/management/dbaas/pxc_cluster_test.go
+++ b/api-tests/management/dbaas/pxc_cluster_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/management/external_test.go b/api-tests/management/external_test.go
index 78dce3c34b..c044ee654b 100644
--- a/api-tests/management/external_test.go
+++ b/api-tests/management/external_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -74,6 +74,7 @@ func TestAddExternal(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Group: "external",
},
}, *serviceOK.Payload)
@@ -225,6 +226,7 @@ func TestAddExternal(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Group: "external",
},
}, *serviceOK.Payload)
diff --git a/api-tests/management/haproxy_test.go b/api-tests/management/haproxy_test.go
index 779891b82a..ceaa2bc147 100644
--- a/api-tests/management/haproxy_test.go
+++ b/api-tests/management/haproxy_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -76,6 +76,7 @@ func TestAddHAProxy(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
},
}, *serviceOK.Payload)
@@ -225,6 +226,7 @@ func TestAddHAProxy(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
},
}, *serviceOK.Payload)
diff --git a/api-tests/management/helpers.go b/api-tests/management/helpers.go
index c3c83ef115..9a69dd3eff 100644
--- a/api-tests/management/helpers.go
+++ b/api-tests/management/helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/management/ia/alerts_test.go b/api-tests/management/ia/alerts_test.go
index ecdbfc5c85..2b8ec88450 100644
--- a/api-tests/management/ia/alerts_test.go
+++ b/api-tests/management/ia/alerts_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/management/ia/channels_test.go b/api-tests/management/ia/channels_test.go
index fa29d7bbde..88bf0276ca 100644
--- a/api-tests/management/ia/channels_test.go
+++ b/api-tests/management/ia/channels_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/management/ia/rules_test.go b/api-tests/management/ia/rules_test.go
index 7015c1228e..fe887e4ef9 100644
--- a/api-tests/management/ia/rules_test.go
+++ b/api-tests/management/ia/rules_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/management/mongodb_test.go b/api-tests/management/mongodb_test.go
index b65f317a03..75c6623fb9 100644
--- a/api-tests/management/mongodb_test.go
+++ b/api-tests/management/mongodb_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -79,6 +79,7 @@ func TestAddMongoDB(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Address: "10.10.10.10",
Port: 27017,
},
@@ -154,6 +155,7 @@ func TestAddMongoDB(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Address: "10.10.10.10",
Port: 27017,
},
@@ -389,6 +391,7 @@ func TestAddMongoDB(t *testing.T) {
ServiceID: serviceID,
NodeID: newNodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Address: "10.10.10.10",
Port: 27017,
},
@@ -607,6 +610,7 @@ func TestAddMongoDB(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Socket: "/tmp/mongodb-27017.sock",
},
}, *serviceOK.Payload)
@@ -678,6 +682,7 @@ func TestAddMongoDB(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Address: "10.10.10.10",
Port: 27017,
},
@@ -750,6 +755,7 @@ func TestAddMongoDB(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Address: "10.10.10.10",
Port: 27017,
},
@@ -821,6 +827,7 @@ func TestAddMongoDB(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Address: "10.10.10.10",
Port: 27017,
},
diff --git a/api-tests/management/mysql_test.go b/api-tests/management/mysql_test.go
index 12e6c0fe6e..5f7490183c 100644
--- a/api-tests/management/mysql_test.go
+++ b/api-tests/management/mysql_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -80,6 +80,7 @@ func TestAddMySQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Address: "10.10.10.10",
Port: 3306,
},
@@ -159,6 +160,7 @@ func TestAddMySQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Address: "10.10.10.10",
Port: 3306,
},
@@ -413,6 +415,7 @@ func TestAddMySQL(t *testing.T) {
ServiceID: serviceID,
NodeID: newNodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Address: "10.10.10.10",
Port: 27017,
},
@@ -666,6 +669,7 @@ func TestAddMySQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Address: "10.10.10.10",
Port: 3306,
},
@@ -741,6 +745,7 @@ func TestAddMySQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Address: "10.10.10.10",
Port: 3306,
},
@@ -815,6 +820,7 @@ func TestAddMySQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Address: "10.10.10.10",
Port: 3306,
},
diff --git a/api-tests/management/nodes_test.go b/api-tests/management/nodes_test.go
index 633f800d32..7c417fea83 100644
--- a/api-tests/management/nodes_test.go
+++ b/api-tests/management/nodes_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/management/postgresql_test.go b/api-tests/management/postgresql_test.go
index 4f21927b49..9e575730f2 100644
--- a/api-tests/management/postgresql_test.go
+++ b/api-tests/management/postgresql_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -82,6 +82,7 @@ func TestAddPostgreSQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
DatabaseName: defaultPostgresDBName,
Address: "10.10.10.10",
Port: 5432,
@@ -161,6 +162,7 @@ func TestAddPostgreSQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
DatabaseName: defaultPostgresDBName,
Address: "10.10.10.10",
Port: 5432,
@@ -261,6 +263,7 @@ func TestAddPostgreSQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
DatabaseName: defaultPostgresDBName,
Address: "10.10.10.10",
Port: 5432,
@@ -410,6 +413,7 @@ func TestAddPostgreSQL(t *testing.T) {
ServiceID: serviceID,
NodeID: newNodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
DatabaseName: defaultPostgresDBName,
Address: "10.10.10.10",
Port: 27017,
@@ -636,6 +640,7 @@ func TestAddPostgreSQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
DatabaseName: defaultPostgresDBName,
Address: "10.10.10.10",
Port: 5432,
@@ -711,6 +716,7 @@ func TestAddPostgreSQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
DatabaseName: defaultPostgresDBName,
Address: "10.10.10.10",
Port: 5432,
@@ -785,6 +791,7 @@ func TestAddPostgreSQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
DatabaseName: defaultPostgresDBName,
Address: "10.10.10.10",
Port: 5432,
diff --git a/api-tests/management/proxysql_test.go b/api-tests/management/proxysql_test.go
index 79c1e4962b..907987abe9 100644
--- a/api-tests/management/proxysql_test.go
+++ b/api-tests/management/proxysql_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -80,6 +80,7 @@ func TestAddProxySQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Address: "10.10.10.10",
Port: 3306,
},
@@ -155,6 +156,7 @@ func TestAddProxySQL(t *testing.T) {
ServiceID: serviceID,
NodeID: nodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Address: "10.10.10.10",
Port: 3306,
},
@@ -260,13 +262,12 @@ func TestAddProxySQL(t *testing.T) {
params := &proxysql.AddProxySQLParams{
Context: pmmapitests.Context,
Body: proxysql.AddProxySQLBody{
- NodeID: nodeID,
- PMMAgentID: pmmAgentID,
- ServiceName: serviceName,
- Address: "10.10.10.10",
- Port: 3306,
- Username: "username",
-
+ NodeID: nodeID,
+ PMMAgentID: pmmAgentID,
+ ServiceName: serviceName,
+ Address: "10.10.10.10",
+ Port: 3306,
+ Username: "username",
SkipConnectionCheck: true,
},
}
@@ -386,6 +387,7 @@ func TestAddProxySQL(t *testing.T) {
ServiceID: serviceID,
NodeID: newNodeID,
ServiceName: serviceName,
+ Cluster: serviceName,
Address: "10.10.10.10",
Port: 27017,
},
diff --git a/api-tests/management/rds_test.go b/api-tests/management/rds_test.go
index 235726cb15..1adf167602 100644
--- a/api-tests/management/rds_test.go
+++ b/api-tests/management/rds_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/server/advisor_metrics_test.go b/api-tests/server/advisor_metrics_test.go
index 7d590da340..bbbb37a843 100644
--- a/api-tests/server/advisor_metrics_test.go
+++ b/api-tests/server/advisor_metrics_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/server/advisors_test.go b/api-tests/server/advisors_test.go
index 44ad3676bf..d8ca14e3a9 100644
--- a/api-tests/server/advisors_test.go
+++ b/api-tests/server/advisors_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/server/alertmanager_test.go b/api-tests/server/alertmanager_test.go
index 3b31f745a6..1a2ecadab2 100644
--- a/api-tests/server/alertmanager_test.go
+++ b/api-tests/server/alertmanager_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/server/auth_test.go b/api-tests/server/auth_test.go
index f58a205190..99158daac5 100644
--- a/api-tests/server/auth_test.go
+++ b/api-tests/server/auth_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/server/helpers.go b/api-tests/server/helpers.go
index 8c2ed1dbca..60f96e5c50 100644
--- a/api-tests/server/helpers.go
+++ b/api-tests/server/helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/server/logs_test.go b/api-tests/server/logs_test.go
index d0ae29faa7..5c4585836c 100644
--- a/api-tests/server/logs_test.go
+++ b/api-tests/server/logs_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/server/panics_test.go b/api-tests/server/panics_test.go
index 216a0645e7..b2c565366b 100644
--- a/api-tests/server/panics_test.go
+++ b/api-tests/server/panics_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/server/platform_test.go b/api-tests/server/platform_test.go
index 2852f8947b..4f8670156b 100644
--- a/api-tests/server/platform_test.go
+++ b/api-tests/server/platform_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/server/readyz_test.go b/api-tests/server/readyz_test.go
index 093ea8c57e..25a05f13ad 100644
--- a/api-tests/server/readyz_test.go
+++ b/api-tests/server/readyz_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/server/settings_test.go b/api-tests/server/settings_test.go
index eca6865a29..73497ef213 100644
--- a/api-tests/server/settings_test.go
+++ b/api-tests/server/settings_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/server/updates_test.go b/api-tests/server/updates_test.go
index 560408eb24..f4b8c68336 100644
--- a/api-tests/server/updates_test.go
+++ b/api-tests/server/updates_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/server/version_test.go b/api-tests/server/version_test.go
index 0332c31c30..3ac20024b2 100644
--- a/api-tests/server/version_test.go
+++ b/api-tests/server/version_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api-tests/tools/tools.go b/api-tests/tools/tools.go
index 4da6391791..91e91b75dc 100644
--- a/api-tests/tools/tools.go
+++ b/api-tests/tools/tools.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api/agentpb/agent.go b/api/agentpb/agent.go
index 4b90297431..74cc4969e1 100644
--- a/api/agentpb/agent.go
+++ b/api/agentpb/agent.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api/agentpb/metadata.go b/api/agentpb/metadata.go
index 895a5d289f..0b456db85a 100644
--- a/api/agentpb/metadata.go
+++ b/api/agentpb/metadata.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api/agentpb/query.go b/api/agentpb/query.go
index 44d27edae6..069f020745 100644
--- a/api/agentpb/query.go
+++ b/api/agentpb/query.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api/agentpb/query_test.go b/api/agentpb/query_test.go
index a7c3f573e2..faaec610b9 100644
--- a/api/agentpb/query_test.go
+++ b/api/agentpb/query_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api/inventorypb/agents.go b/api/inventorypb/agents.go
index 8b919fe4eb..578b3f389c 100644
--- a/api/inventorypb/agents.go
+++ b/api/inventorypb/agents.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api/inventorypb/agents_test.go b/api/inventorypb/agents_test.go
index 2926fb74ca..f8f6e46248 100644
--- a/api/inventorypb/agents_test.go
+++ b/api/inventorypb/agents_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api/inventorypb/json/client/nodes/add_node_parameters.go b/api/inventorypb/json/client/nodes/add_node_parameters.go
new file mode 100644
index 0000000000..eb3fa2c34d
--- /dev/null
+++ b/api/inventorypb/json/client/nodes/add_node_parameters.go
@@ -0,0 +1,144 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package nodes
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "net/http"
+ "time"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ cr "github.com/go-openapi/runtime/client"
+ "github.com/go-openapi/strfmt"
+)
+
+// NewAddNodeParams creates a new AddNodeParams object,
+// with the default timeout for this client.
+//
+// Default values are not hydrated, since defaults are normally applied by the API server side.
+//
+// To enforce default values in parameter, use SetDefaults or WithDefaults.
+func NewAddNodeParams() *AddNodeParams {
+ return &AddNodeParams{
+ timeout: cr.DefaultTimeout,
+ }
+}
+
+// NewAddNodeParamsWithTimeout creates a new AddNodeParams object
+// with the ability to set a timeout on a request.
+func NewAddNodeParamsWithTimeout(timeout time.Duration) *AddNodeParams {
+ return &AddNodeParams{
+ timeout: timeout,
+ }
+}
+
+// NewAddNodeParamsWithContext creates a new AddNodeParams object
+// with the ability to set a context for a request.
+func NewAddNodeParamsWithContext(ctx context.Context) *AddNodeParams {
+ return &AddNodeParams{
+ Context: ctx,
+ }
+}
+
+// NewAddNodeParamsWithHTTPClient creates a new AddNodeParams object
+// with the ability to set a custom HTTPClient for a request.
+func NewAddNodeParamsWithHTTPClient(client *http.Client) *AddNodeParams {
+ return &AddNodeParams{
+ HTTPClient: client,
+ }
+}
+
+/*
+AddNodeParams contains all the parameters to send to the API endpoint
+
+ for the add node operation.
+
+ Typically these are written to a http.Request.
+*/
+type AddNodeParams struct {
+ // Body.
+ Body AddNodeBody
+
+ timeout time.Duration
+ Context context.Context
+ HTTPClient *http.Client
+}
+
+// WithDefaults hydrates default values in the add node params (not the query body).
+//
+// All values with no default are reset to their zero value.
+func (o *AddNodeParams) WithDefaults() *AddNodeParams {
+ o.SetDefaults()
+ return o
+}
+
+// SetDefaults hydrates default values in the add node params (not the query body).
+//
+// All values with no default are reset to their zero value.
+func (o *AddNodeParams) SetDefaults() {
+ // no default values defined for this parameter
+}
+
+// WithTimeout adds the timeout to the add node params
+func (o *AddNodeParams) WithTimeout(timeout time.Duration) *AddNodeParams {
+ o.SetTimeout(timeout)
+ return o
+}
+
+// SetTimeout adds the timeout to the add node params
+func (o *AddNodeParams) SetTimeout(timeout time.Duration) {
+ o.timeout = timeout
+}
+
+// WithContext adds the context to the add node params
+func (o *AddNodeParams) WithContext(ctx context.Context) *AddNodeParams {
+ o.SetContext(ctx)
+ return o
+}
+
+// SetContext adds the context to the add node params
+func (o *AddNodeParams) SetContext(ctx context.Context) {
+ o.Context = ctx
+}
+
+// WithHTTPClient adds the HTTPClient to the add node params
+func (o *AddNodeParams) WithHTTPClient(client *http.Client) *AddNodeParams {
+ o.SetHTTPClient(client)
+ return o
+}
+
+// SetHTTPClient adds the HTTPClient to the add node params
+func (o *AddNodeParams) SetHTTPClient(client *http.Client) {
+ o.HTTPClient = client
+}
+
+// WithBody adds the body to the add node params
+func (o *AddNodeParams) WithBody(body AddNodeBody) *AddNodeParams {
+ o.SetBody(body)
+ return o
+}
+
+// SetBody adds the body to the add node params
+func (o *AddNodeParams) SetBody(body AddNodeBody) {
+ o.Body = body
+}
+
+// WriteToRequest writes these params to a swagger request
+func (o *AddNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
+ if err := r.SetTimeout(o.timeout); err != nil {
+ return err
+ }
+ var res []error
+ if err := r.SetBodyParam(o.Body); err != nil {
+ return err
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
diff --git a/api/inventorypb/json/client/nodes/add_node_responses.go b/api/inventorypb/json/client/nodes/add_node_responses.go
new file mode 100644
index 0000000000..6242f93d67
--- /dev/null
+++ b/api/inventorypb/json/client/nodes/add_node_responses.go
@@ -0,0 +1,1363 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package nodes
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ "context"
+ "fmt"
+ "io"
+ "strconv"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/runtime"
+ "github.com/go-openapi/strfmt"
+ "github.com/go-openapi/swag"
+)
+
+// AddNodeReader is a Reader for the AddNode structure.
+type AddNodeReader struct {
+ formats strfmt.Registry
+}
+
+// ReadResponse reads a server response into the received o.
+func (o *AddNodeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
+ switch response.Code() {
+ case 200:
+ result := NewAddNodeOK()
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ return result, nil
+ default:
+ result := NewAddNodeDefault(response.Code())
+ if err := result.readResponse(response, consumer, o.formats); err != nil {
+ return nil, err
+ }
+ if response.Code()/100 == 2 {
+ return result, nil
+ }
+ return nil, result
+ }
+}
+
+// NewAddNodeOK creates a AddNodeOK with default headers values
+func NewAddNodeOK() *AddNodeOK {
+ return &AddNodeOK{}
+}
+
+/*
+AddNodeOK describes a response with status code 200, with default header values.
+
+A successful response.
+*/
+type AddNodeOK struct {
+ Payload *AddNodeOKBody
+}
+
+func (o *AddNodeOK) Error() string {
+ return fmt.Sprintf("[POST /v1/inventory/Nodes/Add][%d] addNodeOk %+v", 200, o.Payload)
+}
+
+func (o *AddNodeOK) GetPayload() *AddNodeOKBody {
+ return o.Payload
+}
+
+func (o *AddNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+ o.Payload = new(AddNodeOKBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
+
+// NewAddNodeDefault creates a AddNodeDefault with default headers values
+func NewAddNodeDefault(code int) *AddNodeDefault {
+ return &AddNodeDefault{
+ _statusCode: code,
+ }
+}
+
+/*
+AddNodeDefault describes a response with status code -1, with default header values.
+
+An unexpected error response.
+*/
+type AddNodeDefault struct {
+ _statusCode int
+
+ Payload *AddNodeDefaultBody
+}
+
+// Code gets the status code for the add node default response
+func (o *AddNodeDefault) Code() int {
+ return o._statusCode
+}
+
+func (o *AddNodeDefault) Error() string {
+ return fmt.Sprintf("[POST /v1/inventory/Nodes/Add][%d] AddNode default %+v", o._statusCode, o.Payload)
+}
+
+func (o *AddNodeDefault) GetPayload() *AddNodeDefaultBody {
+ return o.Payload
+}
+
+func (o *AddNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
+ o.Payload = new(AddNodeDefaultBody)
+
+ // response payload
+ if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
+ return err
+ }
+
+ return nil
+}
+
+/*
+AddNodeBody add node body
+swagger:model AddNodeBody
+*/
+type AddNodeBody struct {
+ // container
+ Container *AddNodeParamsBodyContainer `json:"container,omitempty"`
+
+ // generic
+ Generic *AddNodeParamsBodyGeneric `json:"generic,omitempty"`
+
+ // remote
+ Remote *AddNodeParamsBodyRemote `json:"remote,omitempty"`
+
+ // remote azure
+ RemoteAzure *AddNodeParamsBodyRemoteAzure `json:"remote_azure,omitempty"`
+
+ // remote rds
+ RemoteRDS *AddNodeParamsBodyRemoteRDS `json:"remote_rds,omitempty"`
+}
+
+// Validate validates this add node body
+func (o *AddNodeBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := o.validateContainer(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.validateGeneric(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.validateRemote(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.validateRemoteAzure(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.validateRemoteRDS(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (o *AddNodeBody) validateContainer(formats strfmt.Registry) error {
+ if swag.IsZero(o.Container) { // not required
+ return nil
+ }
+
+ if o.Container != nil {
+ if err := o.Container.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("body" + "." + "container")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("body" + "." + "container")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (o *AddNodeBody) validateGeneric(formats strfmt.Registry) error {
+ if swag.IsZero(o.Generic) { // not required
+ return nil
+ }
+
+ if o.Generic != nil {
+ if err := o.Generic.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("body" + "." + "generic")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("body" + "." + "generic")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (o *AddNodeBody) validateRemote(formats strfmt.Registry) error {
+ if swag.IsZero(o.Remote) { // not required
+ return nil
+ }
+
+ if o.Remote != nil {
+ if err := o.Remote.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("body" + "." + "remote")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("body" + "." + "remote")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (o *AddNodeBody) validateRemoteAzure(formats strfmt.Registry) error {
+ if swag.IsZero(o.RemoteAzure) { // not required
+ return nil
+ }
+
+ if o.RemoteAzure != nil {
+ if err := o.RemoteAzure.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("body" + "." + "remote_azure")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("body" + "." + "remote_azure")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (o *AddNodeBody) validateRemoteRDS(formats strfmt.Registry) error {
+ if swag.IsZero(o.RemoteRDS) { // not required
+ return nil
+ }
+
+ if o.RemoteRDS != nil {
+ if err := o.RemoteRDS.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("body" + "." + "remote_rds")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("body" + "." + "remote_rds")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// ContextValidate validate this add node body based on the context it is used
+func (o *AddNodeBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := o.contextValidateContainer(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.contextValidateGeneric(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.contextValidateRemote(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.contextValidateRemoteAzure(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.contextValidateRemoteRDS(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (o *AddNodeBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error {
+ if o.Container != nil {
+ if err := o.Container.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("body" + "." + "container")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("body" + "." + "container")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (o *AddNodeBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error {
+ if o.Generic != nil {
+ if err := o.Generic.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("body" + "." + "generic")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("body" + "." + "generic")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (o *AddNodeBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error {
+ if o.Remote != nil {
+ if err := o.Remote.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("body" + "." + "remote")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("body" + "." + "remote")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (o *AddNodeBody) contextValidateRemoteAzure(ctx context.Context, formats strfmt.Registry) error {
+ if o.RemoteAzure != nil {
+ if err := o.RemoteAzure.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("body" + "." + "remote_azure")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("body" + "." + "remote_azure")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (o *AddNodeBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error {
+ if o.RemoteRDS != nil {
+ if err := o.RemoteRDS.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("body" + "." + "remote_rds")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("body" + "." + "remote_rds")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (o *AddNodeBody) MarshalBinary() ([]byte, error) {
+ if o == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(o)
+}
+
+// UnmarshalBinary interface implementation
+func (o *AddNodeBody) UnmarshalBinary(b []byte) error {
+ var res AddNodeBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *o = res
+ return nil
+}
+
+/*
+AddNodeDefaultBody add node default body
+swagger:model AddNodeDefaultBody
+*/
+type AddNodeDefaultBody struct {
+ // code
+ Code int32 `json:"code,omitempty"`
+
+ // message
+ Message string `json:"message,omitempty"`
+
+ // details
+ Details []*AddNodeDefaultBodyDetailsItems0 `json:"details"`
+}
+
+// Validate validates this add node default body
+func (o *AddNodeDefaultBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := o.validateDetails(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (o *AddNodeDefaultBody) validateDetails(formats strfmt.Registry) error {
+ if swag.IsZero(o.Details) { // not required
+ return nil
+ }
+
+ for i := 0; i < len(o.Details); i++ {
+ if swag.IsZero(o.Details[i]) { // not required
+ continue
+ }
+
+ if o.Details[i] != nil {
+ if err := o.Details[i].Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("AddNode default" + "." + "details" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("AddNode default" + "." + "details" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+
+ }
+
+ return nil
+}
+
+// ContextValidate validate this add node default body based on the context it is used
+func (o *AddNodeDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := o.contextValidateDetails(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (o *AddNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error {
+ for i := 0; i < len(o.Details); i++ {
+ if o.Details[i] != nil {
+ if err := o.Details[i].ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("AddNode default" + "." + "details" + "." + strconv.Itoa(i))
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("AddNode default" + "." + "details" + "." + strconv.Itoa(i))
+ }
+ return err
+ }
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (o *AddNodeDefaultBody) MarshalBinary() ([]byte, error) {
+ if o == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(o)
+}
+
+// UnmarshalBinary interface implementation
+func (o *AddNodeDefaultBody) UnmarshalBinary(b []byte) error {
+ var res AddNodeDefaultBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *o = res
+ return nil
+}
+
+/*
+AddNodeDefaultBodyDetailsItems0 add node default body details items0
+swagger:model AddNodeDefaultBodyDetailsItems0
+*/
+type AddNodeDefaultBodyDetailsItems0 struct {
+ // at type
+ AtType string `json:"@type,omitempty"`
+}
+
+// Validate validates this add node default body details items0
+func (o *AddNodeDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error {
+ return nil
+}
+
+// ContextValidate validates this add node default body details items0 based on context it is used
+func (o *AddNodeDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (o *AddNodeDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) {
+ if o == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(o)
+}
+
+// UnmarshalBinary interface implementation
+func (o *AddNodeDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error {
+ var res AddNodeDefaultBodyDetailsItems0
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *o = res
+ return nil
+}
+
+/*
+AddNodeOKBody add node OK body
+swagger:model AddNodeOKBody
+*/
+type AddNodeOKBody struct {
+ // container
+ Container *AddNodeOKBodyContainer `json:"container,omitempty"`
+
+ // generic
+ Generic *AddNodeOKBodyGeneric `json:"generic,omitempty"`
+
+ // remote
+ Remote *AddNodeOKBodyRemote `json:"remote,omitempty"`
+
+ // remote azure database
+ RemoteAzureDatabase *AddNodeOKBodyRemoteAzureDatabase `json:"remote_azure_database,omitempty"`
+
+ // remote rds
+ RemoteRDS *AddNodeOKBodyRemoteRDS `json:"remote_rds,omitempty"`
+}
+
+// Validate validates this add node OK body
+func (o *AddNodeOKBody) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := o.validateContainer(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.validateGeneric(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.validateRemote(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.validateRemoteAzureDatabase(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.validateRemoteRDS(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (o *AddNodeOKBody) validateContainer(formats strfmt.Registry) error {
+ if swag.IsZero(o.Container) { // not required
+ return nil
+ }
+
+ if o.Container != nil {
+ if err := o.Container.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("addNodeOk" + "." + "container")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("addNodeOk" + "." + "container")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (o *AddNodeOKBody) validateGeneric(formats strfmt.Registry) error {
+ if swag.IsZero(o.Generic) { // not required
+ return nil
+ }
+
+ if o.Generic != nil {
+ if err := o.Generic.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("addNodeOk" + "." + "generic")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("addNodeOk" + "." + "generic")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (o *AddNodeOKBody) validateRemote(formats strfmt.Registry) error {
+ if swag.IsZero(o.Remote) { // not required
+ return nil
+ }
+
+ if o.Remote != nil {
+ if err := o.Remote.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("addNodeOk" + "." + "remote")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("addNodeOk" + "." + "remote")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (o *AddNodeOKBody) validateRemoteAzureDatabase(formats strfmt.Registry) error {
+ if swag.IsZero(o.RemoteAzureDatabase) { // not required
+ return nil
+ }
+
+ if o.RemoteAzureDatabase != nil {
+ if err := o.RemoteAzureDatabase.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("addNodeOk" + "." + "remote_azure_database")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("addNodeOk" + "." + "remote_azure_database")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (o *AddNodeOKBody) validateRemoteRDS(formats strfmt.Registry) error {
+ if swag.IsZero(o.RemoteRDS) { // not required
+ return nil
+ }
+
+ if o.RemoteRDS != nil {
+ if err := o.RemoteRDS.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("addNodeOk" + "." + "remote_rds")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("addNodeOk" + "." + "remote_rds")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// ContextValidate validate this add node OK body based on the context it is used
+func (o *AddNodeOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ var res []error
+
+ if err := o.contextValidateContainer(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.contextValidateGeneric(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.contextValidateRemote(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.contextValidateRemoteAzureDatabase(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if err := o.contextValidateRemoteRDS(ctx, formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (o *AddNodeOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error {
+ if o.Container != nil {
+ if err := o.Container.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("addNodeOk" + "." + "container")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("addNodeOk" + "." + "container")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (o *AddNodeOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error {
+ if o.Generic != nil {
+ if err := o.Generic.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("addNodeOk" + "." + "generic")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("addNodeOk" + "." + "generic")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (o *AddNodeOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error {
+ if o.Remote != nil {
+ if err := o.Remote.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("addNodeOk" + "." + "remote")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("addNodeOk" + "." + "remote")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (o *AddNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error {
+ if o.RemoteAzureDatabase != nil {
+ if err := o.RemoteAzureDatabase.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("addNodeOk" + "." + "remote_azure_database")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("addNodeOk" + "." + "remote_azure_database")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (o *AddNodeOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error {
+ if o.RemoteRDS != nil {
+ if err := o.RemoteRDS.ContextValidate(ctx, formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("addNodeOk" + "." + "remote_rds")
+ } else if ce, ok := err.(*errors.CompositeError); ok {
+ return ce.ValidateName("addNodeOk" + "." + "remote_rds")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (o *AddNodeOKBody) MarshalBinary() ([]byte, error) {
+ if o == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(o)
+}
+
+// UnmarshalBinary interface implementation
+func (o *AddNodeOKBody) UnmarshalBinary(b []byte) error {
+ var res AddNodeOKBody
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *o = res
+ return nil
+}
+
+/*
+AddNodeOKBodyContainer ContainerNode represents a Docker container.
+swagger:model AddNodeOKBodyContainer
+*/
+type AddNodeOKBodyContainer struct {
+ // Unique randomly generated instance identifier.
+ NodeID string `json:"node_id,omitempty"`
+
+ // Unique across all Nodes user-defined name.
+ NodeName string `json:"node_name,omitempty"`
+
+ // Node address (DNS name or IP).
+ Address string `json:"address,omitempty"`
+
+ // Linux machine-id of the Generic Node where this Container Node runs.
+ MachineID string `json:"machine_id,omitempty"`
+
+ // Container identifier. If specified, must be a unique Docker container identifier.
+ ContainerID string `json:"container_id,omitempty"`
+
+ // Container name.
+ ContainerName string `json:"container_name,omitempty"`
+
+ // Node model.
+ NodeModel string `json:"node_model,omitempty"`
+
+ // Node region.
+ Region string `json:"region,omitempty"`
+
+ // Node availability zone.
+ Az string `json:"az,omitempty"`
+
+ // Custom user-assigned labels.
+ CustomLabels map[string]string `json:"custom_labels,omitempty"`
+}
+
+// Validate validates this add node OK body container
+func (o *AddNodeOKBodyContainer) Validate(formats strfmt.Registry) error {
+ return nil
+}
+
+// ContextValidate validates this add node OK body container based on context it is used
+func (o *AddNodeOKBodyContainer) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (o *AddNodeOKBodyContainer) MarshalBinary() ([]byte, error) {
+ if o == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(o)
+}
+
+// UnmarshalBinary interface implementation
+func (o *AddNodeOKBodyContainer) UnmarshalBinary(b []byte) error {
+ var res AddNodeOKBodyContainer
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *o = res
+ return nil
+}
+
+/*
+AddNodeOKBodyGeneric GenericNode represents a bare metal server or virtual machine.
+swagger:model AddNodeOKBodyGeneric
+*/
+type AddNodeOKBodyGeneric struct {
+ // Unique randomly generated instance identifier.
+ NodeID string `json:"node_id,omitempty"`
+
+ // Unique across all Nodes user-defined name.
+ NodeName string `json:"node_name,omitempty"`
+
+ // Node address (DNS name or IP).
+ Address string `json:"address,omitempty"`
+
+ // Linux machine-id.
+ MachineID string `json:"machine_id,omitempty"`
+
+ // Linux distribution name and version.
+ Distro string `json:"distro,omitempty"`
+
+ // Node model.
+ NodeModel string `json:"node_model,omitempty"`
+
+ // Node region.
+ Region string `json:"region,omitempty"`
+
+ // Node availability zone.
+ Az string `json:"az,omitempty"`
+
+ // Custom user-assigned labels.
+ CustomLabels map[string]string `json:"custom_labels,omitempty"`
+}
+
+// Validate validates this add node OK body generic
+func (o *AddNodeOKBodyGeneric) Validate(formats strfmt.Registry) error {
+ return nil
+}
+
+// ContextValidate validates this add node OK body generic based on context it is used
+func (o *AddNodeOKBodyGeneric) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (o *AddNodeOKBodyGeneric) MarshalBinary() ([]byte, error) {
+ if o == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(o)
+}
+
+// UnmarshalBinary interface implementation
+func (o *AddNodeOKBodyGeneric) UnmarshalBinary(b []byte) error {
+ var res AddNodeOKBodyGeneric
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *o = res
+ return nil
+}
+
+/*
+AddNodeOKBodyRemote RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes.
+swagger:model AddNodeOKBodyRemote
+*/
+type AddNodeOKBodyRemote struct {
+ // Unique randomly generated instance identifier.
+ NodeID string `json:"node_id,omitempty"`
+
+ // Unique across all Nodes user-defined name.
+ NodeName string `json:"node_name,omitempty"`
+
+ // Node address (DNS name or IP).
+ Address string `json:"address,omitempty"`
+
+ // Node model.
+ NodeModel string `json:"node_model,omitempty"`
+
+ // Node region.
+ Region string `json:"region,omitempty"`
+
+ // Node availability zone.
+ Az string `json:"az,omitempty"`
+
+ // Custom user-assigned labels.
+ CustomLabels map[string]string `json:"custom_labels,omitempty"`
+}
+
+// Validate validates this add node OK body remote
+func (o *AddNodeOKBodyRemote) Validate(formats strfmt.Registry) error {
+ return nil
+}
+
+// ContextValidate validates this add node OK body remote based on context it is used
+func (o *AddNodeOKBodyRemote) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (o *AddNodeOKBodyRemote) MarshalBinary() ([]byte, error) {
+ if o == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(o)
+}
+
+// UnmarshalBinary interface implementation
+func (o *AddNodeOKBodyRemote) UnmarshalBinary(b []byte) error {
+ var res AddNodeOKBodyRemote
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *o = res
+ return nil
+}
+
+/*
+AddNodeOKBodyRemoteAzureDatabase RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes.
+swagger:model AddNodeOKBodyRemoteAzureDatabase
+*/
+type AddNodeOKBodyRemoteAzureDatabase struct {
+ // Unique randomly generated instance identifier.
+ NodeID string `json:"node_id,omitempty"`
+
+ // Unique across all Nodes user-defined name.
+ NodeName string `json:"node_name,omitempty"`
+
+ // DB instance identifier.
+ Address string `json:"address,omitempty"`
+
+ // Node model.
+ NodeModel string `json:"node_model,omitempty"`
+
+ // Node region.
+ Region string `json:"region,omitempty"`
+
+ // Node availability zone.
+ Az string `json:"az,omitempty"`
+
+ // Custom user-assigned labels.
+ CustomLabels map[string]string `json:"custom_labels,omitempty"`
+}
+
+// Validate validates this add node OK body remote azure database
+func (o *AddNodeOKBodyRemoteAzureDatabase) Validate(formats strfmt.Registry) error {
+ return nil
+}
+
+// ContextValidate validates this add node OK body remote azure database based on context it is used
+func (o *AddNodeOKBodyRemoteAzureDatabase) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (o *AddNodeOKBodyRemoteAzureDatabase) MarshalBinary() ([]byte, error) {
+ if o == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(o)
+}
+
+// UnmarshalBinary interface implementation
+func (o *AddNodeOKBodyRemoteAzureDatabase) UnmarshalBinary(b []byte) error {
+ var res AddNodeOKBodyRemoteAzureDatabase
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *o = res
+ return nil
+}
+
+/*
+AddNodeOKBodyRemoteRDS RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.
+swagger:model AddNodeOKBodyRemoteRDS
+*/
+type AddNodeOKBodyRemoteRDS struct {
+ // Unique randomly generated instance identifier.
+ NodeID string `json:"node_id,omitempty"`
+
+ // Unique across all Nodes user-defined name.
+ NodeName string `json:"node_name,omitempty"`
+
+ // DB instance identifier.
+ Address string `json:"address,omitempty"`
+
+ // Node model.
+ NodeModel string `json:"node_model,omitempty"`
+
+ // Node region.
+ Region string `json:"region,omitempty"`
+
+ // Node availability zone.
+ Az string `json:"az,omitempty"`
+
+ // Custom user-assigned labels.
+ CustomLabels map[string]string `json:"custom_labels,omitempty"`
+}
+
+// Validate validates this add node OK body remote RDS
+func (o *AddNodeOKBodyRemoteRDS) Validate(formats strfmt.Registry) error {
+ return nil
+}
+
+// ContextValidate validates this add node OK body remote RDS based on context it is used
+func (o *AddNodeOKBodyRemoteRDS) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (o *AddNodeOKBodyRemoteRDS) MarshalBinary() ([]byte, error) {
+ if o == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(o)
+}
+
+// UnmarshalBinary interface implementation
+func (o *AddNodeOKBodyRemoteRDS) UnmarshalBinary(b []byte) error {
+ var res AddNodeOKBodyRemoteRDS
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *o = res
+ return nil
+}
+
+/*
+AddNodeParamsBodyContainer add node params body container
+swagger:model AddNodeParamsBodyContainer
+*/
+type AddNodeParamsBodyContainer struct {
+ // Unique across all Nodes user-defined name.
+ NodeName string `json:"node_name,omitempty"`
+
+ // Node address (DNS name or IP).
+ Address string `json:"address,omitempty"`
+
+ // Linux machine-id of the Generic Node where this Container Node runs.
+ MachineID string `json:"machine_id,omitempty"`
+
+ // Container identifier. If specified, must be a unique Docker container identifier.
+ ContainerID string `json:"container_id,omitempty"`
+
+ // Container name.
+ ContainerName string `json:"container_name,omitempty"`
+
+ // Node model.
+ NodeModel string `json:"node_model,omitempty"`
+
+ // Node region.
+ Region string `json:"region,omitempty"`
+
+ // Node availability zone.
+ Az string `json:"az,omitempty"`
+
+ // Custom user-assigned labels.
+ CustomLabels map[string]string `json:"custom_labels,omitempty"`
+}
+
+// Validate validates this add node params body container
+func (o *AddNodeParamsBodyContainer) Validate(formats strfmt.Registry) error {
+ return nil
+}
+
+// ContextValidate validates this add node params body container based on context it is used
+func (o *AddNodeParamsBodyContainer) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (o *AddNodeParamsBodyContainer) MarshalBinary() ([]byte, error) {
+ if o == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(o)
+}
+
+// UnmarshalBinary interface implementation
+func (o *AddNodeParamsBodyContainer) UnmarshalBinary(b []byte) error {
+ var res AddNodeParamsBodyContainer
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *o = res
+ return nil
+}
+
+/*
+AddNodeParamsBodyGeneric add node params body generic
+swagger:model AddNodeParamsBodyGeneric
+*/
+type AddNodeParamsBodyGeneric struct {
+ // Unique across all Nodes user-defined name.
+ NodeName string `json:"node_name,omitempty"`
+
+ // Node address (DNS name or IP).
+ Address string `json:"address,omitempty"`
+
+ // Linux machine-id.
+ MachineID string `json:"machine_id,omitempty"`
+
+ // Linux distribution name and version.
+ Distro string `json:"distro,omitempty"`
+
+ // Node model.
+ NodeModel string `json:"node_model,omitempty"`
+
+ // Node region.
+ Region string `json:"region,omitempty"`
+
+ // Node availability zone.
+ Az string `json:"az,omitempty"`
+
+ // Custom user-assigned labels.
+ CustomLabels map[string]string `json:"custom_labels,omitempty"`
+}
+
+// Validate validates this add node params body generic
+func (o *AddNodeParamsBodyGeneric) Validate(formats strfmt.Registry) error {
+ return nil
+}
+
+// ContextValidate validates this add node params body generic based on context it is used
+func (o *AddNodeParamsBodyGeneric) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (o *AddNodeParamsBodyGeneric) MarshalBinary() ([]byte, error) {
+ if o == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(o)
+}
+
+// UnmarshalBinary interface implementation
+func (o *AddNodeParamsBodyGeneric) UnmarshalBinary(b []byte) error {
+ var res AddNodeParamsBodyGeneric
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *o = res
+ return nil
+}
+
+/*
+AddNodeParamsBodyRemote add node params body remote
+swagger:model AddNodeParamsBodyRemote
+*/
+type AddNodeParamsBodyRemote struct {
+ // Unique across all Nodes user-defined name.
+ NodeName string `json:"node_name,omitempty"`
+
+ // Node address (DNS name or IP).
+ Address string `json:"address,omitempty"`
+
+ // Node model.
+ NodeModel string `json:"node_model,omitempty"`
+
+ // Node region.
+ Region string `json:"region,omitempty"`
+
+ // Node availability zone.
+ Az string `json:"az,omitempty"`
+
+ // Custom user-assigned labels.
+ CustomLabels map[string]string `json:"custom_labels,omitempty"`
+}
+
+// Validate validates this add node params body remote
+func (o *AddNodeParamsBodyRemote) Validate(formats strfmt.Registry) error {
+ return nil
+}
+
+// ContextValidate validates this add node params body remote based on context it is used
+func (o *AddNodeParamsBodyRemote) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (o *AddNodeParamsBodyRemote) MarshalBinary() ([]byte, error) {
+ if o == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(o)
+}
+
+// UnmarshalBinary interface implementation
+func (o *AddNodeParamsBodyRemote) UnmarshalBinary(b []byte) error {
+ var res AddNodeParamsBodyRemote
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *o = res
+ return nil
+}
+
+/*
+AddNodeParamsBodyRemoteAzure add node params body remote azure
+swagger:model AddNodeParamsBodyRemoteAzure
+*/
+type AddNodeParamsBodyRemoteAzure struct {
+ // Unique across all Nodes user-defined name.
+ NodeName string `json:"node_name,omitempty"`
+
+ // DB instance identifier.
+ Address string `json:"address,omitempty"`
+
+ // Node model.
+ NodeModel string `json:"node_model,omitempty"`
+
+ // Node region.
+ Region string `json:"region,omitempty"`
+
+ // Node availability zone.
+ Az string `json:"az,omitempty"`
+
+ // Custom user-assigned labels.
+ CustomLabels map[string]string `json:"custom_labels,omitempty"`
+}
+
+// Validate validates this add node params body remote azure
+func (o *AddNodeParamsBodyRemoteAzure) Validate(formats strfmt.Registry) error {
+ return nil
+}
+
+// ContextValidate validates this add node params body remote azure based on context it is used
+func (o *AddNodeParamsBodyRemoteAzure) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (o *AddNodeParamsBodyRemoteAzure) MarshalBinary() ([]byte, error) {
+ if o == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(o)
+}
+
+// UnmarshalBinary interface implementation
+func (o *AddNodeParamsBodyRemoteAzure) UnmarshalBinary(b []byte) error {
+ var res AddNodeParamsBodyRemoteAzure
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *o = res
+ return nil
+}
+
+/*
+AddNodeParamsBodyRemoteRDS add node params body remote RDS
+swagger:model AddNodeParamsBodyRemoteRDS
+*/
+type AddNodeParamsBodyRemoteRDS struct {
+ // Unique across all Nodes user-defined name.
+ NodeName string `json:"node_name,omitempty"`
+
+ // DB instance identifier.
+ Address string `json:"address,omitempty"`
+
+ // Node model.
+ NodeModel string `json:"node_model,omitempty"`
+
+ // Node region.
+ Region string `json:"region,omitempty"`
+
+ // Node availability zone.
+ Az string `json:"az,omitempty"`
+
+ // Custom user-assigned labels.
+ CustomLabels map[string]string `json:"custom_labels,omitempty"`
+}
+
+// Validate validates this add node params body remote RDS
+func (o *AddNodeParamsBodyRemoteRDS) Validate(formats strfmt.Registry) error {
+ return nil
+}
+
+// ContextValidate validates this add node params body remote RDS based on context it is used
+func (o *AddNodeParamsBodyRemoteRDS) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (o *AddNodeParamsBodyRemoteRDS) MarshalBinary() ([]byte, error) {
+ if o == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(o)
+}
+
+// UnmarshalBinary interface implementation
+func (o *AddNodeParamsBodyRemoteRDS) UnmarshalBinary(b []byte) error {
+ var res AddNodeParamsBodyRemoteRDS
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *o = res
+ return nil
+}
diff --git a/api/inventorypb/json/client/nodes/add_remote_rds_node_responses.go b/api/inventorypb/json/client/nodes/add_remote_rds_node_responses.go
index cbdcadf303..614e87de2a 100644
--- a/api/inventorypb/json/client/nodes/add_remote_rds_node_responses.go
+++ b/api/inventorypb/json/client/nodes/add_remote_rds_node_responses.go
@@ -424,10 +424,6 @@ type AddRemoteRDSNodeOKBodyRemoteRDS struct {
Az string `json:"az,omitempty"`
// Custom user-assigned labels.
- //
- // TODO https://jira.percona.com/browse/PMM-4314
- // string az = 8;
- // string node_model = 9;
CustomLabels map[string]string `json:"custom_labels,omitempty"`
}
diff --git a/api/inventorypb/json/client/nodes/get_node_responses.go b/api/inventorypb/json/client/nodes/get_node_responses.go
index 3f22cfb738..6e1a34baf1 100644
--- a/api/inventorypb/json/client/nodes/get_node_responses.go
+++ b/api/inventorypb/json/client/nodes/get_node_responses.go
@@ -824,10 +824,6 @@ type GetNodeOKBodyRemoteRDS struct {
Az string `json:"az,omitempty"`
// Custom user-assigned labels.
- //
- // TODO https://jira.percona.com/browse/PMM-4314
- // string az = 8;
- // string node_model = 9;
CustomLabels map[string]string `json:"custom_labels,omitempty"`
}
diff --git a/api/inventorypb/json/client/nodes/list_nodes_responses.go b/api/inventorypb/json/client/nodes/list_nodes_responses.go
index ca9b8b4dae..e8bf829521 100644
--- a/api/inventorypb/json/client/nodes/list_nodes_responses.go
+++ b/api/inventorypb/json/client/nodes/list_nodes_responses.go
@@ -935,10 +935,6 @@ type ListNodesOKBodyRemoteRDSItems0 struct {
Az string `json:"az,omitempty"`
// Custom user-assigned labels.
- //
- // TODO https://jira.percona.com/browse/PMM-4314
- // string az = 8;
- // string node_model = 9;
CustomLabels map[string]string `json:"custom_labels,omitempty"`
}
diff --git a/api/inventorypb/json/client/nodes/nodes_client.go b/api/inventorypb/json/client/nodes/nodes_client.go
index 48d9df9312..1088e70c62 100644
--- a/api/inventorypb/json/client/nodes/nodes_client.go
+++ b/api/inventorypb/json/client/nodes/nodes_client.go
@@ -32,6 +32,8 @@ type ClientService interface {
AddGenericNode(params *AddGenericNodeParams, opts ...ClientOption) (*AddGenericNodeOK, error)
+ AddNode(params *AddNodeParams, opts ...ClientOption) (*AddNodeOK, error)
+
AddRemoteAzureDatabaseNode(params *AddRemoteAzureDatabaseNodeParams, opts ...ClientOption) (*AddRemoteAzureDatabaseNodeOK, error)
AddRemoteNode(params *AddRemoteNodeParams, opts ...ClientOption) (*AddRemoteNodeOK, error)
@@ -48,9 +50,9 @@ type ClientService interface {
}
/*
-AddContainerNode adds container node
+AddContainerNode adds a container node
-Adds container Node.
+Adds a container Node.
*/
func (a *Client) AddContainerNode(params *AddContainerNodeParams, opts ...ClientOption) (*AddContainerNodeOK, error) {
// TODO: Validate the params before sending
@@ -87,9 +89,9 @@ func (a *Client) AddContainerNode(params *AddContainerNodeParams, opts ...Client
}
/*
-AddGenericNode adds generic node
+AddGenericNode adds a generic node
-Adds generic Node.
+Adds a generic Node.
*/
func (a *Client) AddGenericNode(params *AddGenericNodeParams, opts ...ClientOption) (*AddGenericNodeOK, error) {
// TODO: Validate the params before sending
@@ -126,9 +128,48 @@ func (a *Client) AddGenericNode(params *AddGenericNodeParams, opts ...ClientOpti
}
/*
-AddRemoteAzureDatabaseNode adds remote azure database node
+AddNode adds node
+
+Adds a Node.
+*/
+func (a *Client) AddNode(params *AddNodeParams, opts ...ClientOption) (*AddNodeOK, error) {
+ // TODO: Validate the params before sending
+ if params == nil {
+ params = NewAddNodeParams()
+ }
+ op := &runtime.ClientOperation{
+ ID: "AddNode",
+ Method: "POST",
+ PathPattern: "/v1/inventory/Nodes/Add",
+ ProducesMediaTypes: []string{"application/json"},
+ ConsumesMediaTypes: []string{"application/json"},
+ Schemes: []string{"http", "https"},
+ Params: params,
+ Reader: &AddNodeReader{formats: a.formats},
+ Context: params.Context,
+ Client: params.HTTPClient,
+ }
+ for _, opt := range opts {
+ opt(op)
+ }
+
+ result, err := a.transport.Submit(op)
+ if err != nil {
+ return nil, err
+ }
+ success, ok := result.(*AddNodeOK)
+ if ok {
+ return success, nil
+ }
+ // unexpected success response
+ unexpectedSuccess := result.(*AddNodeDefault)
+ return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
+}
+
+/*
+AddRemoteAzureDatabaseNode addas a remote azure database node
-Adds remote Azure database Node.
+Adds a remote Azure database Node.
*/
func (a *Client) AddRemoteAzureDatabaseNode(params *AddRemoteAzureDatabaseNodeParams, opts ...ClientOption) (*AddRemoteAzureDatabaseNodeOK, error) {
// TODO: Validate the params before sending
@@ -165,9 +206,9 @@ func (a *Client) AddRemoteAzureDatabaseNode(params *AddRemoteAzureDatabaseNodePa
}
/*
-AddRemoteNode adds remote node
+AddRemoteNode adds a remote node
-Adds remote Node.
+Adds a remote Node.
*/
func (a *Client) AddRemoteNode(params *AddRemoteNodeParams, opts ...ClientOption) (*AddRemoteNodeOK, error) {
// TODO: Validate the params before sending
@@ -204,9 +245,9 @@ func (a *Client) AddRemoteNode(params *AddRemoteNodeParams, opts ...ClientOption
}
/*
-AddRemoteRDSNode adds remote RDS node
+AddRemoteRDSNode adds a remote RDS node
-Adds remote RDS Node.
+Adds a remote RDS Node.
*/
func (a *Client) AddRemoteRDSNode(params *AddRemoteRDSNodeParams, opts ...ClientOption) (*AddRemoteRDSNodeOK, error) {
// TODO: Validate the params before sending
@@ -321,9 +362,9 @@ func (a *Client) ListNodes(params *ListNodesParams, opts ...ClientOption) (*List
}
/*
-RemoveNode removes node
+RemoveNode removes a node
-Removes Node.
+Removes a Node.
*/
func (a *Client) RemoveNode(params *RemoveNodeParams, opts ...ClientOption) (*RemoveNodeOK, error) {
// TODO: Validate the params before sending
diff --git a/api/inventorypb/json/inventorypb.json b/api/inventorypb/json/inventorypb.json
index 73ab50ba4d..f1cbb4024b 100644
--- a/api/inventorypb/json/inventorypb.json
+++ b/api/inventorypb/json/inventorypb.json
@@ -9156,14 +9156,548 @@
}
}
},
+ "/v1/inventory/Nodes/Add": {
+ "post": {
+ "description": "Adds a Node.",
+ "tags": [
+ "Nodes"
+ ],
+ "summary": "Add Node",
+ "operationId": "AddNode",
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "type": "object",
+ "properties": {
+ "container": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "description": "Node address (DNS name or IP).",
+ "type": "string",
+ "x-order": 1
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 7
+ },
+ "container_id": {
+ "description": "Container identifier. If specified, must be a unique Docker container identifier.",
+ "type": "string",
+ "x-order": 3
+ },
+ "container_name": {
+ "description": "Container name.",
+ "type": "string",
+ "x-order": 4
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 8
+ },
+ "machine_id": {
+ "description": "Linux machine-id of the Generic Node where this Container Node runs.",
+ "type": "string",
+ "x-order": 2
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 5
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 0
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 6
+ }
+ },
+ "x-order": 1
+ },
+ "generic": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "description": "Node address (DNS name or IP).",
+ "type": "string",
+ "x-order": 1
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 6
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 7
+ },
+ "distro": {
+ "description": "Linux distribution name and version.",
+ "type": "string",
+ "x-order": 3
+ },
+ "machine_id": {
+ "description": "Linux machine-id.",
+ "type": "string",
+ "x-order": 2
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 4
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 0
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 5
+ }
+ },
+ "x-order": 0
+ },
+ "remote": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "description": "Node address (DNS name or IP).",
+ "type": "string",
+ "x-order": 1
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 4
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 5
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 2
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 0
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 3
+ }
+ },
+ "x-order": 2
+ },
+ "remote_azure": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "description": "DB instance identifier.",
+ "type": "string",
+ "x-order": 1
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 4
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 5
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 2
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 0
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 3
+ }
+ },
+ "x-order": 4
+ },
+ "remote_rds": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "description": "DB instance identifier.",
+ "type": "string",
+ "x-order": 1
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 4
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 5
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 2
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 0
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 3
+ }
+ },
+ "x-order": 3
+ }
+ }
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "type": "object",
+ "properties": {
+ "container": {
+ "description": "ContainerNode represents a Docker container.",
+ "type": "object",
+ "properties": {
+ "address": {
+ "description": "Node address (DNS name or IP).",
+ "type": "string",
+ "x-order": 2
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 8
+ },
+ "container_id": {
+ "description": "Container identifier. If specified, must be a unique Docker container identifier.",
+ "type": "string",
+ "x-order": 4
+ },
+ "container_name": {
+ "description": "Container name.",
+ "type": "string",
+ "x-order": 5
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 9
+ },
+ "machine_id": {
+ "description": "Linux machine-id of the Generic Node where this Container Node runs.",
+ "type": "string",
+ "x-order": 3
+ },
+ "node_id": {
+ "description": "Unique randomly generated instance identifier.",
+ "type": "string",
+ "x-order": 0
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 6
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 1
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 7
+ }
+ },
+ "x-order": 1
+ },
+ "generic": {
+ "description": "GenericNode represents a bare metal server or virtual machine.",
+ "type": "object",
+ "properties": {
+ "address": {
+ "description": "Node address (DNS name or IP).",
+ "type": "string",
+ "x-order": 2
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 7
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 8
+ },
+ "distro": {
+ "description": "Linux distribution name and version.",
+ "type": "string",
+ "x-order": 4
+ },
+ "machine_id": {
+ "description": "Linux machine-id.",
+ "type": "string",
+ "x-order": 3
+ },
+ "node_id": {
+ "description": "Unique randomly generated instance identifier.",
+ "type": "string",
+ "x-order": 0
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 5
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 1
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 6
+ }
+ },
+ "x-order": 0
+ },
+ "remote": {
+ "description": "RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes.",
+ "type": "object",
+ "properties": {
+ "address": {
+ "description": "Node address (DNS name or IP).",
+ "type": "string",
+ "x-order": 2
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 5
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 6
+ },
+ "node_id": {
+ "description": "Unique randomly generated instance identifier.",
+ "type": "string",
+ "x-order": 0
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 3
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 1
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 4
+ }
+ },
+ "x-order": 2
+ },
+ "remote_azure_database": {
+ "description": "RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes.",
+ "type": "object",
+ "properties": {
+ "address": {
+ "description": "DB instance identifier.",
+ "type": "string",
+ "x-order": 2
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 5
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 6
+ },
+ "node_id": {
+ "description": "Unique randomly generated instance identifier.",
+ "type": "string",
+ "x-order": 0
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 3
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 1
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 4
+ }
+ },
+ "x-order": 4
+ },
+ "remote_rds": {
+ "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.",
+ "type": "object",
+ "properties": {
+ "address": {
+ "description": "DB instance identifier.",
+ "type": "string",
+ "x-order": 2
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 5
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 6
+ },
+ "node_id": {
+ "description": "Unique randomly generated instance identifier.",
+ "type": "string",
+ "x-order": 0
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 3
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 1
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 4
+ }
+ },
+ "x-order": 3
+ }
+ }
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32",
+ "x-order": 0
+ },
+ "details": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "@type": {
+ "type": "string",
+ "x-order": 0
+ }
+ },
+ "additionalProperties": false
+ },
+ "x-order": 2
+ },
+ "message": {
+ "type": "string",
+ "x-order": 1
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/v1/inventory/Nodes/AddContainer": {
"post": {
- "description": "Adds container Node.",
+ "description": "Adds a container Node.",
"tags": [
"Nodes"
],
- "summary": "Add Container Node",
+ "summary": "Add a Container Node",
"operationId": "AddContainerNode",
+ "deprecated": true,
"parameters": [
{
"name": "body",
@@ -9329,12 +9863,13 @@
},
"/v1/inventory/Nodes/AddGeneric": {
"post": {
- "description": "Adds generic Node.",
+ "description": "Adds a generic Node.",
"tags": [
"Nodes"
],
- "summary": "Add Generic Node",
+ "summary": "Add a Generic Node",
"operationId": "AddGenericNode",
+ "deprecated": true,
"parameters": [
{
"name": "body",
@@ -9490,12 +10025,13 @@
},
"/v1/inventory/Nodes/AddRemote": {
"post": {
- "description": "Adds remote Node.",
+ "description": "Adds a remote Node.",
"tags": [
"Nodes"
],
- "summary": "Add Remote Node",
+ "summary": "Add a Remote Node",
"operationId": "AddRemoteNode",
+ "deprecated": true,
"parameters": [
{
"name": "body",
@@ -9631,12 +10167,13 @@
},
"/v1/inventory/Nodes/AddRemoteAzureDatabase": {
"post": {
- "description": "Adds remote Azure database Node.",
+ "description": "Adds a remote Azure database Node.",
"tags": [
"Nodes"
],
- "summary": "Add Remote Azure Database Node",
+ "summary": "Adda a Remote Azure Database Node",
"operationId": "AddRemoteAzureDatabaseNode",
+ "deprecated": true,
"parameters": [
{
"name": "body",
@@ -9772,12 +10309,13 @@
},
"/v1/inventory/Nodes/AddRemoteRDS": {
"post": {
- "description": "Adds remote RDS Node.",
+ "description": "Adds a remote RDS Node.",
"tags": [
"Nodes"
],
- "summary": "Add Remote RDS Node",
+ "summary": "Add a Remote RDS Node",
"operationId": "AddRemoteRDSNode",
+ "deprecated": true,
"parameters": [
{
"name": "body",
@@ -9844,7 +10382,7 @@
"x-order": 5
},
"custom_labels": {
- "description": "Custom user-assigned labels.\n\nTODO https://jira.percona.com/browse/PMM-4314\n string az = 8;\n string node_model = 9;",
+ "description": "Custom user-assigned labels.",
"type": "object",
"additionalProperties": {
"type": "string"
@@ -10162,7 +10700,7 @@
"x-order": 5
},
"custom_labels": {
- "description": "Custom user-assigned labels.\n\nTODO https://jira.percona.com/browse/PMM-4314\n string az = 8;\n string node_model = 9;",
+ "description": "Custom user-assigned labels.",
"type": "object",
"additionalProperties": {
"type": "string"
@@ -10503,7 +11041,7 @@
"x-order": 5
},
"custom_labels": {
- "description": "Custom user-assigned labels.\n\nTODO https://jira.percona.com/browse/PMM-4314\n string az = 8;\n string node_model = 9;",
+ "description": "Custom user-assigned labels.",
"type": "object",
"additionalProperties": {
"type": "string"
@@ -10573,11 +11111,11 @@
},
"/v1/inventory/Nodes/Remove": {
"post": {
- "description": "Removes Node.",
+ "description": "Removes a Node.",
"tags": [
"Nodes"
],
- "summary": "Remove Node",
+ "summary": "Remove a Node",
"operationId": "RemoveNode",
"parameters": [
{
diff --git a/api/inventorypb/nodes.go b/api/inventorypb/nodes.go
index 5612d35323..f51e9b9ecc 100644
--- a/api/inventorypb/nodes.go
+++ b/api/inventorypb/nodes.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api/inventorypb/nodes.pb.go b/api/inventorypb/nodes.pb.go
index afabb19136..b0589adcca 100644
--- a/api/inventorypb/nodes.pb.go
+++ b/api/inventorypb/nodes.pb.go
@@ -941,6 +941,252 @@ func (*GetNodeResponse_RemoteRds) isGetNodeResponse_Node() {}
func (*GetNodeResponse_RemoteAzureDatabase) isGetNodeResponse_Node() {}
+type AddNodeRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Request:
+ //
+ // *AddNodeRequest_Generic
+ // *AddNodeRequest_Container
+ // *AddNodeRequest_Remote
+ // *AddNodeRequest_RemoteRds
+ // *AddNodeRequest_RemoteAzure
+ Request isAddNodeRequest_Request `protobuf_oneof:"request"`
+}
+
+func (x *AddNodeRequest) Reset() {
+ *x = AddNodeRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_inventorypb_nodes_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AddNodeRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AddNodeRequest) ProtoMessage() {}
+
+func (x *AddNodeRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_inventorypb_nodes_proto_msgTypes[9]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AddNodeRequest.ProtoReflect.Descriptor instead.
+func (*AddNodeRequest) Descriptor() ([]byte, []int) {
+ return file_inventorypb_nodes_proto_rawDescGZIP(), []int{9}
+}
+
+func (m *AddNodeRequest) GetRequest() isAddNodeRequest_Request {
+ if m != nil {
+ return m.Request
+ }
+ return nil
+}
+
+func (x *AddNodeRequest) GetGeneric() *AddGenericNodeRequest {
+ if x, ok := x.GetRequest().(*AddNodeRequest_Generic); ok {
+ return x.Generic
+ }
+ return nil
+}
+
+func (x *AddNodeRequest) GetContainer() *AddContainerNodeRequest {
+ if x, ok := x.GetRequest().(*AddNodeRequest_Container); ok {
+ return x.Container
+ }
+ return nil
+}
+
+func (x *AddNodeRequest) GetRemote() *AddRemoteNodeRequest {
+ if x, ok := x.GetRequest().(*AddNodeRequest_Remote); ok {
+ return x.Remote
+ }
+ return nil
+}
+
+func (x *AddNodeRequest) GetRemoteRds() *AddRemoteRDSNodeRequest {
+ if x, ok := x.GetRequest().(*AddNodeRequest_RemoteRds); ok {
+ return x.RemoteRds
+ }
+ return nil
+}
+
+func (x *AddNodeRequest) GetRemoteAzure() *AddRemoteAzureDatabaseNodeRequest {
+ if x, ok := x.GetRequest().(*AddNodeRequest_RemoteAzure); ok {
+ return x.RemoteAzure
+ }
+ return nil
+}
+
+type isAddNodeRequest_Request interface {
+ isAddNodeRequest_Request()
+}
+
+type AddNodeRequest_Generic struct {
+ Generic *AddGenericNodeRequest `protobuf:"bytes,1,opt,name=generic,proto3,oneof"`
+}
+
+type AddNodeRequest_Container struct {
+ Container *AddContainerNodeRequest `protobuf:"bytes,2,opt,name=container,proto3,oneof"`
+}
+
+type AddNodeRequest_Remote struct {
+ Remote *AddRemoteNodeRequest `protobuf:"bytes,3,opt,name=remote,proto3,oneof"`
+}
+
+type AddNodeRequest_RemoteRds struct {
+ RemoteRds *AddRemoteRDSNodeRequest `protobuf:"bytes,4,opt,name=remote_rds,json=remoteRds,proto3,oneof"`
+}
+
+type AddNodeRequest_RemoteAzure struct {
+ RemoteAzure *AddRemoteAzureDatabaseNodeRequest `protobuf:"bytes,5,opt,name=remote_azure,json=remoteAzure,proto3,oneof"`
+}
+
+func (*AddNodeRequest_Generic) isAddNodeRequest_Request() {}
+
+func (*AddNodeRequest_Container) isAddNodeRequest_Request() {}
+
+func (*AddNodeRequest_Remote) isAddNodeRequest_Request() {}
+
+func (*AddNodeRequest_RemoteRds) isAddNodeRequest_Request() {}
+
+func (*AddNodeRequest_RemoteAzure) isAddNodeRequest_Request() {}
+
+type AddNodeResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Node:
+ //
+ // *AddNodeResponse_Generic
+ // *AddNodeResponse_Container
+ // *AddNodeResponse_Remote
+ // *AddNodeResponse_RemoteRds
+ // *AddNodeResponse_RemoteAzureDatabase
+ Node isAddNodeResponse_Node `protobuf_oneof:"node"`
+}
+
+func (x *AddNodeResponse) Reset() {
+ *x = AddNodeResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_inventorypb_nodes_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AddNodeResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AddNodeResponse) ProtoMessage() {}
+
+func (x *AddNodeResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_inventorypb_nodes_proto_msgTypes[10]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AddNodeResponse.ProtoReflect.Descriptor instead.
+func (*AddNodeResponse) Descriptor() ([]byte, []int) {
+ return file_inventorypb_nodes_proto_rawDescGZIP(), []int{10}
+}
+
+func (m *AddNodeResponse) GetNode() isAddNodeResponse_Node {
+ if m != nil {
+ return m.Node
+ }
+ return nil
+}
+
+func (x *AddNodeResponse) GetGeneric() *GenericNode {
+ if x, ok := x.GetNode().(*AddNodeResponse_Generic); ok {
+ return x.Generic
+ }
+ return nil
+}
+
+func (x *AddNodeResponse) GetContainer() *ContainerNode {
+ if x, ok := x.GetNode().(*AddNodeResponse_Container); ok {
+ return x.Container
+ }
+ return nil
+}
+
+func (x *AddNodeResponse) GetRemote() *RemoteNode {
+ if x, ok := x.GetNode().(*AddNodeResponse_Remote); ok {
+ return x.Remote
+ }
+ return nil
+}
+
+func (x *AddNodeResponse) GetRemoteRds() *RemoteRDSNode {
+ if x, ok := x.GetNode().(*AddNodeResponse_RemoteRds); ok {
+ return x.RemoteRds
+ }
+ return nil
+}
+
+func (x *AddNodeResponse) GetRemoteAzureDatabase() *RemoteAzureDatabaseNode {
+ if x, ok := x.GetNode().(*AddNodeResponse_RemoteAzureDatabase); ok {
+ return x.RemoteAzureDatabase
+ }
+ return nil
+}
+
+type isAddNodeResponse_Node interface {
+ isAddNodeResponse_Node()
+}
+
+type AddNodeResponse_Generic struct {
+ Generic *GenericNode `protobuf:"bytes,1,opt,name=generic,proto3,oneof"`
+}
+
+type AddNodeResponse_Container struct {
+ Container *ContainerNode `protobuf:"bytes,2,opt,name=container,proto3,oneof"`
+}
+
+type AddNodeResponse_Remote struct {
+ Remote *RemoteNode `protobuf:"bytes,3,opt,name=remote,proto3,oneof"`
+}
+
+type AddNodeResponse_RemoteRds struct {
+ RemoteRds *RemoteRDSNode `protobuf:"bytes,4,opt,name=remote_rds,json=remoteRds,proto3,oneof"`
+}
+
+type AddNodeResponse_RemoteAzureDatabase struct {
+ RemoteAzureDatabase *RemoteAzureDatabaseNode `protobuf:"bytes,5,opt,name=remote_azure_database,json=remoteAzureDatabase,proto3,oneof"`
+}
+
+func (*AddNodeResponse_Generic) isAddNodeResponse_Node() {}
+
+func (*AddNodeResponse_Container) isAddNodeResponse_Node() {}
+
+func (*AddNodeResponse_Remote) isAddNodeResponse_Node() {}
+
+func (*AddNodeResponse_RemoteRds) isAddNodeResponse_Node() {}
+
+func (*AddNodeResponse_RemoteAzureDatabase) isAddNodeResponse_Node() {}
+
type AddGenericNodeRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -967,7 +1213,7 @@ type AddGenericNodeRequest struct {
func (x *AddGenericNodeRequest) Reset() {
*x = AddGenericNodeRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_inventorypb_nodes_proto_msgTypes[9]
+ mi := &file_inventorypb_nodes_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -980,7 +1226,7 @@ func (x *AddGenericNodeRequest) String() string {
func (*AddGenericNodeRequest) ProtoMessage() {}
func (x *AddGenericNodeRequest) ProtoReflect() protoreflect.Message {
- mi := &file_inventorypb_nodes_proto_msgTypes[9]
+ mi := &file_inventorypb_nodes_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -993,7 +1239,7 @@ func (x *AddGenericNodeRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddGenericNodeRequest.ProtoReflect.Descriptor instead.
func (*AddGenericNodeRequest) Descriptor() ([]byte, []int) {
- return file_inventorypb_nodes_proto_rawDescGZIP(), []int{9}
+ return file_inventorypb_nodes_proto_rawDescGZIP(), []int{11}
}
func (x *AddGenericNodeRequest) GetNodeName() string {
@@ -1052,6 +1298,7 @@ func (x *AddGenericNodeRequest) GetCustomLabels() map[string]string {
return nil
}
+// Deprecated: Marked as deprecated in inventorypb/nodes.proto.
type AddGenericNodeResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1063,7 +1310,7 @@ type AddGenericNodeResponse struct {
func (x *AddGenericNodeResponse) Reset() {
*x = AddGenericNodeResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_inventorypb_nodes_proto_msgTypes[10]
+ mi := &file_inventorypb_nodes_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1076,7 +1323,7 @@ func (x *AddGenericNodeResponse) String() string {
func (*AddGenericNodeResponse) ProtoMessage() {}
func (x *AddGenericNodeResponse) ProtoReflect() protoreflect.Message {
- mi := &file_inventorypb_nodes_proto_msgTypes[10]
+ mi := &file_inventorypb_nodes_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1089,7 +1336,7 @@ func (x *AddGenericNodeResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddGenericNodeResponse.ProtoReflect.Descriptor instead.
func (*AddGenericNodeResponse) Descriptor() ([]byte, []int) {
- return file_inventorypb_nodes_proto_rawDescGZIP(), []int{10}
+ return file_inventorypb_nodes_proto_rawDescGZIP(), []int{12}
}
func (x *AddGenericNodeResponse) GetGeneric() *GenericNode {
@@ -1127,7 +1374,7 @@ type AddContainerNodeRequest struct {
func (x *AddContainerNodeRequest) Reset() {
*x = AddContainerNodeRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_inventorypb_nodes_proto_msgTypes[11]
+ mi := &file_inventorypb_nodes_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1140,7 +1387,7 @@ func (x *AddContainerNodeRequest) String() string {
func (*AddContainerNodeRequest) ProtoMessage() {}
func (x *AddContainerNodeRequest) ProtoReflect() protoreflect.Message {
- mi := &file_inventorypb_nodes_proto_msgTypes[11]
+ mi := &file_inventorypb_nodes_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1153,7 +1400,7 @@ func (x *AddContainerNodeRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddContainerNodeRequest.ProtoReflect.Descriptor instead.
func (*AddContainerNodeRequest) Descriptor() ([]byte, []int) {
- return file_inventorypb_nodes_proto_rawDescGZIP(), []int{11}
+ return file_inventorypb_nodes_proto_rawDescGZIP(), []int{13}
}
func (x *AddContainerNodeRequest) GetNodeName() string {
@@ -1219,6 +1466,7 @@ func (x *AddContainerNodeRequest) GetCustomLabels() map[string]string {
return nil
}
+// Deprecated: Marked as deprecated in inventorypb/nodes.proto.
type AddContainerNodeResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1230,7 +1478,7 @@ type AddContainerNodeResponse struct {
func (x *AddContainerNodeResponse) Reset() {
*x = AddContainerNodeResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_inventorypb_nodes_proto_msgTypes[12]
+ mi := &file_inventorypb_nodes_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1243,7 +1491,7 @@ func (x *AddContainerNodeResponse) String() string {
func (*AddContainerNodeResponse) ProtoMessage() {}
func (x *AddContainerNodeResponse) ProtoReflect() protoreflect.Message {
- mi := &file_inventorypb_nodes_proto_msgTypes[12]
+ mi := &file_inventorypb_nodes_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1256,7 +1504,7 @@ func (x *AddContainerNodeResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddContainerNodeResponse.ProtoReflect.Descriptor instead.
func (*AddContainerNodeResponse) Descriptor() ([]byte, []int) {
- return file_inventorypb_nodes_proto_rawDescGZIP(), []int{12}
+ return file_inventorypb_nodes_proto_rawDescGZIP(), []int{14}
}
func (x *AddContainerNodeResponse) GetContainer() *ContainerNode {
@@ -1288,7 +1536,7 @@ type AddRemoteNodeRequest struct {
func (x *AddRemoteNodeRequest) Reset() {
*x = AddRemoteNodeRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_inventorypb_nodes_proto_msgTypes[13]
+ mi := &file_inventorypb_nodes_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1301,7 +1549,7 @@ func (x *AddRemoteNodeRequest) String() string {
func (*AddRemoteNodeRequest) ProtoMessage() {}
func (x *AddRemoteNodeRequest) ProtoReflect() protoreflect.Message {
- mi := &file_inventorypb_nodes_proto_msgTypes[13]
+ mi := &file_inventorypb_nodes_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1314,7 +1562,7 @@ func (x *AddRemoteNodeRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddRemoteNodeRequest.ProtoReflect.Descriptor instead.
func (*AddRemoteNodeRequest) Descriptor() ([]byte, []int) {
- return file_inventorypb_nodes_proto_rawDescGZIP(), []int{13}
+ return file_inventorypb_nodes_proto_rawDescGZIP(), []int{15}
}
func (x *AddRemoteNodeRequest) GetNodeName() string {
@@ -1359,6 +1607,7 @@ func (x *AddRemoteNodeRequest) GetCustomLabels() map[string]string {
return nil
}
+// Deprecated: Marked as deprecated in inventorypb/nodes.proto.
type AddRemoteNodeResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1370,7 +1619,7 @@ type AddRemoteNodeResponse struct {
func (x *AddRemoteNodeResponse) Reset() {
*x = AddRemoteNodeResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_inventorypb_nodes_proto_msgTypes[14]
+ mi := &file_inventorypb_nodes_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1383,7 +1632,7 @@ func (x *AddRemoteNodeResponse) String() string {
func (*AddRemoteNodeResponse) ProtoMessage() {}
func (x *AddRemoteNodeResponse) ProtoReflect() protoreflect.Message {
- mi := &file_inventorypb_nodes_proto_msgTypes[14]
+ mi := &file_inventorypb_nodes_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1396,7 +1645,7 @@ func (x *AddRemoteNodeResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddRemoteNodeResponse.ProtoReflect.Descriptor instead.
func (*AddRemoteNodeResponse) Descriptor() ([]byte, []int) {
- return file_inventorypb_nodes_proto_rawDescGZIP(), []int{14}
+ return file_inventorypb_nodes_proto_rawDescGZIP(), []int{16}
}
func (x *AddRemoteNodeResponse) GetRemote() *RemoteNode {
@@ -1428,7 +1677,7 @@ type AddRemoteRDSNodeRequest struct {
func (x *AddRemoteRDSNodeRequest) Reset() {
*x = AddRemoteRDSNodeRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_inventorypb_nodes_proto_msgTypes[15]
+ mi := &file_inventorypb_nodes_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1441,7 +1690,7 @@ func (x *AddRemoteRDSNodeRequest) String() string {
func (*AddRemoteRDSNodeRequest) ProtoMessage() {}
func (x *AddRemoteRDSNodeRequest) ProtoReflect() protoreflect.Message {
- mi := &file_inventorypb_nodes_proto_msgTypes[15]
+ mi := &file_inventorypb_nodes_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1454,7 +1703,7 @@ func (x *AddRemoteRDSNodeRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddRemoteRDSNodeRequest.ProtoReflect.Descriptor instead.
func (*AddRemoteRDSNodeRequest) Descriptor() ([]byte, []int) {
- return file_inventorypb_nodes_proto_rawDescGZIP(), []int{15}
+ return file_inventorypb_nodes_proto_rawDescGZIP(), []int{17}
}
func (x *AddRemoteRDSNodeRequest) GetNodeName() string {
@@ -1499,6 +1748,7 @@ func (x *AddRemoteRDSNodeRequest) GetCustomLabels() map[string]string {
return nil
}
+// Deprecated: Marked as deprecated in inventorypb/nodes.proto.
type AddRemoteRDSNodeResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1510,7 +1760,7 @@ type AddRemoteRDSNodeResponse struct {
func (x *AddRemoteRDSNodeResponse) Reset() {
*x = AddRemoteRDSNodeResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_inventorypb_nodes_proto_msgTypes[16]
+ mi := &file_inventorypb_nodes_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1523,7 +1773,7 @@ func (x *AddRemoteRDSNodeResponse) String() string {
func (*AddRemoteRDSNodeResponse) ProtoMessage() {}
func (x *AddRemoteRDSNodeResponse) ProtoReflect() protoreflect.Message {
- mi := &file_inventorypb_nodes_proto_msgTypes[16]
+ mi := &file_inventorypb_nodes_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1536,7 +1786,7 @@ func (x *AddRemoteRDSNodeResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddRemoteRDSNodeResponse.ProtoReflect.Descriptor instead.
func (*AddRemoteRDSNodeResponse) Descriptor() ([]byte, []int) {
- return file_inventorypb_nodes_proto_rawDescGZIP(), []int{16}
+ return file_inventorypb_nodes_proto_rawDescGZIP(), []int{18}
}
func (x *AddRemoteRDSNodeResponse) GetRemoteRds() *RemoteRDSNode {
@@ -1568,7 +1818,7 @@ type AddRemoteAzureDatabaseNodeRequest struct {
func (x *AddRemoteAzureDatabaseNodeRequest) Reset() {
*x = AddRemoteAzureDatabaseNodeRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_inventorypb_nodes_proto_msgTypes[17]
+ mi := &file_inventorypb_nodes_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1581,7 +1831,7 @@ func (x *AddRemoteAzureDatabaseNodeRequest) String() string {
func (*AddRemoteAzureDatabaseNodeRequest) ProtoMessage() {}
func (x *AddRemoteAzureDatabaseNodeRequest) ProtoReflect() protoreflect.Message {
- mi := &file_inventorypb_nodes_proto_msgTypes[17]
+ mi := &file_inventorypb_nodes_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1594,7 +1844,7 @@ func (x *AddRemoteAzureDatabaseNodeRequest) ProtoReflect() protoreflect.Message
// Deprecated: Use AddRemoteAzureDatabaseNodeRequest.ProtoReflect.Descriptor instead.
func (*AddRemoteAzureDatabaseNodeRequest) Descriptor() ([]byte, []int) {
- return file_inventorypb_nodes_proto_rawDescGZIP(), []int{17}
+ return file_inventorypb_nodes_proto_rawDescGZIP(), []int{19}
}
func (x *AddRemoteAzureDatabaseNodeRequest) GetNodeName() string {
@@ -1639,6 +1889,7 @@ func (x *AddRemoteAzureDatabaseNodeRequest) GetCustomLabels() map[string]string
return nil
}
+// Deprecated: Marked as deprecated in inventorypb/nodes.proto.
type AddRemoteAzureDatabaseNodeResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1650,7 +1901,7 @@ type AddRemoteAzureDatabaseNodeResponse struct {
func (x *AddRemoteAzureDatabaseNodeResponse) Reset() {
*x = AddRemoteAzureDatabaseNodeResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_inventorypb_nodes_proto_msgTypes[18]
+ mi := &file_inventorypb_nodes_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1663,7 +1914,7 @@ func (x *AddRemoteAzureDatabaseNodeResponse) String() string {
func (*AddRemoteAzureDatabaseNodeResponse) ProtoMessage() {}
func (x *AddRemoteAzureDatabaseNodeResponse) ProtoReflect() protoreflect.Message {
- mi := &file_inventorypb_nodes_proto_msgTypes[18]
+ mi := &file_inventorypb_nodes_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1676,7 +1927,7 @@ func (x *AddRemoteAzureDatabaseNodeResponse) ProtoReflect() protoreflect.Message
// Deprecated: Use AddRemoteAzureDatabaseNodeResponse.ProtoReflect.Descriptor instead.
func (*AddRemoteAzureDatabaseNodeResponse) Descriptor() ([]byte, []int) {
- return file_inventorypb_nodes_proto_rawDescGZIP(), []int{18}
+ return file_inventorypb_nodes_proto_rawDescGZIP(), []int{20}
}
func (x *AddRemoteAzureDatabaseNodeResponse) GetRemoteAzureDatabase() *RemoteAzureDatabaseNode {
@@ -1700,7 +1951,7 @@ type RemoveNodeRequest struct {
func (x *RemoveNodeRequest) Reset() {
*x = RemoveNodeRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_inventorypb_nodes_proto_msgTypes[19]
+ mi := &file_inventorypb_nodes_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1713,7 +1964,7 @@ func (x *RemoveNodeRequest) String() string {
func (*RemoveNodeRequest) ProtoMessage() {}
func (x *RemoveNodeRequest) ProtoReflect() protoreflect.Message {
- mi := &file_inventorypb_nodes_proto_msgTypes[19]
+ mi := &file_inventorypb_nodes_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1726,7 +1977,7 @@ func (x *RemoveNodeRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use RemoveNodeRequest.ProtoReflect.Descriptor instead.
func (*RemoveNodeRequest) Descriptor() ([]byte, []int) {
- return file_inventorypb_nodes_proto_rawDescGZIP(), []int{19}
+ return file_inventorypb_nodes_proto_rawDescGZIP(), []int{21}
}
func (x *RemoveNodeRequest) GetNodeId() string {
@@ -1752,7 +2003,7 @@ type RemoveNodeResponse struct {
func (x *RemoveNodeResponse) Reset() {
*x = RemoveNodeResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_inventorypb_nodes_proto_msgTypes[20]
+ mi := &file_inventorypb_nodes_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1765,7 +2016,7 @@ func (x *RemoveNodeResponse) String() string {
func (*RemoveNodeResponse) ProtoMessage() {}
func (x *RemoveNodeResponse) ProtoReflect() protoreflect.Message {
- mi := &file_inventorypb_nodes_proto_msgTypes[20]
+ mi := &file_inventorypb_nodes_proto_msgTypes[22]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1778,7 +2029,7 @@ func (x *RemoveNodeResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use RemoveNodeResponse.ProtoReflect.Descriptor instead.
func (*RemoveNodeResponse) Descriptor() ([]byte, []int) {
- return file_inventorypb_nodes_proto_rawDescGZIP(), []int{20}
+ return file_inventorypb_nodes_proto_rawDescGZIP(), []int{22}
}
var File_inventorypb_nodes_proto protoreflect.FileDescriptor
@@ -1950,68 +2201,165 @@ var file_inventorypb_nodes_proto_rawDesc = []byte{
0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62,
0x61, 0x73, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x74,
0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x42, 0x06,
- 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0xf8, 0x02, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x47, 0x65,
- 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0xf0, 0x02, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x4e, 0x6f,
+ 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x07, 0x67, 0x65, 0x6e,
+ 0x65, 0x72, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x69, 0x6e, 0x76,
+ 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69,
+ 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x07,
+ 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x12, 0x42, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61,
+ 0x69, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6e, 0x76,
+ 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69,
+ 0x6e, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00,
+ 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x06, 0x72,
+ 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x69, 0x6e,
+ 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74,
+ 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x06,
+ 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65,
+ 0x5f, 0x72, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6e, 0x76,
+ 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65,
+ 0x52, 0x44, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00,
+ 0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x64, 0x73, 0x12, 0x51, 0x0a, 0x0c, 0x72,
+ 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x2c, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64,
+ 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61,
+ 0x62, 0x61, 0x73, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48,
+ 0x00, 0x52, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x42, 0x09,
+ 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xcd, 0x02, 0x0a, 0x0f, 0x41, 0x64,
+ 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a,
+ 0x07, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
+ 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72,
+ 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x07, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69,
+ 0x63, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79,
+ 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00,
+ 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x72,
+ 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x69, 0x6e,
+ 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4e, 0x6f,
+ 0x64, 0x65, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x12, 0x39, 0x0a, 0x0a,
+ 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x72, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x18, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6d,
+ 0x6f, 0x74, 0x65, 0x52, 0x44, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x09, 0x72, 0x65,
+ 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x64, 0x73, 0x12, 0x58, 0x0a, 0x15, 0x72, 0x65, 0x6d, 0x6f, 0x74,
+ 0x65, 0x5f, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f,
+ 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61,
+ 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x13, 0x72, 0x65,
+ 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
+ 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0xf8, 0x02, 0x0a, 0x15, 0x41, 0x64,
+ 0x64, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52,
+ 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x07, 0x61, 0x64, 0x64,
+ 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72,
+ 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a,
+ 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x09, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64,
+ 0x69, 0x73, 0x74, 0x72, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x73,
+ 0x74, 0x72, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65,
+ 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f, 0x64,
+ 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a,
+ 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x61, 0x7a, 0x12, 0x57, 0x0a, 0x0d, 0x63, 0x75,
+ 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x32, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64,
+ 0x64, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73,
+ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62,
+ 0x65, 0x6c, 0x73, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62,
+ 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
+ 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4e, 0x0a, 0x16, 0x41, 0x64, 0x64, 0x47, 0x65, 0x6e, 0x65, 0x72,
+ 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30,
+ 0x0a, 0x07, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x16, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x6e, 0x65,
+ 0x72, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63,
+ 0x3a, 0x02, 0x18, 0x01, 0x22, 0xae, 0x03, 0x0a, 0x17, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74,
+ 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x24, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6e, 0x6f,
0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01,
0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x63,
0x68, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d,
- 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x73, 0x74,
- 0x72, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x73, 0x74, 0x72, 0x6f,
- 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x05,
+ 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74,
+ 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
+ 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63,
+ 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61,
+ 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
+ 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f, 0x64, 0x65,
+ 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18,
+ 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x61, 0x7a, 0x12, 0x59, 0x0a, 0x0d, 0x63, 0x75, 0x73,
+ 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x34, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64,
+ 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c,
+ 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61,
+ 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61,
+ 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x56, 0x0a, 0x18, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74,
+ 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x36, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79,
+ 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x09,
+ 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xbf, 0x02,
+ 0x0a, 0x14, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02,
+ 0x10, 0x01, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x07,
+ 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa,
+ 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12,
+ 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x16,
+ 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+ 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x02, 0x61, 0x7a, 0x12, 0x56, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
+ 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e,
+ 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d,
+ 0x6f, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43,
+ 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
+ 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x3f,
+ 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e,
+ 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
+ 0x4a, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f,
+ 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e,
+ 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52,
+ 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xce, 0x02, 0x0a, 0x17,
+ 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x44, 0x53, 0x4e, 0x6f, 0x64, 0x65,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72,
+ 0x02, 0x10, 0x01, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a,
+ 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07,
+ 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
+ 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12,
- 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18, 0x07, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x02, 0x61, 0x7a, 0x12, 0x57, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f,
- 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32,
- 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x47, 0x65,
- 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74,
- 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73,
- 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73,
- 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
- 0x01, 0x22, 0x4a, 0x0a, 0x16, 0x41, 0x64, 0x64, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4e,
- 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x67,
- 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x69,
- 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63,
- 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x22, 0xae, 0x03,
- 0x0a, 0x17, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x6f,
- 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x09, 0x6e, 0x6f, 0x64,
- 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42,
- 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12,
- 0x21, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65,
- 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49,
- 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69,
- 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
- 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
- 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f,
- 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e,
- 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65,
- 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69,
- 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
- 0x61, 0x7a, 0x12, 0x59, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62,
- 0x65, 0x6c, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x69, 0x6e, 0x76, 0x65,
- 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
- 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x75,
- 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
- 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x3f, 0x0a,
- 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74,
- 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x52,
- 0x0a, 0x18, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x6f,
- 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x63, 0x6f,
- 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e,
- 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69,
- 0x6e, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
- 0x65, 0x72, 0x22, 0xbf, 0x02, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65,
+ 0x1f, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e,
+ 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x61, 0x7a,
+ 0x12, 0x59, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c,
+ 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74,
+ 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x44, 0x53,
+ 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74,
+ 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63,
+ 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x3f, 0x0a, 0x11, 0x43,
+ 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
+ 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
+ 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x57, 0x0a, 0x18,
+ 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x44, 0x53, 0x4e, 0x6f, 0x64, 0x65,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x6f,
+ 0x74, 0x65, 0x5f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x69,
+ 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52,
+ 0x44, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x64,
+ 0x73, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xe2, 0x02, 0x0a, 0x21, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d,
+ 0x6f, 0x74, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x09, 0x6e,
0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07,
0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d,
@@ -2019,192 +2367,152 @@ var file_inventorypb_nodes_proto_rawDesc = []byte{
0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64,
0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f,
- 0x64, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x61,
- 0x7a, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x61, 0x7a, 0x12, 0x56, 0x0a, 0x0d, 0x63,
- 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41,
- 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73,
- 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62,
- 0x65, 0x6c, 0x73, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62,
- 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x3a, 0x02, 0x38, 0x01, 0x22, 0x46, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74,
- 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a,
- 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
- 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65,
- 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x22, 0xce, 0x02, 0x0a,
- 0x17, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x44, 0x53, 0x4e, 0x6f, 0x64,
- 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65,
- 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04,
- 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21,
- 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42,
- 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
- 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c,
- 0x12, 0x1f, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f,
- 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x61,
- 0x7a, 0x12, 0x59, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65,
- 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e,
- 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x44,
- 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x75, 0x73,
- 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c,
- 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x3f, 0x0a, 0x11,
- 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72,
- 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
- 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x53, 0x0a,
- 0x18, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x44, 0x53, 0x4e, 0x6f, 0x64,
- 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x72, 0x65, 0x6d,
- 0x6f, 0x74, 0x65, 0x5f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e,
- 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65,
- 0x52, 0x44, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52,
- 0x64, 0x73, 0x22, 0xe2, 0x02, 0x0a, 0x21, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65,
- 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4e, 0x6f, 0x64,
- 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65,
- 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04,
- 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21,
- 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42,
- 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
- 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c,
- 0x12, 0x1f, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f,
- 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x61,
- 0x7a, 0x12, 0x63, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65,
- 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e,
- 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x7a,
- 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62,
- 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
- 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d,
- 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
- 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
- 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7c, 0x0a, 0x22, 0x41, 0x64, 0x64, 0x52, 0x65,
- 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
- 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a,
- 0x15, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x61,
- 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69,
- 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41,
- 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4e, 0x6f, 0x64, 0x65,
- 0x52, 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74,
- 0x61, 0x62, 0x61, 0x73, 0x65, 0x22, 0x4b, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e,
- 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x6e, 0x6f,
- 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04,
- 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05,
- 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72,
- 0x63, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x8d, 0x01, 0x0a, 0x08, 0x4e, 0x6f, 0x64,
- 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59,
- 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c,
- 0x47, 0x45, 0x4e, 0x45, 0x52, 0x49, 0x43, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x10, 0x01, 0x12, 0x12,
- 0x0a, 0x0e, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x44, 0x45,
- 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x4e, 0x4f, 0x44,
- 0x45, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x44,
- 0x53, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x10, 0x04, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x4d, 0x4f,
- 0x54, 0x45, 0x5f, 0x41, 0x5a, 0x55, 0x52, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53,
- 0x45, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x10, 0x05, 0x32, 0x82, 0x0b, 0x0a, 0x05, 0x4e, 0x6f, 0x64,
- 0x65, 0x73, 0x12, 0x98, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73,
- 0x12, 0x1b, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x4c, 0x69, 0x73,
- 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e,
- 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f,
- 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x92, 0x41, 0x2a,
- 0x12, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x1a, 0x1c, 0x52, 0x65,
- 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20,
- 0x61, 0x6c, 0x6c, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d,
- 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f,
- 0x72, 0x79, 0x2f, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x8f, 0x01,
- 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x2e, 0x69, 0x6e, 0x76, 0x65,
- 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79,
- 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x22, 0x4d, 0x92, 0x41, 0x28, 0x12, 0x08, 0x47, 0x65, 0x74, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x1a,
- 0x1c, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c,
- 0x65, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0x2e, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, 0x65,
- 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x47, 0x65, 0x74, 0x12,
- 0xa9, 0x01, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4e, 0x6f,
- 0x64, 0x65, 0x12, 0x20, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41,
- 0x64, 0x64, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79,
- 0x2e, 0x41, 0x64, 0x64, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x92, 0x41, 0x26, 0x12, 0x10, 0x41, 0x64,
- 0x64, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x12,
- 0x41, 0x64, 0x64, 0x73, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x20, 0x4e, 0x6f, 0x64,
- 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x76, 0x31,
+ 0x64, 0x65, 0x6c, 0x12, 0x1f, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x72, 0x65,
+ 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x02, 0x61, 0x7a, 0x12, 0x63, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c,
+ 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x69, 0x6e,
+ 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74,
+ 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4e, 0x6f,
+ 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d,
+ 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73,
+ 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73,
+ 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
+ 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
+ 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x80, 0x01, 0x0a, 0x22, 0x41,
+ 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74,
+ 0x61, 0x62, 0x61, 0x73, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x56, 0x0a, 0x15, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x7a, 0x75, 0x72,
+ 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x22, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6d,
+ 0x6f, 0x74, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
+ 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x7a, 0x75, 0x72,
+ 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x4b, 0x0a,
+ 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x6e, 0x6f,
+ 0x64, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x52, 0x65,
+ 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x2a, 0x8d, 0x01, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a,
+ 0x11, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c,
+ 0x49, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x49, 0x43, 0x5f,
+ 0x4e, 0x4f, 0x44, 0x45, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49,
+ 0x4e, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45,
+ 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x52,
+ 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x44, 0x53, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x10, 0x04,
+ 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x41, 0x5a, 0x55, 0x52, 0x45,
+ 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x10, 0x05,
+ 0x32, 0xb6, 0x0c, 0x0a, 0x05, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x98, 0x01, 0x0a, 0x09, 0x4c,
+ 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e,
+ 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72,
+ 0x79, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x50, 0x92, 0x41, 0x2a, 0x12, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x4e,
+ 0x6f, 0x64, 0x65, 0x73, 0x1a, 0x1c, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20,
+ 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x4e, 0x6f, 0x64, 0x65,
+ 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f, 0x76, 0x31,
0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x4e, 0x6f, 0x64, 0x65, 0x73,
- 0x2f, 0x41, 0x64, 0x64, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x12, 0xb5, 0x01, 0x0a, 0x10,
- 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65,
- 0x12, 0x22, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64,
- 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79,
- 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x6f, 0x64,
- 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, 0x92, 0x41, 0x2a, 0x12, 0x12,
- 0x41, 0x64, 0x64, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x20, 0x4e, 0x6f,
- 0x64, 0x65, 0x1a, 0x14, 0x41, 0x64, 0x64, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
- 0x65, 0x72, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01,
- 0x2a, 0x22, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79,
- 0x2f, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69,
- 0x6e, 0x65, 0x72, 0x12, 0xa3, 0x01, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74,
- 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72,
- 0x79, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f,
- 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x92, 0x41, 0x24, 0x12, 0x0f, 0x41,
- 0x64, 0x64, 0x20, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x11,
- 0x41, 0x64, 0x64, 0x73, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x4e, 0x6f, 0x64, 0x65,
- 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f,
+ 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x8f, 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64,
+ 0x65, 0x12, 0x19, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x47, 0x65,
+ 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x69,
+ 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x92, 0x41, 0x28, 0x12, 0x08, 0x47,
+ 0x65, 0x74, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x1c, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73,
+ 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x20, 0x62,
+ 0x79, 0x20, 0x49, 0x44, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17,
+ 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x4e, 0x6f,
+ 0x64, 0x65, 0x73, 0x2f, 0x47, 0x65, 0x74, 0x12, 0x7f, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x4e, 0x6f,
+ 0x64, 0x65, 0x12, 0x19, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41,
+ 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e,
+ 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64,
+ 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x92, 0x41, 0x18, 0x12, 0x08,
+ 0x41, 0x64, 0x64, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x0c, 0x41, 0x64, 0x64, 0x73, 0x20, 0x61,
+ 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22,
+ 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x4e,
+ 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xb2, 0x01, 0x0a, 0x0e, 0x41, 0x64, 0x64,
+ 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x2e, 0x69, 0x6e,
+ 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x47, 0x65, 0x6e, 0x65, 0x72,
+ 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e,
+ 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x47, 0x65, 0x6e,
+ 0x65, 0x72, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x22, 0x5b, 0x92, 0x41, 0x2c, 0x12, 0x12, 0x41, 0x64, 0x64, 0x20, 0x61, 0x20, 0x47, 0x65, 0x6e,
+ 0x65, 0x72, 0x69, 0x63, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x14, 0x41, 0x64, 0x64, 0x73, 0x20,
+ 0x61, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x58,
+ 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f,
0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x2f,
- 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x12, 0xb7, 0x01, 0x0a, 0x10, 0x41, 0x64,
- 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x44, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x22,
- 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65,
- 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x44, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41,
+ 0x41, 0x64, 0x64, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x88, 0x02, 0x01, 0x12, 0xbe, 0x01,
+ 0x0a, 0x10, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x6f,
+ 0x64, 0x65, 0x12, 0x22, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41,
+ 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f,
+ 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e,
+ 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x61, 0x92, 0x41, 0x30,
+ 0x12, 0x14, 0x41, 0x64, 0x64, 0x20, 0x61, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
+ 0x72, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x16, 0x41, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x63,
+ 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x58, 0x01,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x69,
+ 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x41,
+ 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x88, 0x02, 0x01, 0x12, 0xac,
+ 0x01, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65,
+ 0x12, 0x1f, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64,
+ 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x20, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64,
+ 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x58, 0x92, 0x41, 0x2a, 0x12, 0x11, 0x41, 0x64, 0x64, 0x20, 0x61, 0x20,
+ 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x13, 0x41, 0x64, 0x64,
+ 0x73, 0x20, 0x61, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x2e,
+ 0x58, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31,
+ 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x4e, 0x6f, 0x64, 0x65, 0x73,
+ 0x2f, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x88, 0x02, 0x01, 0x12, 0xc0, 0x01,
+ 0x0a, 0x10, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x44, 0x53, 0x4e, 0x6f,
+ 0x64, 0x65, 0x12, 0x22, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41,
0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x44, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5a, 0x92, 0x41, 0x2c, 0x12, 0x13, 0x41, 0x64,
- 0x64, 0x20, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x52, 0x44, 0x53, 0x20, 0x4e, 0x6f, 0x64,
- 0x65, 0x1a, 0x15, 0x41, 0x64, 0x64, 0x73, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x52,
- 0x44, 0x53, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01,
- 0x2a, 0x22, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79,
- 0x2f, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65,
- 0x52, 0x44, 0x53, 0x12, 0xf5, 0x01, 0x0a, 0x1a, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74,
- 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4e, 0x6f,
- 0x64, 0x65, 0x12, 0x2c, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41,
- 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74,
- 0x61, 0x62, 0x61, 0x73, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x2d, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64,
- 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62,
- 0x61, 0x73, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
- 0x7a, 0x92, 0x41, 0x42, 0x12, 0x1e, 0x41, 0x64, 0x64, 0x20, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65,
- 0x20, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x20, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x20,
- 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x20, 0x41, 0x64, 0x64, 0x73, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x74,
- 0x65, 0x20, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x20, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
- 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a, 0x01, 0x2a, 0x22,
- 0x2a, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x4e,
- 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x7a,
- 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x0a,
- 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x69, 0x6e, 0x76,
- 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64,
- 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e,
- 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x92, 0x41, 0x1c, 0x12, 0x0b, 0x52, 0x65,
- 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76,
- 0x65, 0x73, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01,
- 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79,
- 0x2f, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x87, 0x01,
- 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x42,
- 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x26, 0x67,
- 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e,
- 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74,
- 0x6f, 0x72, 0x79, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x49, 0x6e,
- 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0xca, 0x02, 0x09, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74,
- 0x6f, 0x72, 0x79, 0xe2, 0x02, 0x15, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x5c,
- 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x49, 0x6e,
- 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f,
+ 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x44, 0x53, 0x4e,
+ 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x63, 0x92, 0x41, 0x32,
+ 0x12, 0x15, 0x41, 0x64, 0x64, 0x20, 0x61, 0x20, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x52,
+ 0x44, 0x53, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x17, 0x41, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20,
+ 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x52, 0x44, 0x53, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x2e,
+ 0x58, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x76, 0x31,
+ 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x4e, 0x6f, 0x64, 0x65, 0x73,
+ 0x2f, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x44, 0x53, 0x88, 0x02, 0x01,
+ 0x12, 0x80, 0x02, 0x0a, 0x1a, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x7a,
+ 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12,
+ 0x2c, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x52,
+ 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,
+ 0x73, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e,
+ 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d,
+ 0x6f, 0x74, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
+ 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x84, 0x01, 0x92,
+ 0x41, 0x49, 0x12, 0x21, 0x41, 0x64, 0x64, 0x61, 0x20, 0x61, 0x20, 0x52, 0x65, 0x6d, 0x6f, 0x74,
+ 0x65, 0x20, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x20, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
+ 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x22, 0x41, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x72, 0x65,
+ 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x20, 0x64, 0x61, 0x74, 0x61, 0x62,
+ 0x61, 0x73, 0x65, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x58, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x2f, 0x3a, 0x01, 0x2a, 0x22, 0x2a, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74,
+ 0x6f, 0x72, 0x79, 0x2f, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x41, 0x64, 0x64, 0x52, 0x65, 0x6d,
+ 0x6f, 0x74, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
+ 0x88, 0x02, 0x01, 0x12, 0x93, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f,
+ 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x52,
+ 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x1d, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6d,
+ 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+ 0x48, 0x92, 0x41, 0x20, 0x12, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x61, 0x20, 0x4e,
+ 0x6f, 0x64, 0x65, 0x1a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x73, 0x20, 0x61, 0x20, 0x4e,
+ 0x6f, 0x64, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f,
+ 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x4e, 0x6f, 0x64,
+ 0x65, 0x73, 0x2f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x87, 0x01, 0x0a, 0x0d, 0x63, 0x6f,
+ 0x6d, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x0a, 0x4e, 0x6f, 0x64,
+ 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75,
+ 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d,
+ 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x70,
+ 0x62, 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74,
+ 0x6f, 0x72, 0x79, 0xca, 0x02, 0x09, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0xe2,
+ 0x02, 0x15, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x5c, 0x47, 0x50, 0x42, 0x4d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74,
+ 0x6f, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -2221,7 +2529,7 @@ func file_inventorypb_nodes_proto_rawDescGZIP() []byte {
var (
file_inventorypb_nodes_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
- file_inventorypb_nodes_proto_msgTypes = make([]protoimpl.MessageInfo, 31)
+ file_inventorypb_nodes_proto_msgTypes = make([]protoimpl.MessageInfo, 33)
file_inventorypb_nodes_proto_goTypes = []interface{}{
(NodeType)(0), // 0: inventory.NodeType
(*GenericNode)(nil), // 1: inventory.GenericNode
@@ -2233,37 +2541,39 @@ var (
(*ListNodesResponse)(nil), // 7: inventory.ListNodesResponse
(*GetNodeRequest)(nil), // 8: inventory.GetNodeRequest
(*GetNodeResponse)(nil), // 9: inventory.GetNodeResponse
- (*AddGenericNodeRequest)(nil), // 10: inventory.AddGenericNodeRequest
- (*AddGenericNodeResponse)(nil), // 11: inventory.AddGenericNodeResponse
- (*AddContainerNodeRequest)(nil), // 12: inventory.AddContainerNodeRequest
- (*AddContainerNodeResponse)(nil), // 13: inventory.AddContainerNodeResponse
- (*AddRemoteNodeRequest)(nil), // 14: inventory.AddRemoteNodeRequest
- (*AddRemoteNodeResponse)(nil), // 15: inventory.AddRemoteNodeResponse
- (*AddRemoteRDSNodeRequest)(nil), // 16: inventory.AddRemoteRDSNodeRequest
- (*AddRemoteRDSNodeResponse)(nil), // 17: inventory.AddRemoteRDSNodeResponse
- (*AddRemoteAzureDatabaseNodeRequest)(nil), // 18: inventory.AddRemoteAzureDatabaseNodeRequest
- (*AddRemoteAzureDatabaseNodeResponse)(nil), // 19: inventory.AddRemoteAzureDatabaseNodeResponse
- (*RemoveNodeRequest)(nil), // 20: inventory.RemoveNodeRequest
- (*RemoveNodeResponse)(nil), // 21: inventory.RemoveNodeResponse
- nil, // 22: inventory.GenericNode.CustomLabelsEntry
- nil, // 23: inventory.ContainerNode.CustomLabelsEntry
- nil, // 24: inventory.RemoteNode.CustomLabelsEntry
- nil, // 25: inventory.RemoteRDSNode.CustomLabelsEntry
- nil, // 26: inventory.RemoteAzureDatabaseNode.CustomLabelsEntry
- nil, // 27: inventory.AddGenericNodeRequest.CustomLabelsEntry
- nil, // 28: inventory.AddContainerNodeRequest.CustomLabelsEntry
- nil, // 29: inventory.AddRemoteNodeRequest.CustomLabelsEntry
- nil, // 30: inventory.AddRemoteRDSNodeRequest.CustomLabelsEntry
- nil, // 31: inventory.AddRemoteAzureDatabaseNodeRequest.CustomLabelsEntry
+ (*AddNodeRequest)(nil), // 10: inventory.AddNodeRequest
+ (*AddNodeResponse)(nil), // 11: inventory.AddNodeResponse
+ (*AddGenericNodeRequest)(nil), // 12: inventory.AddGenericNodeRequest
+ (*AddGenericNodeResponse)(nil), // 13: inventory.AddGenericNodeResponse
+ (*AddContainerNodeRequest)(nil), // 14: inventory.AddContainerNodeRequest
+ (*AddContainerNodeResponse)(nil), // 15: inventory.AddContainerNodeResponse
+ (*AddRemoteNodeRequest)(nil), // 16: inventory.AddRemoteNodeRequest
+ (*AddRemoteNodeResponse)(nil), // 17: inventory.AddRemoteNodeResponse
+ (*AddRemoteRDSNodeRequest)(nil), // 18: inventory.AddRemoteRDSNodeRequest
+ (*AddRemoteRDSNodeResponse)(nil), // 19: inventory.AddRemoteRDSNodeResponse
+ (*AddRemoteAzureDatabaseNodeRequest)(nil), // 20: inventory.AddRemoteAzureDatabaseNodeRequest
+ (*AddRemoteAzureDatabaseNodeResponse)(nil), // 21: inventory.AddRemoteAzureDatabaseNodeResponse
+ (*RemoveNodeRequest)(nil), // 22: inventory.RemoveNodeRequest
+ (*RemoveNodeResponse)(nil), // 23: inventory.RemoveNodeResponse
+ nil, // 24: inventory.GenericNode.CustomLabelsEntry
+ nil, // 25: inventory.ContainerNode.CustomLabelsEntry
+ nil, // 26: inventory.RemoteNode.CustomLabelsEntry
+ nil, // 27: inventory.RemoteRDSNode.CustomLabelsEntry
+ nil, // 28: inventory.RemoteAzureDatabaseNode.CustomLabelsEntry
+ nil, // 29: inventory.AddGenericNodeRequest.CustomLabelsEntry
+ nil, // 30: inventory.AddContainerNodeRequest.CustomLabelsEntry
+ nil, // 31: inventory.AddRemoteNodeRequest.CustomLabelsEntry
+ nil, // 32: inventory.AddRemoteRDSNodeRequest.CustomLabelsEntry
+ nil, // 33: inventory.AddRemoteAzureDatabaseNodeRequest.CustomLabelsEntry
}
)
var file_inventorypb_nodes_proto_depIdxs = []int32{
- 22, // 0: inventory.GenericNode.custom_labels:type_name -> inventory.GenericNode.CustomLabelsEntry
- 23, // 1: inventory.ContainerNode.custom_labels:type_name -> inventory.ContainerNode.CustomLabelsEntry
- 24, // 2: inventory.RemoteNode.custom_labels:type_name -> inventory.RemoteNode.CustomLabelsEntry
- 25, // 3: inventory.RemoteRDSNode.custom_labels:type_name -> inventory.RemoteRDSNode.CustomLabelsEntry
- 26, // 4: inventory.RemoteAzureDatabaseNode.custom_labels:type_name -> inventory.RemoteAzureDatabaseNode.CustomLabelsEntry
+ 24, // 0: inventory.GenericNode.custom_labels:type_name -> inventory.GenericNode.CustomLabelsEntry
+ 25, // 1: inventory.ContainerNode.custom_labels:type_name -> inventory.ContainerNode.CustomLabelsEntry
+ 26, // 2: inventory.RemoteNode.custom_labels:type_name -> inventory.RemoteNode.CustomLabelsEntry
+ 27, // 3: inventory.RemoteRDSNode.custom_labels:type_name -> inventory.RemoteRDSNode.CustomLabelsEntry
+ 28, // 4: inventory.RemoteAzureDatabaseNode.custom_labels:type_name -> inventory.RemoteAzureDatabaseNode.CustomLabelsEntry
0, // 5: inventory.ListNodesRequest.node_type:type_name -> inventory.NodeType
1, // 6: inventory.ListNodesResponse.generic:type_name -> inventory.GenericNode
2, // 7: inventory.ListNodesResponse.container:type_name -> inventory.ContainerNode
@@ -2275,37 +2585,49 @@ var file_inventorypb_nodes_proto_depIdxs = []int32{
3, // 13: inventory.GetNodeResponse.remote:type_name -> inventory.RemoteNode
4, // 14: inventory.GetNodeResponse.remote_rds:type_name -> inventory.RemoteRDSNode
5, // 15: inventory.GetNodeResponse.remote_azure_database:type_name -> inventory.RemoteAzureDatabaseNode
- 27, // 16: inventory.AddGenericNodeRequest.custom_labels:type_name -> inventory.AddGenericNodeRequest.CustomLabelsEntry
- 1, // 17: inventory.AddGenericNodeResponse.generic:type_name -> inventory.GenericNode
- 28, // 18: inventory.AddContainerNodeRequest.custom_labels:type_name -> inventory.AddContainerNodeRequest.CustomLabelsEntry
- 2, // 19: inventory.AddContainerNodeResponse.container:type_name -> inventory.ContainerNode
- 29, // 20: inventory.AddRemoteNodeRequest.custom_labels:type_name -> inventory.AddRemoteNodeRequest.CustomLabelsEntry
- 3, // 21: inventory.AddRemoteNodeResponse.remote:type_name -> inventory.RemoteNode
- 30, // 22: inventory.AddRemoteRDSNodeRequest.custom_labels:type_name -> inventory.AddRemoteRDSNodeRequest.CustomLabelsEntry
- 4, // 23: inventory.AddRemoteRDSNodeResponse.remote_rds:type_name -> inventory.RemoteRDSNode
- 31, // 24: inventory.AddRemoteAzureDatabaseNodeRequest.custom_labels:type_name -> inventory.AddRemoteAzureDatabaseNodeRequest.CustomLabelsEntry
- 5, // 25: inventory.AddRemoteAzureDatabaseNodeResponse.remote_azure_database:type_name -> inventory.RemoteAzureDatabaseNode
- 6, // 26: inventory.Nodes.ListNodes:input_type -> inventory.ListNodesRequest
- 8, // 27: inventory.Nodes.GetNode:input_type -> inventory.GetNodeRequest
- 10, // 28: inventory.Nodes.AddGenericNode:input_type -> inventory.AddGenericNodeRequest
- 12, // 29: inventory.Nodes.AddContainerNode:input_type -> inventory.AddContainerNodeRequest
- 14, // 30: inventory.Nodes.AddRemoteNode:input_type -> inventory.AddRemoteNodeRequest
- 16, // 31: inventory.Nodes.AddRemoteRDSNode:input_type -> inventory.AddRemoteRDSNodeRequest
- 18, // 32: inventory.Nodes.AddRemoteAzureDatabaseNode:input_type -> inventory.AddRemoteAzureDatabaseNodeRequest
- 20, // 33: inventory.Nodes.RemoveNode:input_type -> inventory.RemoveNodeRequest
- 7, // 34: inventory.Nodes.ListNodes:output_type -> inventory.ListNodesResponse
- 9, // 35: inventory.Nodes.GetNode:output_type -> inventory.GetNodeResponse
- 11, // 36: inventory.Nodes.AddGenericNode:output_type -> inventory.AddGenericNodeResponse
- 13, // 37: inventory.Nodes.AddContainerNode:output_type -> inventory.AddContainerNodeResponse
- 15, // 38: inventory.Nodes.AddRemoteNode:output_type -> inventory.AddRemoteNodeResponse
- 17, // 39: inventory.Nodes.AddRemoteRDSNode:output_type -> inventory.AddRemoteRDSNodeResponse
- 19, // 40: inventory.Nodes.AddRemoteAzureDatabaseNode:output_type -> inventory.AddRemoteAzureDatabaseNodeResponse
- 21, // 41: inventory.Nodes.RemoveNode:output_type -> inventory.RemoveNodeResponse
- 34, // [34:42] is the sub-list for method output_type
- 26, // [26:34] is the sub-list for method input_type
- 26, // [26:26] is the sub-list for extension type_name
- 26, // [26:26] is the sub-list for extension extendee
- 0, // [0:26] is the sub-list for field type_name
+ 12, // 16: inventory.AddNodeRequest.generic:type_name -> inventory.AddGenericNodeRequest
+ 14, // 17: inventory.AddNodeRequest.container:type_name -> inventory.AddContainerNodeRequest
+ 16, // 18: inventory.AddNodeRequest.remote:type_name -> inventory.AddRemoteNodeRequest
+ 18, // 19: inventory.AddNodeRequest.remote_rds:type_name -> inventory.AddRemoteRDSNodeRequest
+ 20, // 20: inventory.AddNodeRequest.remote_azure:type_name -> inventory.AddRemoteAzureDatabaseNodeRequest
+ 1, // 21: inventory.AddNodeResponse.generic:type_name -> inventory.GenericNode
+ 2, // 22: inventory.AddNodeResponse.container:type_name -> inventory.ContainerNode
+ 3, // 23: inventory.AddNodeResponse.remote:type_name -> inventory.RemoteNode
+ 4, // 24: inventory.AddNodeResponse.remote_rds:type_name -> inventory.RemoteRDSNode
+ 5, // 25: inventory.AddNodeResponse.remote_azure_database:type_name -> inventory.RemoteAzureDatabaseNode
+ 29, // 26: inventory.AddGenericNodeRequest.custom_labels:type_name -> inventory.AddGenericNodeRequest.CustomLabelsEntry
+ 1, // 27: inventory.AddGenericNodeResponse.generic:type_name -> inventory.GenericNode
+ 30, // 28: inventory.AddContainerNodeRequest.custom_labels:type_name -> inventory.AddContainerNodeRequest.CustomLabelsEntry
+ 2, // 29: inventory.AddContainerNodeResponse.container:type_name -> inventory.ContainerNode
+ 31, // 30: inventory.AddRemoteNodeRequest.custom_labels:type_name -> inventory.AddRemoteNodeRequest.CustomLabelsEntry
+ 3, // 31: inventory.AddRemoteNodeResponse.remote:type_name -> inventory.RemoteNode
+ 32, // 32: inventory.AddRemoteRDSNodeRequest.custom_labels:type_name -> inventory.AddRemoteRDSNodeRequest.CustomLabelsEntry
+ 4, // 33: inventory.AddRemoteRDSNodeResponse.remote_rds:type_name -> inventory.RemoteRDSNode
+ 33, // 34: inventory.AddRemoteAzureDatabaseNodeRequest.custom_labels:type_name -> inventory.AddRemoteAzureDatabaseNodeRequest.CustomLabelsEntry
+ 5, // 35: inventory.AddRemoteAzureDatabaseNodeResponse.remote_azure_database:type_name -> inventory.RemoteAzureDatabaseNode
+ 6, // 36: inventory.Nodes.ListNodes:input_type -> inventory.ListNodesRequest
+ 8, // 37: inventory.Nodes.GetNode:input_type -> inventory.GetNodeRequest
+ 10, // 38: inventory.Nodes.AddNode:input_type -> inventory.AddNodeRequest
+ 12, // 39: inventory.Nodes.AddGenericNode:input_type -> inventory.AddGenericNodeRequest
+ 14, // 40: inventory.Nodes.AddContainerNode:input_type -> inventory.AddContainerNodeRequest
+ 16, // 41: inventory.Nodes.AddRemoteNode:input_type -> inventory.AddRemoteNodeRequest
+ 18, // 42: inventory.Nodes.AddRemoteRDSNode:input_type -> inventory.AddRemoteRDSNodeRequest
+ 20, // 43: inventory.Nodes.AddRemoteAzureDatabaseNode:input_type -> inventory.AddRemoteAzureDatabaseNodeRequest
+ 22, // 44: inventory.Nodes.RemoveNode:input_type -> inventory.RemoveNodeRequest
+ 7, // 45: inventory.Nodes.ListNodes:output_type -> inventory.ListNodesResponse
+ 9, // 46: inventory.Nodes.GetNode:output_type -> inventory.GetNodeResponse
+ 11, // 47: inventory.Nodes.AddNode:output_type -> inventory.AddNodeResponse
+ 13, // 48: inventory.Nodes.AddGenericNode:output_type -> inventory.AddGenericNodeResponse
+ 15, // 49: inventory.Nodes.AddContainerNode:output_type -> inventory.AddContainerNodeResponse
+ 17, // 50: inventory.Nodes.AddRemoteNode:output_type -> inventory.AddRemoteNodeResponse
+ 19, // 51: inventory.Nodes.AddRemoteRDSNode:output_type -> inventory.AddRemoteRDSNodeResponse
+ 21, // 52: inventory.Nodes.AddRemoteAzureDatabaseNode:output_type -> inventory.AddRemoteAzureDatabaseNodeResponse
+ 23, // 53: inventory.Nodes.RemoveNode:output_type -> inventory.RemoveNodeResponse
+ 45, // [45:54] is the sub-list for method output_type
+ 36, // [36:45] is the sub-list for method input_type
+ 36, // [36:36] is the sub-list for extension type_name
+ 36, // [36:36] is the sub-list for extension extendee
+ 0, // [0:36] is the sub-list for field type_name
}
func init() { file_inventorypb_nodes_proto_init() }
@@ -2423,7 +2745,7 @@ func file_inventorypb_nodes_proto_init() {
}
}
file_inventorypb_nodes_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AddGenericNodeRequest); i {
+ switch v := v.(*AddNodeRequest); i {
case 0:
return &v.state
case 1:
@@ -2435,7 +2757,7 @@ func file_inventorypb_nodes_proto_init() {
}
}
file_inventorypb_nodes_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AddGenericNodeResponse); i {
+ switch v := v.(*AddNodeResponse); i {
case 0:
return &v.state
case 1:
@@ -2447,7 +2769,7 @@ func file_inventorypb_nodes_proto_init() {
}
}
file_inventorypb_nodes_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AddContainerNodeRequest); i {
+ switch v := v.(*AddGenericNodeRequest); i {
case 0:
return &v.state
case 1:
@@ -2459,7 +2781,7 @@ func file_inventorypb_nodes_proto_init() {
}
}
file_inventorypb_nodes_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AddContainerNodeResponse); i {
+ switch v := v.(*AddGenericNodeResponse); i {
case 0:
return &v.state
case 1:
@@ -2471,7 +2793,7 @@ func file_inventorypb_nodes_proto_init() {
}
}
file_inventorypb_nodes_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AddRemoteNodeRequest); i {
+ switch v := v.(*AddContainerNodeRequest); i {
case 0:
return &v.state
case 1:
@@ -2483,7 +2805,7 @@ func file_inventorypb_nodes_proto_init() {
}
}
file_inventorypb_nodes_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AddRemoteNodeResponse); i {
+ switch v := v.(*AddContainerNodeResponse); i {
case 0:
return &v.state
case 1:
@@ -2495,7 +2817,7 @@ func file_inventorypb_nodes_proto_init() {
}
}
file_inventorypb_nodes_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AddRemoteRDSNodeRequest); i {
+ switch v := v.(*AddRemoteNodeRequest); i {
case 0:
return &v.state
case 1:
@@ -2507,7 +2829,7 @@ func file_inventorypb_nodes_proto_init() {
}
}
file_inventorypb_nodes_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AddRemoteRDSNodeResponse); i {
+ switch v := v.(*AddRemoteNodeResponse); i {
case 0:
return &v.state
case 1:
@@ -2519,7 +2841,7 @@ func file_inventorypb_nodes_proto_init() {
}
}
file_inventorypb_nodes_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AddRemoteAzureDatabaseNodeRequest); i {
+ switch v := v.(*AddRemoteRDSNodeRequest); i {
case 0:
return &v.state
case 1:
@@ -2531,7 +2853,7 @@ func file_inventorypb_nodes_proto_init() {
}
}
file_inventorypb_nodes_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AddRemoteAzureDatabaseNodeResponse); i {
+ switch v := v.(*AddRemoteRDSNodeResponse); i {
case 0:
return &v.state
case 1:
@@ -2543,7 +2865,7 @@ func file_inventorypb_nodes_proto_init() {
}
}
file_inventorypb_nodes_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RemoveNodeRequest); i {
+ switch v := v.(*AddRemoteAzureDatabaseNodeRequest); i {
case 0:
return &v.state
case 1:
@@ -2555,6 +2877,30 @@ func file_inventorypb_nodes_proto_init() {
}
}
file_inventorypb_nodes_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AddRemoteAzureDatabaseNodeResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_inventorypb_nodes_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RemoveNodeRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_inventorypb_nodes_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RemoveNodeResponse); i {
case 0:
return &v.state
@@ -2574,13 +2920,27 @@ func file_inventorypb_nodes_proto_init() {
(*GetNodeResponse_RemoteRds)(nil),
(*GetNodeResponse_RemoteAzureDatabase)(nil),
}
+ file_inventorypb_nodes_proto_msgTypes[9].OneofWrappers = []interface{}{
+ (*AddNodeRequest_Generic)(nil),
+ (*AddNodeRequest_Container)(nil),
+ (*AddNodeRequest_Remote)(nil),
+ (*AddNodeRequest_RemoteRds)(nil),
+ (*AddNodeRequest_RemoteAzure)(nil),
+ }
+ file_inventorypb_nodes_proto_msgTypes[10].OneofWrappers = []interface{}{
+ (*AddNodeResponse_Generic)(nil),
+ (*AddNodeResponse_Container)(nil),
+ (*AddNodeResponse_Remote)(nil),
+ (*AddNodeResponse_RemoteRds)(nil),
+ (*AddNodeResponse_RemoteAzureDatabase)(nil),
+ }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_inventorypb_nodes_proto_rawDesc,
NumEnums: 1,
- NumMessages: 31,
+ NumMessages: 33,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/api/inventorypb/nodes.pb.gw.go b/api/inventorypb/nodes.pb.gw.go
index 91d1c6a5a5..9789ecfcb6 100644
--- a/api/inventorypb/nodes.pb.gw.go
+++ b/api/inventorypb/nodes.pb.gw.go
@@ -97,6 +97,38 @@ func local_request_Nodes_GetNode_0(ctx context.Context, marshaler runtime.Marsha
return msg, metadata, err
}
+func request_Nodes_AddNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq AddNodeRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.AddNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_Nodes_AddNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq AddNodeRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.AddNode(ctx, &protoReq)
+ return msg, metadata, err
+}
+
func request_Nodes_AddGenericNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq AddGenericNodeRequest
var metadata runtime.ServerMetadata
@@ -342,6 +374,30 @@ func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
forward_Nodes_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
+ mux.Handle("POST", pattern_Nodes_AddNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/inventory.Nodes/AddNode", runtime.WithHTTPPathPattern("/v1/inventory/Nodes/Add"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_Nodes_AddNode_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_Nodes_AddNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+
mux.Handle("POST", pattern_Nodes_AddGenericNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -568,6 +624,27 @@ func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
forward_Nodes_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
+ mux.Handle("POST", pattern_Nodes_AddNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/inventory.Nodes/AddNode", runtime.WithHTTPPathPattern("/v1/inventory/Nodes/Add"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_Nodes_AddNode_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_Nodes_AddNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+
mux.Handle("POST", pattern_Nodes_AddGenericNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -702,6 +779,8 @@ var (
pattern_Nodes_GetNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "inventory", "Nodes", "Get"}, ""))
+ pattern_Nodes_AddNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "inventory", "Nodes", "Add"}, ""))
+
pattern_Nodes_AddGenericNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "inventory", "Nodes", "AddGeneric"}, ""))
pattern_Nodes_AddContainerNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "inventory", "Nodes", "AddContainer"}, ""))
@@ -720,6 +799,8 @@ var (
forward_Nodes_GetNode_0 = runtime.ForwardResponseMessage
+ forward_Nodes_AddNode_0 = runtime.ForwardResponseMessage
+
forward_Nodes_AddGenericNode_0 = runtime.ForwardResponseMessage
forward_Nodes_AddContainerNode_0 = runtime.ForwardResponseMessage
diff --git a/api/inventorypb/nodes.pb.validate.go b/api/inventorypb/nodes.pb.validate.go
index 84b7fe914d..79c6ccb2fd 100644
--- a/api/inventorypb/nodes.pb.validate.go
+++ b/api/inventorypb/nodes.pb.validate.go
@@ -1410,6 +1410,626 @@ var _ interface {
ErrorName() string
} = GetNodeResponseValidationError{}
+// Validate checks the field values on AddNodeRequest with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *AddNodeRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on AddNodeRequest with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in AddNodeRequestMultiError,
+// or nil if none found.
+func (m *AddNodeRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *AddNodeRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ switch v := m.Request.(type) {
+ case *AddNodeRequest_Generic:
+ if v == nil {
+ err := AddNodeRequestValidationError{
+ field: "Request",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetGeneric()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, AddNodeRequestValidationError{
+ field: "Generic",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, AddNodeRequestValidationError{
+ field: "Generic",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetGeneric()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return AddNodeRequestValidationError{
+ field: "Generic",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *AddNodeRequest_Container:
+ if v == nil {
+ err := AddNodeRequestValidationError{
+ field: "Request",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetContainer()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, AddNodeRequestValidationError{
+ field: "Container",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, AddNodeRequestValidationError{
+ field: "Container",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetContainer()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return AddNodeRequestValidationError{
+ field: "Container",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *AddNodeRequest_Remote:
+ if v == nil {
+ err := AddNodeRequestValidationError{
+ field: "Request",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRemote()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, AddNodeRequestValidationError{
+ field: "Remote",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, AddNodeRequestValidationError{
+ field: "Remote",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRemote()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return AddNodeRequestValidationError{
+ field: "Remote",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *AddNodeRequest_RemoteRds:
+ if v == nil {
+ err := AddNodeRequestValidationError{
+ field: "Request",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRemoteRds()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, AddNodeRequestValidationError{
+ field: "RemoteRds",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, AddNodeRequestValidationError{
+ field: "RemoteRds",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRemoteRds()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return AddNodeRequestValidationError{
+ field: "RemoteRds",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *AddNodeRequest_RemoteAzure:
+ if v == nil {
+ err := AddNodeRequestValidationError{
+ field: "Request",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRemoteAzure()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, AddNodeRequestValidationError{
+ field: "RemoteAzure",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, AddNodeRequestValidationError{
+ field: "RemoteAzure",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRemoteAzure()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return AddNodeRequestValidationError{
+ field: "RemoteAzure",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return AddNodeRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// AddNodeRequestMultiError is an error wrapping multiple validation errors
+// returned by AddNodeRequest.ValidateAll() if the designated constraints
+// aren't met.
+type AddNodeRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m AddNodeRequestMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m AddNodeRequestMultiError) AllErrors() []error { return m }
+
+// AddNodeRequestValidationError is the validation error returned by
+// AddNodeRequest.Validate if the designated constraints aren't met.
+type AddNodeRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e AddNodeRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e AddNodeRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e AddNodeRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e AddNodeRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e AddNodeRequestValidationError) ErrorName() string { return "AddNodeRequestValidationError" }
+
+// Error satisfies the builtin error interface
+func (e AddNodeRequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sAddNodeRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = AddNodeRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = AddNodeRequestValidationError{}
+
+// Validate checks the field values on AddNodeResponse with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *AddNodeResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on AddNodeResponse with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// AddNodeResponseMultiError, or nil if none found.
+func (m *AddNodeResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *AddNodeResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ switch v := m.Node.(type) {
+ case *AddNodeResponse_Generic:
+ if v == nil {
+ err := AddNodeResponseValidationError{
+ field: "Node",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetGeneric()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, AddNodeResponseValidationError{
+ field: "Generic",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, AddNodeResponseValidationError{
+ field: "Generic",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetGeneric()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return AddNodeResponseValidationError{
+ field: "Generic",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *AddNodeResponse_Container:
+ if v == nil {
+ err := AddNodeResponseValidationError{
+ field: "Node",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetContainer()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, AddNodeResponseValidationError{
+ field: "Container",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, AddNodeResponseValidationError{
+ field: "Container",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetContainer()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return AddNodeResponseValidationError{
+ field: "Container",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *AddNodeResponse_Remote:
+ if v == nil {
+ err := AddNodeResponseValidationError{
+ field: "Node",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRemote()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, AddNodeResponseValidationError{
+ field: "Remote",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, AddNodeResponseValidationError{
+ field: "Remote",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRemote()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return AddNodeResponseValidationError{
+ field: "Remote",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *AddNodeResponse_RemoteRds:
+ if v == nil {
+ err := AddNodeResponseValidationError{
+ field: "Node",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRemoteRds()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, AddNodeResponseValidationError{
+ field: "RemoteRds",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, AddNodeResponseValidationError{
+ field: "RemoteRds",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRemoteRds()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return AddNodeResponseValidationError{
+ field: "RemoteRds",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *AddNodeResponse_RemoteAzureDatabase:
+ if v == nil {
+ err := AddNodeResponseValidationError{
+ field: "Node",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRemoteAzureDatabase()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, AddNodeResponseValidationError{
+ field: "RemoteAzureDatabase",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, AddNodeResponseValidationError{
+ field: "RemoteAzureDatabase",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRemoteAzureDatabase()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return AddNodeResponseValidationError{
+ field: "RemoteAzureDatabase",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return AddNodeResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// AddNodeResponseMultiError is an error wrapping multiple validation errors
+// returned by AddNodeResponse.ValidateAll() if the designated constraints
+// aren't met.
+type AddNodeResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m AddNodeResponseMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m AddNodeResponseMultiError) AllErrors() []error { return m }
+
+// AddNodeResponseValidationError is the validation error returned by
+// AddNodeResponse.Validate if the designated constraints aren't met.
+type AddNodeResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e AddNodeResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e AddNodeResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e AddNodeResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e AddNodeResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e AddNodeResponseValidationError) ErrorName() string { return "AddNodeResponseValidationError" }
+
+// Error satisfies the builtin error interface
+func (e AddNodeResponseValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sAddNodeResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = AddNodeResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = AddNodeResponseValidationError{}
+
// Validate checks the field values on AddGenericNodeRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
diff --git a/api/inventorypb/nodes.proto b/api/inventorypb/nodes.proto
index 8ad0c3d36f..e14a3446d0 100644
--- a/api/inventorypb/nodes.proto
+++ b/api/inventorypb/nodes.proto
@@ -98,9 +98,6 @@ message RemoteRDSNode {
string az = 6;
// Custom user-assigned labels.
map custom_labels = 7;
- // TODO https://jira.percona.com/browse/PMM-4314
- // string az = 8;
- // string node_model = 9;
}
// RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes.
@@ -153,6 +150,28 @@ message GetNodeResponse {
}
}
+// Add any Node
+
+message AddNodeRequest {
+ oneof request {
+ AddGenericNodeRequest generic = 1;
+ AddContainerNodeRequest container = 2;
+ AddRemoteNodeRequest remote = 3;
+ AddRemoteRDSNodeRequest remote_rds = 4;
+ AddRemoteAzureDatabaseNodeRequest remote_azure = 5;
+ }
+}
+
+message AddNodeResponse {
+ oneof node {
+ GenericNode generic = 1;
+ ContainerNode container = 2;
+ RemoteNode remote = 3;
+ RemoteRDSNode remote_rds = 4;
+ RemoteAzureDatabaseNode remote_azure_database = 5;
+ }
+}
+
// Add Generic
message AddGenericNodeRequest {
@@ -175,6 +194,8 @@ message AddGenericNodeRequest {
}
message AddGenericNodeResponse {
+ option deprecated = true;
+
GenericNode generic = 1;
}
@@ -202,6 +223,8 @@ message AddContainerNodeRequest {
}
message AddContainerNodeResponse {
+ option deprecated = true;
+
ContainerNode container = 1;
}
@@ -223,6 +246,8 @@ message AddRemoteNodeRequest {
}
message AddRemoteNodeResponse {
+ option deprecated = true;
+
RemoteNode remote = 1;
}
@@ -244,6 +269,8 @@ message AddRemoteRDSNodeRequest {
}
message AddRemoteRDSNodeResponse {
+ option deprecated = true;
+
RemoteRDSNode remote_rds = 1;
}
@@ -265,6 +292,8 @@ message AddRemoteAzureDatabaseNodeRequest {
}
message AddRemoteAzureDatabaseNodeResponse {
+ option deprecated = true;
+
RemoteAzureDatabaseNode remote_azure_database = 1;
}
@@ -303,70 +332,91 @@ service Nodes {
description: "Returns a single Node by ID."
};
}
- // AddGenericNode adds generic Node.
+ // AddNode adds any type of Node.
+ rpc AddNode(AddNodeRequest) returns (AddNodeResponse) {
+ option (google.api.http) = {
+ post: "/v1/inventory/Nodes/Add"
+ body: "*"
+ };
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
+ summary: "Add Node"
+ description: "Adds a Node."
+ };
+ }
+ // AddGenericNode adds a generic Node.
rpc AddGenericNode(AddGenericNodeRequest) returns (AddGenericNodeResponse) {
+ option deprecated = true;
option (google.api.http) = {
post: "/v1/inventory/Nodes/AddGeneric"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
- summary: "Add Generic Node"
- description: "Adds generic Node."
+ deprecated: true
+ summary: "Add a Generic Node"
+ description: "Adds a generic Node."
};
}
- // AddContainerNode adds Container Node.
+ // AddContainerNode adds a container Node.
rpc AddContainerNode(AddContainerNodeRequest) returns (AddContainerNodeResponse) {
+ option deprecated = true;
option (google.api.http) = {
post: "/v1/inventory/Nodes/AddContainer"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
- summary: "Add Container Node"
- description: "Adds container Node."
+ deprecated: true
+ summary: "Add a Container Node"
+ description: "Adds a container Node."
};
}
- // AddRemoteNode adds remote Node.
+ // AddRemoteNode adds a remote Node.
rpc AddRemoteNode(AddRemoteNodeRequest) returns (AddRemoteNodeResponse) {
+ option deprecated = true;
option (google.api.http) = {
post: "/v1/inventory/Nodes/AddRemote"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
- summary: "Add Remote Node"
- description: "Adds remote Node."
+ deprecated: true
+ summary: "Add a Remote Node"
+ description: "Adds a remote Node."
};
}
- // AddRemoteRDSNode adds remote RDS Node.
+ // AddRemoteRDSNode adds a remote RDS Node.
rpc AddRemoteRDSNode(AddRemoteRDSNodeRequest) returns (AddRemoteRDSNodeResponse) {
+ option deprecated = true;
option (google.api.http) = {
post: "/v1/inventory/Nodes/AddRemoteRDS"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
- summary: "Add Remote RDS Node"
- description: "Adds remote RDS Node."
+ deprecated: true
+ summary: "Add a Remote RDS Node"
+ description: "Adds a remote RDS Node."
};
}
- // AddRemoteAzureDatabaseNode adds remote Azure database Node.
+ // AddRemoteAzureDatabaseNode adds a remote Azure database Node.
rpc AddRemoteAzureDatabaseNode(AddRemoteAzureDatabaseNodeRequest) returns (AddRemoteAzureDatabaseNodeResponse) {
+ option deprecated = true;
option (google.api.http) = {
post: "/v1/inventory/Nodes/AddRemoteAzureDatabase"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
- summary: "Add Remote Azure Database Node"
- description: "Adds remote Azure database Node."
+ deprecated: true
+ summary: "Adda a Remote Azure Database Node"
+ description: "Adds a remote Azure database Node."
};
}
- // RemoveNode removes Node.
+ // RemoveNode removes a Node.
rpc RemoveNode(RemoveNodeRequest) returns (RemoveNodeResponse) {
option (google.api.http) = {
post: "/v1/inventory/Nodes/Remove"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
- summary: "Remove Node"
- description: "Removes Node."
+ summary: "Remove a Node"
+ description: "Removes a Node."
};
}
}
diff --git a/api/inventorypb/nodes_grpc.pb.go b/api/inventorypb/nodes_grpc.pb.go
index 372069998c..1cf7c5bed6 100644
--- a/api/inventorypb/nodes_grpc.pb.go
+++ b/api/inventorypb/nodes_grpc.pb.go
@@ -22,6 +22,7 @@ const _ = grpc.SupportPackageIsVersion7
const (
Nodes_ListNodes_FullMethodName = "/inventory.Nodes/ListNodes"
Nodes_GetNode_FullMethodName = "/inventory.Nodes/GetNode"
+ Nodes_AddNode_FullMethodName = "/inventory.Nodes/AddNode"
Nodes_AddGenericNode_FullMethodName = "/inventory.Nodes/AddGenericNode"
Nodes_AddContainerNode_FullMethodName = "/inventory.Nodes/AddContainerNode"
Nodes_AddRemoteNode_FullMethodName = "/inventory.Nodes/AddRemoteNode"
@@ -38,17 +39,24 @@ type NodesClient interface {
ListNodes(ctx context.Context, in *ListNodesRequest, opts ...grpc.CallOption) (*ListNodesResponse, error)
// GetNode returns a single Node by ID.
GetNode(ctx context.Context, in *GetNodeRequest, opts ...grpc.CallOption) (*GetNodeResponse, error)
- // AddGenericNode adds generic Node.
+ // AddNode adds any type of Node.
+ AddNode(ctx context.Context, in *AddNodeRequest, opts ...grpc.CallOption) (*AddNodeResponse, error)
+ // Deprecated: Do not use.
+ // AddGenericNode adds a generic Node.
AddGenericNode(ctx context.Context, in *AddGenericNodeRequest, opts ...grpc.CallOption) (*AddGenericNodeResponse, error)
- // AddContainerNode adds Container Node.
+ // Deprecated: Do not use.
+ // AddContainerNode adds a container Node.
AddContainerNode(ctx context.Context, in *AddContainerNodeRequest, opts ...grpc.CallOption) (*AddContainerNodeResponse, error)
- // AddRemoteNode adds remote Node.
+ // Deprecated: Do not use.
+ // AddRemoteNode adds a remote Node.
AddRemoteNode(ctx context.Context, in *AddRemoteNodeRequest, opts ...grpc.CallOption) (*AddRemoteNodeResponse, error)
- // AddRemoteRDSNode adds remote RDS Node.
+ // Deprecated: Do not use.
+ // AddRemoteRDSNode adds a remote RDS Node.
AddRemoteRDSNode(ctx context.Context, in *AddRemoteRDSNodeRequest, opts ...grpc.CallOption) (*AddRemoteRDSNodeResponse, error)
- // AddRemoteAzureDatabaseNode adds remote Azure database Node.
+ // Deprecated: Do not use.
+ // AddRemoteAzureDatabaseNode adds a remote Azure database Node.
AddRemoteAzureDatabaseNode(ctx context.Context, in *AddRemoteAzureDatabaseNodeRequest, opts ...grpc.CallOption) (*AddRemoteAzureDatabaseNodeResponse, error)
- // RemoveNode removes Node.
+ // RemoveNode removes a Node.
RemoveNode(ctx context.Context, in *RemoveNodeRequest, opts ...grpc.CallOption) (*RemoveNodeResponse, error)
}
@@ -78,6 +86,16 @@ func (c *nodesClient) GetNode(ctx context.Context, in *GetNodeRequest, opts ...g
return out, nil
}
+func (c *nodesClient) AddNode(ctx context.Context, in *AddNodeRequest, opts ...grpc.CallOption) (*AddNodeResponse, error) {
+ out := new(AddNodeResponse)
+ err := c.cc.Invoke(ctx, Nodes_AddNode_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// Deprecated: Do not use.
func (c *nodesClient) AddGenericNode(ctx context.Context, in *AddGenericNodeRequest, opts ...grpc.CallOption) (*AddGenericNodeResponse, error) {
out := new(AddGenericNodeResponse)
err := c.cc.Invoke(ctx, Nodes_AddGenericNode_FullMethodName, in, out, opts...)
@@ -87,6 +105,7 @@ func (c *nodesClient) AddGenericNode(ctx context.Context, in *AddGenericNodeRequ
return out, nil
}
+// Deprecated: Do not use.
func (c *nodesClient) AddContainerNode(ctx context.Context, in *AddContainerNodeRequest, opts ...grpc.CallOption) (*AddContainerNodeResponse, error) {
out := new(AddContainerNodeResponse)
err := c.cc.Invoke(ctx, Nodes_AddContainerNode_FullMethodName, in, out, opts...)
@@ -96,6 +115,7 @@ func (c *nodesClient) AddContainerNode(ctx context.Context, in *AddContainerNode
return out, nil
}
+// Deprecated: Do not use.
func (c *nodesClient) AddRemoteNode(ctx context.Context, in *AddRemoteNodeRequest, opts ...grpc.CallOption) (*AddRemoteNodeResponse, error) {
out := new(AddRemoteNodeResponse)
err := c.cc.Invoke(ctx, Nodes_AddRemoteNode_FullMethodName, in, out, opts...)
@@ -105,6 +125,7 @@ func (c *nodesClient) AddRemoteNode(ctx context.Context, in *AddRemoteNodeReques
return out, nil
}
+// Deprecated: Do not use.
func (c *nodesClient) AddRemoteRDSNode(ctx context.Context, in *AddRemoteRDSNodeRequest, opts ...grpc.CallOption) (*AddRemoteRDSNodeResponse, error) {
out := new(AddRemoteRDSNodeResponse)
err := c.cc.Invoke(ctx, Nodes_AddRemoteRDSNode_FullMethodName, in, out, opts...)
@@ -114,6 +135,7 @@ func (c *nodesClient) AddRemoteRDSNode(ctx context.Context, in *AddRemoteRDSNode
return out, nil
}
+// Deprecated: Do not use.
func (c *nodesClient) AddRemoteAzureDatabaseNode(ctx context.Context, in *AddRemoteAzureDatabaseNodeRequest, opts ...grpc.CallOption) (*AddRemoteAzureDatabaseNodeResponse, error) {
out := new(AddRemoteAzureDatabaseNodeResponse)
err := c.cc.Invoke(ctx, Nodes_AddRemoteAzureDatabaseNode_FullMethodName, in, out, opts...)
@@ -140,17 +162,24 @@ type NodesServer interface {
ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error)
// GetNode returns a single Node by ID.
GetNode(context.Context, *GetNodeRequest) (*GetNodeResponse, error)
- // AddGenericNode adds generic Node.
+ // AddNode adds any type of Node.
+ AddNode(context.Context, *AddNodeRequest) (*AddNodeResponse, error)
+ // Deprecated: Do not use.
+ // AddGenericNode adds a generic Node.
AddGenericNode(context.Context, *AddGenericNodeRequest) (*AddGenericNodeResponse, error)
- // AddContainerNode adds Container Node.
+ // Deprecated: Do not use.
+ // AddContainerNode adds a container Node.
AddContainerNode(context.Context, *AddContainerNodeRequest) (*AddContainerNodeResponse, error)
- // AddRemoteNode adds remote Node.
+ // Deprecated: Do not use.
+ // AddRemoteNode adds a remote Node.
AddRemoteNode(context.Context, *AddRemoteNodeRequest) (*AddRemoteNodeResponse, error)
- // AddRemoteRDSNode adds remote RDS Node.
+ // Deprecated: Do not use.
+ // AddRemoteRDSNode adds a remote RDS Node.
AddRemoteRDSNode(context.Context, *AddRemoteRDSNodeRequest) (*AddRemoteRDSNodeResponse, error)
- // AddRemoteAzureDatabaseNode adds remote Azure database Node.
+ // Deprecated: Do not use.
+ // AddRemoteAzureDatabaseNode adds a remote Azure database Node.
AddRemoteAzureDatabaseNode(context.Context, *AddRemoteAzureDatabaseNodeRequest) (*AddRemoteAzureDatabaseNodeResponse, error)
- // RemoveNode removes Node.
+ // RemoveNode removes a Node.
RemoveNode(context.Context, *RemoveNodeRequest) (*RemoveNodeResponse, error)
mustEmbedUnimplementedNodesServer()
}
@@ -166,6 +195,10 @@ func (UnimplementedNodesServer) GetNode(context.Context, *GetNodeRequest) (*GetN
return nil, status.Errorf(codes.Unimplemented, "method GetNode not implemented")
}
+func (UnimplementedNodesServer) AddNode(context.Context, *AddNodeRequest) (*AddNodeResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method AddNode not implemented")
+}
+
func (UnimplementedNodesServer) AddGenericNode(context.Context, *AddGenericNodeRequest) (*AddGenericNodeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddGenericNode not implemented")
}
@@ -238,6 +271,24 @@ func _Nodes_GetNode_Handler(srv interface{}, ctx context.Context, dec func(inter
return interceptor(ctx, in, info, handler)
}
+func _Nodes_AddNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(AddNodeRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(NodesServer).AddNode(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Nodes_AddNode_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(NodesServer).AddNode(ctx, req.(*AddNodeRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _Nodes_AddGenericNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddGenericNodeRequest)
if err := dec(in); err != nil {
@@ -361,6 +412,10 @@ var Nodes_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetNode",
Handler: _Nodes_GetNode_Handler,
},
+ {
+ MethodName: "AddNode",
+ Handler: _Nodes_AddNode_Handler,
+ },
{
MethodName: "AddGenericNode",
Handler: _Nodes_AddGenericNode_Handler,
diff --git a/api/inventorypb/nodes_test.go b/api/inventorypb/nodes_test.go
index f5e7399323..722cae686d 100644
--- a/api/inventorypb/nodes_test.go
+++ b/api/inventorypb/nodes_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api/inventorypb/services.go b/api/inventorypb/services.go
index f4aa147f43..fba1cb6495 100644
--- a/api/inventorypb/services.go
+++ b/api/inventorypb/services.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api/inventorypb/services_test.go b/api/inventorypb/services_test.go
index dd2697d948..0dea92474a 100644
--- a/api/inventorypb/services_test.go
+++ b/api/inventorypb/services_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api/inventorypb/types/agent_types.go b/api/inventorypb/types/agent_types.go
index 56817deb9a..8be8950c55 100644
--- a/api/inventorypb/types/agent_types.go
+++ b/api/inventorypb/types/agent_types.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api/inventorypb/types/node_types.go b/api/inventorypb/types/node_types.go
index e861436d5e..8737e0d479 100644
--- a/api/inventorypb/types/node_types.go
+++ b/api/inventorypb/types/node_types.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api/inventorypb/types/service_types.go b/api/inventorypb/types/service_types.go
index a1b24ba061..77301e2400 100644
--- a/api/inventorypb/types/service_types.go
+++ b/api/inventorypb/types/service_types.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api/main_test.go b/api/main_test.go
index a797c4c6ae..518d42d8bb 100644
--- a/api/main_test.go
+++ b/api/main_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/api/managementpb/json/client/rds/add_rds_responses.go b/api/managementpb/json/client/rds/add_rds_responses.go
index 0c5c17da70..739b758db0 100644
--- a/api/managementpb/json/client/rds/add_rds_responses.go
+++ b/api/managementpb/json/client/rds/add_rds_responses.go
@@ -1219,10 +1219,6 @@ type AddRDSOKBodyNode struct {
Az string `json:"az,omitempty"`
// Custom user-assigned labels.
- //
- // TODO https://jira.percona.com/browse/PMM-4314
- // string az = 8;
- // string node_model = 9;
CustomLabels map[string]string `json:"custom_labels,omitempty"`
}
diff --git a/api/managementpb/json/managementpb.json b/api/managementpb/json/managementpb.json
index b5c9de7585..57b8c1da00 100644
--- a/api/managementpb/json/managementpb.json
+++ b/api/managementpb/json/managementpb.json
@@ -5407,7 +5407,7 @@
"x-order": 5
},
"custom_labels": {
- "description": "Custom user-assigned labels.\n\nTODO https://jira.percona.com/browse/PMM-4314\n string az = 8;\n string node_model = 9;",
+ "description": "Custom user-assigned labels.",
"type": "object",
"additionalProperties": {
"type": "string"
diff --git a/api/swagger/swagger-dev.json b/api/swagger/swagger-dev.json
index 8801f4cba5..af4af60aaa 100644
--- a/api/swagger/swagger-dev.json
+++ b/api/swagger/swagger-dev.json
@@ -13307,14 +13307,548 @@
}
}
},
+ "/v1/inventory/Nodes/Add": {
+ "post": {
+ "description": "Adds a Node.",
+ "tags": [
+ "Nodes"
+ ],
+ "summary": "Add Node",
+ "operationId": "AddNode",
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "type": "object",
+ "properties": {
+ "generic": {
+ "type": "object",
+ "properties": {
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 0
+ },
+ "address": {
+ "description": "Node address (DNS name or IP).",
+ "type": "string",
+ "x-order": 1
+ },
+ "machine_id": {
+ "description": "Linux machine-id.",
+ "type": "string",
+ "x-order": 2
+ },
+ "distro": {
+ "description": "Linux distribution name and version.",
+ "type": "string",
+ "x-order": 3
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 4
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 5
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 6
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 7
+ }
+ },
+ "x-order": 0
+ },
+ "container": {
+ "type": "object",
+ "properties": {
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 0
+ },
+ "address": {
+ "description": "Node address (DNS name or IP).",
+ "type": "string",
+ "x-order": 1
+ },
+ "machine_id": {
+ "description": "Linux machine-id of the Generic Node where this Container Node runs.",
+ "type": "string",
+ "x-order": 2
+ },
+ "container_id": {
+ "description": "Container identifier. If specified, must be a unique Docker container identifier.",
+ "type": "string",
+ "x-order": 3
+ },
+ "container_name": {
+ "description": "Container name.",
+ "type": "string",
+ "x-order": 4
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 5
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 6
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 7
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 8
+ }
+ },
+ "x-order": 1
+ },
+ "remote": {
+ "type": "object",
+ "properties": {
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 0
+ },
+ "address": {
+ "description": "Node address (DNS name or IP).",
+ "type": "string",
+ "x-order": 1
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 2
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 3
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 4
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 5
+ }
+ },
+ "x-order": 2
+ },
+ "remote_rds": {
+ "type": "object",
+ "properties": {
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 0
+ },
+ "address": {
+ "description": "DB instance identifier.",
+ "type": "string",
+ "x-order": 1
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 2
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 3
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 4
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 5
+ }
+ },
+ "x-order": 3
+ },
+ "remote_azure": {
+ "type": "object",
+ "properties": {
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 0
+ },
+ "address": {
+ "description": "DB instance identifier.",
+ "type": "string",
+ "x-order": 1
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 2
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 3
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 4
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 5
+ }
+ },
+ "x-order": 4
+ }
+ }
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "type": "object",
+ "properties": {
+ "generic": {
+ "description": "GenericNode represents a bare metal server or virtual machine.",
+ "type": "object",
+ "properties": {
+ "node_id": {
+ "description": "Unique randomly generated instance identifier.",
+ "type": "string",
+ "x-order": 0
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 1
+ },
+ "address": {
+ "description": "Node address (DNS name or IP).",
+ "type": "string",
+ "x-order": 2
+ },
+ "machine_id": {
+ "description": "Linux machine-id.",
+ "type": "string",
+ "x-order": 3
+ },
+ "distro": {
+ "description": "Linux distribution name and version.",
+ "type": "string",
+ "x-order": 4
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 5
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 6
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 7
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 8
+ }
+ },
+ "x-order": 0
+ },
+ "container": {
+ "description": "ContainerNode represents a Docker container.",
+ "type": "object",
+ "properties": {
+ "node_id": {
+ "description": "Unique randomly generated instance identifier.",
+ "type": "string",
+ "x-order": 0
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 1
+ },
+ "address": {
+ "description": "Node address (DNS name or IP).",
+ "type": "string",
+ "x-order": 2
+ },
+ "machine_id": {
+ "description": "Linux machine-id of the Generic Node where this Container Node runs.",
+ "type": "string",
+ "x-order": 3
+ },
+ "container_id": {
+ "description": "Container identifier. If specified, must be a unique Docker container identifier.",
+ "type": "string",
+ "x-order": 4
+ },
+ "container_name": {
+ "description": "Container name.",
+ "type": "string",
+ "x-order": 5
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 6
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 7
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 8
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 9
+ }
+ },
+ "x-order": 1
+ },
+ "remote": {
+ "description": "RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes.",
+ "type": "object",
+ "properties": {
+ "node_id": {
+ "description": "Unique randomly generated instance identifier.",
+ "type": "string",
+ "x-order": 0
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 1
+ },
+ "address": {
+ "description": "Node address (DNS name or IP).",
+ "type": "string",
+ "x-order": 2
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 3
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 4
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 5
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 6
+ }
+ },
+ "x-order": 2
+ },
+ "remote_rds": {
+ "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.",
+ "type": "object",
+ "properties": {
+ "node_id": {
+ "description": "Unique randomly generated instance identifier.",
+ "type": "string",
+ "x-order": 0
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 1
+ },
+ "address": {
+ "description": "DB instance identifier.",
+ "type": "string",
+ "x-order": 2
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 3
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 4
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 5
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 6
+ }
+ },
+ "x-order": 3
+ },
+ "remote_azure_database": {
+ "description": "RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes.",
+ "type": "object",
+ "properties": {
+ "node_id": {
+ "description": "Unique randomly generated instance identifier.",
+ "type": "string",
+ "x-order": 0
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 1
+ },
+ "address": {
+ "description": "DB instance identifier.",
+ "type": "string",
+ "x-order": 2
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 3
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 4
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 5
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 6
+ }
+ },
+ "x-order": 4
+ }
+ }
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32",
+ "x-order": 0
+ },
+ "message": {
+ "type": "string",
+ "x-order": 1
+ },
+ "details": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "@type": {
+ "type": "string",
+ "x-order": 0
+ }
+ },
+ "additionalProperties": false
+ },
+ "x-order": 2
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/v1/inventory/Nodes/AddContainer": {
"post": {
- "description": "Adds container Node.",
+ "description": "Adds a container Node.",
"tags": [
"Nodes"
],
- "summary": "Add Container Node",
+ "summary": "Add a Container Node",
"operationId": "AddContainerNode",
+ "deprecated": true,
"parameters": [
{
"name": "body",
@@ -13480,12 +14014,13 @@
},
"/v1/inventory/Nodes/AddGeneric": {
"post": {
- "description": "Adds generic Node.",
+ "description": "Adds a generic Node.",
"tags": [
"Nodes"
],
- "summary": "Add Generic Node",
+ "summary": "Add a Generic Node",
"operationId": "AddGenericNode",
+ "deprecated": true,
"parameters": [
{
"name": "body",
@@ -13641,12 +14176,13 @@
},
"/v1/inventory/Nodes/AddRemote": {
"post": {
- "description": "Adds remote Node.",
+ "description": "Adds a remote Node.",
"tags": [
"Nodes"
],
- "summary": "Add Remote Node",
+ "summary": "Add a Remote Node",
"operationId": "AddRemoteNode",
+ "deprecated": true,
"parameters": [
{
"name": "body",
@@ -13782,12 +14318,13 @@
},
"/v1/inventory/Nodes/AddRemoteAzureDatabase": {
"post": {
- "description": "Adds remote Azure database Node.",
+ "description": "Adds a remote Azure database Node.",
"tags": [
"Nodes"
],
- "summary": "Add Remote Azure Database Node",
+ "summary": "Adda a Remote Azure Database Node",
"operationId": "AddRemoteAzureDatabaseNode",
+ "deprecated": true,
"parameters": [
{
"name": "body",
@@ -13923,12 +14460,13 @@
},
"/v1/inventory/Nodes/AddRemoteRDS": {
"post": {
- "description": "Adds remote RDS Node.",
+ "description": "Adds a remote RDS Node.",
"tags": [
"Nodes"
],
- "summary": "Add Remote RDS Node",
+ "summary": "Add a Remote RDS Node",
"operationId": "AddRemoteRDSNode",
+ "deprecated": true,
"parameters": [
{
"name": "body",
@@ -14015,7 +14553,7 @@
"x-order": 5
},
"custom_labels": {
- "description": "Custom user-assigned labels.\n\nTODO https://jira.percona.com/browse/PMM-4314\n string az = 8;\n string node_model = 9;",
+ "description": "Custom user-assigned labels.",
"type": "object",
"additionalProperties": {
"type": "string"
@@ -14288,7 +14826,7 @@
"x-order": 5
},
"custom_labels": {
- "description": "Custom user-assigned labels.\n\nTODO https://jira.percona.com/browse/PMM-4314\n string az = 8;\n string node_model = 9;",
+ "description": "Custom user-assigned labels.",
"type": "object",
"additionalProperties": {
"type": "string"
@@ -14626,7 +15164,7 @@
"x-order": 5
},
"custom_labels": {
- "description": "Custom user-assigned labels.\n\nTODO https://jira.percona.com/browse/PMM-4314\n string az = 8;\n string node_model = 9;",
+ "description": "Custom user-assigned labels.",
"type": "object",
"additionalProperties": {
"type": "string"
@@ -14724,11 +15262,11 @@
},
"/v1/inventory/Nodes/Remove": {
"post": {
- "description": "Removes Node.",
+ "description": "Removes a Node.",
"tags": [
"Nodes"
],
- "summary": "Remove Node",
+ "summary": "Remove a Node",
"operationId": "RemoveNode",
"parameters": [
{
@@ -28232,7 +28770,7 @@
"x-order": 5
},
"custom_labels": {
- "description": "Custom user-assigned labels.\n\nTODO https://jira.percona.com/browse/PMM-4314\n string az = 8;\n string node_model = 9;",
+ "description": "Custom user-assigned labels.",
"type": "object",
"additionalProperties": {
"type": "string"
diff --git a/api/swagger/swagger.json b/api/swagger/swagger.json
index f1e0ccb21b..13fd52ea88 100644
--- a/api/swagger/swagger.json
+++ b/api/swagger/swagger.json
@@ -10463,14 +10463,548 @@
}
}
},
+ "/v1/inventory/Nodes/Add": {
+ "post": {
+ "description": "Adds a Node.",
+ "tags": [
+ "Nodes"
+ ],
+ "summary": "Add Node",
+ "operationId": "AddNode",
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "type": "object",
+ "properties": {
+ "generic": {
+ "type": "object",
+ "properties": {
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 0
+ },
+ "address": {
+ "description": "Node address (DNS name or IP).",
+ "type": "string",
+ "x-order": 1
+ },
+ "machine_id": {
+ "description": "Linux machine-id.",
+ "type": "string",
+ "x-order": 2
+ },
+ "distro": {
+ "description": "Linux distribution name and version.",
+ "type": "string",
+ "x-order": 3
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 4
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 5
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 6
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 7
+ }
+ },
+ "x-order": 0
+ },
+ "container": {
+ "type": "object",
+ "properties": {
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 0
+ },
+ "address": {
+ "description": "Node address (DNS name or IP).",
+ "type": "string",
+ "x-order": 1
+ },
+ "machine_id": {
+ "description": "Linux machine-id of the Generic Node where this Container Node runs.",
+ "type": "string",
+ "x-order": 2
+ },
+ "container_id": {
+ "description": "Container identifier. If specified, must be a unique Docker container identifier.",
+ "type": "string",
+ "x-order": 3
+ },
+ "container_name": {
+ "description": "Container name.",
+ "type": "string",
+ "x-order": 4
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 5
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 6
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 7
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 8
+ }
+ },
+ "x-order": 1
+ },
+ "remote": {
+ "type": "object",
+ "properties": {
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 0
+ },
+ "address": {
+ "description": "Node address (DNS name or IP).",
+ "type": "string",
+ "x-order": 1
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 2
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 3
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 4
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 5
+ }
+ },
+ "x-order": 2
+ },
+ "remote_rds": {
+ "type": "object",
+ "properties": {
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 0
+ },
+ "address": {
+ "description": "DB instance identifier.",
+ "type": "string",
+ "x-order": 1
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 2
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 3
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 4
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 5
+ }
+ },
+ "x-order": 3
+ },
+ "remote_azure": {
+ "type": "object",
+ "properties": {
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 0
+ },
+ "address": {
+ "description": "DB instance identifier.",
+ "type": "string",
+ "x-order": 1
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 2
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 3
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 4
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 5
+ }
+ },
+ "x-order": 4
+ }
+ }
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "type": "object",
+ "properties": {
+ "generic": {
+ "description": "GenericNode represents a bare metal server or virtual machine.",
+ "type": "object",
+ "properties": {
+ "node_id": {
+ "description": "Unique randomly generated instance identifier.",
+ "type": "string",
+ "x-order": 0
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 1
+ },
+ "address": {
+ "description": "Node address (DNS name or IP).",
+ "type": "string",
+ "x-order": 2
+ },
+ "machine_id": {
+ "description": "Linux machine-id.",
+ "type": "string",
+ "x-order": 3
+ },
+ "distro": {
+ "description": "Linux distribution name and version.",
+ "type": "string",
+ "x-order": 4
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 5
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 6
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 7
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 8
+ }
+ },
+ "x-order": 0
+ },
+ "container": {
+ "description": "ContainerNode represents a Docker container.",
+ "type": "object",
+ "properties": {
+ "node_id": {
+ "description": "Unique randomly generated instance identifier.",
+ "type": "string",
+ "x-order": 0
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 1
+ },
+ "address": {
+ "description": "Node address (DNS name or IP).",
+ "type": "string",
+ "x-order": 2
+ },
+ "machine_id": {
+ "description": "Linux machine-id of the Generic Node where this Container Node runs.",
+ "type": "string",
+ "x-order": 3
+ },
+ "container_id": {
+ "description": "Container identifier. If specified, must be a unique Docker container identifier.",
+ "type": "string",
+ "x-order": 4
+ },
+ "container_name": {
+ "description": "Container name.",
+ "type": "string",
+ "x-order": 5
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 6
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 7
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 8
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 9
+ }
+ },
+ "x-order": 1
+ },
+ "remote": {
+ "description": "RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes.",
+ "type": "object",
+ "properties": {
+ "node_id": {
+ "description": "Unique randomly generated instance identifier.",
+ "type": "string",
+ "x-order": 0
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 1
+ },
+ "address": {
+ "description": "Node address (DNS name or IP).",
+ "type": "string",
+ "x-order": 2
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 3
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 4
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 5
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 6
+ }
+ },
+ "x-order": 2
+ },
+ "remote_rds": {
+ "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.",
+ "type": "object",
+ "properties": {
+ "node_id": {
+ "description": "Unique randomly generated instance identifier.",
+ "type": "string",
+ "x-order": 0
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 1
+ },
+ "address": {
+ "description": "DB instance identifier.",
+ "type": "string",
+ "x-order": 2
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 3
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 4
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 5
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 6
+ }
+ },
+ "x-order": 3
+ },
+ "remote_azure_database": {
+ "description": "RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes.",
+ "type": "object",
+ "properties": {
+ "node_id": {
+ "description": "Unique randomly generated instance identifier.",
+ "type": "string",
+ "x-order": 0
+ },
+ "node_name": {
+ "description": "Unique across all Nodes user-defined name.",
+ "type": "string",
+ "x-order": 1
+ },
+ "address": {
+ "description": "DB instance identifier.",
+ "type": "string",
+ "x-order": 2
+ },
+ "node_model": {
+ "description": "Node model.",
+ "type": "string",
+ "x-order": 3
+ },
+ "region": {
+ "description": "Node region.",
+ "type": "string",
+ "x-order": 4
+ },
+ "az": {
+ "description": "Node availability zone.",
+ "type": "string",
+ "x-order": 5
+ },
+ "custom_labels": {
+ "description": "Custom user-assigned labels.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "x-order": 6
+ }
+ },
+ "x-order": 4
+ }
+ }
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32",
+ "x-order": 0
+ },
+ "message": {
+ "type": "string",
+ "x-order": 1
+ },
+ "details": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "@type": {
+ "type": "string",
+ "x-order": 0
+ }
+ },
+ "additionalProperties": false
+ },
+ "x-order": 2
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/v1/inventory/Nodes/AddContainer": {
"post": {
- "description": "Adds container Node.",
+ "description": "Adds a container Node.",
"tags": [
"Nodes"
],
- "summary": "Add Container Node",
+ "summary": "Add a Container Node",
"operationId": "AddContainerNode",
+ "deprecated": true,
"parameters": [
{
"name": "body",
@@ -10636,12 +11170,13 @@
},
"/v1/inventory/Nodes/AddGeneric": {
"post": {
- "description": "Adds generic Node.",
+ "description": "Adds a generic Node.",
"tags": [
"Nodes"
],
- "summary": "Add Generic Node",
+ "summary": "Add a Generic Node",
"operationId": "AddGenericNode",
+ "deprecated": true,
"parameters": [
{
"name": "body",
@@ -10797,12 +11332,13 @@
},
"/v1/inventory/Nodes/AddRemote": {
"post": {
- "description": "Adds remote Node.",
+ "description": "Adds a remote Node.",
"tags": [
"Nodes"
],
- "summary": "Add Remote Node",
+ "summary": "Add a Remote Node",
"operationId": "AddRemoteNode",
+ "deprecated": true,
"parameters": [
{
"name": "body",
@@ -10938,12 +11474,13 @@
},
"/v1/inventory/Nodes/AddRemoteAzureDatabase": {
"post": {
- "description": "Adds remote Azure database Node.",
+ "description": "Adds a remote Azure database Node.",
"tags": [
"Nodes"
],
- "summary": "Add Remote Azure Database Node",
+ "summary": "Adda a Remote Azure Database Node",
"operationId": "AddRemoteAzureDatabaseNode",
+ "deprecated": true,
"parameters": [
{
"name": "body",
@@ -11079,12 +11616,13 @@
},
"/v1/inventory/Nodes/AddRemoteRDS": {
"post": {
- "description": "Adds remote RDS Node.",
+ "description": "Adds a remote RDS Node.",
"tags": [
"Nodes"
],
- "summary": "Add Remote RDS Node",
+ "summary": "Add a Remote RDS Node",
"operationId": "AddRemoteRDSNode",
+ "deprecated": true,
"parameters": [
{
"name": "body",
@@ -11171,7 +11709,7 @@
"x-order": 5
},
"custom_labels": {
- "description": "Custom user-assigned labels.\n\nTODO https://jira.percona.com/browse/PMM-4314\n string az = 8;\n string node_model = 9;",
+ "description": "Custom user-assigned labels.",
"type": "object",
"additionalProperties": {
"type": "string"
@@ -11444,7 +11982,7 @@
"x-order": 5
},
"custom_labels": {
- "description": "Custom user-assigned labels.\n\nTODO https://jira.percona.com/browse/PMM-4314\n string az = 8;\n string node_model = 9;",
+ "description": "Custom user-assigned labels.",
"type": "object",
"additionalProperties": {
"type": "string"
@@ -11782,7 +12320,7 @@
"x-order": 5
},
"custom_labels": {
- "description": "Custom user-assigned labels.\n\nTODO https://jira.percona.com/browse/PMM-4314\n string az = 8;\n string node_model = 9;",
+ "description": "Custom user-assigned labels.",
"type": "object",
"additionalProperties": {
"type": "string"
@@ -11880,11 +12418,11 @@
},
"/v1/inventory/Nodes/Remove": {
"post": {
- "description": "Removes Node.",
+ "description": "Removes a Node.",
"tags": [
"Nodes"
],
- "summary": "Remove Node",
+ "summary": "Remove a Node",
"operationId": "RemoveNode",
"parameters": [
{
@@ -19401,7 +19939,7 @@
"x-order": 5
},
"custom_labels": {
- "description": "Custom user-assigned labels.\n\nTODO https://jira.percona.com/browse/PMM-4314\n string az = 8;\n string node_model = 9;",
+ "description": "Custom user-assigned labels.",
"type": "object",
"additionalProperties": {
"type": "string"
diff --git a/build/ansible/roles/ami-ovf/tasks/main.yml b/build/ansible/roles/ami-ovf/tasks/main.yml
index 6fdec5edd7..fd30f8009f 100644
--- a/build/ansible/roles/ami-ovf/tasks/main.yml
+++ b/build/ansible/roles/ami-ovf/tasks/main.yml
@@ -31,12 +31,39 @@
enabled: yes
gpgkey: file:///etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY
-- name: Disable SELinux
+- name: Disable SELinux | EL7
+ when:
+ - ansible_distribution == 'CentOS'
+ - ansible_distribution_major_version == '7'
selinux:
policy: targeted
state: permissive
-- name: PMM | Add firewalld rule
+- name: Disable SELinux | EL9
+ when:
+ - ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux'
+ - ansible_distribution_major_version == '9'
+ vars:
+ ansible_python_interpreter: /usr/bin/python3.9
+ selinux:
+ policy: targeted
+ state: permissive
+
+- name: Add firewalld rule | EL7
+ when:
+ - ansible_distribution == 'CentOS'
+ - ansible_distribution_major_version == '7'
+ firewalld: port={{ item }} permanent=true state=enabled immediate=yes
+ with_items:
+ - 80/tcp
+ - 443/tcp
+
+- name: Add firewalld rule | EL9
+ when:
+ - ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux'
+ - ansible_distribution_major_version == '9'
+ vars:
+ ansible_python_interpreter: /usr/bin/python3.9
firewalld: port={{ item }} permanent=true state=enabled immediate=yes
with_items:
- 80/tcp
diff --git a/build/ansible/roles/cloud-node/tasks/main.yml b/build/ansible/roles/cloud-node/tasks/main.yml
index edcbe3104d..b5fb6bcf6b 100644
--- a/build/ansible/roles/cloud-node/tasks/main.yml
+++ b/build/ansible/roles/cloud-node/tasks/main.yml
@@ -38,11 +38,26 @@
- yum-utils
- cloud-init
- firewalld
- - python3-pip
- - ansible
+ - python3-libselinux
+ - python3-firewall
+
+- name: Firewalld | Start EL7
+ when:
+ - ansible_distribution == 'CentOS'
+ - ansible_distribution_major_version == '7'
+ - ansible_os_family == 'RedHat'
+ service:
+ name: firewalld
+ state: started
+ enabled: yes
-- name: Firewalld | Start
- when: ansible_os_family == 'RedHat'
+- name: Firewalld | Start EL9
+ when:
+ - ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux'
+ - ansible_distribution_major_version == '9'
+ - ansible_os_family == 'RedHat'
+ vars:
+ ansible_python_interpreter: /usr/bin/python3.9
service:
name: firewalld
state: started
diff --git a/build/ansible/roles/pmm2-images/tasks/main.yml b/build/ansible/roles/pmm2-images/tasks/main.yml
index f7812a6328..6fed510de7 100644
--- a/build/ansible/roles/pmm2-images/tasks/main.yml
+++ b/build/ansible/roles/pmm2-images/tasks/main.yml
@@ -47,13 +47,25 @@
state: installed
ignore_errors: True
-- name: Packages | Update OS
+- name: Packages | Update OS EL7
+ when:
+ - ansible_distribution == "CentOS"
+ - ansible_distribution_major_version == "7"
yum:
name: "*"
state: latest
exclude: "ansible*"
disablerepo: percona-release-x86_64
+- name: Packages | Update OS EL9
+ when:
+ - ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux'
+ - ansible_distribution_major_version == '9'
+ yum:
+ name: "*"
+ state: latest
+ disablerepo: percona-release-x86_64
+
- name: Packages | Install OS tools for EL7
when:
- ansible_distribution == "CentOS"
@@ -70,7 +82,6 @@
name:
- python3-pip
- python3.11-pip
- - python3.11
- python3.11-psycopg2
- rsync
- libsqlite3x-devel # package does not come pre-installed on EL9
diff --git a/build/docker/server/Dockerfile.el9 b/build/docker/server/Dockerfile.el9
index 925e4e6c08..4fb9001f98 100644
--- a/build/docker/server/Dockerfile.el9
+++ b/build/docker/server/Dockerfile.el9
@@ -18,19 +18,14 @@ EXPOSE 80 443
WORKDIR /opt
-# NOTE: Ansible should NOT be installed via yum/dnf
-# Read more: https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#pip-install
-# RUN microdnf -y install yum && yum -y install python3-pip && \
-# yum -y install oracle-epel-release-el9 ansible-core && \
-# python3 -m pip install ansible && \
-# python3 -m pip install setuptools && \
-# yum -y install epel-release
-
-RUN microdnf -y install yum && yum -y install python3-pip && \
- yum -y install oracle-epel-release-el9 ansible-core && \
- yum -y install epel-release && \
- yum -y install glibc-langpack-en && \
- yum -y install ansible vi
+RUN microdnf -y install epel-release && \
+ microdnf -y install ansible-core \
+ ansible-collection-community-general \
+ ansible-collection-community-postgresql \
+ ansible-collection-ansible-posix \
+ glibc-langpack-en \
+ yum \
+ vi
COPY RPMS /tmp/RPMS
COPY gitCommit /tmp/gitCommit
diff --git a/build/packages/rpm/server/SPECS/pmm-dump.spec b/build/packages/rpm/server/SPECS/pmm-dump.spec
index 24ae2ee76c..c4175cda2c 100644
--- a/build/packages/rpm/server/SPECS/pmm-dump.spec
+++ b/build/packages/rpm/server/SPECS/pmm-dump.spec
@@ -31,6 +31,7 @@ install -d -p %{buildroot}%{_sbindir}
install -p -m 0755 pmm-dump %{buildroot}%{_sbindir}/pmm-dump
%files
+%license LICENSE
%doc README.md
%{_sbindir}/pmm-dump
diff --git a/build/packages/rpm/server/SPECS/victoriametrics.spec b/build/packages/rpm/server/SPECS/victoriametrics.spec
index 7b13cd2f3e..ec55d239d1 100644
--- a/build/packages/rpm/server/SPECS/victoriametrics.spec
+++ b/build/packages/rpm/server/SPECS/victoriametrics.spec
@@ -9,11 +9,11 @@
%global repo VictoriaMetrics
%global provider github.com/VictoriaMetrics/%{repo}
-%global commit pmm-6401-v1.93.1
+%global commit pmm-6401-v1.93.4
Name: percona-victoriametrics
-Version: 1.93.1
-Release: 2%{?dist}
+Version: 1.93.4
+Release: 1%{?dist}
Summary: VictoriaMetrics monitoring solution and time series database
License: Apache-2.0
URL: https://%{provider}
@@ -43,13 +43,16 @@ install -D -p -m 0755 ./bin/vmalert-pure %{buildroot}%{_sbindir}/vmalert
%files
-%copying LICENSE
+%license LICENSE
%doc README.md
%{_sbindir}/victoriametrics
%{_sbindir}/vmalert
%changelog
+* Thu Sep 14 2023 Alex Tymchuk - 1.93.4-1
+- upgrade victoriametrics to 1.93.4 release
+
* Fri Sep 1 2023 Nurlan Moldomurov - 1.93.1-2
- upgrade victoriametrics to 1.93.1 release
diff --git a/build/packer/pmm2.el9.json b/build/packer/pmm2.el9.json
index 51488569db..baa0ef18f2 100644
--- a/build/packer/pmm2.el9.json
+++ b/build/packer/pmm2.el9.json
@@ -114,7 +114,8 @@
"inline": [
"sudo yum -y update",
"sudo yum -y install epel-release",
- "sudo yum -y install ansible"
+ "sudo yum -y install ansible-core",
+ "sudo yum -y install ansible-collection-community-general ansible-collection-community-postgresql ansible-collection-ansible-posix"
]
},
{
diff --git a/build/scripts/vars b/build/scripts/vars
index f1597dd14a..789377c71b 100644
--- a/build/scripts/vars
+++ b/build/scripts/vars
@@ -55,5 +55,5 @@ docker_client_tarball=${root_dir}/results/docker/pmm2-client-${pmm_version}.dock
source_tarball=${root_dir}/results/source_tarball/pmm2-client-${pmm_version}.tar.gz
binary_tarball=${root_dir}/results/tarball/pmm2-client-${pmm_version}.tar.gz
-# https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/pmm-6401-v1.93.1
-vmagent_commit_hash=ca20478a69233179b1891755937b5c7d58791fc2
+# https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/pmm-6401-v1.93.4
+vmagent_commit_hash=58ecb9066574f38f1d1c91ace467316e7f175b09
diff --git a/cli-tests/package-lock.json b/cli-tests/package-lock.json
index 0be0a4df2c..a9c7eac9d6 100644
--- a/cli-tests/package-lock.json
+++ b/cli-tests/package-lock.json
@@ -20,9 +20,9 @@
"devDependencies": {
"@types/promise-retry": "^1.1.3",
"@types/shelljs": "^0.8.12",
- "@typescript-eslint/eslint-plugin": "^6.6.0",
- "@typescript-eslint/parser": "^6.6.0",
- "eslint": "8.48",
+ "@typescript-eslint/eslint-plugin": "^6.7.0",
+ "@typescript-eslint/parser": "^6.7.0",
+ "eslint": "8.49",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-plugin-import": "^2.28.0",
@@ -86,18 +86,18 @@
}
},
"node_modules/@eslint/js": {
- "version": "8.48.0",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.48.0.tgz",
- "integrity": "sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==",
+ "version": "8.49.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.49.0.tgz",
+ "integrity": "sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
"node_modules/@humanwhocodes/config-array": {
- "version": "0.11.10",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz",
- "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==",
+ "version": "0.11.11",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz",
+ "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==",
"dev": true,
"dependencies": {
"@humanwhocodes/object-schema": "^1.2.1",
@@ -261,16 +261,16 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin": {
- "version": "6.6.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.6.0.tgz",
- "integrity": "sha512-CW9YDGTQnNYMIo5lMeuiIG08p4E0cXrXTbcZ2saT/ETE7dWUrNxlijsQeU04qAAKkILiLzdQz+cGFxCJjaZUmA==",
+ "version": "6.7.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.0.tgz",
+ "integrity": "sha512-gUqtknHm0TDs1LhY12K2NA3Rmlmp88jK9Tx8vGZMfHeNMLE3GH2e9TRub+y+SOjuYgtOmok+wt1AyDPZqxbNag==",
"dev": true,
"dependencies": {
"@eslint-community/regexpp": "^4.5.1",
- "@typescript-eslint/scope-manager": "6.6.0",
- "@typescript-eslint/type-utils": "6.6.0",
- "@typescript-eslint/utils": "6.6.0",
- "@typescript-eslint/visitor-keys": "6.6.0",
+ "@typescript-eslint/scope-manager": "6.7.0",
+ "@typescript-eslint/type-utils": "6.7.0",
+ "@typescript-eslint/utils": "6.7.0",
+ "@typescript-eslint/visitor-keys": "6.7.0",
"debug": "^4.3.4",
"graphemer": "^1.4.0",
"ignore": "^5.2.4",
@@ -296,15 +296,15 @@
}
},
"node_modules/@typescript-eslint/parser": {
- "version": "6.6.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.6.0.tgz",
- "integrity": "sha512-setq5aJgUwtzGrhW177/i+DMLqBaJbdwGj2CPIVFFLE0NCliy5ujIdLHd2D1ysmlmsjdL2GWW+hR85neEfc12w==",
+ "version": "6.7.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.7.0.tgz",
+ "integrity": "sha512-jZKYwqNpNm5kzPVP5z1JXAuxjtl2uG+5NpaMocFPTNC2EdYIgbXIPImObOkhbONxtFTTdoZstLZefbaK+wXZng==",
"dev": true,
"dependencies": {
- "@typescript-eslint/scope-manager": "6.6.0",
- "@typescript-eslint/types": "6.6.0",
- "@typescript-eslint/typescript-estree": "6.6.0",
- "@typescript-eslint/visitor-keys": "6.6.0",
+ "@typescript-eslint/scope-manager": "6.7.0",
+ "@typescript-eslint/types": "6.7.0",
+ "@typescript-eslint/typescript-estree": "6.7.0",
+ "@typescript-eslint/visitor-keys": "6.7.0",
"debug": "^4.3.4"
},
"engines": {
@@ -324,13 +324,13 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
- "version": "6.6.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.6.0.tgz",
- "integrity": "sha512-pT08u5W/GT4KjPUmEtc2kSYvrH8x89cVzkA0Sy2aaOUIw6YxOIjA8ilwLr/1fLjOedX1QAuBpG9XggWqIIfERw==",
+ "version": "6.7.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.7.0.tgz",
+ "integrity": "sha512-lAT1Uau20lQyjoLUQ5FUMSX/dS07qux9rYd5FGzKz/Kf8W8ccuvMyldb8hadHdK/qOI7aikvQWqulnEq2nCEYA==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "6.6.0",
- "@typescript-eslint/visitor-keys": "6.6.0"
+ "@typescript-eslint/types": "6.7.0",
+ "@typescript-eslint/visitor-keys": "6.7.0"
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
@@ -341,13 +341,13 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
- "version": "6.6.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.6.0.tgz",
- "integrity": "sha512-8m16fwAcEnQc69IpeDyokNO+D5spo0w1jepWWY2Q6y5ZKNuj5EhVQXjtVAeDDqvW6Yg7dhclbsz6rTtOvcwpHg==",
+ "version": "6.7.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.7.0.tgz",
+ "integrity": "sha512-f/QabJgDAlpSz3qduCyQT0Fw7hHpmhOzY/Rv6zO3yO+HVIdPfIWhrQoAyG+uZVtWAIS85zAyzgAFfyEr+MgBpg==",
"dev": true,
"dependencies": {
- "@typescript-eslint/typescript-estree": "6.6.0",
- "@typescript-eslint/utils": "6.6.0",
+ "@typescript-eslint/typescript-estree": "6.7.0",
+ "@typescript-eslint/utils": "6.7.0",
"debug": "^4.3.4",
"ts-api-utils": "^1.0.1"
},
@@ -368,9 +368,9 @@
}
},
"node_modules/@typescript-eslint/types": {
- "version": "6.6.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.6.0.tgz",
- "integrity": "sha512-CB6QpJQ6BAHlJXdwUmiaXDBmTqIE2bzGTDLADgvqtHWuhfNP3rAOK7kAgRMAET5rDRr9Utt+qAzRBdu3AhR3sg==",
+ "version": "6.7.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.7.0.tgz",
+ "integrity": "sha512-ihPfvOp7pOcN/ysoj0RpBPOx3HQTJTrIN8UZK+WFd3/iDeFHHqeyYxa4hQk4rMhsz9H9mXpR61IzwlBVGXtl9Q==",
"dev": true,
"engines": {
"node": "^16.0.0 || >=18.0.0"
@@ -381,13 +381,13 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
- "version": "6.6.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.6.0.tgz",
- "integrity": "sha512-hMcTQ6Al8MP2E6JKBAaSxSVw5bDhdmbCEhGW/V8QXkb9oNsFkA4SBuOMYVPxD3jbtQ4R/vSODBsr76R6fP3tbA==",
+ "version": "6.7.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.0.tgz",
+ "integrity": "sha512-dPvkXj3n6e9yd/0LfojNU8VMUGHWiLuBZvbM6V6QYD+2qxqInE7J+J/ieY2iGwR9ivf/R/haWGkIj04WVUeiSQ==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "6.6.0",
- "@typescript-eslint/visitor-keys": "6.6.0",
+ "@typescript-eslint/types": "6.7.0",
+ "@typescript-eslint/visitor-keys": "6.7.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@@ -408,17 +408,17 @@
}
},
"node_modules/@typescript-eslint/utils": {
- "version": "6.6.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.6.0.tgz",
- "integrity": "sha512-mPHFoNa2bPIWWglWYdR0QfY9GN0CfvvXX1Sv6DlSTive3jlMTUy+an67//Gysc+0Me9pjitrq0LJp0nGtLgftw==",
+ "version": "6.7.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.7.0.tgz",
+ "integrity": "sha512-MfCq3cM0vh2slSikQYqK2Gq52gvOhe57vD2RM3V4gQRZYX4rDPnKLu5p6cm89+LJiGlwEXU8hkYxhqqEC/V3qA==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"@types/json-schema": "^7.0.12",
"@types/semver": "^7.5.0",
- "@typescript-eslint/scope-manager": "6.6.0",
- "@typescript-eslint/types": "6.6.0",
- "@typescript-eslint/typescript-estree": "6.6.0",
+ "@typescript-eslint/scope-manager": "6.7.0",
+ "@typescript-eslint/types": "6.7.0",
+ "@typescript-eslint/typescript-estree": "6.7.0",
"semver": "^7.5.4"
},
"engines": {
@@ -433,12 +433,12 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
- "version": "6.6.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.6.0.tgz",
- "integrity": "sha512-L61uJT26cMOfFQ+lMZKoJNbAEckLe539VhTxiGHrWl5XSKQgA0RTBZJW2HFPy5T0ZvPVSD93QsrTKDkfNwJGyQ==",
+ "version": "6.7.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.0.tgz",
+ "integrity": "sha512-/C1RVgKFDmGMcVGeD8HjKv2bd72oI1KxQDeY8uc66gw9R0OK0eMq48cA+jv9/2Ag6cdrsUGySm1yzYmfz0hxwQ==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "6.6.0",
+ "@typescript-eslint/types": "6.7.0",
"eslint-visitor-keys": "^3.4.1"
},
"engines": {
@@ -936,16 +936,16 @@
}
},
"node_modules/eslint": {
- "version": "8.48.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.48.0.tgz",
- "integrity": "sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==",
+ "version": "8.49.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.49.0.tgz",
+ "integrity": "sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
"@eslint/eslintrc": "^2.1.2",
- "@eslint/js": "8.48.0",
- "@humanwhocodes/config-array": "^0.11.10",
+ "@eslint/js": "8.49.0",
+ "@humanwhocodes/config-array": "^0.11.11",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
"ajv": "^6.12.4",
diff --git a/cli-tests/package.json b/cli-tests/package.json
index a3742996ab..79bd81ced2 100644
--- a/cli-tests/package.json
+++ b/cli-tests/package.json
@@ -24,9 +24,9 @@
"devDependencies": {
"@types/promise-retry": "^1.1.3",
"@types/shelljs": "^0.8.12",
- "@typescript-eslint/eslint-plugin": "^6.6.0",
- "@typescript-eslint/parser": "^6.6.0",
- "eslint": "8.48",
+ "@typescript-eslint/eslint-plugin": "^6.7.0",
+ "@typescript-eslint/parser": "^6.7.0",
+ "eslint": "8.49",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-plugin-import": "^2.28.0",
diff --git a/docker-compose.yml b/docker-compose.yml
index d516be2235..566c7495d8 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -100,20 +100,45 @@ services:
# /opt/entrypoint.sh
# "
- # PMM with external ClickHouse DB
+ # PMM with external DBs
ch:
profiles:
- - pmm-ch
+ - pmm-external-dbs
image: ${CH_IMAGE:-clickhouse/clickhouse-server:22.6.9.11-alpine}
platform: linux/amd64
hostname: ${CH_HOSTNAME:-ch}
ports:
- ${CH_PORT:-9000}:9000
- pmm-server-ch:
+ networks:
+ - ${NETWORK:-default}
+ victoriametrics:
+ profiles:
+ - pmm-external-dbs
+ hostname: ${VM_HOSTNAME:-victoriametrics}
+ image: victoriametrics/victoria-metrics:v1.88.1
+ ports:
+ - 8428:8428
+ - 8089:8089
+ - 8089:8089/udp
+ - 2003:2003
+ - 2003:2003/udp
+ - 4242:4242
+ volumes:
+ - vmdata:/storage
+ command:
+ - "--storageDataPath=/storage"
+ - "--graphiteListenAddr=:2003"
+ - "--opentsdbListenAddr=:4242"
+ - "--httpListenAddr=:8428"
+ - "--influxListenAddr=:8089"
+ networks:
+ - ${NETWORK:-default}
+ pmm-managed-server-ch:
profiles:
- - pmm-ch
+ - pmm-external-dbs
depends_on:
- ch
+ - victoriametrics
image: ${PMM_CONTAINER:-perconalab/pmm-server:dev-container}
container_name: pmm-server
hostname: pmm-server
@@ -136,7 +161,8 @@ services:
- PERCONA_TEST_PMM_CLICKHOUSE_DATABASE=pmm
- PERCONA_TEST_PMM_CLICKHOUSE_BLOCK_SIZE=10000
- PERCONA_TEST_PMM_CLICKHOUSE_POOL_SIZE=2
- # - PMM_DEBUG=1
+ - PMM_VM_URL=${PMM_VM_URL:-http://victoriametrics:8428/}
+ - PMM_DEBUG=1
- PERCONA_TEST_DBAAS_PMM_CLIENT=perconalab/pmm-client:dev-latest
extra_hosts:
@@ -161,13 +187,6 @@ services:
- ${PMM_PORT_HTTPS:-443}:443
# For headless delve
- ${PMM_PORT_DELVE:-2345}:2345
- # PG
- - ${PMM_PORT_PG:-15432}:5432
- # VM
- - ${PMM_PORT_VM:-9090}:9090
- # CH
- - ${PMM_PORT_CH_TCP:-11000}:9000
- - ${PMM_PORT_CH_HTTP:-11123}:8123
volumes:
- ./:/root/go/src/github.com/percona/pmm
# - "../grafana/public:/usr/share/grafana/public"
@@ -207,4 +226,5 @@ services:
volumes:
go-modules:
+ vmdata: {}
root-cache:
diff --git a/docs/api/addnode.md b/docs/api/addnode.md
new file mode 100644
index 0000000000..2b177c72bf
--- /dev/null
+++ b/docs/api/addnode.md
@@ -0,0 +1,69 @@
+---
+slug: 'addnode'
+---
+
+## Add a Node
+
+This section describes how to add a Node of any type to the inventory.
+
+In PMM versions prior to 2.40.0, we featured a separate API call for each Node type. Starting with PMM 2.40.0, we have a single API call for all Node types. The API call is `Add` and the Node type is specified in the `node_type` field. The `node_type` field is required. Along with this single API endpoint, we are deprecating the separate API calls for each Node type.
+
+Let's see how to add a Node of type `GENERIC_NODE` using the old and new API calls.
+
+Old API call:
+
+````bash:
+
+```bash
+curl --insecure -X POST \
+ -H 'Authorization: Basic YWRtaW46YWRtaW4=' \
+ -H 'Accept: application/json' \
+ -H 'Content-Type: application/json' \
+ --url https://127.0.0.1/v1/inventory/Nodes/AddGeneric \
+ --data '
+{
+ "node_name": "mysql-sales-db-prod-1",
+ "region": "us-east-1",
+ "az": "us-east-1a",
+ "address": "209.0.25.100",
+ "custom_labels": {
+ "environment": "sales-prod",
+ "department": "sales"
+ }
+}
+'
+````
+
+New API call:
+
+```bash
+curl --insecure -X POST \
+ -H 'Authorization: Basic YWRtaW46YWRtaW4=' \
+ -H 'Accept: application/json' \
+ -H 'Content-Type: application/json' \
+ --url https://127.0.0.1/v1/inventory/Nodes/Add \
+ --data '
+{
+ "generic": {
+ "node_name": "mysql-sales-db-prod-1",
+ "region": "us-east-1",
+ "az": "us-east-1a",
+ "address": "209.0.25.100",
+ "custom_labels": {
+ "environment": "sales-prod",
+ "department": "sales"
+ }
+ }
+}
+'
+```
+
+To get the authentication token, please visit [this page](ref:authentication).
+
+You can choose from the following Node types:
+
+- GENERIC_NODE: `generic`
+- CONTAINER_NODE: `container`
+- REMOTE_NODE: `remote`
+- REMOTE_RDS_NODE: `remote_rds`
+- REMOTE_AZURE_DATABASE_NODE: `remote_azure`
diff --git a/docs/api/adhoc-backup.md b/docs/api/adhoc-backup.md
index 4988cf9c3a..fcd94af324 100644
--- a/docs/api/adhoc-backup.md
+++ b/docs/api/adhoc-backup.md
@@ -4,16 +4,14 @@ slug: 'adhoc-backup'
## Ad hoc Backup
-PMM can backup the monitored servers.
+PMM can backup the monitored servers.
This section describes making ad hoc backups from a service.
-
### Creating a Backup
Here is an example of a Curl API call to create a backup:
-
```bash
curl --insecure -X POST -H 'Authorization: Bearer XXXXX' \
--request POST \
@@ -32,9 +30,8 @@ curl --insecure -X POST -H 'Authorization: Bearer XXXXX' \
'
```
-You require an authentication string which is described [here](ref:authentication).
+You require an authentication token, which is described [here](ref:authentication).
Also, you require the [service_id](ref:listservices) and [location_id](ref:listlocations).
-You can choose a `name` and `description` for the backup. You can also configure `retry_interval` and `retries` if required.
-
+You can choose a `name` and `description` for the backup. You can also configure `retry_interval` and `retries` if required.
diff --git a/docs/api/authentication.md b/docs/api/authentication.md
index 4e04f11d1a..2379589217 100644
--- a/docs/api/authentication.md
+++ b/docs/api/authentication.md
@@ -23,7 +23,7 @@ Let's assume the username is `admin` and the password is also `admin`. Then the
```bash
curl -X GET -H 'Authorization: Basic YWRtaW46YWRtaW4=' \
- -H 'Content-Type: application/json' https://127.0.0.1/v1/version
+ -H 'Content-Type: application/json' https://127.0.0.1/v1/version
```
If you use `curl` to make API calls, a simple equivalent to the command above is:
@@ -34,19 +34,18 @@ curl -X GET -u admin:admin -H 'Content-Type: application/json' https://127.0.0.1
### Bearer Authentication
-Bearer authentication (also called token authentication) is an HTTP authentication scheme that involves security tokens called bearer tokens. The bearer token is a cryptic API key, which can be generated by the server admin from the Settings UI or via a respective API call (read more about how to generate an API key). The client must send the API key in the `Authorization` header when making requests to protected resources:
+Bearer authentication (also called token authentication) is an HTTP authentication scheme that involves security tokens called bearer tokens. The bearer token is a cryptic API key, which can be generated by the server admin from the Settings UI or via a respective API call (read more about how to generate an API key). The client must send the API key in the `Authorization` header when making requests to protected resources:
```bash
curl -X GET -H 'Authorization: Bearer eyJrIjoiUXRkeDNMS1g1bFVyY0tUj1o0SmhBc3g4QUdTRVAwekoiLCJuIjoicG1tLXRlc3QiLCJpZCI6MX0=' \
- -H 'Content-Type: application/json' https://127.0.0.1/v1/version
+ -H 'Content-Type: application/json' https://127.0.0.1/v1/version
```
You can use the API key in basic authentication as well:
```bash
curl -X GET -H 'Content-Type: application/json' \
-https://api_key:eyJrIjoiUXRkeDNMS1g1bFVyY0tUj1o0SmhBc3g4QUdTRVAwekoiLCJuIjoicG1tLXRlc3QiLCJpZCI6MX0=@127.0.0.1/v1/version
-
+ https://api_key:eyJrIjoiUXRkeDNMS1g1bFVyY0tUj1o0SmhBc3g4QUdTRVAwekoiLCJuIjoicG1tLXRlc3QiLCJpZCI6MX0=@127.0.0.1/v1/version
```
### Protecting Credentials
@@ -58,11 +57,13 @@ In the previous examples, the credentials can be gleaned from the shell history
It is possible to hide from the shell history:
bash
+
```bash
set +o history
```
zsh
+
```zsh
SAVEHIST=0
```
@@ -78,16 +79,19 @@ password admin
```
This can then be used as follows:
+
```bash
curl --netrc -X GET -H 'Content-Type: application/json' https://127.0.0.1/v1/version
```
Should you wish to use a different file then the `--netrc-file` option needs to be used. If we have the credentials stored in `~/.netrc-pmm` then the command would become:
+
```bash
curl --netrc --netrc-file ~/.netrc-pmm -X GET -H 'Content-Type: application/json' https://127.0.0.1/v1/version
```
You can use API keys in this way too, for example:
+
```
machine 127.0.0.1
login api_key
diff --git a/docs/api/listlocations.md b/docs/api/listlocations.md
index 0053a47bcf..63d0187575 100644
--- a/docs/api/listlocations.md
+++ b/docs/api/listlocations.md
@@ -4,14 +4,14 @@ slug: 'listlocations'
## List Locations
-The following Curl API call will list all the available Locations:
+The following API call will list all the available Locations:
```bash
-curl --insecure -X POST -H 'Authorization: Bearer XXXXX' \
- --request POST \
- --url https://127.0.0.1/v1/management/backup/Locations/List \
- --header 'Accept: application/json' \
- --header 'Content-Type: application/json'
+curl --insecure -X POST \
+ -H 'Authorization: Basic YWRtaW46YWRtaW4=' \
+ -H 'Accept: application/json' \
+ -H 'Content-Type: application/json' \
+ --url https://127.0.0.1/v1/management/backup/Locations/List \
```
-You will need the [authetication string](ref:authentication).
\ No newline at end of file
+You will need the [authetication token](ref:authentication).
diff --git a/docs/api/listnodes.md b/docs/api/listnodes.md
index 6a45b229cb..ba5740e3e5 100644
--- a/docs/api/listnodes.md
+++ b/docs/api/listnodes.md
@@ -4,26 +4,25 @@ slug: 'listnodes'
## List Nodes
-This section describes listing the Nodes in the inventory.
+This section describes how to list PMM Inventory Nodes.
Example:
+
```bash
-curl --insecure -X POST -H 'Authorization: Bearer XXXXX'
- --request POST
- --url https://127.0.0.1/v1/inventory/Nodes/List
- --header 'Accept: application/json'
- --header 'Content-Type: application/json'
- --data '
-{
- "node_type": "GENERIC_NODE"
-}
-'
+curl --insecure -X POST \
+ -H 'Authorization: Basic YWRtaW46YWRtaW4=' \
+ -H 'Accept: application/json' \
+ -H 'Content-Type: application/json' \
+ --url https://127.0.0.1/v1/inventory/Nodes/List \
+ --data '{"node_type": "GENERIC_NODE"}'
```
-Firstly, get the [authentication string](ref:authentication).
-
-Then, choose from the following Node types:
-`NODE_TYPE_INVALID, GENERIC_NODE, CONTAINER_NODE, REMOTE_NODE, REMOTE_RDS_NODE, REMOTE_AZURE_DATABASE_NODE`
-
+First, get the [authentication token](ref:authentication).
+Then, choose from the following Node types:
+- GENERIC_NODE
+- CONTAINER_NODE
+- REMOTE_NODE
+- REMOTE_RDS_NODE
+- REMOTE_AZURE_DATABASE_NODE`
diff --git a/docs/api/listservices.md b/docs/api/listservices.md
index b95bed1f1f..51d79dcb19 100644
--- a/docs/api/listservices.md
+++ b/docs/api/listservices.md
@@ -7,25 +7,31 @@ slug: 'listservices'
The following API call lists the available services on a Node:
```bash
-curl --insecure -X POST -H 'Authorization: Bearer XXXXX' \
- --request POST \
- --url https://127.0.0.1/v1/inventory/Services/List \
- --header 'Accept: application/json' \
- --header 'Content-Type: application/json' \
- --data '
+curl --insecure -X POST \
+ -H 'Authorization: Basic YWRtaW46YWRtaW4=' \
+ -H 'Accept: application/json' \
+ -H 'Content-Type: application/json' \
+ --url https://127.0.0.1/v1/inventory/Services/List \
+ --data '
{
"node_id": "/node_id/XXXXX",
"service_type": "MYSQL_SERVICE"
}'
```
-Firstly, get the [authentication string](ref:authentication).
+First, get the [authentication token](ref:authentication).
-Then, you require the [node_id](ref:listnodes).
+Then, you need to know the [node_id](ref:listnodes).
Choose the `service_type` that you want to list. The options are:
-`SERVICE_TYPE_INVALID, MYSQL_SERVICE, MONGODB_SERVICE, POSTGRESQL_SERVICE, PROXYSQL_SERVICE, HAPROXY_SERVICE, EXTERNAL_SERVICE`
+
+- MYSQL_SERVICE
+- MONGODB_SERVICE
+- POSTGRESQL_SERVICE
+- PROXYSQL_SERVICE
+- HAPROXY_SERVICE
+- EXTERNAL_SERVICE
If you prefer to get all services running on the node, you can omit the `service_type` parameter.
-However, calling the same endpoint without any parameters will return all services known to this PMM instance.
+Otherwise, calling the same endpoint with no parameters will return all services known to this PMM instance.
diff --git a/docs/process/tech_stack.md b/docs/process/tech_stack.md
index 1785731eba..a5778b127d 100644
--- a/docs/process/tech_stack.md
+++ b/docs/process/tech_stack.md
@@ -10,14 +10,14 @@ Currently, our development team has fewer people than components/repositories. I
- [protobuf v3](https://developers.google.com/protocol-buffers/) gives us [strongly-typed](https://developers.google.com/protocol-buffers/docs/proto3) serialization format with good [forward- and backward-compatibility](https://developers.google.com/protocol-buffers/docs/gotutorial#extending-a-protocol-buffer), [canonical mapping to and from JSON](https://developers.google.com/protocol-buffers/docs/proto3#json), and a large ecosystem of libraries and tools. We don't have to write code to work with it because there are code generators for a lot of languages.
- [gRPC](https://grpc.io/) extends protobuf with RPC mechanism. Both single requests/responses and bi-directional streams are supported. Error handling is built-in. Again, there are code generators for both client- and server-side code, so we don't have to write it by ourselves.
-- [grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway) takes gRPC specification and generates code for HTTP JSON API server-side wrapper for it. It also generates [Swagger](https://swagger.io/) specification from protocol specification and annotations, with documentation from comments. In turn, it is used to generate client-side code for environments where gRPC is not yet supported natively (e.g. web browser). No manual writing of serialization and communication code, and documentation with examples and interactive tools – gRPC specification becomes the single source of truth.
+- [grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway) takes gRPC specification and generates code for HTTP JSON API server-side wrapper for it. It also generates [Swagger](https://swagger.io/) specification from protocol specification and annotations, with documentation built up from comments. In turn, it is used to generate client-side code for environments where gRPC is not yet supported natively (e.g. web browser). No manual writing of serialization and communication code, and documentation with examples and interactive tools – gRPC specification becomes the single source of truth.
- [logrus](https://github.com/sirupsen/logrus) or stdlib `log` package should be used for logging. Always log to unbuffered stderr, let process supervisor do the rest.
- [prometheus client](https://github.com/prometheus/client_golang) is used for exposing internal metrics of application and gRPC library.
- [testify](https://github.com/stretchr/testify) or stdlib `testing` package should be used for writing tests. Testify should be used only for `assert` and `require` packages – suites here have some problems with logging and parallel tests. Common setups and teardowns should be implemented with `testing` [subtests](https://golang.org/pkg/testing/#hdr-Subtests_and_Sub_benchmarks).
- [golangci-lint](https://github.com/golangci/golangci-lint) is used for static code checks.
- [gocov.io](http://gocov.io/) and [gocoverutil](https://github.com/AlekSi/gocoverutil) gather code coverage metrics.
- [Docker Compose](https://docs.docker.com/compose/) is used for a local development environment and in CI.
-- [Kong](https://github.com/alecthomas/kong) for pmm CLI and [kingpin.v2](http://gopkg.in/alecthomas/kingpin.v2) for exporters and some other code. Use [Kong](https://github.com/alecthomas/kong) if you need some new CLI or need to make significant changes to the old `kingpin.v2` CLI.
+- [Kong](https://github.com/alecthomas/kong) for PMM CLI and [kingpin.v2](http://gopkg.in/alecthomas/kingpin.v2) for exporters and some other code. Use [Kong](https://github.com/alecthomas/kong) if you want to contribute a brand new CLI or need to make significant changes to the old `kingpin.v2`-based CLI.
- [go modules](https://go.dev/ref/mod#introduction) for vendoring.
## Open questions
diff --git a/go.mod b/go.mod
index 0841c5f51d..605a79c9e8 100644
--- a/go.mod
+++ b/go.mod
@@ -43,10 +43,10 @@ require (
github.com/golang-migrate/migrate/v4 v4.16.1
github.com/golang/protobuf v1.5.3
github.com/google/uuid v1.3.0
- github.com/grafana/grafana-api-golang-client v0.23.0
+ github.com/grafana/grafana-api-golang-client v0.24.0
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
- github.com/grpc-ecosystem/grpc-gateway/v2 v2.17.0
+ github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0
github.com/hashicorp/go-version v1.6.0
github.com/jhunters/bigqueue v1.2.7
github.com/jmoiron/sqlx v1.3.5
@@ -256,7 +256,7 @@ require (
go.opentelemetry.io/otel/trace v1.16.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.15.0 // indirect
- golang.org/x/oauth2 v0.11.0 // indirect
+ golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/term v0.12.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
diff --git a/go.sum b/go.sum
index f32992b5d6..9c8fe5120c 100644
--- a/go.sum
+++ b/go.sum
@@ -397,12 +397,12 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c h1:7lF+Vz0LqiRidnzC1Oq86fpX1q/iEv2KJdrCtttYjT4=
github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
-github.com/grafana/grafana-api-golang-client v0.23.0 h1:Uta0dSkxWYf1D83/E7MRLCG69387FiUc+k9U/35nMhY=
-github.com/grafana/grafana-api-golang-client v0.23.0/go.mod h1:24W29gPe9yl0/3A9X624TPkAOR8DpHno490cPwnkv8E=
+github.com/grafana/grafana-api-golang-client v0.24.0 h1:9cUvft7xCMnnL/Uscwy7eoldn16Gz5TH4T1MymuVs8E=
+github.com/grafana/grafana-api-golang-client v0.24.0/go.mod h1:24W29gPe9yl0/3A9X624TPkAOR8DpHno490cPwnkv8E=
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI=
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.17.0 h1:Rme6CE1aUTyV9WmrEPyGf1V+7W3iQzZ1DZkKnT6z9B0=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.17.0/go.mod h1:Hbb13e3/WtqQ8U5hLGkek9gJvBLasHuPFI0UEGfnQ10=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 h1:RtRsiaGvWxcwd8y3BiRZxsylPT8hLWZ5SPcfI+3IDNk=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0/go.mod h1:TzP6duP4Py2pHLVPPQp42aoYI92+PCrVotyR5e8Vqlk=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
@@ -898,8 +898,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU=
-golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk=
+golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4=
+golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
diff --git a/ia_migration.py b/ia_migration.py
index 444796ea93..2ccfec126a 100755
--- a/ia_migration.py
+++ b/ia_migration.py
@@ -2,7 +2,7 @@
import argparse
import requests
-# Copyright (C) 2022 Percona LLC
+# Copyright (C) 2017 Percona LLC
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/cmd/pmm-managed-init/main.go b/managed/cmd/pmm-managed-init/main.go
index 92b0039620..1d52155db1 100644
--- a/managed/cmd/pmm-managed-init/main.go
+++ b/managed/cmd/pmm-managed-init/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/cmd/pmm-managed-starlark/main.go b/managed/cmd/pmm-managed-starlark/main.go
index 8247879f6d..f976d67a7f 100644
--- a/managed/cmd/pmm-managed-starlark/main.go
+++ b/managed/cmd/pmm-managed-starlark/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/cmd/pmm-managed-starlark/main_test.go b/managed/cmd/pmm-managed-starlark/main_test.go
index e7a03037e1..ecb2dde83a 100644
--- a/managed/cmd/pmm-managed-starlark/main_test.go
+++ b/managed/cmd/pmm-managed-starlark/main_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/cmd/pmm-managed/main.go b/managed/cmd/pmm-managed/main.go
index cd203b2e31..ab347034f8 100644
--- a/managed/cmd/pmm-managed/main.go
+++ b/managed/cmd/pmm-managed/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -680,9 +680,9 @@ func main() { //nolint:cyclop,maintidx
kingpin.Version(version.FullInfo())
kingpin.HelpFlag.Short('h')
- victoriaMetricsURLF := kingpin.Flag("victoriametrics-url", "VictoriaMetrics base URL").
- Default("http://127.0.0.1:9090/prometheus/").String()
- victoriaMetricsVMAlertURLF := kingpin.Flag("victoriametrics-vmalert-url", "VictoriaMetrics VMAlert base URL").
+ victoriaMetricsURLF := kingpin.Flag("victoriametrics-url", "VictoriaMetrics base URL").Envar("PMM_VM_URL").
+ Default(models.VMBaseURL).String()
+ victoriaMetricsVMAlertURLF := kingpin.Flag("victoriametrics-vmalert-url", "VictoriaMetrics VMAlert base URL").Envar("PMM_VM_ALERT_URL").
Default("http://127.0.0.1:8880/").String()
victoriaMetricsConfigF := kingpin.Flag("victoriametrics-config", "VictoriaMetrics scrape configuration file path").
Default("/etc/victoriametrics-promscrape.yml").String()
@@ -762,6 +762,7 @@ func main() { //nolint:cyclop,maintidx
*postgresSSLModeF = models.VerifyCaSSLMode
}
ds := cfg.Config.Services.Telemetry.DataSources
+
pmmdb := ds.PmmDBSelect
pmmdb.Credentials.Username = *postgresDBUsernameF
pmmdb.Credentials.Password = *postgresDBPasswordF
@@ -782,6 +783,15 @@ func main() { //nolint:cyclop,maintidx
qanDB := ds.QanDBSelect
qanDB.DSN = clickhouseDSN
+ ds.VM.Address = *victoriaMetricsURLF
+
+ vmParams, err := models.NewVictoriaMetricsParams(
+ models.BasePrometheusConfigPath,
+ *victoriaMetricsURLF)
+ if err != nil {
+ l.Panicf("cannot load victoriametrics params problem: %+v", err)
+ }
+
setupParams := models.SetupDBParams{
Address: *postgresAddrF,
Name: *postgresDBNameF,
@@ -814,12 +824,7 @@ func main() { //nolint:cyclop,maintidx
cleaner := clean.New(db)
externalRules := vmalert.NewExternalRules()
-
- vmParams, err := models.NewVictoriaMetricsParams(victoriametrics.BasePrometheusConfigPath)
- if err != nil {
- l.Panicf("cannot load victoriametrics params problem: %+v", err)
- }
- vmdb, err := victoriametrics.NewVictoriaMetrics(*victoriaMetricsConfigF, db, *victoriaMetricsURLF, vmParams)
+ vmdb, err := victoriametrics.NewVictoriaMetrics(*victoriaMetricsConfigF, db, vmParams)
if err != nil {
l.Panicf("VictoriaMetrics service problem: %+v", err)
}
@@ -833,7 +838,7 @@ func main() { //nolint:cyclop,maintidx
qanClient := getQANClient(ctx, sqlDB, *postgresDBNameF, *qanAPIAddrF)
- agentsRegistry := agents.NewRegistry(db)
+ agentsRegistry := agents.NewRegistry(db, vmParams)
pbmPITRService := backup.NewPBMPITRService()
backupRemovalService := backup.NewRemovalService(db, pbmPITRService)
backupRetentionService := backup.NewRetentionService(db, backupRemovalService)
@@ -852,7 +857,7 @@ func main() { //nolint:cyclop,maintidx
pmmUpdateCheck := supervisord.NewPMMUpdateChecker(logrus.WithField("component", "supervisord/pmm-update-checker"))
- logs := supervisord.NewLogs(version.FullInfo(), pmmUpdateCheck)
+ logs := supervisord.NewLogs(version.FullInfo(), pmmUpdateCheck, vmParams)
supervisord := supervisord.New(
*supervisordConfigDirF,
@@ -897,7 +902,7 @@ func main() { //nolint:cyclop,maintidx
prom.MustRegister(grafanaClient)
jobsService := agents.NewJobsService(db, agentsRegistry, backupRetentionService)
- agentsStateUpdater := agents.NewStateUpdater(db, agentsRegistry, vmdb)
+ agentsStateUpdater := agents.NewStateUpdater(db, agentsRegistry, vmdb, vmParams)
agentsHandler := agents.NewHandler(db, qanClient, vmdb, agentsRegistry, agentsStateUpdater, jobsService)
actionsService := agents.NewActionsService(qanClient, agentsRegistry)
diff --git a/managed/cmd/pmm-managed/main_test.go b/managed/cmd/pmm-managed/main_test.go
index 2b97955616..4ce740f9ef 100644
--- a/managed/cmd/pmm-managed/main_test.go
+++ b/managed/cmd/pmm-managed/main_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/cmd/pmm-managed/maincover_test.go b/managed/cmd/pmm-managed/maincover_test.go
index a1e85dbf87..4f5accd141 100644
--- a/managed/cmd/pmm-managed/maincover_test.go
+++ b/managed/cmd/pmm-managed/maincover_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/data/gen.go b/managed/data/gen.go
index 4e01fb7a53..13a2804e8d 100644
--- a/managed/data/gen.go
+++ b/managed/data/gen.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/data/iatemplates/agent_down.yml b/managed/data/iatemplates/agent_down.yml
index e913696f6e..89abeb7a12 100644
--- a/managed/data/iatemplates/agent_down.yml
+++ b/managed/data/iatemplates/agent_down.yml
@@ -8,6 +8,5 @@ templates:
severity: critical
annotations:
description: |-
- PMM agent on node '{{ $labels.node_id }}' cannot be reached. Host may be down.
- summary: PMM agent on node '{{ $labels.node_id }}' cannot be reached. Host may be down.
-
+ PMM agent on node '{{ $labels.node_name }}', node ID '{{ $labels.node_id }}', cannot be reached. Host may be down.
+ summary: PMM agent on node '{{ $labels.node_name }}' cannot be reached. Host may be down.
diff --git a/managed/models/action_helpers.go b/managed/models/action_helpers.go
index a61f08bdca..761fa84826 100644
--- a/managed/models/action_helpers.go
+++ b/managed/models/action_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/action_helpers_test.go b/managed/models/action_helpers_test.go
index 20270553d8..30009aeb95 100644
--- a/managed/models/action_helpers_test.go
+++ b/managed/models/action_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/action_models.go b/managed/models/action_models.go
index eee93990d2..451932d8ce 100644
--- a/managed/models/action_models.go
+++ b/managed/models/action_models.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/agent_helpers.go b/managed/models/agent_helpers.go
index 21df05d004..4d6e65c22e 100644
--- a/managed/models/agent_helpers.go
+++ b/managed/models/agent_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/agent_helpers_test.go b/managed/models/agent_helpers_test.go
index 44c679d846..dd48be34e7 100644
--- a/managed/models/agent_helpers_test.go
+++ b/managed/models/agent_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/agent_model.go b/managed/models/agent_model.go
index 1ae1cb2d22..c7cfc2f5c8 100644
--- a/managed/models/agent_model.go
+++ b/managed/models/agent_model.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/agent_model_test.go b/managed/models/agent_model_test.go
index 0fa15a86af..fd4eacd881 100644
--- a/managed/models/agent_model_test.go
+++ b/managed/models/agent_model_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/artifact_helpers.go b/managed/models/artifact_helpers.go
index e518845e61..ed8a95a0cd 100644
--- a/managed/models/artifact_helpers.go
+++ b/managed/models/artifact_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/artifact_helpers_test.go b/managed/models/artifact_helpers_test.go
index a7ba3b423f..8d2cc84783 100644
--- a/managed/models/artifact_helpers_test.go
+++ b/managed/models/artifact_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/artifact_model.go b/managed/models/artifact_model.go
index 6c879d4d24..2ec01b4c6b 100644
--- a/managed/models/artifact_model.go
+++ b/managed/models/artifact_model.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/channel.go b/managed/models/channel.go
index 2d13e040a6..653085ac3b 100644
--- a/managed/models/channel.go
+++ b/managed/models/channel.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/channel_helpers.go b/managed/models/channel_helpers.go
index c39f9a24e4..5d016e2906 100644
--- a/managed/models/channel_helpers.go
+++ b/managed/models/channel_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/channel_helpers_test.go b/managed/models/channel_helpers_test.go
index e6531021e7..9770efc18f 100644
--- a/managed/models/channel_helpers_test.go
+++ b/managed/models/channel_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/check_settings_helper.go b/managed/models/check_settings_helper.go
index ad9d09ac97..d22855ffcf 100644
--- a/managed/models/check_settings_helper.go
+++ b/managed/models/check_settings_helper.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/check_settings_helper_test.go b/managed/models/check_settings_helper_test.go
index 427de8750a..b64de25bd1 100644
--- a/managed/models/check_settings_helper_test.go
+++ b/managed/models/check_settings_helper_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/check_settings_model.go b/managed/models/check_settings_model.go
index 76c6fa62ba..133b6d64a9 100644
--- a/managed/models/check_settings_model.go
+++ b/managed/models/check_settings_model.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/common_helpers.go b/managed/models/common_helpers.go
index 5e81f7563e..ee79c6a590 100644
--- a/managed/models/common_helpers.go
+++ b/managed/models/common_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/database.go b/managed/models/database.go
index 4897a7d3cb..189037f922 100644
--- a/managed/models/database.go
+++ b/managed/models/database.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -915,6 +915,9 @@ var databaseSchema = [][]string{
`ALTER TABLE agents
ALTER COLUMN comments_parsing_disabled DROP DEFAULT`,
},
+ 85: {
+ `UPDATE services SET cluster = service_name WHERE cluster = ''`,
+ },
}
// ^^^ Avoid default values in schema definition. ^^^
diff --git a/managed/models/database_test.go b/managed/models/database_test.go
index f58cd39e1d..0f86574b19 100644
--- a/managed/models/database_test.go
+++ b/managed/models/database_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/delimiter.go b/managed/models/delimiter.go
index 9e96c707ff..23d9e0025b 100644
--- a/managed/models/delimiter.go
+++ b/managed/models/delimiter.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/dsn_helpers.go b/managed/models/dsn_helpers.go
index 34d4c722b2..a702e6efac 100644
--- a/managed/models/dsn_helpers.go
+++ b/managed/models/dsn_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/dsn_helpers_test.go b/managed/models/dsn_helpers_test.go
index 712d3bc24c..668f8863ce 100644
--- a/managed/models/dsn_helpers_test.go
+++ b/managed/models/dsn_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/errors.go b/managed/models/errors.go
index a0c1551e08..f97b89692c 100644
--- a/managed/models/errors.go
+++ b/managed/models/errors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/job_helpers.go b/managed/models/job_helpers.go
index 1762c7b34f..08327e2cd9 100644
--- a/managed/models/job_helpers.go
+++ b/managed/models/job_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/job_helpers_test.go b/managed/models/job_helpers_test.go
index 9c2cf9793d..c554b04e7a 100644
--- a/managed/models/job_helpers_test.go
+++ b/managed/models/job_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/job_models.go b/managed/models/job_models.go
index 43cd975d84..e34d404a93 100644
--- a/managed/models/job_models.go
+++ b/managed/models/job_models.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/kubernetes_helpers.go b/managed/models/kubernetes_helpers.go
index fad875311d..8128803ddd 100644
--- a/managed/models/kubernetes_helpers.go
+++ b/managed/models/kubernetes_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/kubernetes_helpers_test.go b/managed/models/kubernetes_helpers_test.go
index 1b8eb72600..6b602ba728 100644
--- a/managed/models/kubernetes_helpers_test.go
+++ b/managed/models/kubernetes_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/kubernetes_models.go b/managed/models/kubernetes_models.go
index 55e875265e..aef490cd3e 100644
--- a/managed/models/kubernetes_models.go
+++ b/managed/models/kubernetes_models.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/location_helpers.go b/managed/models/location_helpers.go
index de7da55a21..8172d25a0a 100644
--- a/managed/models/location_helpers.go
+++ b/managed/models/location_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/location_helpers_test.go b/managed/models/location_helpers_test.go
index 032240a1d1..4ad3df1796 100644
--- a/managed/models/location_helpers_test.go
+++ b/managed/models/location_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/location_model.go b/managed/models/location_model.go
index 9cb2246acb..5272b5c624 100644
--- a/managed/models/location_model.go
+++ b/managed/models/location_model.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/models.go b/managed/models/models.go
index b65d461cd4..2ee68f37f4 100644
--- a/managed/models/models.go
+++ b/managed/models/models.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/models_json_test.go b/managed/models/models_json_test.go
index 8baec878a5..1e590c9d18 100644
--- a/managed/models/models_json_test.go
+++ b/managed/models/models_json_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/models_test.go b/managed/models/models_test.go
index 3a39b091d9..3490c90af7 100644
--- a/managed/models/models_test.go
+++ b/managed/models/models_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/node_helpers.go b/managed/models/node_helpers.go
index 638273634a..34c743bab5 100644
--- a/managed/models/node_helpers.go
+++ b/managed/models/node_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/node_helpers_test.go b/managed/models/node_helpers_test.go
index e0873a93cf..6e3ac6b770 100644
--- a/managed/models/node_helpers_test.go
+++ b/managed/models/node_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/node_model.go b/managed/models/node_model.go
index 07587fb50e..3406071eb5 100644
--- a/managed/models/node_model.go
+++ b/managed/models/node_model.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/node_model_test.go b/managed/models/node_model_test.go
index 6bda8f5b0e..cee4269105 100644
--- a/managed/models/node_model_test.go
+++ b/managed/models/node_model_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/percona_sso_model.go b/managed/models/percona_sso_model.go
index 15629ff959..afa5009e84 100644
--- a/managed/models/percona_sso_model.go
+++ b/managed/models/percona_sso_model.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/percona_sso_model_helpers.go b/managed/models/percona_sso_model_helpers.go
index e91935b49b..55cda53440 100644
--- a/managed/models/percona_sso_model_helpers.go
+++ b/managed/models/percona_sso_model_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/percona_sso_model_helpers_test.go b/managed/models/percona_sso_model_helpers_test.go
index d4386350af..23f59c2d7d 100644
--- a/managed/models/percona_sso_model_helpers_test.go
+++ b/managed/models/percona_sso_model_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/postgres.go b/managed/models/postgres.go
index 641abefea0..72b6dfc906 100644
--- a/managed/models/postgres.go
+++ b/managed/models/postgres.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/postgresql_version.go b/managed/models/postgresql_version.go
index 2a5cba30e9..47136278b0 100644
--- a/managed/models/postgresql_version.go
+++ b/managed/models/postgresql_version.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/postgresql_version_test.go b/managed/models/postgresql_version_test.go
index 5a676118ca..98828bba84 100644
--- a/managed/models/postgresql_version_test.go
+++ b/managed/models/postgresql_version_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/restore_history_helpers.go b/managed/models/restore_history_helpers.go
index 8680f97341..65bef9c0d2 100644
--- a/managed/models/restore_history_helpers.go
+++ b/managed/models/restore_history_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/restore_history_helpers_test.go b/managed/models/restore_history_helpers_test.go
index db837c1644..1621fe51d8 100644
--- a/managed/models/restore_history_helpers_test.go
+++ b/managed/models/restore_history_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/restore_history_model.go b/managed/models/restore_history_model.go
index fba2d166a4..ccfdb1a4eb 100644
--- a/managed/models/restore_history_model.go
+++ b/managed/models/restore_history_model.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/role_helpers.go b/managed/models/role_helpers.go
index 9abcd2ab21..da1c25057b 100644
--- a/managed/models/role_helpers.go
+++ b/managed/models/role_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/role_helpers_test.go b/managed/models/role_helpers_test.go
index 17394c4ff6..9121665095 100644
--- a/managed/models/role_helpers_test.go
+++ b/managed/models/role_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/role_model.go b/managed/models/role_model.go
index 964098b9c4..16d653e9f3 100644
--- a/managed/models/role_model.go
+++ b/managed/models/role_model.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/rule_helpers.go b/managed/models/rule_helpers.go
index 38620c1c8e..07580d162f 100644
--- a/managed/models/rule_helpers.go
+++ b/managed/models/rule_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/rule_helpers_test.go b/managed/models/rule_helpers_test.go
index f6c02c2c14..277f7576b8 100644
--- a/managed/models/rule_helpers_test.go
+++ b/managed/models/rule_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/rule_model.go b/managed/models/rule_model.go
index 5866910bec..fab7db7597 100644
--- a/managed/models/rule_model.go
+++ b/managed/models/rule_model.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/scheduled_task_models.go b/managed/models/scheduled_task_models.go
index 4e928f9f84..b4419531f1 100644
--- a/managed/models/scheduled_task_models.go
+++ b/managed/models/scheduled_task_models.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/scheduled_tasks_helpers.go b/managed/models/scheduled_tasks_helpers.go
index d639387542..be58f5eaf5 100644
--- a/managed/models/scheduled_tasks_helpers.go
+++ b/managed/models/scheduled_tasks_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/scheduled_tasks_helpers_test.go b/managed/models/scheduled_tasks_helpers_test.go
index 50a1f2b555..c890838f9e 100644
--- a/managed/models/scheduled_tasks_helpers_test.go
+++ b/managed/models/scheduled_tasks_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/service_helpers.go b/managed/models/service_helpers.go
index 6c9f8b3e4f..257fae1f61 100644
--- a/managed/models/service_helpers.go
+++ b/managed/models/service_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/service_helpers_test.go b/managed/models/service_helpers_test.go
index 07e4773a45..47d4dc317c 100644
--- a/managed/models/service_helpers_test.go
+++ b/managed/models/service_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -158,10 +158,11 @@ func TestServiceHelpers(t *testing.T) {
services, err = models.FindServices(q, models.ServiceFilters{NodeID: "N1"})
assert.NoError(t, err)
assert.Equal(t, 3, len(services))
- assert.Equal(t, services, []*models.Service{{
+ assert.Equal(t, []*models.Service{{
ServiceID: "S1",
ServiceType: models.MongoDBServiceType,
ServiceName: "Service without Agents",
+ Cluster: "Service without Agents",
NodeID: "N1",
Address: pointer.ToString("127.0.0.1"),
Port: pointer.ToUint16OrNil(27017),
@@ -171,6 +172,7 @@ func TestServiceHelpers(t *testing.T) {
ServiceID: "S2",
ServiceType: models.MySQLServiceType,
ServiceName: "Service with Agents",
+ Cluster: "Service with Agents",
NodeID: "N1",
Address: pointer.ToString("127.0.0.1"),
Port: pointer.ToUint16OrNil(3306),
@@ -180,35 +182,38 @@ func TestServiceHelpers(t *testing.T) {
ServiceID: "S5",
ServiceType: models.ProxySQLServiceType,
ServiceName: "Fifth service",
+ Cluster: "Fifth service",
NodeID: "N1",
Address: pointer.ToString("127.0.0.1"),
Port: pointer.ToUint16OrNil(6032),
CreatedAt: now,
UpdatedAt: now,
- }})
+ }}, services)
services, err = models.FindServices(q, models.ServiceFilters{NodeID: "N1", ServiceType: pointerToServiceType(models.MySQLServiceType)})
assert.NoError(t, err)
assert.Equal(t, 1, len(services))
- assert.Equal(t, services, []*models.Service{{
+ assert.Equal(t, []*models.Service{{
ServiceID: "S2",
ServiceType: models.MySQLServiceType,
ServiceName: "Service with Agents",
+ Cluster: "Service with Agents",
NodeID: "N1",
Address: pointer.ToString("127.0.0.1"),
Port: pointer.ToUint16OrNil(3306),
CreatedAt: now,
UpdatedAt: now,
- }})
+ }}, services)
services, err = models.FindServices(q, models.ServiceFilters{NodeID: "N2", ServiceType: pointerToServiceType(models.ExternalServiceType)})
assert.NoError(t, err)
assert.Equal(t, 2, len(services))
- assert.Equal(t, services, []*models.Service{
+ assert.Equal(t, []*models.Service{
{
ServiceID: "S4",
ServiceType: models.ExternalServiceType,
ServiceName: "Fourth service",
+ Cluster: "Fourth service",
ExternalGroup: "external",
NodeID: "N2",
CreatedAt: now,
@@ -218,6 +223,7 @@ func TestServiceHelpers(t *testing.T) {
ServiceID: "S7",
ServiceType: models.ExternalServiceType,
ServiceName: "Seventh service",
+ Cluster: "Seventh service",
NodeID: "N2",
Address: pointer.ToString("127.0.0.1"),
Port: pointer.ToUint16OrNil(6379),
@@ -225,47 +231,50 @@ func TestServiceHelpers(t *testing.T) {
CreatedAt: now,
UpdatedAt: now,
},
- })
+ }, services)
services, err = models.FindServices(q, models.ServiceFilters{NodeID: "N2", ServiceType: pointerToServiceType(models.ProxySQLServiceType)})
assert.NoError(t, err)
assert.Equal(t, 1, len(services))
- assert.Equal(t, services, []*models.Service{{
+ assert.Equal(t, []*models.Service{{
ServiceID: "S6",
ServiceType: models.ProxySQLServiceType,
ServiceName: "Sixth service",
+ Cluster: "Sixth service",
Socket: pointer.ToStringOrNil("/tmp/proxysql_admin.sock"),
NodeID: "N2",
CreatedAt: now,
UpdatedAt: now,
- }})
+ }}, services)
services, err = models.FindServices(q, models.ServiceFilters{ExternalGroup: "redis"})
assert.NoError(t, err)
assert.Equal(t, 1, len(services))
- assert.Equal(t, services, []*models.Service{{
+ assert.Equal(t, []*models.Service{{
ServiceID: "S7",
ServiceType: models.ExternalServiceType,
ServiceName: "Seventh service",
+ Cluster: "Seventh service",
NodeID: "N2",
Address: pointer.ToString("127.0.0.1"),
Port: pointer.ToUint16OrNil(6379),
ExternalGroup: "redis",
CreatedAt: now,
UpdatedAt: now,
- }})
+ }}, services)
services, err = models.FindServices(q, models.ServiceFilters{NodeID: "N2", ServiceType: pointerToServiceType(models.HAProxyServiceType)})
assert.NoError(t, err)
assert.Equal(t, 1, len(services))
- assert.Equal(t, services, []*models.Service{{
+ assert.Equal(t, []*models.Service{{
ServiceID: "S8",
ServiceType: models.HAProxyServiceType,
ServiceName: "Eighth service",
+ Cluster: "Eighth service",
NodeID: "N2",
CreatedAt: now,
UpdatedAt: now,
- }})
+ }}, services)
})
t.Run("FindActiveServiceTypes", func(t *testing.T) {
diff --git a/managed/models/service_model.go b/managed/models/service_model.go
index 721e59ed64..04c7484156 100644
--- a/managed/models/service_model.go
+++ b/managed/models/service_model.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -74,6 +74,9 @@ func (s *Service) BeforeInsert() error {
if len(s.CustomLabels) == 0 {
s.CustomLabels = nil
}
+ if s.Cluster == "" {
+ s.Cluster = s.ServiceName
+ }
return nil
}
@@ -83,6 +86,9 @@ func (s *Service) BeforeUpdate() error {
if len(s.CustomLabels) == 0 {
s.CustomLabels = nil
}
+ if s.Cluster == "" {
+ s.Cluster = s.ServiceName
+ }
return nil
}
diff --git a/managed/models/service_model_test.go b/managed/models/service_model_test.go
index 7493c5fe13..a26dcce51a 100644
--- a/managed/models/service_model_test.go
+++ b/managed/models/service_model_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/settings.go b/managed/models/settings.go
index 590920bde1..981f2fee9c 100644
--- a/managed/models/settings.go
+++ b/managed/models/settings.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/settings_helpers.go b/managed/models/settings_helpers.go
index 8e73d73601..b439121cf8 100644
--- a/managed/models/settings_helpers.go
+++ b/managed/models/settings_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/settings_helpers_test.go b/managed/models/settings_helpers_test.go
index 941e1745d7..81dd18299d 100644
--- a/managed/models/settings_helpers_test.go
+++ b/managed/models/settings_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/software_version.go b/managed/models/software_version.go
index ac9410ff97..0fc5d38b37 100644
--- a/managed/models/software_version.go
+++ b/managed/models/software_version.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/software_version_helpers.go b/managed/models/software_version_helpers.go
index 9d49e33b4c..853ae749df 100644
--- a/managed/models/software_version_helpers.go
+++ b/managed/models/software_version_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/software_version_helpers_test.go b/managed/models/software_version_helpers_test.go
index a0ea43e75f..24b7c32a17 100644
--- a/managed/models/software_version_helpers_test.go
+++ b/managed/models/software_version_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/template_helpers.go b/managed/models/template_helpers.go
index 2aae1437b6..7c0ca1ee57 100644
--- a/managed/models/template_helpers.go
+++ b/managed/models/template_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/template_helpers_test.go b/managed/models/template_helpers_test.go
index b364ae06ba..ab0782c364 100644
--- a/managed/models/template_helpers_test.go
+++ b/managed/models/template_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/template_model.go b/managed/models/template_model.go
index 622028827a..500774b965 100644
--- a/managed/models/template_model.go
+++ b/managed/models/template_model.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/user_flags_helpers.go b/managed/models/user_flags_helpers.go
index 7d7b9fc969..20f7faea2b 100644
--- a/managed/models/user_flags_helpers.go
+++ b/managed/models/user_flags_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/user_flags_model.go b/managed/models/user_flags_model.go
index 8876c9b994..5f7e8cff1e 100644
--- a/managed/models/user_flags_model.go
+++ b/managed/models/user_flags_model.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/user_roles_helpers.go b/managed/models/user_roles_helpers.go
index 8bdbc6aa63..47c861f477 100644
--- a/managed/models/user_roles_helpers.go
+++ b/managed/models/user_roles_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/user_roles_model.go b/managed/models/user_roles_model.go
index 7ba870216d..ca8fa2c4d3 100644
--- a/managed/models/user_roles_model.go
+++ b/managed/models/user_roles_model.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/models/victoriametrics.go b/managed/models/victoriametrics_params.go
similarity index 71%
rename from managed/models/victoriametrics.go
rename to managed/models/victoriametrics_params.go
index d8b07caf27..14a86a5d41 100644
--- a/managed/models/victoriametrics.go
+++ b/managed/models/victoriametrics_params.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -16,25 +16,45 @@
package models
import (
+ "net/url"
"os"
+ "strings"
config "github.com/percona/promconfig"
"github.com/pkg/errors"
"gopkg.in/yaml.v3"
)
+const (
+ // BasePrometheusConfigPath - basic path with prometheus config,
+ // that user can mount to container.
+ BasePrometheusConfigPath = "/srv/prometheus/prometheus.base.yml"
+ VMBaseURL = "http://127.0.0.1:9090/prometheus/"
+)
+
// VictoriaMetricsParams - defines flags and settings for victoriametrics.
type VictoriaMetricsParams struct {
// VMAlertFlags additional flags for VMAlert.
VMAlertFlags []string
// BaseConfigPath defines path for basic prometheus config.
BaseConfigPath string
+ // url defines url of Victoria Metrics
+ url *url.URL
}
// NewVictoriaMetricsParams - returns configuration params for VictoriaMetrics.
-func NewVictoriaMetricsParams(basePath string) (*VictoriaMetricsParams, error) {
+func NewVictoriaMetricsParams(basePath string, vmURL string) (*VictoriaMetricsParams, error) {
+ if !strings.HasSuffix(vmURL, "/") {
+ vmURL += "/"
+ }
+
+ URL, err := url.Parse(vmURL)
+ if err != nil {
+ return nil, err
+ }
vmp := &VictoriaMetricsParams{
BaseConfigPath: basePath,
+ url: URL,
}
if err := vmp.UpdateParams(); err != nil {
return vmp, err
@@ -59,7 +79,7 @@ func (vmp *VictoriaMetricsParams) loadVMAlertParams() error {
if !os.IsNotExist(err) {
return errors.Wrap(err, "cannot read baseConfigPath for VMAlertParams")
}
- // fast return if users configuration doesn't exists with path
+ // fast return if users configuration doesn't exist with path
// /srv/prometheus/prometheus.base.yml,
// its maybe mounted into container by user.
return nil
@@ -79,3 +99,18 @@ func (vmp *VictoriaMetricsParams) loadVMAlertParams() error {
return nil
}
+
+func (vmp *VictoriaMetricsParams) ExternalVM() bool {
+ return vmp.url.Hostname() != "127.0.0.1"
+}
+
+func (vmp *VictoriaMetricsParams) URL() string {
+ return vmp.url.String()
+}
+
+func (vmp *VictoriaMetricsParams) URLFor(path string) (*url.URL, error) {
+ if path == "" {
+ return vmp.url, nil
+ }
+ return vmp.url.Parse(path)
+}
diff --git a/managed/models/victoriametrics_test.go b/managed/models/victoriametrics_params_test.go
similarity index 60%
rename from managed/models/victoriametrics_test.go
rename to managed/models/victoriametrics_params_test.go
index 02ab59b036..9f673c7518 100644
--- a/managed/models/victoriametrics_test.go
+++ b/managed/models/victoriametrics_params_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -18,17 +18,48 @@ package models
import (
"testing"
+ "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestVictoriaMetricsParams(t *testing.T) {
t.Run("read non exist baseConfigFile", func(t *testing.T) {
- _, err := NewVictoriaMetricsParams("nonExistConfigFile.yml")
+ _, err := NewVictoriaMetricsParams("nonExistConfigFile.yml", VMBaseURL)
require.NoError(t, err)
})
t.Run("check params for VMAlert", func(t *testing.T) {
- vmp, err := NewVictoriaMetricsParams("../testdata/victoriametrics/prometheus.external.alerts.yml")
+ vmp, err := NewVictoriaMetricsParams("../testdata/victoriametrics/prometheus.external.alerts.yml", VMBaseURL)
require.NoError(t, err)
require.Equal(t, []string{"--rule=/srv/external_rules/rul1.yml", "--rule=/srv/external_rules/rule2.yml", "--evaluationInterval=10s"}, vmp.VMAlertFlags)
})
+ t.Run("check external VM", func(t *testing.T) {
+ tests := []struct {
+ url string
+ want bool
+ }{
+ {
+ "http://127.0.0.1:9090/prometheus",
+ false,
+ },
+ {
+ "http://127.0.0.1:9090/prometheus/",
+ false,
+ },
+ {
+ "http://victoriametrics:8428/",
+ true,
+ },
+ {
+ "https://example.com:9090/",
+ true,
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.url, func(t *testing.T) {
+ vmp, err := NewVictoriaMetricsParams(BasePrometheusConfigPath, tt.url)
+ require.NoError(t, err)
+ assert.Equalf(t, tt.want, vmp.ExternalVM(), "ExternalVM()")
+ })
+ }
+ })
}
diff --git a/managed/services/agents/actions.go b/managed/services/agents/actions.go
index c2834b8c3a..52a1097d8a 100644
--- a/managed/services/agents/actions.go
+++ b/managed/services/agents/actions.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/agents.go b/managed/services/agents/agents.go
index 0d7ffa4853..5a6c9bb036 100644
--- a/managed/services/agents/agents.go
+++ b/managed/services/agents/agents.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/agents_test.go b/managed/services/agents/agents_test.go
index 1497a0ac5d..ce0e846241 100644
--- a/managed/services/agents/agents_test.go
+++ b/managed/services/agents/agents_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/agentversion.go b/managed/services/agents/agentversion.go
index 427b501f22..9486511d3c 100644
--- a/managed/services/agents/agentversion.go
+++ b/managed/services/agents/agentversion.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/agentversion_test.go b/managed/services/agents/agentversion_test.go
index f6b22abb49..ebbad646fc 100644
--- a/managed/services/agents/agentversion_test.go
+++ b/managed/services/agents/agentversion_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/azure_database.go b/managed/services/agents/azure_database.go
index 2ccff9d96c..c53417306a 100644
--- a/managed/services/agents/azure_database.go
+++ b/managed/services/agents/azure_database.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/azure_database_test.go b/managed/services/agents/azure_database_test.go
index 0cdd20b727..17d1302fbc 100644
--- a/managed/services/agents/azure_database_test.go
+++ b/managed/services/agents/azure_database_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/channel/channel.go b/managed/services/agents/channel/channel.go
index dfbb859174..1229ab6fab 100644
--- a/managed/services/agents/channel/channel.go
+++ b/managed/services/agents/channel/channel.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/channel/channel_test.go b/managed/services/agents/channel/channel_test.go
index 5f877fc60b..0944d85936 100644
--- a/managed/services/agents/channel/channel_test.go
+++ b/managed/services/agents/channel/channel_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/configure_test.go b/managed/services/agents/configure_test.go
index 2f56d2e1bb..be8d98b9a1 100644
--- a/managed/services/agents/configure_test.go
+++ b/managed/services/agents/configure_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/connection_checker.go b/managed/services/agents/connection_checker.go
index b784fd4d85..256481be3b 100644
--- a/managed/services/agents/connection_checker.go
+++ b/managed/services/agents/connection_checker.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/deps.go b/managed/services/agents/deps.go
index 0a321d944d..9774ce6e73 100644
--- a/managed/services/agents/deps.go
+++ b/managed/services/agents/deps.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -17,6 +17,7 @@ package agents
import (
"context"
+ "net/url"
"github.com/sirupsen/logrus"
@@ -54,3 +55,11 @@ type jobsService interface {
handleJobResult(ctx context.Context, l *logrus.Entry, result *agentpb.JobResult)
handleJobProgress(ctx context.Context, progress *agentpb.JobProgress)
}
+
+// victoriaMetricsParams is a subset of methods of models.VMParams used by this package.
+// We use it instead of real type to avoid dependency cycle.
+type victoriaMetricsParams interface {
+ ExternalVM() bool
+ URLFor(path string) (*url.URL, error)
+ URL() string
+}
diff --git a/managed/services/agents/grpc/agent_server.go b/managed/services/agents/grpc/agent_server.go
index 42ef5b0d09..da6e23502d 100644
--- a/managed/services/agents/grpc/agent_server.go
+++ b/managed/services/agents/grpc/agent_server.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/handler.go b/managed/services/agents/handler.go
index 9163dd0dbd..011ce90a84 100644
--- a/managed/services/agents/handler.go
+++ b/managed/services/agents/handler.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/jobs.go b/managed/services/agents/jobs.go
index a78fffd381..56a6430e14 100644
--- a/managed/services/agents/jobs.go
+++ b/managed/services/agents/jobs.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/jobs_test.go b/managed/services/agents/jobs_test.go
index e6788e581d..cfb93abbc6 100644
--- a/managed/services/agents/jobs_test.go
+++ b/managed/services/agents/jobs_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/log_level.go b/managed/services/agents/log_level.go
index ab7f81915f..2b33b472f8 100644
--- a/managed/services/agents/log_level.go
+++ b/managed/services/agents/log_level.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/mongodb.go b/managed/services/agents/mongodb.go
index f0d14243fe..e51f4ba393 100644
--- a/managed/services/agents/mongodb.go
+++ b/managed/services/agents/mongodb.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/mongodb_test.go b/managed/services/agents/mongodb_test.go
index 9630519b50..9e01fe3eff 100644
--- a/managed/services/agents/mongodb_test.go
+++ b/managed/services/agents/mongodb_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/mysql.go b/managed/services/agents/mysql.go
index 56a67d7077..a2ecf8bfd3 100644
--- a/managed/services/agents/mysql.go
+++ b/managed/services/agents/mysql.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/mysql_test.go b/managed/services/agents/mysql_test.go
index 9b80f23483..0dd26767cc 100644
--- a/managed/services/agents/mysql_test.go
+++ b/managed/services/agents/mysql_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/node.go b/managed/services/agents/node.go
index ddd51efe2d..0189db757b 100644
--- a/managed/services/agents/node.go
+++ b/managed/services/agents/node.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/node_test.go b/managed/services/agents/node_test.go
index b050f8295f..e458847eca 100644
--- a/managed/services/agents/node_test.go
+++ b/managed/services/agents/node_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/postgresql.go b/managed/services/agents/postgresql.go
index e3503ed638..d777e56b47 100644
--- a/managed/services/agents/postgresql.go
+++ b/managed/services/agents/postgresql.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/postgresql_test.go b/managed/services/agents/postgresql_test.go
index 0e0131f3d9..312fa86757 100644
--- a/managed/services/agents/postgresql_test.go
+++ b/managed/services/agents/postgresql_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/proxysql.go b/managed/services/agents/proxysql.go
index cccec78944..94eb9694f7 100644
--- a/managed/services/agents/proxysql.go
+++ b/managed/services/agents/proxysql.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/proxysql_test.go b/managed/services/agents/proxysql_test.go
index ce4ee0ae0b..afcac95b5e 100644
--- a/managed/services/agents/proxysql_test.go
+++ b/managed/services/agents/proxysql_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/rds.go b/managed/services/agents/rds.go
index b882a30cc3..6f255f3e6b 100644
--- a/managed/services/agents/rds.go
+++ b/managed/services/agents/rds.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/rds_test.go b/managed/services/agents/rds_test.go
index 5cbf6d133f..52b4c6ebc3 100644
--- a/managed/services/agents/rds_test.go
+++ b/managed/services/agents/rds_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/registry.go b/managed/services/agents/registry.go
index 3745044378..9f381c8ed8 100644
--- a/managed/services/agents/registry.go
+++ b/managed/services/agents/registry.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -85,10 +85,12 @@ type Registry struct {
mRoundTrip prom.Summary
mClockDrift prom.Summary
mAgents prom.GaugeFunc
+
+ isExternalVM bool
}
// NewRegistry creates a new registry with given database connection.
-func NewRegistry(db *reform.DB) *Registry {
+func NewRegistry(db *reform.DB, externalVMChecker victoriaMetricsParams) *Registry {
agents := make(map[string]*pmmAgentInfo)
r := &Registry{
db: db,
@@ -123,6 +125,8 @@ func NewRegistry(db *reform.DB) *Registry {
Help: "Clock drift.",
Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
}),
+
+ isExternalVM: externalVMChecker.ExternalVM(),
}
r.mAgents = prom.NewGaugeFunc(prom.GaugeOpts{
@@ -160,7 +164,7 @@ func (r *Registry) register(stream agentpb.Agent_ConnectServer) (*pmmAgentInfo,
}
var node *models.Node
err = r.db.InTransaction(func(tx *reform.TX) error {
- node, err = authenticate(agentMD, tx.Querier)
+ node, err = r.authenticate(agentMD, tx.Querier)
if err != nil {
return err
}
@@ -204,7 +208,7 @@ func (r *Registry) register(stream agentpb.Agent_ConnectServer) (*pmmAgentInfo,
return agent, nil
}
-func authenticate(md *agentpb.AgentConnectMetadata, q *reform.Querier) (*models.Node, error) {
+func (r *Registry) authenticate(md *agentpb.AgentConnectMetadata, q *reform.Querier) (*models.Node, error) {
if md.ID == "" {
return nil, status.Error(codes.PermissionDenied, "Empty Agent ID.")
}
@@ -233,7 +237,7 @@ func authenticate(md *agentpb.AgentConnectMetadata, q *reform.Querier) (*models.
return nil, status.Errorf(codes.InvalidArgument, "Can't parse 'version' for pmm-agent with ID %q.", md.ID)
}
- if err := addOrRemoveVMAgent(q, md.ID, runsOnNodeID, agentVersion); err != nil {
+ if err := r.addOrRemoveVMAgent(q, md.ID, runsOnNodeID, agentVersion); err != nil {
return nil, err
}
@@ -296,18 +300,18 @@ func (r *Registry) ping(ctx context.Context, agent *pmmAgentInfo) error {
// addOrRemoveVMAgent - creates vmAgent agentType if pmm-agent's version supports it and agent not exists yet,
// otherwise ensures that vmAgent not exist for pmm-agent and pmm-agent's agents don't have push_metrics mode,
// removes it if needed.
-func addOrRemoveVMAgent(q *reform.Querier, pmmAgentID, runsOnNodeID string, pmmAgentVersion *version.Parsed) error {
+func (r *Registry) addOrRemoveVMAgent(q *reform.Querier, pmmAgentID, runsOnNodeID string, pmmAgentVersion *version.Parsed) error {
if pmmAgentVersion.Less(models.PMMAgentWithPushMetricsSupport) {
// ensure that vmagent not exists and agents dont have push_metrics.
return removeVMAgentFromPMMAgent(q, pmmAgentID)
}
- return addVMAgentToPMMAgent(q, pmmAgentID, runsOnNodeID)
+ return r.addVMAgentToPMMAgent(q, pmmAgentID, runsOnNodeID)
}
-func addVMAgentToPMMAgent(q *reform.Querier, pmmAgentID, runsOnNodeID string) error {
+func (r *Registry) addVMAgentToPMMAgent(q *reform.Querier, pmmAgentID, runsOnNodeID string) error {
// TODO remove it after fix
// https://jira.percona.com/browse/PMM-4420
- if runsOnNodeID == "pmm-server" {
+ if runsOnNodeID == "pmm-server" && !r.isExternalVM {
return nil
}
vmAgentType := models.VMAgentType
diff --git a/managed/services/agents/roster.go b/managed/services/agents/roster.go
index 4eba720bf2..4747075933 100644
--- a/managed/services/agents/roster.go
+++ b/managed/services/agents/roster.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/roster_test.go b/managed/services/agents/roster_test.go
index fc6b339a8c..d3e94482bc 100644
--- a/managed/services/agents/roster_test.go
+++ b/managed/services/agents/roster_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/state.go b/managed/services/agents/state.go
index ac49fc5768..1bf2dc043b 100644
--- a/managed/services/agents/state.go
+++ b/managed/services/agents/state.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -40,17 +40,19 @@ const (
// StateUpdater handles updating status of agents.
type StateUpdater struct {
- db *reform.DB
- r *Registry
- vmdb prometheusService
+ db *reform.DB
+ r *Registry
+ vmdb prometheusService
+ vmParams victoriaMetricsParams
}
// NewStateUpdater creates new agent state updater.
-func NewStateUpdater(db *reform.DB, r *Registry, vmdb prometheusService) *StateUpdater {
+func NewStateUpdater(db *reform.DB, r *Registry, vmdb prometheusService, vmParams victoriaMetricsParams) *StateUpdater {
return &StateUpdater{
- db: db,
- r: r,
- vmdb: vmdb,
+ db: db,
+ r: r,
+ vmdb: vmdb,
+ vmParams: vmParams,
}
}
@@ -180,7 +182,7 @@ func (u *StateUpdater) sendSetStateRequest(ctx context.Context, agent *pmmAgentI
if err != nil {
return errors.Wrapf(err, "cannot get agent scrape config for agent: %s", agent.id)
}
- agentProcesses[row.AgentID] = vmAgentConfig(string(scrapeCfg))
+ agentProcesses[row.AgentID] = vmAgentConfig(string(scrapeCfg), u.vmParams)
case models.NodeExporterType:
node, err := models.FindNodeByID(u.db.Querier, pointer.GetString(row.NodeID))
diff --git a/managed/services/agents/versioner.go b/managed/services/agents/versioner.go
index d91709128f..ae1bff828a 100644
--- a/managed/services/agents/versioner.go
+++ b/managed/services/agents/versioner.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/versioner_test.go b/managed/services/agents/versioner_test.go
index 53e1cc0b53..1135d44729 100644
--- a/managed/services/agents/versioner_test.go
+++ b/managed/services/agents/versioner_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/agents/vmagent.go b/managed/services/agents/vmagent.go
index f12d345d36..b13bfc9876 100644
--- a/managed/services/agents/vmagent.go
+++ b/managed/services/agents/vmagent.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -16,8 +16,10 @@
package agents
import (
+ "fmt"
"os"
"sort"
+ "strings"
"github.com/percona/pmm/api/agentpb"
"github.com/percona/pmm/api/inventorypb"
@@ -30,7 +32,11 @@ var (
)
// vmAgentConfig returns desired configuration of vmagent process.
-func vmAgentConfig(scrapeCfg string) *agentpb.SetStateRequest_AgentProcess {
+func vmAgentConfig(scrapeCfg string, params victoriaMetricsParams) *agentpb.SetStateRequest_AgentProcess {
+ serverURL := "{{.server_url}}/victoriametrics/"
+ if params.ExternalVM() {
+ serverURL = params.URL()
+ }
maxScrapeSize := maxScrapeSizeDefault
if space := os.Getenv(maxScrapeSizeEnv); space != "" {
maxScrapeSize = space
@@ -39,7 +45,7 @@ func vmAgentConfig(scrapeCfg string) *agentpb.SetStateRequest_AgentProcess {
interfaceToBind := envvars.GetInterfaceToBind()
args := []string{
- "-remoteWrite.url={{.server_url}}/victoriametrics/api/v1/write",
+ fmt.Sprintf("-remoteWrite.url=%sapi/v1/write", serverURL),
"-remoteWrite.tlsInsecureSkipVerify={{.server_insecure}}",
"-remoteWrite.tmpDataPath={{.tmp_dir}}/vmagent-temp-dir",
"-promscrape.config={{.TextFiles.vmagentscrapecfg}}",
@@ -50,13 +56,22 @@ func vmAgentConfig(scrapeCfg string) *agentpb.SetStateRequest_AgentProcess {
"-httpListenAddr=" + interfaceToBind + ":{{.listen_port}}",
// needed for login/password at client side.
"-envflag.enable=true",
+ "-envflag.prefix=VMAGENT_",
}
sort.Strings(args)
- envs := []string{
- "remoteWrite_basicAuth_username={{.server_username}}",
- "remoteWrite_basicAuth_password={{.server_password}}",
+ var envs []string
+ if !params.ExternalVM() {
+ envs = []string{
+ "VMAGENT_remoteWrite_basicAuth_username={{.server_username}}",
+ "VMAGENT_remoteWrite_basicAuth_password={{.server_password}}",
+ }
+ }
+ for _, env := range os.Environ() {
+ if strings.HasPrefix(env, envvars.ENVvmAgentPrefix) {
+ envs = append(envs, env)
+ }
}
sort.Strings(envs)
diff --git a/managed/services/agents/vmagent_test.go b/managed/services/agents/vmagent_test.go
index 2adc5fded8..a7bce4b3d6 100644
--- a/managed/services/agents/vmagent_test.go
+++ b/managed/services/agents/vmagent_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -19,17 +19,43 @@ import (
"testing"
"github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+
+ "github.com/percona/pmm/managed/models"
)
func TestMaxScrapeSize(t *testing.T) {
t.Run("by default 64MiB", func(t *testing.T) {
- actual := vmAgentConfig("")
+ params, err := models.NewVictoriaMetricsParams(models.BasePrometheusConfigPath, models.VMBaseURL)
+ require.NoError(t, err)
+ actual := vmAgentConfig("", params)
assert.Contains(t, actual.Args, "-promscrape.maxScrapeSize="+maxScrapeSizeDefault)
})
t.Run("overridden with ENV", func(t *testing.T) {
+ params, err := models.NewVictoriaMetricsParams(models.BasePrometheusConfigPath, models.VMBaseURL)
+ require.NoError(t, err)
newValue := "16MiB"
t.Setenv(maxScrapeSizeEnv, newValue)
- actual := vmAgentConfig("")
+ actual := vmAgentConfig("", params)
assert.Contains(t, actual.Args, "-promscrape.maxScrapeSize="+newValue)
})
+ t.Run("VMAGENT_ ENV variables", func(t *testing.T) {
+ params, err := models.NewVictoriaMetricsParams(models.BasePrometheusConfigPath, models.VMBaseURL)
+ require.NoError(t, err)
+ t.Setenv("VMAGENT_promscrape_maxScrapeSize", "16MiB")
+ t.Setenv("VM_remoteWrite_basicAuth_password", "password")
+ actual := vmAgentConfig("", params)
+ assert.Contains(t, actual.Env, "VMAGENT_promscrape_maxScrapeSize=16MiB")
+ assert.Contains(t, actual.Env, "VMAGENT_remoteWrite_basicAuth_username={{.server_username}}")
+ assert.NotContains(t, actual.Env, "VM_remoteWrite_basicAuth_password=password")
+ })
+ t.Run("External Victoria Metrics ENV variables", func(t *testing.T) {
+ params, err := models.NewVictoriaMetricsParams(models.BasePrometheusConfigPath, "http://victoriametrics:8428")
+ require.NoError(t, err)
+ t.Setenv("VMAGENT_promscrape_maxScrapeSize", "16MiB")
+ actual := vmAgentConfig("", params)
+ assert.Contains(t, actual.Args, "-remoteWrite.url=http://victoriametrics:8428/api/v1/write")
+ assert.Contains(t, actual.Env, "VMAGENT_promscrape_maxScrapeSize=16MiB")
+ assert.NotContains(t, actual.Env, "VMAGENT_remoteWrite_basicAuth_username={{.server_username}}")
+ })
}
diff --git a/managed/services/alert_rule.go b/managed/services/alert_rule.go
index 563aa2dc5f..8c6517957a 100644
--- a/managed/services/alert_rule.go
+++ b/managed/services/alert_rule.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/alertmanager/alertmanager.go b/managed/services/alertmanager/alertmanager.go
index 8f6f380ae4..8a52c24a7a 100644
--- a/managed/services/alertmanager/alertmanager.go
+++ b/managed/services/alertmanager/alertmanager.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/alertmanager/alertmanager_test.go b/managed/services/alertmanager/alertmanager_test.go
index 7c323d2dbf..f3461dcb03 100644
--- a/managed/services/alertmanager/alertmanager_test.go
+++ b/managed/services/alertmanager/alertmanager_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/alertmanager/emailer.go b/managed/services/alertmanager/emailer.go
index 50fa91e9b8..e07da67a3f 100644
--- a/managed/services/alertmanager/emailer.go
+++ b/managed/services/alertmanager/emailer.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/backup/backup_service.go b/managed/services/backup/backup_service.go
index 9847b32173..e23cab52d2 100644
--- a/managed/services/backup/backup_service.go
+++ b/managed/services/backup/backup_service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/backup/backup_service_test.go b/managed/services/backup/backup_service_test.go
index e599b7c12b..1b5d80801f 100644
--- a/managed/services/backup/backup_service_test.go
+++ b/managed/services/backup/backup_service_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/backup/compatibility_helpers.go b/managed/services/backup/compatibility_helpers.go
index d82a2a2d46..94f0f18882 100644
--- a/managed/services/backup/compatibility_helpers.go
+++ b/managed/services/backup/compatibility_helpers.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/backup/compatibility_helpers_test.go b/managed/services/backup/compatibility_helpers_test.go
index 7795d73187..9d5e975572 100644
--- a/managed/services/backup/compatibility_helpers_test.go
+++ b/managed/services/backup/compatibility_helpers_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/backup/compatibility_service.go b/managed/services/backup/compatibility_service.go
index 9d2372afdb..04796cee20 100644
--- a/managed/services/backup/compatibility_service.go
+++ b/managed/services/backup/compatibility_service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/backup/compatibility_service_test.go b/managed/services/backup/compatibility_service_test.go
index eaf777e5fe..4859073fd8 100644
--- a/managed/services/backup/compatibility_service_test.go
+++ b/managed/services/backup/compatibility_service_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/backup/deps.go b/managed/services/backup/deps.go
index 86c0caf8a4..3ec7340976 100644
--- a/managed/services/backup/deps.go
+++ b/managed/services/backup/deps.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/backup/errors.go b/managed/services/backup/errors.go
index f6b5d15c6b..4001dbba8e 100644
--- a/managed/services/backup/errors.go
+++ b/managed/services/backup/errors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/backup/metrics.go b/managed/services/backup/metrics.go
index b97148a958..1aa661deca 100644
--- a/managed/services/backup/metrics.go
+++ b/managed/services/backup/metrics.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/backup/pitr_timerange_service.go b/managed/services/backup/pitr_timerange_service.go
index 8f691a7777..000ca1c22c 100644
--- a/managed/services/backup/pitr_timerange_service.go
+++ b/managed/services/backup/pitr_timerange_service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/backup/pitr_timerange_service_test.go b/managed/services/backup/pitr_timerange_service_test.go
index ed9765293b..4f7e3cbfee 100644
--- a/managed/services/backup/pitr_timerange_service_test.go
+++ b/managed/services/backup/pitr_timerange_service_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/backup/removal_service.go b/managed/services/backup/removal_service.go
index 50e4e7ab01..dff93e5cac 100644
--- a/managed/services/backup/removal_service.go
+++ b/managed/services/backup/removal_service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/backup/removal_service_test.go b/managed/services/backup/removal_service_test.go
index 5afb9691b9..b0f9b2dc13 100644
--- a/managed/services/backup/removal_service_test.go
+++ b/managed/services/backup/removal_service_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/backup/retention_service.go b/managed/services/backup/retention_service.go
index c46a56e1ec..562babc703 100644
--- a/managed/services/backup/retention_service.go
+++ b/managed/services/backup/retention_service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/backup/retention_service_test.go b/managed/services/backup/retention_service_test.go
index 738729fb8f..66bc5fb4b0 100644
--- a/managed/services/backup/retention_service_test.go
+++ b/managed/services/backup/retention_service_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/checks/checks.go b/managed/services/checks/checks.go
index 7d3aef9c53..c3e95f0302 100644
--- a/managed/services/checks/checks.go
+++ b/managed/services/checks/checks.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/checks/checks_test.go b/managed/services/checks/checks_test.go
index 2d89d9ddbe..b38f0b1d4e 100644
--- a/managed/services/checks/checks_test.go
+++ b/managed/services/checks/checks_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/checks/deps.go b/managed/services/checks/deps.go
index 267d69b5f5..8e9912ba16 100644
--- a/managed/services/checks/deps.go
+++ b/managed/services/checks/deps.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/checks/funcs.go b/managed/services/checks/funcs.go
index 29927f4832..aa046777d5 100644
--- a/managed/services/checks/funcs.go
+++ b/managed/services/checks/funcs.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/checks/funcs_test.go b/managed/services/checks/funcs_test.go
index 2212e34e6f..2723d4e8c8 100644
--- a/managed/services/checks/funcs_test.go
+++ b/managed/services/checks/funcs_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/checks/registry.go b/managed/services/checks/registry.go
index 2be7d5c706..1ccb42932c 100644
--- a/managed/services/checks/registry.go
+++ b/managed/services/checks/registry.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/checks/registry_test.go b/managed/services/checks/registry_test.go
index ae5eb55f1d..6ef6d1d26a 100644
--- a/managed/services/checks/registry_test.go
+++ b/managed/services/checks/registry_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/config/config.go b/managed/services/config/config.go
index c8637bd278..da63fa58e7 100644
--- a/managed/services/config/config.go
+++ b/managed/services/config/config.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/config/pmm-managed.yaml b/managed/services/config/pmm-managed.yaml
index af40bfc254..d9341b020f 100644
--- a/managed/services/config/pmm-managed.yaml
+++ b/managed/services/config/pmm-managed.yaml
@@ -6,7 +6,6 @@ services:
VM:
enabled: true
timeout: 2s
- address: http://localhost:9090/prometheus
QANDB_SELECT:
enabled: true
timeout: 2s
diff --git a/managed/services/converters.go b/managed/services/converters.go
index 299776441c..a4da1283f0 100644
--- a/managed/services/converters.go
+++ b/managed/services/converters.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/dbaas/dbaas_client.go b/managed/services/dbaas/dbaas_client.go
index 2e3ec415f6..2768eea2b1 100644
--- a/managed/services/dbaas/dbaas_client.go
+++ b/managed/services/dbaas/dbaas_client.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/dbaas/kubernetes/client/client.go b/managed/services/dbaas/kubernetes/client/client.go
index 309887ee9f..83c6c12499 100644
--- a/managed/services/dbaas/kubernetes/client/client.go
+++ b/managed/services/dbaas/kubernetes/client/client.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/dbaas/kubernetes/client/client_test.go b/managed/services/dbaas/kubernetes/client/client_test.go
index 542fa2b927..6bcdcf0e62 100644
--- a/managed/services/dbaas/kubernetes/client/client_test.go
+++ b/managed/services/dbaas/kubernetes/client/client_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/dbaas/kubernetes/client/ctl.go b/managed/services/dbaas/kubernetes/client/ctl.go
index 795f0863f9..a3081c35bb 100644
--- a/managed/services/dbaas/kubernetes/client/ctl.go
+++ b/managed/services/dbaas/kubernetes/client/ctl.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/dbaas/kubernetes/client/database/database.go b/managed/services/dbaas/kubernetes/client/database/database.go
index d5a0aacda7..b332f0f1e9 100644
--- a/managed/services/dbaas/kubernetes/client/database/database.go
+++ b/managed/services/dbaas/kubernetes/client/database/database.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/dbaas/kubernetes/client/gen.go b/managed/services/dbaas/kubernetes/client/gen.go
index fe733886cf..1b9eddf585 100644
--- a/managed/services/dbaas/kubernetes/client/gen.go
+++ b/managed/services/dbaas/kubernetes/client/gen.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/dbaas/kubernetes/client/load_config.go b/managed/services/dbaas/kubernetes/client/load_config.go
index 4d993af1ba..ec8cffa41c 100644
--- a/managed/services/dbaas/kubernetes/client/load_config.go
+++ b/managed/services/dbaas/kubernetes/client/load_config.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/dbaas/kubernetes/client/writer.go b/managed/services/dbaas/kubernetes/client/writer.go
index a058cc0531..2c5839504c 100644
--- a/managed/services/dbaas/kubernetes/client/writer.go
+++ b/managed/services/dbaas/kubernetes/client/writer.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/dbaas/kubernetes/kubernetes.go b/managed/services/dbaas/kubernetes/kubernetes.go
index 5fe45368a7..9582a2c76a 100644
--- a/managed/services/dbaas/kubernetes/kubernetes.go
+++ b/managed/services/dbaas/kubernetes/kubernetes.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/dbaas/kubernetes/olm_operator_test.go b/managed/services/dbaas/kubernetes/olm_operator_test.go
index b9cb55d414..83906ee61b 100644
--- a/managed/services/dbaas/kubernetes/olm_operator_test.go
+++ b/managed/services/dbaas/kubernetes/olm_operator_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2020 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/dbaas/kubernetes/types.go b/managed/services/dbaas/kubernetes/types.go
index 867491f48f..db29220e1c 100644
--- a/managed/services/dbaas/kubernetes/types.go
+++ b/managed/services/dbaas/kubernetes/types.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/dbaas/kubernetes/types_test.go b/managed/services/dbaas/kubernetes/types_test.go
index 21f132a3f3..08daf4c349 100644
--- a/managed/services/dbaas/kubernetes/types_test.go
+++ b/managed/services/dbaas/kubernetes/types_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/dbaas/utils/convertors/convertors.go b/managed/services/dbaas/utils/convertors/convertors.go
index b6481ae467..a7f3d2f55d 100644
--- a/managed/services/dbaas/utils/convertors/convertors.go
+++ b/managed/services/dbaas/utils/convertors/convertors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/dbaas/utils/convertors/convertors_test.go b/managed/services/dbaas/utils/convertors/convertors_test.go
index fd9ab7b1c6..d3eefec788 100644
--- a/managed/services/dbaas/utils/convertors/convertors_test.go
+++ b/managed/services/dbaas/utils/convertors/convertors_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/errors.go b/managed/services/errors.go
index a58d0eff19..9de5a80d00 100644
--- a/managed/services/errors.go
+++ b/managed/services/errors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/grafana/auth_server.go b/managed/services/grafana/auth_server.go
index 72d0368b00..2d7cf38cc3 100644
--- a/managed/services/grafana/auth_server.go
+++ b/managed/services/grafana/auth_server.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/grafana/auth_server_fuzz.go b/managed/services/grafana/auth_server_fuzz.go
index 2abdb9c911..d72f17a776 100644
--- a/managed/services/grafana/auth_server_fuzz.go
+++ b/managed/services/grafana/auth_server_fuzz.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/grafana/auth_server_test.go b/managed/services/grafana/auth_server_test.go
index 1c02bfe0d4..77d341a36b 100644
--- a/managed/services/grafana/auth_server_test.go
+++ b/managed/services/grafana/auth_server_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/grafana/client.go b/managed/services/grafana/client.go
index 4287f6942e..20333cf1bb 100644
--- a/managed/services/grafana/client.go
+++ b/managed/services/grafana/client.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/grafana/client_test.go b/managed/services/grafana/client_test.go
index 546dbcaa7f..75b4e5376f 100644
--- a/managed/services/grafana/client_test.go
+++ b/managed/services/grafana/client_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/grafana/deps.go b/managed/services/grafana/deps.go
index e58ce85e8b..496065a021 100644
--- a/managed/services/grafana/deps.go
+++ b/managed/services/grafana/deps.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/inventory/agents.go b/managed/services/inventory/agents.go
index 6e35a6c371..6a27106db9 100644
--- a/managed/services/inventory/agents.go
+++ b/managed/services/inventory/agents.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/inventory/agents_test.go b/managed/services/inventory/agents_test.go
index 3e9082bd87..6157ea2d9a 100644
--- a/managed/services/inventory/agents_test.go
+++ b/managed/services/inventory/agents_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/inventory/deps.go b/managed/services/inventory/deps.go
index a1471ea79c..37c2faab3e 100644
--- a/managed/services/inventory/deps.go
+++ b/managed/services/inventory/deps.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/inventory/grpc/agents_server.go b/managed/services/inventory/grpc/agents_server.go
index b7d1a73eb5..3e4277d394 100644
--- a/managed/services/inventory/grpc/agents_server.go
+++ b/managed/services/inventory/grpc/agents_server.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/inventory/grpc/nodes_server.go b/managed/services/inventory/grpc/nodes_server.go
index ba08800ad8..18b57b1d4d 100644
--- a/managed/services/inventory/grpc/nodes_server.go
+++ b/managed/services/inventory/grpc/nodes_server.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -106,6 +106,10 @@ func (s *nodesServer) GetNode(ctx context.Context, req *inventorypb.GetNodeReque
return res, nil
}
+func (s *nodesServer) AddNode(ctx context.Context, req *inventorypb.AddNodeRequest) (*inventorypb.AddNodeResponse, error) {
+ return s.svc.AddNode(ctx, req)
+}
+
// AddGenericNode adds Generic Node.
func (s *nodesServer) AddGenericNode(ctx context.Context, req *inventorypb.AddGenericNodeRequest) (*inventorypb.AddGenericNodeResponse, error) {
node, err := s.svc.AddGenericNode(ctx, req)
diff --git a/managed/services/inventory/grpc/services_server.go b/managed/services/inventory/grpc/services_server.go
index 7636617249..0a6207ce87 100644
--- a/managed/services/inventory/grpc/services_server.go
+++ b/managed/services/inventory/grpc/services_server.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/inventory/inventory_metrics.go b/managed/services/inventory/inventory_metrics.go
index afda82c0b6..d390b95b73 100644
--- a/managed/services/inventory/inventory_metrics.go
+++ b/managed/services/inventory/inventory_metrics.go
@@ -68,7 +68,7 @@ func NewInventoryMetricsCollector(metrics inventoryMetrics) *InventoryMetricsCol
mAgentsDesc: prom.NewDesc(
prom.BuildFQName(prometheusNamespace, prometheusSubsystem, "agents"),
"Inventory Agent",
- []string{"agent_id", "agent_type", "service_id", "node_id", "pmm_agent_id", "disabled", "version"},
+ []string{"agent_id", "agent_type", "service_id", "node_id", "node_name", "pmm_agent_id", "disabled", "version"},
nil),
mNodesDesc: prom.NewDesc(
prom.BuildFQName(prometheusNamespace, prometheusSubsystem, "nodes"),
@@ -85,7 +85,7 @@ func NewInventoryMetricsCollector(metrics inventoryMetrics) *InventoryMetricsCol
}
}
-func GetRunsOnNodeIDByPMMAgentID(agents []*models.Agent, pmmAgentID string) string {
+func getRunsOnNodeIDByPMMAgentID(agents []*models.Agent, pmmAgentID string) string {
for _, agent := range agents {
if agent.AgentID == pmmAgentID {
return pointer.GetString(agent.RunsOnNodeID)
@@ -103,6 +103,16 @@ func (i *InventoryMetrics) GetAgentMetrics(ctx context.Context) ([]Metric, error
return err
}
+ dbNodes, err := models.FindNodes(tx.Querier, models.NodeFilters{})
+ if err != nil {
+ return err
+ }
+
+ nodeMap := make(map[string]string, len(dbNodes))
+ for _, node := range dbNodes {
+ nodeMap[node.NodeID] = node.NodeName
+ }
+
for _, agent := range dbAgents {
runsOnNodeID := ""
disabled := "0"
@@ -121,14 +131,16 @@ func (i *InventoryMetrics) GetAgentMetrics(ctx context.Context) ([]Metric, error
runsOnNodeID = pointer.GetString(agent.RunsOnNodeID)
} else {
metricValue = float64(inventorypb.AgentStatus_value[agent.Status])
- runsOnNodeID = GetRunsOnNodeIDByPMMAgentID(dbAgents, pmmAgentID)
+ runsOnNodeID = getRunsOnNodeIDByPMMAgentID(dbAgents, pmmAgentID)
}
+ nodeName := nodeMap[runsOnNodeID]
agentMetricLabels := []string{
agent.AgentID,
string(agent.AgentType),
pointer.GetString(agent.ServiceID),
runsOnNodeID,
+ nodeName,
pmmAgentID,
disabled,
pointer.GetString(agent.Version),
diff --git a/managed/services/inventory/inventory_metrics_test.go b/managed/services/inventory/inventory_metrics_test.go
index c65631588f..939ccc7b07 100644
--- a/managed/services/inventory/inventory_metrics_test.go
+++ b/managed/services/inventory/inventory_metrics_test.go
@@ -38,7 +38,7 @@ func TestNewInventoryMetricsCollector(t *testing.T) {
agentMetrics := []Metric{
{
- labels: []string{"A1", string(models.PMMAgentType), "S1", "N1", "PA1", strconv.Itoa(1), "V1"},
+ labels: []string{"A1", string(models.PMMAgentType), "S1", "N1", "NN1", "PA1", strconv.Itoa(1), "V1"},
value: float64(1),
},
}
@@ -87,13 +87,13 @@ func TestNewInventoryMetricsCollector(t *testing.T) {
const expectedAgentMetrics = `
# HELP pmm_managed_inventory_agents Inventory Agent
# TYPE pmm_managed_inventory_agents gauge
- pmm_managed_inventory_agents{agent_id="A1",agent_type="pmm-agent",disabled="1",node_id="N1",pmm_agent_id="PA1",service_id="S1",version="V1"} 1
+ pmm_managed_inventory_agents{agent_id="A1",agent_type="pmm-agent",disabled="1",node_id="N1",node_name="NN1",pmm_agent_id="PA1",service_id="S1",version="V1"} 1
`
const expectedNodeMetrics = `
# HELP pmm_managed_inventory_nodes Inventory Node
- # TYPE pmm_managed_inventory_nodes gauge
- pmm_managed_inventory_nodes{container_name="C1",node_id="N1",node_name="N1",node_type="generic"} 1
+ # TYPE pmm_managed_inventory_nodes gauge
+ pmm_managed_inventory_nodes{container_name="C1",node_id="N1",node_name="N1",node_type="generic"} 1
`
const expectedServiceMetrics = `
diff --git a/managed/services/inventory/nodes.go b/managed/services/inventory/nodes.go
index 10516dfd2d..31a4f304d4 100644
--- a/managed/services/inventory/nodes.go
+++ b/managed/services/inventory/nodes.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -46,11 +46,9 @@ func NewNodesService(db *reform.DB, r agentsRegistry, state agentsStateUpdater,
}
// List returns a list of all Nodes.
-//
-//nolint:unparam
func (s *NodesService) List(ctx context.Context, filters models.NodeFilters) ([]inventorypb.Node, error) {
var nodes []*models.Node
- e := s.db.InTransaction(func(tx *reform.TX) error {
+ e := s.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error {
var err error
nodes, err = models.FindNodes(tx.Querier, filters)
return err
@@ -70,9 +68,9 @@ func (s *NodesService) List(ctx context.Context, filters models.NodeFilters) ([]
}
// Get returns a single Node by ID.
-func (s *NodesService) Get(ctx context.Context, req *inventorypb.GetNodeRequest) (inventorypb.Node, error) { //nolint:unparam,ireturn
+func (s *NodesService) Get(ctx context.Context, req *inventorypb.GetNodeRequest) (inventorypb.Node, error) { //nolint:ireturn
modelNode := &models.Node{}
- e := s.db.InTransaction(func(tx *reform.TX) error {
+ e := s.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error {
var err error
modelNode, err = models.FindNodeByID(tx.Querier, req.NodeId)
if err != nil {
@@ -92,9 +90,49 @@ func (s *NodesService) Get(ctx context.Context, req *inventorypb.GetNodeRequest)
return node, nil
}
+// AddNode adds any type of Node.
+func (s *NodesService) AddNode(ctx context.Context, req *inventorypb.AddNodeRequest) (*inventorypb.AddNodeResponse, error) {
+ res := &inventorypb.AddNodeResponse{}
+
+ switch req.Request.(type) {
+ case *inventorypb.AddNodeRequest_Generic:
+ node, err := s.AddGenericNode(ctx, req.GetGeneric())
+ if err != nil {
+ return nil, err
+ }
+ res.Node = &inventorypb.AddNodeResponse_Generic{Generic: node}
+ case *inventorypb.AddNodeRequest_Container:
+ node, err := s.AddContainerNode(ctx, req.GetContainer())
+ if err != nil {
+ return nil, err
+ }
+ res.Node = &inventorypb.AddNodeResponse_Container{Container: node}
+ case *inventorypb.AddNodeRequest_Remote:
+ node, err := s.AddRemoteNode(ctx, req.GetRemote())
+ if err != nil {
+ return nil, err
+ }
+ res.Node = &inventorypb.AddNodeResponse_Remote{Remote: node}
+ case *inventorypb.AddNodeRequest_RemoteRds:
+ node, err := s.AddRemoteRDSNode(ctx, req.GetRemoteRds())
+ if err != nil {
+ return nil, err
+ }
+ res.Node = &inventorypb.AddNodeResponse_RemoteRds{RemoteRds: node}
+ case *inventorypb.AddNodeRequest_RemoteAzure:
+ node, err := s.AddRemoteAzureDatabaseNode(ctx, req.GetRemoteAzure())
+ if err != nil {
+ return nil, err
+ }
+ res.Node = &inventorypb.AddNodeResponse_RemoteAzureDatabase{RemoteAzureDatabase: node}
+ default:
+ return nil, errors.Errorf("invalid request %v", req.GetRequest())
+ }
+
+ return res, nil
+}
+
// AddGenericNode adds Generic Node.
-//
-//nolint:unparam
func (s *NodesService) AddGenericNode(ctx context.Context, req *inventorypb.AddGenericNodeRequest) (*inventorypb.GenericNode, error) {
params := &models.CreateNodeParams{
NodeName: req.NodeName,
@@ -108,7 +146,7 @@ func (s *NodesService) AddGenericNode(ctx context.Context, req *inventorypb.AddG
}
node := &models.Node{}
- e := s.db.InTransaction(func(tx *reform.TX) error {
+ e := s.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error {
var err error
node, err = models.CreateNode(tx.Querier, models.GenericNodeType, params)
if err != nil {
@@ -129,8 +167,6 @@ func (s *NodesService) AddGenericNode(ctx context.Context, req *inventorypb.AddG
}
// AddContainerNode adds Container Node.
-//
-//nolint:unparam
func (s *NodesService) AddContainerNode(ctx context.Context, req *inventorypb.AddContainerNodeRequest) (*inventorypb.ContainerNode, error) {
params := &models.CreateNodeParams{
NodeName: req.NodeName,
@@ -145,7 +181,7 @@ func (s *NodesService) AddContainerNode(ctx context.Context, req *inventorypb.Ad
}
node := &models.Node{}
- e := s.db.InTransaction(func(tx *reform.TX) error {
+ e := s.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error {
var err error
node, err = models.CreateNode(tx.Querier, models.ContainerNodeType, params)
if err != nil {
@@ -166,8 +202,6 @@ func (s *NodesService) AddContainerNode(ctx context.Context, req *inventorypb.Ad
}
// AddRemoteNode adds Remote Node.
-//
-//nolint:unparam
func (s *NodesService) AddRemoteNode(ctx context.Context, req *inventorypb.AddRemoteNodeRequest) (*inventorypb.RemoteNode, error) {
params := &models.CreateNodeParams{
NodeName: req.NodeName,
@@ -179,7 +213,7 @@ func (s *NodesService) AddRemoteNode(ctx context.Context, req *inventorypb.AddRe
}
node := &models.Node{}
- e := s.db.InTransaction(func(tx *reform.TX) error {
+ e := s.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error {
var err error
node, err = models.CreateNode(tx.Querier, models.RemoteNodeType, params)
if err != nil {
@@ -200,8 +234,6 @@ func (s *NodesService) AddRemoteNode(ctx context.Context, req *inventorypb.AddRe
}
// AddRemoteRDSNode adds a new RDS node
-//
-//nolint:unparam
func (s *NodesService) AddRemoteRDSNode(ctx context.Context, req *inventorypb.AddRemoteRDSNodeRequest) (*inventorypb.RemoteRDSNode, error) {
params := &models.CreateNodeParams{
NodeName: req.NodeName,
@@ -213,7 +245,7 @@ func (s *NodesService) AddRemoteRDSNode(ctx context.Context, req *inventorypb.Ad
}
node := &models.Node{}
- e := s.db.InTransaction(func(tx *reform.TX) error {
+ e := s.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error {
var err error
node, err = models.CreateNode(tx.Querier, models.RemoteRDSNodeType, params)
if err != nil {
@@ -235,7 +267,7 @@ func (s *NodesService) AddRemoteRDSNode(ctx context.Context, req *inventorypb.Ad
// AddRemoteAzureDatabaseNode adds a new Azure database node
//
-//nolint:unparam,dupl
+//nolint:dupl
func (s *NodesService) AddRemoteAzureDatabaseNode(ctx context.Context, req *inventorypb.AddRemoteAzureDatabaseNodeRequest) (*inventorypb.RemoteAzureDatabaseNode, error) {
params := &models.CreateNodeParams{
NodeName: req.NodeName,
@@ -247,7 +279,7 @@ func (s *NodesService) AddRemoteAzureDatabaseNode(ctx context.Context, req *inve
}
node := &models.Node{}
- e := s.db.InTransaction(func(tx *reform.TX) error {
+ e := s.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error {
var err error
node, err = models.CreateNode(tx.Querier, models.RemoteAzureDatabaseNodeType, params)
if err != nil {
@@ -274,7 +306,7 @@ func (s *NodesService) Remove(ctx context.Context, id string, force bool) error
idsToKick := make(map[string]struct{})
idsToSetState := make(map[string]struct{})
- if e := s.db.InTransaction(func(tx *reform.TX) error {
+ if e := s.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error {
mode := models.RemoveRestrict
if force {
mode = models.RemoveCascade
diff --git a/managed/services/inventory/nodes_test.go b/managed/services/inventory/nodes_test.go
index afd2ad42a8..d03ab7ed8c 100644
--- a/managed/services/inventory/nodes_test.go
+++ b/managed/services/inventory/nodes_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -16,6 +16,7 @@
package inventory
import (
+ "fmt"
"testing"
"github.com/stretchr/testify/assert"
@@ -31,7 +32,7 @@ import (
func TestNodes(t *testing.T) {
t.Run("Basic", func(t *testing.T) {
_, _, ns, teardown, ctx, _ := setup(t)
- defer teardown(t)
+ t.Cleanup(func() { teardown(t) })
actualNodes, err := ns.List(ctx, models.NodeFilters{})
require.NoError(t, err)
@@ -63,7 +64,7 @@ func TestNodes(t *testing.T) {
t.Run("GetEmptyID", func(t *testing.T) {
_, _, ns, teardown, ctx, _ := setup(t)
- defer teardown(t)
+ t.Cleanup(func() { teardown(t) })
getNodeResponse, err := ns.Get(ctx, &inventorypb.GetNodeRequest{NodeId: ""})
tests.AssertGRPCError(t, status.New(codes.InvalidArgument, `Empty Node ID.`), err)
@@ -72,7 +73,7 @@ func TestNodes(t *testing.T) {
t.Run("AddNameEmpty", func(t *testing.T) {
_, _, ns, teardown, ctx, _ := setup(t)
- defer teardown(t)
+ t.Cleanup(func() { teardown(t) })
_, err := ns.AddGenericNode(ctx, &inventorypb.AddGenericNodeRequest{NodeName: ""})
tests.AssertGRPCError(t, status.New(codes.InvalidArgument, `Empty Node name.`), err)
@@ -80,7 +81,7 @@ func TestNodes(t *testing.T) {
t.Run("AddNameNotUnique", func(t *testing.T) {
_, _, ns, teardown, ctx, _ := setup(t)
- defer teardown(t)
+ t.Cleanup(func() { teardown(t) })
_, err := ns.AddGenericNode(ctx, &inventorypb.AddGenericNodeRequest{NodeName: "test", Address: "test"})
require.NoError(t, err)
@@ -91,7 +92,7 @@ func TestNodes(t *testing.T) {
t.Run("AddHostnameNotUnique", func(t *testing.T) {
_, _, ns, teardown, ctx, _ := setup(t)
- defer teardown(t)
+ t.Cleanup(func() { teardown(t) })
_, err := ns.AddGenericNode(ctx, &inventorypb.AddGenericNodeRequest{NodeName: "test1", Address: "test"})
require.NoError(t, err)
@@ -100,24 +101,9 @@ func TestNodes(t *testing.T) {
require.NoError(t, err)
})
- /*
- TODO
- t.Run("AddInstanceRegionNotUnique", func(t *testing.T) {
- ns, teardown := setup(t)
- defer teardown(t)
-
- _, err := ns.AddRemoteAmazonRDSNode(ctx, &inventorypb.AddRemoteAmazonRDSNodeRequest{NodeName: "test1", Instance: "test-instance", Region: "test-region"})
- require.NoError(t, err)
-
- _, err = ns.AddRemoteAmazonRDSNode(ctx, &inventorypb.AddRemoteAmazonRDSNodeRequest{NodeName: "test2", Instance: "test-instance", Region: "test-region"})
- expected := status.New(codes.AlreadyExists, `Node with instance "test-instance" and region "test-region" already exists.`)
- tests.AssertGRPCError(t, expected, err)
- })
- */
-
- t.Run("AddRemoteRDSNode", func(t *testing.T) {
+ t.Run("AddRemoteRDSNodeNotUnique", func(t *testing.T) {
_, _, ns, teardown, ctx, _ := setup(t)
- defer teardown(t)
+ t.Cleanup(func() { teardown(t) })
_, err := ns.AddRemoteRDSNode(ctx, &inventorypb.AddRemoteRDSNodeRequest{NodeName: "test1", Region: "test-region", Address: "test"})
require.NoError(t, err)
@@ -135,3 +121,250 @@ func TestNodes(t *testing.T) {
tests.AssertGRPCError(t, status.New(codes.NotFound, `Node with ID "no-such-id" not found.`), err)
})
}
+
+func TestAddNode(t *testing.T) {
+ t.Run("BasicGeneric", func(t *testing.T) {
+ const nodeID = "/node_id/00000000-0000-4000-8000-000000000005"
+ _, _, ns, teardown, ctx, _ := setup(t)
+ t.Cleanup(func() { teardown(t) })
+
+ actualNodes, err := ns.List(ctx, models.NodeFilters{})
+ require.NoError(t, err)
+ require.Len(t, actualNodes, 1) // PMM Server Node
+
+ addNodeResponse, err := ns.AddNode(ctx, &inventorypb.AddNodeRequest{
+ Request: &inventorypb.AddNodeRequest_Generic{
+ Generic: &inventorypb.AddGenericNodeRequest{NodeName: "test-bm", Region: "test-region", Address: "test"},
+ },
+ })
+ require.NoError(t, err)
+
+ expectedNode := &inventorypb.GenericNode{
+ NodeId: nodeID,
+ NodeName: "test-bm",
+ Region: "test-region",
+ Address: "test",
+ }
+ assert.Equal(t, expectedNode, addNodeResponse.GetGeneric())
+
+ getNodeResponse, err := ns.Get(ctx, &inventorypb.GetNodeRequest{NodeId: nodeID})
+ require.NoError(t, err)
+ assert.Equal(t, expectedNode, getNodeResponse)
+
+ nodesResponse, err := ns.List(ctx, models.NodeFilters{})
+ require.NoError(t, err)
+ require.Len(t, nodesResponse, 2)
+ assert.Equal(t, expectedNode, nodesResponse[0])
+
+ err = ns.Remove(ctx, nodeID, false)
+ require.NoError(t, err)
+ getNodeResponse, err = ns.Get(ctx, &inventorypb.GetNodeRequest{NodeId: nodeID})
+ tests.AssertGRPCError(t, status.New(codes.NotFound, fmt.Sprintf("Node with ID %q not found.", nodeID)), err)
+ assert.Nil(t, getNodeResponse)
+ })
+
+ t.Run("AddAllNodeTypes", func(t *testing.T) {
+ const (
+ nodeID1 = "/node_id/00000000-0000-4000-8000-000000000005"
+ nodeID2 = "/node_id/00000000-0000-4000-8000-000000000006"
+ nodeID3 = "/node_id/00000000-0000-4000-8000-000000000007"
+ nodeID4 = "/node_id/00000000-0000-4000-8000-000000000008"
+ nodeID5 = "/node_id/00000000-0000-4000-8000-000000000009"
+ )
+ _, _, ns, teardown, ctx, _ := setup(t)
+ t.Cleanup(func() { teardown(t) })
+
+ actualNodes, err := ns.List(ctx, models.NodeFilters{})
+ require.NoError(t, err)
+ require.Len(t, actualNodes, 1) // PMM Server Node
+
+ expectedNode1 := &inventorypb.GenericNode{
+ NodeId: nodeID1,
+ NodeName: "test-name1",
+ Region: "test-region",
+ Address: "test1",
+ }
+ addNodeResponse, err := ns.AddNode(ctx, &inventorypb.AddNodeRequest{
+ Request: &inventorypb.AddNodeRequest_Generic{
+ Generic: &inventorypb.AddGenericNodeRequest{
+ NodeName: "test-name1",
+ Region: "test-region",
+ Address: "test1",
+ },
+ },
+ })
+ require.NoError(t, err)
+ assert.Equal(t, expectedNode1, addNodeResponse.GetGeneric())
+
+ expectedNode2 := &inventorypb.ContainerNode{
+ NodeId: nodeID2,
+ NodeName: "test-name2",
+ Region: "test-region",
+ Address: "test2",
+ }
+ addNodeResponse, err = ns.AddNode(ctx, &inventorypb.AddNodeRequest{
+ Request: &inventorypb.AddNodeRequest_Container{
+ Container: &inventorypb.AddContainerNodeRequest{
+ NodeName: "test-name2",
+ Region: "test-region",
+ Address: "test2",
+ },
+ },
+ })
+ require.NoError(t, err)
+ assert.Equal(t, expectedNode2, addNodeResponse.GetContainer())
+
+ expectedNode3 := &inventorypb.RemoteNode{
+ NodeId: nodeID3,
+ NodeName: "test-name3",
+ Region: "test-region",
+ Address: "test3",
+ CustomLabels: map[string]string{
+ "testkey": "test-value",
+ "region": "test-region",
+ },
+ }
+ addNodeResponse, err = ns.AddNode(ctx, &inventorypb.AddNodeRequest{
+ Request: &inventorypb.AddNodeRequest_Remote{
+ Remote: &inventorypb.AddRemoteNodeRequest{
+ NodeName: "test-name3",
+ Region: "test-region",
+ Address: "test3",
+ CustomLabels: map[string]string{
+ "testkey": "test-value",
+ "region": "test-region",
+ },
+ },
+ },
+ })
+ require.NoError(t, err)
+ assert.Equal(t, expectedNode3, addNodeResponse.GetRemote())
+
+ expectedNode4 := &inventorypb.RemoteAzureDatabaseNode{
+ NodeId: nodeID4,
+ NodeName: "test-name4",
+ Region: "test-region",
+ Az: "test-region-az",
+ Address: "test4",
+ }
+ addNodeResponse, err = ns.AddNode(ctx, &inventorypb.AddNodeRequest{
+ Request: &inventorypb.AddNodeRequest_RemoteAzure{
+ RemoteAzure: &inventorypb.AddRemoteAzureDatabaseNodeRequest{
+ NodeName: "test-name4",
+ Region: "test-region",
+ Az: "test-region-az",
+ Address: "test4",
+ },
+ },
+ })
+ require.NoError(t, err)
+ assert.Equal(t, expectedNode4, addNodeResponse.GetRemoteAzureDatabase())
+
+ expectedNode5 := &inventorypb.RemoteRDSNode{
+ NodeId: nodeID5,
+ NodeName: "test-name5",
+ Region: "test-region",
+ Az: "test-region-az",
+ Address: "test5",
+ }
+ addNodeResponse, err = ns.AddNode(ctx, &inventorypb.AddNodeRequest{
+ Request: &inventorypb.AddNodeRequest_RemoteRds{
+ RemoteRds: &inventorypb.AddRemoteRDSNodeRequest{
+ NodeName: "test-name5",
+ Region: "test-region",
+ Az: "test-region-az",
+ Address: "test5",
+ },
+ },
+ })
+ require.NoError(t, err)
+ assert.Equal(t, expectedNode5, addNodeResponse.GetRemoteRds())
+
+ getNodeResponse, err := ns.Get(ctx, &inventorypb.GetNodeRequest{NodeId: nodeID1})
+ require.NoError(t, err)
+ assert.Equal(t, expectedNode1, getNodeResponse)
+
+ nodesResponse, err := ns.List(ctx, models.NodeFilters{})
+ require.NoError(t, err)
+ require.Len(t, nodesResponse, 6)
+ assert.Equal(t, expectedNode1, nodesResponse[0])
+
+ err = ns.Remove(ctx, nodeID1, false)
+ require.NoError(t, err)
+ getNodeResponse, err = ns.Get(ctx, &inventorypb.GetNodeRequest{NodeId: nodeID1})
+ tests.AssertGRPCError(t, status.New(codes.NotFound, fmt.Sprintf("Node with ID %q not found.", nodeID1)), err)
+ assert.Nil(t, getNodeResponse)
+ })
+
+ t.Run("AddRemoteRDSNodeNonUnique", func(t *testing.T) {
+ _, _, ns, teardown, ctx, _ := setup(t)
+ t.Cleanup(func() { teardown(t) })
+
+ _, err := ns.AddNode(ctx, &inventorypb.AddNodeRequest{
+ Request: &inventorypb.AddNodeRequest_RemoteRds{
+ RemoteRds: &inventorypb.AddRemoteRDSNodeRequest{NodeName: "test1", Region: "test-region", Address: "test"},
+ },
+ })
+ require.NoError(t, err)
+
+ _, err = ns.AddNode(ctx, &inventorypb.AddNodeRequest{
+ Request: &inventorypb.AddNodeRequest_RemoteRds{
+ RemoteRds: &inventorypb.AddRemoteRDSNodeRequest{NodeName: "test2", Region: "test-region", Address: "test"},
+ },
+ })
+ expected := status.New(codes.AlreadyExists, `Node with instance "test" and region "test-region" already exists.`)
+ tests.AssertGRPCError(t, expected, err)
+ })
+
+ t.Run("AddHostnameNotUnique", func(t *testing.T) {
+ _, _, ns, teardown, ctx, _ := setup(t)
+ t.Cleanup(func() { teardown(t) })
+
+ _, err := ns.AddNode(ctx, &inventorypb.AddNodeRequest{
+ Request: &inventorypb.AddNodeRequest_Generic{
+ Generic: &inventorypb.AddGenericNodeRequest{NodeName: "test1", Address: "test"},
+ },
+ })
+ require.NoError(t, err)
+
+ _, err = ns.AddNode(ctx, &inventorypb.AddNodeRequest{
+ Request: &inventorypb.AddNodeRequest_Generic{
+ Generic: &inventorypb.AddGenericNodeRequest{NodeName: "test2", Address: "test"},
+ },
+ })
+ require.NoError(t, err)
+ })
+
+ t.Run("AddNameEmpty", func(t *testing.T) {
+ _, _, ns, teardown, ctx, _ := setup(t)
+ t.Cleanup(func() { teardown(t) })
+
+ _, err := ns.AddNode(ctx,
+ &inventorypb.AddNodeRequest{
+ Request: &inventorypb.AddNodeRequest_Generic{
+ Generic: &inventorypb.AddGenericNodeRequest{NodeName: ""},
+ },
+ },
+ )
+ tests.AssertGRPCError(t, status.New(codes.InvalidArgument, `Empty Node name.`), err)
+ })
+
+ t.Run("AddNameNotUnique", func(t *testing.T) {
+ _, _, ns, teardown, ctx, _ := setup(t)
+ t.Cleanup(func() { teardown(t) })
+
+ _, err := ns.AddNode(ctx, &inventorypb.AddNodeRequest{
+ Request: &inventorypb.AddNodeRequest_Generic{
+ Generic: &inventorypb.AddGenericNodeRequest{NodeName: "test", Address: "test"},
+ },
+ })
+ require.NoError(t, err)
+
+ _, err = ns.AddNode(ctx, &inventorypb.AddNodeRequest{
+ Request: &inventorypb.AddNodeRequest_Remote{
+ Remote: &inventorypb.AddRemoteNodeRequest{NodeName: "test"},
+ },
+ })
+ tests.AssertGRPCError(t, status.New(codes.AlreadyExists, `Node with name "test" already exists.`), err)
+ })
+}
diff --git a/managed/services/inventory/services.go b/managed/services/inventory/services.go
index 885300bb2f..89e6d3b966 100644
--- a/managed/services/inventory/services.go
+++ b/managed/services/inventory/services.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/inventory/services_test.go b/managed/services/inventory/services_test.go
index ad5549a00c..40f0d75d0b 100644
--- a/managed/services/inventory/services_test.go
+++ b/managed/services/inventory/services_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -104,6 +104,7 @@ func TestServices(t *testing.T) {
expectedService := &inventorypb.MySQLService{
ServiceId: "/service_id/00000000-0000-4000-8000-000000000005",
ServiceName: "test-mysql",
+ Cluster: "test-mysql",
NodeId: models.PMMServerNodeID,
Address: "127.0.0.1",
Port: 3306,
@@ -259,6 +260,7 @@ func TestServices(t *testing.T) {
expectedService := &inventorypb.MySQLService{
ServiceId: "/service_id/00000000-0000-4000-8000-000000000005",
ServiceName: "test-mysql-socket",
+ Cluster: "test-mysql-socket",
NodeId: models.PMMServerNodeID,
Socket: "/var/run/mysqld/mysqld.sock",
}
@@ -333,6 +335,7 @@ func TestServices(t *testing.T) {
expectedMongoDBService := &inventorypb.MongoDBService{
ServiceId: "/service_id/00000000-0000-4000-8000-000000000005",
ServiceName: "test-mongo",
+ Cluster: "test-mongo",
NodeId: models.PMMServerNodeID,
Address: "127.0.0.1",
Port: 27017,
@@ -374,6 +377,7 @@ func TestServices(t *testing.T) {
expectedPostgreSQLService := &inventorypb.PostgreSQLService{
ServiceId: "/service_id/00000000-0000-4000-8000-000000000005",
ServiceName: "test-postgres",
+ Cluster: "test-postgres",
DatabaseName: "postgres",
NodeId: models.PMMServerNodeID,
Address: "127.0.0.1",
@@ -414,6 +418,7 @@ func TestServices(t *testing.T) {
expectedPostgreSQLService := &inventorypb.PostgreSQLService{
ServiceId: "/service_id/00000000-0000-4000-8000-000000000005",
ServiceName: "test-postgres",
+ Cluster: "test-postgres",
DatabaseName: "postgres",
NodeId: models.PMMServerNodeID,
Socket: "/var/run/postgresql",
@@ -492,6 +497,7 @@ func TestServices(t *testing.T) {
expectedProxySQLService := &inventorypb.ProxySQLService{
ServiceId: "/service_id/00000000-0000-4000-8000-000000000005",
ServiceName: "test-proxysql",
+ Cluster: "test-proxysql",
NodeId: models.PMMServerNodeID,
Address: "127.0.0.1",
Port: 6033,
@@ -531,6 +537,7 @@ func TestServices(t *testing.T) {
expectedService := &inventorypb.ProxySQLService{
ServiceId: "/service_id/00000000-0000-4000-8000-000000000005",
ServiceName: "test-proxysql-socket",
+ Cluster: "test-proxysql-socket",
NodeId: models.PMMServerNodeID,
Socket: "/tmp/proxysql.sock",
}
@@ -602,6 +609,7 @@ func TestServices(t *testing.T) {
expectedHAProxyService := &inventorypb.HAProxyService{
ServiceId: "/service_id/00000000-0000-4000-8000-000000000005",
ServiceName: "test-haproxy-service",
+ Cluster: "test-haproxy-service",
NodeId: models.PMMServerNodeID,
}
assert.Equal(t, expectedHAProxyService, actualHAProxyService)
@@ -639,6 +647,7 @@ func TestServices(t *testing.T) {
expectedExternalService := &inventorypb.ExternalService{
ServiceId: "/service_id/00000000-0000-4000-8000-000000000005",
ServiceName: "test-external-service",
+ Cluster: "test-external-service",
NodeId: models.PMMServerNodeID,
Group: "external",
}
@@ -730,6 +739,7 @@ func TestServices(t *testing.T) {
expectedService := &inventorypb.MongoDBService{
ServiceId: "/service_id/00000000-0000-4000-8000-000000000005",
ServiceName: "test-mongodb-socket",
+ Cluster: "test-mongodb-socket",
NodeId: models.PMMServerNodeID,
Socket: "/tmp/mongodb-27017.sock",
}
diff --git a/managed/services/management/agent.go b/managed/services/management/agent.go
index 645c31c7f9..b501440cd5 100644
--- a/managed/services/management/agent.go
+++ b/managed/services/management/agent.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/agent_test.go b/managed/services/management/agent_test.go
index c566b911f7..d88718ba99 100644
--- a/managed/services/management/agent_test.go
+++ b/managed/services/management/agent_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/alerting/deps.go b/managed/services/management/alerting/deps.go
index 6b21b5387c..42ea52543c 100644
--- a/managed/services/management/alerting/deps.go
+++ b/managed/services/management/alerting/deps.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/alerting/service.go b/managed/services/management/alerting/service.go
index 47e2f23fe3..3c5aca955f 100644
--- a/managed/services/management/alerting/service.go
+++ b/managed/services/management/alerting/service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/alerting/service_test.go b/managed/services/management/alerting/service_test.go
index 37de5b37a2..812637ca9f 100644
--- a/managed/services/management/alerting/service_test.go
+++ b/managed/services/management/alerting/service_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/annotation.go b/managed/services/management/annotation.go
index 1888130b33..26222cf541 100644
--- a/managed/services/management/annotation.go
+++ b/managed/services/management/annotation.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/annotation_test.go b/managed/services/management/annotation_test.go
index 386bedb80c..977a278ae4 100644
--- a/managed/services/management/annotation_test.go
+++ b/managed/services/management/annotation_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/azure_database.go b/managed/services/management/azure_database.go
index c305a24c58..dda84b4fae 100644
--- a/managed/services/management/azure_database.go
+++ b/managed/services/management/azure_database.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/backup/artifacts_service.go b/managed/services/management/backup/artifacts_service.go
index e278f6dc34..3f4d212dfc 100644
--- a/managed/services/management/backup/artifacts_service.go
+++ b/managed/services/management/backup/artifacts_service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/backup/artifacts_service_test.go b/managed/services/management/backup/artifacts_service_test.go
index 9dddfd29ae..a60afc3fe6 100644
--- a/managed/services/management/backup/artifacts_service_test.go
+++ b/managed/services/management/backup/artifacts_service_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/backup/backups_service.go b/managed/services/management/backup/backups_service.go
index e55bfaacf8..73601293fc 100644
--- a/managed/services/management/backup/backups_service.go
+++ b/managed/services/management/backup/backups_service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/backup/backups_service_test.go b/managed/services/management/backup/backups_service_test.go
index e1afdd22a0..07fdd1531f 100644
--- a/managed/services/management/backup/backups_service_test.go
+++ b/managed/services/management/backup/backups_service_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/backup/deps.go b/managed/services/management/backup/deps.go
index 5b8b794122..a8493dbe7a 100644
--- a/managed/services/management/backup/deps.go
+++ b/managed/services/management/backup/deps.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/backup/locations_service.go b/managed/services/management/backup/locations_service.go
index 9b64c835e6..a81dca8aa0 100644
--- a/managed/services/management/backup/locations_service.go
+++ b/managed/services/management/backup/locations_service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/backup/locations_service_test.go b/managed/services/management/backup/locations_service_test.go
index 00bcb2108c..b8e39f107a 100644
--- a/managed/services/management/backup/locations_service_test.go
+++ b/managed/services/management/backup/locations_service_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/backup/restore_history_service.go b/managed/services/management/backup/restore_history_service.go
index e54ee8c95a..1c901fc5d6 100644
--- a/managed/services/management/backup/restore_history_service.go
+++ b/managed/services/management/backup/restore_history_service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/checks.go b/managed/services/management/checks.go
index 999e63b733..d1d8049c2b 100644
--- a/managed/services/management/checks.go
+++ b/managed/services/management/checks.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/checks_test.go b/managed/services/management/checks_test.go
index 27fca1950b..bd2e5697d1 100644
--- a/managed/services/management/checks_test.go
+++ b/managed/services/management/checks_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/common/common.go b/managed/services/management/common/common.go
index 6dae1f8719..9697e70451 100644
--- a/managed/services/management/common/common.go
+++ b/managed/services/management/common/common.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/dbaas/components_service.go b/managed/services/management/dbaas/components_service.go
index ffa549968a..e33497aabe 100644
--- a/managed/services/management/dbaas/components_service.go
+++ b/managed/services/management/dbaas/components_service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/dbaas/components_service_test.go b/managed/services/management/dbaas/components_service_test.go
index 8d5399bf9e..3a8198301c 100644
--- a/managed/services/management/dbaas/components_service_test.go
+++ b/managed/services/management/dbaas/components_service_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/dbaas/db_cluster_service.go b/managed/services/management/dbaas/db_cluster_service.go
index 3746727b5c..fd42534e5e 100644
--- a/managed/services/management/dbaas/db_cluster_service.go
+++ b/managed/services/management/dbaas/db_cluster_service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/dbaas/db_cluster_service_test.go b/managed/services/management/dbaas/db_cluster_service_test.go
index 88a736f21c..8afa320443 100644
--- a/managed/services/management/dbaas/db_cluster_service_test.go
+++ b/managed/services/management/dbaas/db_cluster_service_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/dbaas/dbaas_initializer.go b/managed/services/management/dbaas/dbaas_initializer.go
index f8b10b6529..155570e388 100644
--- a/managed/services/management/dbaas/dbaas_initializer.go
+++ b/managed/services/management/dbaas/dbaas_initializer.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/dbaas/deps.go b/managed/services/management/dbaas/deps.go
index 84509c0236..3f9be6d5f5 100644
--- a/managed/services/management/dbaas/deps.go
+++ b/managed/services/management/dbaas/deps.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/dbaas/kube_clients.go b/managed/services/management/dbaas/kube_clients.go
index c6328b4f06..305cf55c7e 100644
--- a/managed/services/management/dbaas/kube_clients.go
+++ b/managed/services/management/dbaas/kube_clients.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/dbaas/kubeconfig_test.go b/managed/services/management/dbaas/kubeconfig_test.go
index 4e71660870..670ae780f3 100644
--- a/managed/services/management/dbaas/kubeconfig_test.go
+++ b/managed/services/management/dbaas/kubeconfig_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/dbaas/kubernetes_server.go b/managed/services/management/dbaas/kubernetes_server.go
index fcb9ed9aa6..5a72cb79e5 100644
--- a/managed/services/management/dbaas/kubernetes_server.go
+++ b/managed/services/management/dbaas/kubernetes_server.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/dbaas/kubernetes_server_test.go b/managed/services/management/dbaas/kubernetes_server_test.go
index a1d21b60a9..5794a27d41 100644
--- a/managed/services/management/dbaas/kubernetes_server_test.go
+++ b/managed/services/management/dbaas/kubernetes_server_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/dbaas/logs_service.go b/managed/services/management/dbaas/logs_service.go
index 6cef57780c..0609f58d7a 100644
--- a/managed/services/management/dbaas/logs_service.go
+++ b/managed/services/management/dbaas/logs_service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/dbaas/psmdb_cluster_service.go b/managed/services/management/dbaas/psmdb_cluster_service.go
index 66365ae9b9..7a9fdea706 100644
--- a/managed/services/management/dbaas/psmdb_cluster_service.go
+++ b/managed/services/management/dbaas/psmdb_cluster_service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/dbaas/psmdb_cluster_service_test.go b/managed/services/management/dbaas/psmdb_cluster_service_test.go
index f9791dfe9c..b406675433 100644
--- a/managed/services/management/dbaas/psmdb_cluster_service_test.go
+++ b/managed/services/management/dbaas/psmdb_cluster_service_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/dbaas/pxc_cluster_service.go b/managed/services/management/dbaas/pxc_cluster_service.go
index e9b007a197..de510c9998 100644
--- a/managed/services/management/dbaas/pxc_cluster_service.go
+++ b/managed/services/management/dbaas/pxc_cluster_service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/dbaas/pxc_cluster_service_test.go b/managed/services/management/dbaas/pxc_cluster_service_test.go
index da64a7f261..d5da41acfd 100644
--- a/managed/services/management/dbaas/pxc_cluster_service_test.go
+++ b/managed/services/management/dbaas/pxc_cluster_service_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/dbaas/template_service.go b/managed/services/management/dbaas/template_service.go
index 527e667857..8680164533 100644
--- a/managed/services/management/dbaas/template_service.go
+++ b/managed/services/management/dbaas/template_service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/dbaas/version_service_client.go b/managed/services/management/dbaas/version_service_client.go
index db0fb82cb7..934d9bebba 100644
--- a/managed/services/management/dbaas/version_service_client.go
+++ b/managed/services/management/dbaas/version_service_client.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/dbaas/version_service_client_test.go b/managed/services/management/dbaas/version_service_client_test.go
index 3eb41bff61..fed2e3037e 100644
--- a/managed/services/management/dbaas/version_service_client_test.go
+++ b/managed/services/management/dbaas/version_service_client_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/deps.go b/managed/services/management/deps.go
index b87ae574e3..9849a0c2f6 100644
--- a/managed/services/management/deps.go
+++ b/managed/services/management/deps.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/external.go b/managed/services/management/external.go
index 933e02d990..7bb3253f8c 100644
--- a/managed/services/management/external.go
+++ b/managed/services/management/external.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/grpc/actions_server.go b/managed/services/management/grpc/actions_server.go
index 64b59b0b70..cfcfdac444 100644
--- a/managed/services/management/grpc/actions_server.go
+++ b/managed/services/management/grpc/actions_server.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/grpc/annotation_server.go b/managed/services/management/grpc/annotation_server.go
index ed9da9dea7..47fba492bd 100644
--- a/managed/services/management/grpc/annotation_server.go
+++ b/managed/services/management/grpc/annotation_server.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/grpc/mongodb_server.go b/managed/services/management/grpc/mongodb_server.go
index c6c3a41091..8836f2f230 100644
--- a/managed/services/management/grpc/mongodb_server.go
+++ b/managed/services/management/grpc/mongodb_server.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/grpc/mysql_server.go b/managed/services/management/grpc/mysql_server.go
index 754770bbbc..43048d48cc 100644
--- a/managed/services/management/grpc/mysql_server.go
+++ b/managed/services/management/grpc/mysql_server.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/grpc/node_server.go b/managed/services/management/grpc/node_server.go
index 57e54e5a30..e8922fc62c 100644
--- a/managed/services/management/grpc/node_server.go
+++ b/managed/services/management/grpc/node_server.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/grpc/postgresql_server.go b/managed/services/management/grpc/postgresql_server.go
index cad7f99a94..80aa8de52a 100644
--- a/managed/services/management/grpc/postgresql_server.go
+++ b/managed/services/management/grpc/postgresql_server.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/grpc/proxysql_server.go b/managed/services/management/grpc/proxysql_server.go
index 2394827148..d548cb62bc 100644
--- a/managed/services/management/grpc/proxysql_server.go
+++ b/managed/services/management/grpc/proxysql_server.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/haproxy.go b/managed/services/management/haproxy.go
index a3763f9749..320b7bd1b5 100644
--- a/managed/services/management/haproxy.go
+++ b/managed/services/management/haproxy.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/ia/alerts_service.go b/managed/services/management/ia/alerts_service.go
index 575d3c687f..d1809ab0cb 100644
--- a/managed/services/management/ia/alerts_service.go
+++ b/managed/services/management/ia/alerts_service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/ia/alerts_service_test.go b/managed/services/management/ia/alerts_service_test.go
index 1ca2a3e25d..21e452dcce 100644
--- a/managed/services/management/ia/alerts_service_test.go
+++ b/managed/services/management/ia/alerts_service_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/ia/channels_service.go b/managed/services/management/ia/channels_service.go
index fe31991d66..96990bc337 100644
--- a/managed/services/management/ia/channels_service.go
+++ b/managed/services/management/ia/channels_service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/ia/common.go b/managed/services/management/ia/common.go
index 4f219fa67c..73af3400e0 100644
--- a/managed/services/management/ia/common.go
+++ b/managed/services/management/ia/common.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/ia/deps.go b/managed/services/management/ia/deps.go
index 1a9d39b33d..02ed8f676c 100644
--- a/managed/services/management/ia/deps.go
+++ b/managed/services/management/ia/deps.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/ia/rules_service.go b/managed/services/management/ia/rules_service.go
index 7ea8f672a1..e6034cce40 100644
--- a/managed/services/management/ia/rules_service.go
+++ b/managed/services/management/ia/rules_service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/ia/rules_service_test.go b/managed/services/management/ia/rules_service_test.go
index f264e6c5c5..a925fd51d7 100644
--- a/managed/services/management/ia/rules_service_test.go
+++ b/managed/services/management/ia/rules_service_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/management.go b/managed/services/management/management.go
index e45bbc22fd..fcf312062c 100644
--- a/managed/services/management/management.go
+++ b/managed/services/management/management.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/mongodb.go b/managed/services/management/mongodb.go
index de7d063415..e016d47aa5 100644
--- a/managed/services/management/mongodb.go
+++ b/managed/services/management/mongodb.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/mysql.go b/managed/services/management/mysql.go
index 5493bbdffb..e67f05eced 100644
--- a/managed/services/management/mysql.go
+++ b/managed/services/management/mysql.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/node.go b/managed/services/management/node.go
index 0c17d5e3ea..f8a43a2220 100644
--- a/managed/services/management/node.go
+++ b/managed/services/management/node.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/node_mgmt.go b/managed/services/management/node_mgmt.go
index 694706b116..cacc35a460 100644
--- a/managed/services/management/node_mgmt.go
+++ b/managed/services/management/node_mgmt.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/node_mgmt_test.go b/managed/services/management/node_mgmt_test.go
index bde08a60d7..92ca762c90 100644
--- a/managed/services/management/node_mgmt_test.go
+++ b/managed/services/management/node_mgmt_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/node_test.go b/managed/services/management/node_test.go
index fe2c67281e..8f6bcf9f14 100644
--- a/managed/services/management/node_test.go
+++ b/managed/services/management/node_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/postgresql.go b/managed/services/management/postgresql.go
index dfdf559fa4..536d593b42 100644
--- a/managed/services/management/postgresql.go
+++ b/managed/services/management/postgresql.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/proxysql.go b/managed/services/management/proxysql.go
index 88b883bfff..d356b8b321 100644
--- a/managed/services/management/proxysql.go
+++ b/managed/services/management/proxysql.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/rds.go b/managed/services/management/rds.go
index 4b4b2723d0..a669e2c472 100644
--- a/managed/services/management/rds.go
+++ b/managed/services/management/rds.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/rds_test.go b/managed/services/management/rds_test.go
index a710c465b4..3cac4518e4 100644
--- a/managed/services/management/rds_test.go
+++ b/managed/services/management/rds_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/role.go b/managed/services/management/role.go
index c8164c8e52..2448ee88dc 100644
--- a/managed/services/management/role.go
+++ b/managed/services/management/role.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/role_test.go b/managed/services/management/role_test.go
index 1c3ee4dfcc..5aeaa57c24 100644
--- a/managed/services/management/role_test.go
+++ b/managed/services/management/role_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/service.go b/managed/services/management/service.go
index 4d9a49f68a..e659a31375 100644
--- a/managed/services/management/service.go
+++ b/managed/services/management/service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/service_mgmt.go b/managed/services/management/service_mgmt.go
index aefa0dcc63..73f3febf5d 100644
--- a/managed/services/management/service_mgmt.go
+++ b/managed/services/management/service_mgmt.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/service_mgmt_test.go b/managed/services/management/service_mgmt_test.go
index c6e34c290f..29f783428d 100644
--- a/managed/services/management/service_mgmt_test.go
+++ b/managed/services/management/service_mgmt_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/management/service_test.go b/managed/services/management/service_test.go
index 8167f91520..0c4c535d9d 100644
--- a/managed/services/management/service_test.go
+++ b/managed/services/management/service_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/minio/client.go b/managed/services/minio/client.go
index 103ac3b19d..037d6c84cb 100644
--- a/managed/services/minio/client.go
+++ b/managed/services/minio/client.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/platform/deps.go b/managed/services/platform/deps.go
index 501299f19a..ce6e4c2f09 100644
--- a/managed/services/platform/deps.go
+++ b/managed/services/platform/deps.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/platform/platform.go b/managed/services/platform/platform.go
index 5af433c5db..4b75510ed9 100644
--- a/managed/services/platform/platform.go
+++ b/managed/services/platform/platform.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/preconditions.go b/managed/services/preconditions.go
index 41e06cf179..8df82edd78 100644
--- a/managed/services/preconditions.go
+++ b/managed/services/preconditions.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -117,7 +117,9 @@ func CheckArtifactOverlapping(q *reform.Querier, serviceID, locationID, folder s
}
for _, artifact := range artifacts {
- if artifact.ServiceID != serviceID {
+ // We skip artifacts made on services that are no longer exists in PMM. However, in future we can improve this function
+ // by storing required information right in artifact model.
+ if artifact.ServiceID != "" && artifact.ServiceID != serviceID {
svc, err := models.FindServiceByID(q, artifact.ServiceID)
if err != nil {
return err
diff --git a/managed/services/preconditions_test.go b/managed/services/preconditions_test.go
index ba73f4e597..259b09e4db 100644
--- a/managed/services/preconditions_test.go
+++ b/managed/services/preconditions_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/qan/client.go b/managed/services/qan/client.go
index b6adaef8d7..b84f4b87e8 100644
--- a/managed/services/qan/client.go
+++ b/managed/services/qan/client.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/qan/client_test.go b/managed/services/qan/client_test.go
index e48d5c7503..dce12fce95 100644
--- a/managed/services/qan/client_test.go
+++ b/managed/services/qan/client_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -185,6 +185,7 @@ func TestClient(t *testing.T) {
MQueryTimeSum: 1234,
ServiceId: "/service_id/014647c3-b2f5-44eb-94f4-d943260a968c",
ServiceName: "test-mysql",
+ Cluster: "test-mysql",
ServiceType: "mysql",
NodeId: "/node_id/cc663f36-18ca-40a1-aea9-c6310bb4738d",
NodeName: "test-generic-node",
@@ -254,6 +255,7 @@ func TestClient(t *testing.T) {
NumQueries: 1,
ServiceId: "/service_id/1fce2502-ecc7-46d4-968b-18d7907f2543",
ServiceName: "test-mongodb",
+ Cluster: "test-mongodb",
ServiceType: "mongodb",
NodeId: "/node_id/cc663f36-18ca-40a1-aea9-c6310bb4738d",
NodeName: "test-generic-node",
@@ -352,6 +354,7 @@ func TestClient(t *testing.T) {
MQueryTimeCnt: 1,
MQueryTimeSum: 55,
ServiceName: "test-postgresql",
+ Cluster: "test-postgresql",
ServiceType: "postgresql",
ServiceId: "/service_id/9cffbdd4-3cd2-47f8-a5f9-a749c3d5fee1",
NodeId: "/node_id/cc663f36-18ca-40a1-aea9-c6310bb4738d",
@@ -492,6 +495,7 @@ func TestClientPerformance(t *testing.T) {
expectedBuckets[i] = &qanpb.MetricsBucket{
Queryid: fmt.Sprintf("bucket %d", i),
ServiceName: "test-mysql",
+ Cluster: "test-mysql",
NodeId: "pmm-server",
NodeName: "pmm-server",
NodeType: "generic",
diff --git a/managed/services/qan/deps.go b/managed/services/qan/deps.go
index f745e18e53..77ce35a6e6 100644
--- a/managed/services/qan/deps.go
+++ b/managed/services/qan/deps.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/scheduler/deps.go b/managed/services/scheduler/deps.go
index 0820f524b5..e0faed3bbf 100644
--- a/managed/services/scheduler/deps.go
+++ b/managed/services/scheduler/deps.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/scheduler/scheduler.go b/managed/services/scheduler/scheduler.go
index 127416d724..bce97c3832 100644
--- a/managed/services/scheduler/scheduler.go
+++ b/managed/services/scheduler/scheduler.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/scheduler/scheduler_test.go b/managed/services/scheduler/scheduler_test.go
index d71eb2ad35..0967c34b77 100644
--- a/managed/services/scheduler/scheduler_test.go
+++ b/managed/services/scheduler/scheduler_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/scheduler/task.go b/managed/services/scheduler/task.go
index c277623822..0a26b869ec 100644
--- a/managed/services/scheduler/task.go
+++ b/managed/services/scheduler/task.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/scheduler/task_test.go b/managed/services/scheduler/task_test.go
index a83e80bcb5..c08b65025f 100644
--- a/managed/services/scheduler/task_test.go
+++ b/managed/services/scheduler/task_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/server/aws_instance_checker.go b/managed/services/server/aws_instance_checker.go
index a233eb4ea3..7b95abbaf1 100644
--- a/managed/services/server/aws_instance_checker.go
+++ b/managed/services/server/aws_instance_checker.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/server/aws_instance_checker_test.go b/managed/services/server/aws_instance_checker_test.go
index a82df34a22..86888b9028 100644
--- a/managed/services/server/aws_instance_checker_test.go
+++ b/managed/services/server/aws_instance_checker_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/server/deps.go b/managed/services/server/deps.go
index 3eef78b54a..d7c139830b 100644
--- a/managed/services/server/deps.go
+++ b/managed/services/server/deps.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/server/server.go b/managed/services/server/server.go
index 08bec308bc..84c8d67ae1 100644
--- a/managed/services/server/server.go
+++ b/managed/services/server/server.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/server/server_test.go b/managed/services/server/server_test.go
index 004df80387..0ffec40532 100644
--- a/managed/services/server/server_test.go
+++ b/managed/services/server/server_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/supervisord/deps.go b/managed/services/supervisord/deps.go
new file mode 100644
index 0000000000..9de477c334
--- /dev/null
+++ b/managed/services/supervisord/deps.go
@@ -0,0 +1,25 @@
+// Copyright (C) 2023 Percona LLC
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+
+package supervisord
+
+import "net/url"
+
+// victoriaMetricsParams is a subset of methods of models.VMParams used by this package.
+// We use it instead of real type to avoid dependency cycle.
+type victoriaMetricsParams interface {
+ ExternalVM() bool
+ URLFor(path string) (*url.URL, error)
+}
diff --git a/managed/services/supervisord/devcontainer_test.go b/managed/services/supervisord/devcontainer_test.go
index e3f0992f0a..6a545e7ec9 100644
--- a/managed/services/supervisord/devcontainer_test.go
+++ b/managed/services/supervisord/devcontainer_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -112,7 +112,9 @@ func TestDevContainer(t *testing.T) {
t.Run("UpdateConfiguration", func(t *testing.T) {
// logrus.SetLevel(logrus.DebugLevel)
checker := NewPMMUpdateChecker(logrus.WithField("test", t.Name()))
- vmParams := &models.VictoriaMetricsParams{}
+ vmParams, err := models.NewVictoriaMetricsParams(models.BasePrometheusConfigPath, models.VMBaseURL)
+ require.NoError(t, err)
+
s := New("/etc/supervisord.d", checker, vmParams, models.PGParams{}, gRPCMessageMaxSize)
require.NotEmpty(t, s.supervisorctlPath)
diff --git a/managed/services/supervisord/logs.go b/managed/services/supervisord/logs.go
index 7eb802fae3..0445ab97cd 100644
--- a/managed/services/supervisord/logs.go
+++ b/managed/services/supervisord/logs.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -59,14 +59,16 @@ type fileContent struct {
type Logs struct {
pmmVersion string
pmmUpdateChecker *PMMUpdateChecker
+ vmParams victoriaMetricsParams
}
// NewLogs creates a new Logs service.
// The number of last log lines to read is n.
-func NewLogs(pmmVersion string, pmmUpdateChecker *PMMUpdateChecker) *Logs {
+func NewLogs(pmmVersion string, pmmUpdateChecker *PMMUpdateChecker, vmParams victoriaMetricsParams) *Logs {
return &Logs{
pmmVersion: pmmVersion,
pmmUpdateChecker: pmmUpdateChecker,
+ vmParams: vmParams,
}
}
@@ -215,7 +217,7 @@ func (l *Logs) files(ctx context.Context, pprofConfig *PprofConfig) []fileConten
})
// add VictoriaMetrics targets
- b, err = readURL(ctx, "http://127.0.0.1:9090/prometheus/api/v1/targets")
+ b, err = l.victoriaMetricsTargets(ctx)
files = append(files, fileContent{
Name: "victoriametrics_targets.json",
Data: b,
@@ -280,6 +282,14 @@ func (l *Logs) files(ctx context.Context, pprofConfig *PprofConfig) []fileConten
return files
}
+func (l *Logs) victoriaMetricsTargets(ctx context.Context) ([]byte, error) {
+ targetsURL, err := l.vmParams.URLFor("api/v1/targets")
+ if err != nil {
+ return nil, err
+ }
+ return readURL(ctx, targetsURL.String())
+}
+
// readLog reads last lines (up to given number of lines and bytes) from given file,
// and returns them together with modification time.
func readLog(name string, maxLines int, maxBytes int64) ([]byte, time.Time, error) {
diff --git a/managed/services/supervisord/logs_test.go b/managed/services/supervisord/logs_test.go
index 118a42bac1..ebdf0f78f6 100644
--- a/managed/services/supervisord/logs_test.go
+++ b/managed/services/supervisord/logs_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -31,6 +31,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
+ "github.com/percona/pmm/managed/models"
"github.com/percona/pmm/utils/logger"
)
@@ -147,7 +148,9 @@ func TestAddAdminSummary(t *testing.T) {
func TestFiles(t *testing.T) {
checker := NewPMMUpdateChecker(logrus.WithField("test", t.Name()))
- l := NewLogs("2.4.5", checker)
+ params, err := models.NewVictoriaMetricsParams(models.BasePrometheusConfigPath, models.VMBaseURL)
+ require.NoError(t, err)
+ l := NewLogs("2.4.5", checker, params)
ctx := logger.Set(context.Background(), t.Name())
files := l.files(ctx, nil)
@@ -190,7 +193,9 @@ func TestZip(t *testing.T) {
t.Skip("FIXME")
checker := NewPMMUpdateChecker(logrus.WithField("test", t.Name()))
- l := NewLogs("2.4.5", checker)
+ params, err := models.NewVictoriaMetricsParams(models.BasePrometheusConfigPath, models.VMBaseURL)
+ require.NoError(t, err)
+ l := NewLogs("2.4.5", checker, params)
ctx := logger.Set(context.Background(), t.Name())
var buf bytes.Buffer
diff --git a/managed/services/supervisord/maintail.go b/managed/services/supervisord/maintail.go
index 1d61e30586..1dd1f62e4c 100644
--- a/managed/services/supervisord/maintail.go
+++ b/managed/services/supervisord/maintail.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/supervisord/maintail_test.go b/managed/services/supervisord/maintail_test.go
index 94603da72d..2e108a66f6 100644
--- a/managed/services/supervisord/maintail_test.go
+++ b/managed/services/supervisord/maintail_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/supervisord/pmm_config.go b/managed/services/supervisord/pmm_config.go
index 602b9a5546..fbe7f2b51f 100644
--- a/managed/services/supervisord/pmm_config.go
+++ b/managed/services/supervisord/pmm_config.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -166,7 +166,6 @@ priority = 14
command =
/usr/sbin/pmm-managed
--victoriametrics-config=/etc/victoriametrics-promscrape.yml
- --victoriametrics-url=http://127.0.0.1:9090/prometheus
--supervisord-config-dir=/etc/supervisord.d
autorestart = true
autostart = true
diff --git a/managed/services/supervisord/pmm_update_checker.go b/managed/services/supervisord/pmm_update_checker.go
index aa06b04048..fe062da7fe 100644
--- a/managed/services/supervisord/pmm_update_checker.go
+++ b/managed/services/supervisord/pmm_update_checker.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/supervisord/pprof_config.go b/managed/services/supervisord/pprof_config.go
index f4cc63ed62..52ab238389 100644
--- a/managed/services/supervisord/pprof_config.go
+++ b/managed/services/supervisord/pprof_config.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/supervisord/supervisord.go b/managed/services/supervisord/supervisord.go
index 29490ff66d..79335b5b77 100644
--- a/managed/services/supervisord/supervisord.go
+++ b/managed/services/supervisord/supervisord.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -394,20 +394,10 @@ func (s *Service) UpdateLog(offset uint32) ([]string, uint32, error) {
// reload asks supervisord to reload configuration.
func (s *Service) reload(name string) error {
- // See https://github.com/Supervisor/supervisor/issues/1264 for explanation
- // why we do reread + stop/remove/add.
-
if _, err := s.supervisorctl("reread"); err != nil {
s.l.Warn(err)
}
- if _, err := s.supervisorctl("stop", name); err != nil {
- s.l.Warn(err)
- }
- if _, err := s.supervisorctl("remove", name); err != nil {
- s.l.Warn(err)
- }
-
- _, err := s.supervisorctl("add", name)
+ _, err := s.supervisorctl("update", name)
return err
}
@@ -433,7 +423,10 @@ func (s *Service) marshalConfig(tmpl *template.Template, settings *models.Settin
"DataRetentionDays": int(settings.DataRetention.Hours() / 24),
"VMAlertFlags": s.vmParams.VMAlertFlags,
"VMDBCacheDisable": !settings.VictoriaMetrics.CacheEnabled,
+ "VMURL": s.vmParams.URL(),
+ "ExternalVM": s.vmParams.ExternalVM(),
"PerconaTestDbaas": settings.DBaaS.Enabled,
+ "InterfaceToBind": envvars.GetInterfaceToBind(),
"ClickhouseAddr": clickhouseAddr,
"ClickhouseDataSourceAddr": clickhouseDataSourceAddr,
"ClickhouseDatabase": clickhouseDatabase,
@@ -614,8 +607,6 @@ func (s *Service) RestartSupervisedService(serviceName string) error {
return err
}
-var interfaceToBind = envvars.GetInterfaceToBind()
-
//nolint:lll
var templates = template.Must(template.New("").Option("missingkey=error").Parse(`
{{define "dbaas-controller"}}
@@ -652,6 +643,7 @@ redirect_stderr = true
{{end}}
{{define "victoriametrics"}}
+{{- if not .ExternalVM }}
[program:victoriametrics]
priority = 7
command =
@@ -659,7 +651,7 @@ command =
--promscrape.config=/etc/victoriametrics-promscrape.yml
--retentionPeriod={{ .DataRetentionDays }}d
--storageDataPath=/srv/victoriametrics/data
- --httpListenAddr=` + interfaceToBind + `:9090
+ --httpListenAddr={{ .InterfaceToBind }}:9090
--search.disableCache={{ .VMDBCacheDisable }}
--search.maxQueryLen=1MB
--search.latencyOffset=5s
@@ -684,6 +676,7 @@ stdout_logfile = /srv/logs/victoriametrics.log
stdout_logfile_maxbytes = 10MB
stdout_logfile_backups = 3
redirect_stderr = true
+{{end -}}
{{end}}
{{define "vmalert"}}
@@ -694,14 +687,14 @@ command =
--notifier.url="{{ .AlertmanagerURL }}"
--notifier.basicAuth.password='{{ .AlertManagerPassword }}'
--notifier.basicAuth.username="{{ .AlertManagerUser }}"
- --external.url=http://localhost:9090/prometheus
- --datasource.url=http://127.0.0.1:9090/prometheus
- --remoteRead.url=http://127.0.0.1:9090/prometheus
+ --external.url={{ .VMURL }}
+ --datasource.url={{ .VMURL }}
+ --remoteRead.url={{ .VMURL }}
--remoteRead.ignoreRestoreErrors=false
- --remoteWrite.url=http://127.0.0.1:9090/prometheus
+ --remoteWrite.url={{ .VMURL }}
--rule=/srv/prometheus/rules/*.yml
--rule=/etc/ia/rules/*.yml
- --httpListenAddr=` + interfaceToBind + `:8880
+ --httpListenAddr={{ .InterfaceToBind }}:8880
{{- range $index, $param := .VMAlertFlags }}
{{ $param }}
{{- end }}
@@ -723,9 +716,9 @@ redirect_stderr = true
priority = 9
command =
/usr/sbin/vmproxy
- --target-url=http://127.0.0.1:9090/
+ --target-url={{ .VMURL }}
--listen-port=8430
- --listen-address=` + interfaceToBind + `
+ --listen-address={{ .InterfaceToBind }}
--header-name=X-Proxy-Filter
user = pmm
autorestart = true
@@ -749,7 +742,7 @@ command =
--storage.path=/srv/alertmanager/data
--data.retention={{ .DataRetentionHours }}h
--web.external-url=http://localhost:9093/alertmanager/
- --web.listen-address=` + interfaceToBind + `:9093
+ --web.listen-address={{ .InterfaceToBind }}:9093
--cluster.listen-address=""
user = pmm
autorestart = true
diff --git a/managed/services/supervisord/supervisord_test.go b/managed/services/supervisord/supervisord_test.go
index ed6e515ff5..6676406f39 100644
--- a/managed/services/supervisord/supervisord_test.go
+++ b/managed/services/supervisord/supervisord_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -36,7 +36,8 @@ func TestConfig(t *testing.T) {
pmmUpdateCheck := NewPMMUpdateChecker(logrus.WithField("component", "supervisord/pmm-update-checker_logs"))
configDir := filepath.Join("..", "..", "testdata", "supervisord.d")
- vmParams := &models.VictoriaMetricsParams{}
+ vmParams, err := models.NewVictoriaMetricsParams(models.BasePrometheusConfigPath, models.VMBaseURL)
+ require.NoError(t, err)
s := New(configDir, pmmUpdateCheck, vmParams, models.PGParams{}, gRPCMessageMaxSize)
settings := &models.Settings{
DataRetention: 30 * 24 * time.Hour,
@@ -68,7 +69,8 @@ func TestDBaaSController(t *testing.T) {
pmmUpdateCheck := NewPMMUpdateChecker(logrus.WithField("component", "supervisord/pmm-update-checker_logs"))
configDir := filepath.Join("..", "..", "testdata", "supervisord.d")
- vmParams := &models.VictoriaMetricsParams{}
+ vmParams, err := models.NewVictoriaMetricsParams(models.BasePrometheusConfigPath, models.VMBaseURL)
+ require.NoError(t, err)
s := New(configDir, pmmUpdateCheck, vmParams, models.PGParams{}, gRPCMessageMaxSize)
var tp *template.Template
diff --git a/managed/services/telemetry/config.go b/managed/services/telemetry/config.go
index 813d0fa437..40372b297f 100644
--- a/managed/services/telemetry/config.go
+++ b/managed/services/telemetry/config.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/telemetry/config_test.go b/managed/services/telemetry/config_test.go
index 33868fbf45..5d497688d0 100644
--- a/managed/services/telemetry/config_test.go
+++ b/managed/services/telemetry/config_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/telemetry/datasource_grafana_sqlitedb.go b/managed/services/telemetry/datasource_grafana_sqlitedb.go
index dfa6606a3b..689a3decfd 100644
--- a/managed/services/telemetry/datasource_grafana_sqlitedb.go
+++ b/managed/services/telemetry/datasource_grafana_sqlitedb.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/telemetry/datasource_grafana_sqlitedb_test.go b/managed/services/telemetry/datasource_grafana_sqlitedb_test.go
index 8edadf5ec8..4877c9263d 100644
--- a/managed/services/telemetry/datasource_grafana_sqlitedb_test.go
+++ b/managed/services/telemetry/datasource_grafana_sqlitedb_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/telemetry/datasource_pmmdb_select.go b/managed/services/telemetry/datasource_pmmdb_select.go
index 75bfdc9d7b..08e6485e36 100644
--- a/managed/services/telemetry/datasource_pmmdb_select.go
+++ b/managed/services/telemetry/datasource_pmmdb_select.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/telemetry/datasource_qandb_select.go b/managed/services/telemetry/datasource_qandb_select.go
index 0aa29a5778..3f80053282 100644
--- a/managed/services/telemetry/datasource_qandb_select.go
+++ b/managed/services/telemetry/datasource_qandb_select.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/telemetry/datasource_victoria_metrics.go b/managed/services/telemetry/datasource_victoria_metrics.go
index 2c406d4301..359032aa5c 100644
--- a/managed/services/telemetry/datasource_victoria_metrics.go
+++ b/managed/services/telemetry/datasource_victoria_metrics.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/telemetry/datasources.go b/managed/services/telemetry/datasources.go
index 6f116bc0e9..01f5e75996 100644
--- a/managed/services/telemetry/datasources.go
+++ b/managed/services/telemetry/datasources.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/telemetry/deps.go b/managed/services/telemetry/deps.go
index 465e757e95..e2f47d9100 100644
--- a/managed/services/telemetry/deps.go
+++ b/managed/services/telemetry/deps.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/telemetry/distribution_util.go b/managed/services/telemetry/distribution_util.go
index 28213dfd3b..7c27be9d3e 100644
--- a/managed/services/telemetry/distribution_util.go
+++ b/managed/services/telemetry/distribution_util.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/telemetry/distribution_util_test.go b/managed/services/telemetry/distribution_util_test.go
index 59c62bb5c9..cfd1ac5ae8 100644
--- a/managed/services/telemetry/distribution_util_test.go
+++ b/managed/services/telemetry/distribution_util_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/telemetry/telemetry.go b/managed/services/telemetry/telemetry.go
index be935063a2..81f2450215 100644
--- a/managed/services/telemetry/telemetry.go
+++ b/managed/services/telemetry/telemetry.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/telemetry/telemetry_test.go b/managed/services/telemetry/telemetry_test.go
index 477ff027d4..842b6e9233 100644
--- a/managed/services/telemetry/telemetry_test.go
+++ b/managed/services/telemetry/telemetry_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/telemetry/transform.go b/managed/services/telemetry/transform.go
index 95339047dd..b9ab4c7ac6 100644
--- a/managed/services/telemetry/transform.go
+++ b/managed/services/telemetry/transform.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/telemetry/transform_test.go b/managed/services/telemetry/transform_test.go
index 971e80ba4b..6e4e8f2cbc 100644
--- a/managed/services/telemetry/transform_test.go
+++ b/managed/services/telemetry/transform_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/types.go b/managed/services/types.go
index 04720ff2f5..9573660b91 100644
--- a/managed/services/types.go
+++ b/managed/services/types.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/user/user.go b/managed/services/user/user.go
index 0934c93809..c0dd0d5365 100644
--- a/managed/services/user/user.go
+++ b/managed/services/user/user.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/versioncache/versioncache.go b/managed/services/versioncache/versioncache.go
index aaa4d006b6..e51dfe6506 100644
--- a/managed/services/versioncache/versioncache.go
+++ b/managed/services/versioncache/versioncache.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/versioncache/versioncache_test.go b/managed/services/versioncache/versioncache_test.go
index d9fb69ce3f..1fadc032f6 100644
--- a/managed/services/versioncache/versioncache_test.go
+++ b/managed/services/versioncache/versioncache_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/victoriametrics/prometheus.go b/managed/services/victoriametrics/prometheus.go
index 304c20742c..717868763f 100644
--- a/managed/services/victoriametrics/prometheus.go
+++ b/managed/services/victoriametrics/prometheus.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/victoriametrics/scrape_configs.go b/managed/services/victoriametrics/scrape_configs.go
index 977a7b5dbd..e47df63673 100644
--- a/managed/services/victoriametrics/scrape_configs.go
+++ b/managed/services/victoriametrics/scrape_configs.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/victoriametrics/scrape_configs_test.go b/managed/services/victoriametrics/scrape_configs_test.go
index 7969431400..29d08272dc 100644
--- a/managed/services/victoriametrics/scrape_configs_test.go
+++ b/managed/services/victoriametrics/scrape_configs_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/victoriametrics/victoriametrics.go b/managed/services/victoriametrics/victoriametrics.go
index 13a468be87..746e3008d7 100644
--- a/managed/services/victoriametrics/victoriametrics.go
+++ b/managed/services/victoriametrics/victoriametrics.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -46,10 +46,6 @@ const (
updateBatchDelay = time.Second
configurationUpdateTimeout = 3 * time.Second
- // BasePrometheusConfigPath - basic path with prometheus config,
- // that user can mount to container.
- BasePrometheusConfigPath = "/srv/prometheus/prometheus.base.yml"
-
victoriametricsDir = "/srv/victoriametrics"
victoriametricsDataDir = "/srv/victoriametrics/data"
dirPerm = os.FileMode(0o775)
@@ -64,15 +60,15 @@ type Service struct {
baseURL *url.URL
client *http.Client
- baseConfigPath string // for testing
+ params *models.VictoriaMetricsParams
l *logrus.Entry
reloadCh chan struct{}
}
// NewVictoriaMetrics creates new VictoriaMetrics service.
-func NewVictoriaMetrics(scrapeConfigPath string, db *reform.DB, baseURL string, params *models.VictoriaMetricsParams) (*Service, error) {
- u, err := url.Parse(baseURL)
+func NewVictoriaMetrics(scrapeConfigPath string, db *reform.DB, params *models.VictoriaMetricsParams) (*Service, error) {
+ u, err := url.Parse(params.URL())
if err != nil {
return nil, errors.WithStack(err)
}
@@ -82,7 +78,7 @@ func NewVictoriaMetrics(scrapeConfigPath string, db *reform.DB, baseURL string,
db: db,
baseURL: u,
client: &http.Client{}, // TODO instrument with utils/irt; see vmalert package https://jira.percona.com/browse/PMM-7229
- baseConfigPath: params.BaseConfigPath,
+ params: params,
l: logrus.WithField("component", "victoriametrics"),
reloadCh: make(chan struct{}, 1),
}, nil
@@ -145,6 +141,9 @@ func (svc *Service) RequestConfigurationUpdate() {
// updateConfiguration updates VictoriaMetrics configuration.
func (svc *Service) updateConfiguration(ctx context.Context) error {
+ if svc.params.ExternalVM() {
+ return nil
+ }
start := time.Now()
defer func() {
if dur := time.Since(start); dur > time.Second {
@@ -152,8 +151,7 @@ func (svc *Service) updateConfiguration(ctx context.Context) error {
}
}()
- base := svc.loadBaseConfig()
- cfg, err := svc.marshalConfig(base)
+ cfg, err := svc.buildVMConfig()
if err != nil {
return err
}
@@ -161,6 +159,11 @@ func (svc *Service) updateConfiguration(ctx context.Context) error {
return svc.configAndReload(ctx, cfg)
}
+func (svc *Service) buildVMConfig() ([]byte, error) {
+ base := svc.loadBaseConfig()
+ return svc.marshalConfig(base)
+}
+
// reload asks VictoriaMetrics to reload configuration.
func (svc *Service) reload(ctx context.Context) error {
u := *svc.baseURL
@@ -189,10 +192,10 @@ func (svc *Service) reload(ctx context.Context) error {
// loadBaseConfig returns parsed base configuration file, or empty configuration on error.
func (svc *Service) loadBaseConfig() *config.Config {
- buf, err := os.ReadFile(svc.baseConfigPath)
+ buf, err := os.ReadFile(svc.params.BaseConfigPath)
if err != nil {
if !os.IsNotExist(err) {
- svc.l.Errorf("Failed to load base VictoriaMetrics config %s: %s", svc.baseConfigPath, err)
+ svc.l.Errorf("Failed to load base VictoriaMetrics config %s: %s", svc.params.BaseConfigPath, err)
}
return &config.Config{}
@@ -200,7 +203,7 @@ func (svc *Service) loadBaseConfig() *config.Config {
var cfg config.Config
if err := yaml.Unmarshal(buf, &cfg); err != nil {
- svc.l.Errorf("Failed to parse base VictoriaMetrics config %s: %s.", svc.baseConfigPath, err)
+ svc.l.Errorf("Failed to parse base VictoriaMetrics config %s: %s.", svc.params.BaseConfigPath, err)
return &config.Config{}
}
@@ -330,7 +333,10 @@ func (svc *Service) populateConfig(cfg *config.Config) error {
if cfg.GlobalConfig.ScrapeTimeout == 0 {
cfg.GlobalConfig.ScrapeTimeout = ScrapeTimeout(s.LR)
}
- cfg.ScrapeConfigs = append(cfg.ScrapeConfigs, scrapeConfigForVictoriaMetrics(s.HR))
+ cfg.ScrapeConfigs = append(cfg.ScrapeConfigs, scrapeConfigForVictoriaMetrics(svc.l, s.HR, svc.params))
+ if svc.params.ExternalVM() {
+ cfg.ScrapeConfigs = append(cfg.ScrapeConfigs, scrapeConfigForInternalVMAgent(s.HR, svc.baseURL.Host))
+ }
cfg.ScrapeConfigs = append(cfg.ScrapeConfigs, scrapeConfigForVMAlert(s.HR))
AddInternalServicesToScrape(cfg, s, settings.DBaaS.Enabled)
return AddScrapeConfigs(svc.l, cfg, tx.Querier, &s, nil, false)
@@ -338,17 +344,41 @@ func (svc *Service) populateConfig(cfg *config.Config) error {
}
// scrapeConfigForVictoriaMetrics returns scrape config for Victoria Metrics in Prometheus format.
-func scrapeConfigForVictoriaMetrics(interval time.Duration) *config.ScrapeConfig {
+func scrapeConfigForVictoriaMetrics(l *logrus.Entry, interval time.Duration, vmParams *models.VictoriaMetricsParams) *config.ScrapeConfig {
+ target, err := vmParams.URLFor("metrics")
+ if err != nil {
+ l.Errorf("couldn't parse relative path to victoria metrics: %q", err)
+ return nil
+ }
+
return &config.ScrapeConfig{
JobName: "victoriametrics",
ScrapeInterval: config.Duration(interval),
ScrapeTimeout: ScrapeTimeout(interval),
- MetricsPath: "/prometheus/metrics",
+ MetricsPath: target.Path,
ServiceDiscoveryConfig: config.ServiceDiscoveryConfig{
StaticConfigs: []*config.Group{
{
- Targets: []string{"127.0.0.1:9090"},
- Labels: map[string]string{"instance": "pmm-server"},
+ Targets: []string{target.Host},
+ Labels: map[string]string{"instance": models.PMMServerAgentID},
+ },
+ },
+ },
+ }
+}
+
+// scrapeConfigForInternalVMAgent returns scrape config for internal VM Agent in Prometheus format.
+func scrapeConfigForInternalVMAgent(interval time.Duration, target string) *config.ScrapeConfig {
+ return &config.ScrapeConfig{
+ JobName: "vmagent",
+ ScrapeInterval: config.Duration(interval),
+ ScrapeTimeout: ScrapeTimeout(interval),
+ MetricsPath: "/metrics",
+ ServiceDiscoveryConfig: config.ServiceDiscoveryConfig{
+ StaticConfigs: []*config.Group{
+ {
+ Targets: []string{target},
+ Labels: map[string]string{"instance": models.PMMServerAgentID},
},
},
},
@@ -375,6 +405,9 @@ func scrapeConfigForVMAlert(interval time.Duration) *config.ScrapeConfig {
// BuildScrapeConfigForVMAgent builds scrape configuration for given pmm-agent.
func (svc *Service) BuildScrapeConfigForVMAgent(pmmAgentID string) ([]byte, error) {
+ if pmmAgentID == models.PMMServerAgentID {
+ return svc.buildVMConfig()
+ }
var cfg config.Config
e := svc.db.InTransaction(func(tx *reform.TX) error {
settings, err := models.GetSettings(tx)
@@ -393,6 +426,10 @@ func (svc *Service) BuildScrapeConfigForVMAgent(pmmAgentID string) ([]byte, erro
// IsReady verifies that VictoriaMetrics works.
func (svc *Service) IsReady(ctx context.Context) error {
+ if svc.params.ExternalVM() {
+ svc.l.Debugf("External VM is used, VM healthcheck is skipped")
+ return nil
+ }
u := *svc.baseURL
u.Path = path.Join(u.Path, "health")
req, err := http.NewRequestWithContext(ctx, http.MethodGet, u.String(), nil)
diff --git a/managed/services/victoriametrics/victoriametrics_test.go b/managed/services/victoriametrics/victoriametrics_test.go
index 6eb19fcd9c..d6a7db56cb 100644
--- a/managed/services/victoriametrics/victoriametrics_test.go
+++ b/managed/services/victoriametrics/victoriametrics_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -43,8 +43,9 @@ func setup(t *testing.T) (*reform.DB, *Service, []byte) {
sqlDB := testdb.Open(t, models.SkipFixtures, nil)
db := reform.NewDB(sqlDB, postgresql.Dialect, reform.NewPrintfLogger(t.Logf))
- vmParams := &models.VictoriaMetricsParams{BaseConfigPath: "/srv/prometheus/prometheus.base.yml"}
- svc, err := NewVictoriaMetrics(configPath, db, "http://127.0.0.1:9090/prometheus/", vmParams)
+ vmParams, err := models.NewVictoriaMetricsParams(models.BasePrometheusConfigPath, models.VMBaseURL)
+ check.NoError(err)
+ svc, err := NewVictoriaMetrics(configPath, db, vmParams)
check.NoError(err)
original, err := os.ReadFile(configPath)
@@ -336,6 +337,7 @@ scrape_configs:
_service_label: bam
agent_id: /agent_id/cfec996c-4fe6-41d9-83cb-e1a3b1fe10a8
agent_type: mongodb_exporter
+ cluster: test-mongodb-noversion
instance: /agent_id/cfec996c-4fe6-41d9-83cb-e1a3b1fe10a8
node_id: /node_id/cc663f36-18ca-40a1-aea9-c6310bb4738d
node_name: test-generic-node
@@ -366,6 +368,7 @@ scrape_configs:
_service_label: bam
agent_id: /agent_id/ecd8995a-d479-4b4d-bfb7-865bac4ac2fb
agent_type: mongodb_exporter
+ cluster: test-mongodb
instance: /agent_id/ecd8995a-d479-4b4d-bfb7-865bac4ac2fb
node_id: /node_id/cc663f36-18ca-40a1-aea9-c6310bb4738d
node_name: test-generic-node
@@ -396,6 +399,7 @@ scrape_configs:
_service_label: bam
agent_id: /agent_id/ecd8995a-d479-4b4d-bfb7-865bac4ac2fb
agent_type: mongodb_exporter
+ cluster: test-mongodb
instance: /agent_id/ecd8995a-d479-4b4d-bfb7-865bac4ac2fb
node_id: /node_id/cc663f36-18ca-40a1-aea9-c6310bb4738d
node_name: test-generic-node
@@ -428,6 +432,7 @@ scrape_configs:
_service_label: bar
agent_id: /agent_id/75bb30d3-ef4a-4147-97a8-621a996611dd
agent_type: mysqld_exporter
+ cluster: test-mysql
instance: /agent_id/75bb30d3-ef4a-4147-97a8-621a996611dd
node_id: /node_id/cc663f36-18ca-40a1-aea9-c6310bb4738d
node_name: test-generic-node
@@ -465,6 +470,7 @@ scrape_configs:
_service_label: bar
agent_id: /agent_id/75bb30d3-ef4a-4147-97a8-621a996611dd
agent_type: mysqld_exporter
+ cluster: test-mysql
instance: /agent_id/75bb30d3-ef4a-4147-97a8-621a996611dd
node_id: /node_id/cc663f36-18ca-40a1-aea9-c6310bb4738d
node_name: test-generic-node
@@ -508,6 +514,7 @@ scrape_configs:
_service_label: bar
agent_id: /agent_id/75bb30d3-ef4a-4147-97a8-621a996611dd
agent_type: mysqld_exporter
+ cluster: test-mysql
instance: /agent_id/75bb30d3-ef4a-4147-97a8-621a996611dd
node_id: /node_id/cc663f36-18ca-40a1-aea9-c6310bb4738d
node_name: test-generic-node
@@ -540,6 +547,7 @@ scrape_configs:
_service_label: bar
agent_id: /agent_id/f9ab9f7b-5e53-4952-a2e7-ff25fb90fe6a
agent_type: mysqld_exporter
+ cluster: test-remote-mysql
instance: /agent_id/f9ab9f7b-5e53-4952-a2e7-ff25fb90fe6a
node_id: /node_id/4e2e07dc-40a1-18ca-aea9-d943260a9653
node_name: test-remote-node
@@ -577,6 +585,7 @@ scrape_configs:
_service_label: bar
agent_id: /agent_id/f9ab9f7b-5e53-4952-a2e7-ff25fb90fe6a
agent_type: mysqld_exporter
+ cluster: test-remote-mysql
instance: /agent_id/f9ab9f7b-5e53-4952-a2e7-ff25fb90fe6a
node_id: /node_id/4e2e07dc-40a1-18ca-aea9-d943260a9653
node_name: test-remote-node
@@ -620,6 +629,7 @@ scrape_configs:
_service_label: bar
agent_id: /agent_id/f9ab9f7b-5e53-4952-a2e7-ff25fb90fe6a
agent_type: mysqld_exporter
+ cluster: test-remote-mysql
instance: /agent_id/f9ab9f7b-5e53-4952-a2e7-ff25fb90fe6a
node_id: /node_id/4e2e07dc-40a1-18ca-aea9-d943260a9653
node_name: test-remote-node
@@ -652,6 +662,7 @@ scrape_configs:
_service_label: bar
agent_id: /agent_id/29e14468-d479-4b4d-bfb7-4ac2fb865bac
agent_type: postgres_exporter
+ cluster: test-postgresql
instance: /agent_id/29e14468-d479-4b4d-bfb7-4ac2fb865bac
node_id: /node_id/cc663f36-18ca-40a1-aea9-c6310bb4738d
node_name: test-generic-node
@@ -681,6 +692,7 @@ scrape_configs:
_service_label: bar
agent_id: /agent_id/29e14468-d479-4b4d-bfb7-4ac2fb865bac
agent_type: postgres_exporter
+ cluster: test-postgresql
instance: /agent_id/29e14468-d479-4b4d-bfb7-4ac2fb865bac
node_id: /node_id/cc663f36-18ca-40a1-aea9-c6310bb4738d
node_name: test-generic-node
@@ -710,6 +722,7 @@ scrape_configs:
_service_label: bar
agent_id: /agent_id/29e14468-d479-4b4d-bfb7-4ac2fb865bac
agent_type: postgres_exporter
+ cluster: test-postgresql
instance: /agent_id/29e14468-d479-4b4d-bfb7-4ac2fb865bac
node_id: /node_id/cc663f36-18ca-40a1-aea9-c6310bb4738d
node_name: test-generic-node
@@ -802,7 +815,7 @@ func TestBaseConfig(t *testing.T) {
db, svc, original := setup(t)
defer teardown(t, db, svc, original)
- svc.baseConfigPath = "../../testdata/victoriametrics/promscrape.base.yml"
+ svc.params.BaseConfigPath = "../../testdata/victoriametrics/promscrape.base.yml"
expected := strings.TrimSpace(`
# Managed by pmm-managed. DO NOT EDIT.
diff --git a/managed/services/vmalert/external_rules.go b/managed/services/vmalert/external_rules.go
index e87030895e..b60ff6d8e2 100644
--- a/managed/services/vmalert/external_rules.go
+++ b/managed/services/vmalert/external_rules.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/vmalert/init_test.go b/managed/services/vmalert/init_test.go
index 2399a45e94..d147f53360 100644
--- a/managed/services/vmalert/init_test.go
+++ b/managed/services/vmalert/init_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/vmalert/vmalert.go b/managed/services/vmalert/vmalert.go
index bc8c0f74b8..f5c86c03e0 100644
--- a/managed/services/vmalert/vmalert.go
+++ b/managed/services/vmalert/vmalert.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/services/vmalert/vmalert_test.go b/managed/services/vmalert/vmalert_test.go
index 47221fa94d..3d3da6afe9 100644
--- a/managed/services/vmalert/vmalert_test.go
+++ b/managed/services/vmalert/vmalert_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/testdata/supervisord.d/pmm-db_disabled.ini b/managed/testdata/supervisord.d/pmm-db_disabled.ini
index 210d822422..b45251ab1f 100644
--- a/managed/testdata/supervisord.d/pmm-db_disabled.ini
+++ b/managed/testdata/supervisord.d/pmm-db_disabled.ini
@@ -61,7 +61,6 @@ priority = 14
command =
/usr/sbin/pmm-managed
--victoriametrics-config=/etc/victoriametrics-promscrape.yml
- --victoriametrics-url=http://127.0.0.1:9090/prometheus
--supervisord-config-dir=/etc/supervisord.d
autorestart = true
autostart = true
diff --git a/managed/testdata/supervisord.d/pmm-db_enabled.ini b/managed/testdata/supervisord.d/pmm-db_enabled.ini
index df0fd59059..4d4ad4afd9 100644
--- a/managed/testdata/supervisord.d/pmm-db_enabled.ini
+++ b/managed/testdata/supervisord.d/pmm-db_enabled.ini
@@ -85,7 +85,6 @@ priority = 14
command =
/usr/sbin/pmm-managed
--victoriametrics-config=/etc/victoriametrics-promscrape.yml
- --victoriametrics-url=http://127.0.0.1:9090/prometheus
--supervisord-config-dir=/etc/supervisord.d
autorestart = true
autostart = true
diff --git a/managed/testdata/supervisord.d/vmalert.ini b/managed/testdata/supervisord.d/vmalert.ini
index e784596bcb..40f61b1d83 100644
--- a/managed/testdata/supervisord.d/vmalert.ini
+++ b/managed/testdata/supervisord.d/vmalert.ini
@@ -7,11 +7,11 @@ command =
--notifier.url="http://127.0.0.1:9093/alertmanager,https://external-alertmanager:6443/alerts"
--notifier.basicAuth.password=',"passw!,ord"'
--notifier.basicAuth.username=",external-user"
- --external.url=http://localhost:9090/prometheus
- --datasource.url=http://127.0.0.1:9090/prometheus
- --remoteRead.url=http://127.0.0.1:9090/prometheus
+ --external.url=http://127.0.0.1:9090/prometheus/
+ --datasource.url=http://127.0.0.1:9090/prometheus/
+ --remoteRead.url=http://127.0.0.1:9090/prometheus/
--remoteRead.ignoreRestoreErrors=false
- --remoteWrite.url=http://127.0.0.1:9090/prometheus
+ --remoteWrite.url=http://127.0.0.1:9090/prometheus/
--rule=/srv/prometheus/rules/*.yml
--rule=/etc/ia/rules/*.yml
--httpListenAddr=127.0.0.1:8880
diff --git a/managed/testdata/supervisord.d/vmproxy.ini b/managed/testdata/supervisord.d/vmproxy.ini
index 72acc05eaf..5654b85bc4 100644
--- a/managed/testdata/supervisord.d/vmproxy.ini
+++ b/managed/testdata/supervisord.d/vmproxy.ini
@@ -4,7 +4,7 @@
priority = 9
command =
/usr/sbin/vmproxy
- --target-url=http://127.0.0.1:9090/
+ --target-url=http://127.0.0.1:9090/prometheus/
--listen-port=8430
--listen-address=127.0.0.1
--header-name=X-Proxy-Filter
diff --git a/managed/utils/clean/clean.go b/managed/utils/clean/clean.go
index 8ca7e69aa6..2a319e165e 100644
--- a/managed/utils/clean/clean.go
+++ b/managed/utils/clean/clean.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/clean/clean_test.go b/managed/utils/clean/clean_test.go
index 8991b20850..95e2d6881e 100644
--- a/managed/utils/clean/clean_test.go
+++ b/managed/utils/clean/clean_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/collectors/collectors.go b/managed/utils/collectors/collectors.go
index f08905b150..66e464ff40 100644
--- a/managed/utils/collectors/collectors.go
+++ b/managed/utils/collectors/collectors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/depstests/depstests.go b/managed/utils/depstests/depstests.go
index dd08cf3750..f7b17754f1 100644
--- a/managed/utils/depstests/depstests.go
+++ b/managed/utils/depstests/depstests.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/depstests/protobuf_test.go b/managed/utils/depstests/protobuf_test.go
index 7d1ecce53c..472c9fc4e3 100644
--- a/managed/utils/depstests/protobuf_test.go
+++ b/managed/utils/depstests/protobuf_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/dir/dir.go b/managed/utils/dir/dir.go
index bd5f7ceb59..7714b9025c 100644
--- a/managed/utils/dir/dir.go
+++ b/managed/utils/dir/dir.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/dir/dir_test.go b/managed/utils/dir/dir_test.go
index e23f8cea3e..8c05ccafb7 100644
--- a/managed/utils/dir/dir_test.go
+++ b/managed/utils/dir/dir_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/envvars/parser.go b/managed/utils/envvars/parser.go
index 4bd4fc67f2..3412e95f23 100644
--- a/managed/utils/envvars/parser.go
+++ b/managed/utils/envvars/parser.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -42,6 +42,7 @@ const (
envEnableAccessControl = "ENABLE_RBAC"
envPlatformAPITimeout = "PERCONA_PLATFORM_API_TIMEOUT"
defaultPlatformAPITimeout = 30 * time.Second
+ ENVvmAgentPrefix = "VMAGENT_"
)
// InvalidDurationError invalid duration error.
@@ -156,6 +157,12 @@ func ParseEnvVars(envs []string) (envSettings *models.ChangeSettingsParams, errs
case "PMM_PUBLIC_ADDRESS":
envSettings.PMMPublicAddress = v
+ case "PMM_VM_URL":
+ _, err = url.Parse(v)
+ if err != nil {
+ err = fmt.Errorf("invalid value %q for environment variable %q", v, k)
+ }
+
case "NO_PROXY", "HTTP_PROXY", "HTTPS_PROXY":
continue
@@ -203,6 +210,11 @@ func ParseEnvVars(envs []string) (envSettings *models.ChangeSettingsParams, errs
continue
}
+ // skip VM Agents environment variables
+ if strings.HasPrefix(k, ENVvmAgentPrefix) {
+ continue
+ }
+
// skip supervisord environment variables
if strings.HasPrefix(k, "SUPERVISOR_") {
continue
diff --git a/managed/utils/envvars/parser_test.go b/managed/utils/envvars/parser_test.go
index 6bb5d91a83..2d823ea055 100644
--- a/managed/utils/envvars/parser_test.go
+++ b/managed/utils/envvars/parser_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/interceptors/grpc_extension.go b/managed/utils/interceptors/grpc_extension.go
index 16b8c4b584..19046adefc 100644
--- a/managed/utils/interceptors/grpc_extension.go
+++ b/managed/utils/interceptors/grpc_extension.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/interceptors/interceptors.go b/managed/utils/interceptors/interceptors.go
index a783a4ab2b..039de49143 100644
--- a/managed/utils/interceptors/interceptors.go
+++ b/managed/utils/interceptors/interceptors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/interceptors/middlewares.go b/managed/utils/interceptors/middlewares.go
index 6fa1a82837..fdd9e0d581 100644
--- a/managed/utils/interceptors/middlewares.go
+++ b/managed/utils/interceptors/middlewares.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/interceptors/service.go b/managed/utils/interceptors/service.go
index cf47ebd6de..86c5040e41 100644
--- a/managed/utils/interceptors/service.go
+++ b/managed/utils/interceptors/service.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/irt/logger.go b/managed/utils/irt/logger.go
index cbaa896b91..5a28fe31b0 100644
--- a/managed/utils/irt/logger.go
+++ b/managed/utils/irt/logger.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/irt/metrics.go b/managed/utils/irt/metrics.go
index e895325ee4..57a72ebc03 100644
--- a/managed/utils/irt/metrics.go
+++ b/managed/utils/irt/metrics.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/platform/client.go b/managed/utils/platform/client.go
index e6367d910d..c199e501e0 100644
--- a/managed/utils/platform/client.go
+++ b/managed/utils/platform/client.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/pprof/pprof.go b/managed/utils/pprof/pprof.go
index 007a8b39f3..71c5687c76 100644
--- a/managed/utils/pprof/pprof.go
+++ b/managed/utils/pprof/pprof.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/pprof/pprof_test.go b/managed/utils/pprof/pprof_test.go
index f80204a99a..1dcc59a4ba 100644
--- a/managed/utils/pprof/pprof_test.go
+++ b/managed/utils/pprof/pprof_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/signatures/signatures.go b/managed/utils/signatures/signatures.go
index d5e4f9e02a..8d6d905d29 100644
--- a/managed/utils/signatures/signatures.go
+++ b/managed/utils/signatures/signatures.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/signatures/signatures_test.go b/managed/utils/signatures/signatures_test.go
index af86cf0fd8..9e8935421e 100644
--- a/managed/utils/signatures/signatures_test.go
+++ b/managed/utils/signatures/signatures_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/stringset/stringset.go b/managed/utils/stringset/stringset.go
index 548f07ad4f..b59b3c02af 100644
--- a/managed/utils/stringset/stringset.go
+++ b/managed/utils/stringset/stringset.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/testdb/db.go b/managed/utils/testdb/db.go
index 1a2354ff9f..d5707e367a 100644
--- a/managed/utils/testdb/db.go
+++ b/managed/utils/testdb/db.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/tests/asserts.go b/managed/utils/tests/asserts.go
index 6371f8dc46..cb52d9296a 100644
--- a/managed/utils/tests/asserts.go
+++ b/managed/utils/tests/asserts.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/tests/aws.go b/managed/utils/tests/aws.go
index 8537fa1a72..ed003a2350 100644
--- a/managed/utils/tests/aws.go
+++ b/managed/utils/tests/aws.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/tests/credentials.go b/managed/utils/tests/credentials.go
index cac0241de7..8d5852ec73 100644
--- a/managed/utils/tests/credentials.go
+++ b/managed/utils/tests/credentials.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/tests/fuzz.go b/managed/utils/tests/fuzz.go
index 36dd4f4583..918e7c5bd9 100644
--- a/managed/utils/tests/fuzz.go
+++ b/managed/utils/tests/fuzz.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/tests/id.go b/managed/utils/tests/id.go
index 846a1d9083..d49ccc706e 100644
--- a/managed/utils/tests/id.go
+++ b/managed/utils/tests/id.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/validators/alerting_rules.go b/managed/utils/validators/alerting_rules.go
index 81fb8aa66f..d00de9a17f 100644
--- a/managed/utils/validators/alerting_rules.go
+++ b/managed/utils/validators/alerting_rules.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/validators/alerting_rules_test.go b/managed/utils/validators/alerting_rules_test.go
index 859dde22d7..ed40d7daff 100644
--- a/managed/utils/validators/alerting_rules_test.go
+++ b/managed/utils/validators/alerting_rules_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/managed/utils/validators/validators.go b/managed/utils/validators/validators.go
index 7257cf917e..8a4fd3d983 100644
--- a/managed/utils/validators/validators.go
+++ b/managed/utils/validators/validators.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/db.go b/qan-api2/db.go
index de3ed9d776..8c87408258 100644
--- a/qan-api2/db.go
+++ b/qan-api2/db.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/db_test.go b/qan-api2/db_test.go
index 1eb145ea93..fc06a5fd7d 100644
--- a/qan-api2/db_test.go
+++ b/qan-api2/db_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/exporters/slow_log.go b/qan-api2/exporters/slow_log.go
index e13c81e03f..db3d6cd0cc 100644
--- a/qan-api2/exporters/slow_log.go
+++ b/qan-api2/exporters/slow_log.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/main.go b/qan-api2/main.go
index b0f7ffa422..c155e85c1e 100644
--- a/qan-api2/main.go
+++ b/qan-api2/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/maincover_test.go b/qan-api2/maincover_test.go
index 1828a08ed0..4f5accd141 100644
--- a/qan-api2/maincover_test.go
+++ b/qan-api2/maincover_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/models/base.go b/qan-api2/models/base.go
index 4f0368d8aa..45a3493b98 100644
--- a/qan-api2/models/base.go
+++ b/qan-api2/models/base.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/models/data_ingestion.go b/qan-api2/models/data_ingestion.go
index 6a8746ccbf..d6eda35ba5 100644
--- a/qan-api2/models/data_ingestion.go
+++ b/qan-api2/models/data_ingestion.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/models/metrics.go b/qan-api2/models/metrics.go
index 4b34dcb178..70dac41689 100644
--- a/qan-api2/models/metrics.go
+++ b/qan-api2/models/metrics.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/models/reporter.go b/qan-api2/models/reporter.go
index 4ceebcd10f..4a5e463626 100644
--- a/qan-api2/models/reporter.go
+++ b/qan-api2/models/reporter.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/services/analytics/base.go b/qan-api2/services/analytics/base.go
index b9e9bd54e0..5d91cf5014 100644
--- a/qan-api2/services/analytics/base.go
+++ b/qan-api2/services/analytics/base.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/services/analytics/filters.go b/qan-api2/services/analytics/filters.go
index da6cdc9bfe..97d46ba1de 100644
--- a/qan-api2/services/analytics/filters.go
+++ b/qan-api2/services/analytics/filters.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/services/analytics/filters_test.go b/qan-api2/services/analytics/filters_test.go
index 163ffd8c25..31b4fb81f4 100644
--- a/qan-api2/services/analytics/filters_test.go
+++ b/qan-api2/services/analytics/filters_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/services/analytics/metrics_names.go b/qan-api2/services/analytics/metrics_names.go
index 5d5074e0a3..4f913d80dd 100644
--- a/qan-api2/services/analytics/metrics_names.go
+++ b/qan-api2/services/analytics/metrics_names.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/services/analytics/metrics_names_test.go b/qan-api2/services/analytics/metrics_names_test.go
index b9ca476b6f..c7e8edc667 100644
--- a/qan-api2/services/analytics/metrics_names_test.go
+++ b/qan-api2/services/analytics/metrics_names_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/services/analytics/object_details.go b/qan-api2/services/analytics/object_details.go
index 72024f41b9..f3bdc191fb 100644
--- a/qan-api2/services/analytics/object_details.go
+++ b/qan-api2/services/analytics/object_details.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/services/analytics/object_details_test.go b/qan-api2/services/analytics/object_details_test.go
index 9bc076f37b..05793dd581 100644
--- a/qan-api2/services/analytics/object_details_test.go
+++ b/qan-api2/services/analytics/object_details_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/services/analytics/profile.go b/qan-api2/services/analytics/profile.go
index de0e498254..d2cb850cda 100644
--- a/qan-api2/services/analytics/profile.go
+++ b/qan-api2/services/analytics/profile.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/services/analytics/profile_test.go b/qan-api2/services/analytics/profile_test.go
index 8597d17a93..895a7f4dfd 100644
--- a/qan-api2/services/analytics/profile_test.go
+++ b/qan-api2/services/analytics/profile_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/services/receiver/receiver.go b/qan-api2/services/receiver/receiver.go
index 4d963dd2b7..127f4c0fba 100644
--- a/qan-api2/services/receiver/receiver.go
+++ b/qan-api2/services/receiver/receiver.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/utils/interceptors/interceptors.go b/qan-api2/utils/interceptors/interceptors.go
index d60ef711f8..fa2cda3033 100644
--- a/qan-api2/utils/interceptors/interceptors.go
+++ b/qan-api2/utils/interceptors/interceptors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/utils/logger/grpc.go b/qan-api2/utils/logger/grpc.go
index f6e2673182..7fa6342b83 100644
--- a/qan-api2/utils/logger/grpc.go
+++ b/qan-api2/utils/logger/grpc.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/qan-api2/utils/logger/logger.go b/qan-api2/utils/logger/logger.go
index 45bfe362ef..5bc5b12f8e 100644
--- a/qan-api2/utils/logger/logger.go
+++ b/qan-api2/utils/logger/logger.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/tools/go.mod b/tools/go.mod
index 94822446fd..b8b7409c4e 100644
--- a/tools/go.mod
+++ b/tools/go.mod
@@ -7,15 +7,15 @@ replace github.com/go-openapi/spec => github.com/Percona-Lab/spec v0.20.5-percon
require (
github.com/BurntSushi/go-sumtype v0.0.0-20190304192233-fcb4a6205bdc
github.com/Percona-Lab/swagger-order v0.0.0-20191002141859-166b3973d026
- github.com/apache/skywalking-eyes v0.4.0
+ github.com/apache/skywalking-eyes v0.5.0
github.com/bufbuild/buf v1.26.1
github.com/daixiang0/gci v0.11.0
- github.com/envoyproxy/protoc-gen-validate v1.0.1
+ github.com/envoyproxy/protoc-gen-validate v1.0.2
github.com/go-delve/delve v1.21.0
github.com/go-openapi/runtime v0.25.0
github.com/go-openapi/spec v0.20.4
github.com/go-swagger/go-swagger v0.29.0
- github.com/grpc-ecosystem/grpc-gateway/v2 v2.17.0
+ github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0
github.com/jstemmer/go-junit-report v1.0.0
github.com/quasilyte/go-consistent v0.6.0
github.com/reviewdog/reviewdog v0.15.0
@@ -36,11 +36,12 @@ require (
cloud.google.com/go/datastore v1.14.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
- github.com/Masterminds/semver/v3 v3.1.1 // indirect
- github.com/Masterminds/sprig/v3 v3.2.2 // indirect
+ github.com/Masterminds/semver/v3 v3.2.0 // indirect
+ github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
- github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
+ github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 // indirect
github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794 // indirect
+ github.com/acomagu/bufpipe v1.0.4 // indirect
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
@@ -63,11 +64,15 @@ require (
github.com/docker/docker-credential-helpers v0.8.0 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
+ github.com/emirpasic/gods v1.18.1 // indirect
github.com/felixge/fgprof v0.9.3 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-chi/chi/v5 v5.0.10 // indirect
github.com/go-delve/liner v1.2.3-0.20220127212407-d32d89dd2a5d // indirect
+ github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
+ github.com/go-git/go-billy/v5 v5.4.1 // indirect
+ github.com/go-git/go-git/v5 v5.8.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.21.3 // indirect
@@ -114,16 +119,18 @@ require (
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/haya14busa/go-actions-toolkit v0.0.0-20200105081403-ca0307860f01 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
- github.com/huandu/xstrings v1.3.1 // indirect
+ github.com/huandu/xstrings v1.4.0 // indirect
github.com/iancoleman/orderedmap v0.2.0 // indirect
github.com/iancoleman/strcase v0.2.0 // indirect
- github.com/imdario/mergo v0.3.12 // indirect
+ github.com/imdario/mergo v0.3.16 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jackc/pgx v3.6.2+incompatible // indirect
+ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84 // indirect
github.com/jessevdk/go-flags v1.5.0 // indirect
github.com/jinzhu/copier v0.3.5 // indirect
github.com/josharian/intern v1.0.0 // indirect
+ github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/kisielk/gotool v1.0.0 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/klauspost/pgzip v1.2.6 // indirect
@@ -138,10 +145,10 @@ require (
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mattn/go-shellwords v1.0.12 // indirect
github.com/mattn/go-sqlite3 v1.14.6 // indirect
- github.com/mitchellh/copystructure v1.0.0 // indirect
+ github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
- github.com/mitchellh/reflectwalk v1.0.1 // indirect
+ github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/oklog/ulid v1.3.1 // indirect
@@ -149,6 +156,7 @@ require (
github.com/opencontainers/image-spec v1.1.0-rc4 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
+ github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/profile v1.7.0 // indirect
@@ -160,8 +168,10 @@ require (
github.com/rs/cors v1.9.0 // indirect
github.com/rs/zerolog v1.29.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
- github.com/shopspring/decimal v1.2.0 // indirect
+ github.com/sergi/go-diff v1.3.1 // indirect
+ github.com/shopspring/decimal v1.3.1 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
+ github.com/skeema/knownhosts v1.2.0 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cobra v1.7.0 // indirect
@@ -174,6 +184,7 @@ require (
github.com/vbatts/tar-split v0.11.3 // indirect
github.com/vvakame/sdlog v1.2.0 // indirect
github.com/xanzy/go-gitlab v0.91.1 // indirect
+ github.com/xanzy/ssh-agent v0.3.3 // indirect
go.mongodb.org/mongo-driver v1.9.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/otel v1.16.0 // indirect
@@ -202,9 +213,10 @@ require (
google.golang.org/genproto v0.0.0-20230821184602-ccc8af3d0e93 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
- google.golang.org/grpc v1.57.0 // indirect
+ google.golang.org/grpc v1.58.0 // indirect
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
+ gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
diff --git a/tools/go.sum b/tools/go.sum
index d59d0fc7d3..e930fc604a 100644
--- a/tools/go.sum
+++ b/tools/go.sum
@@ -60,10 +60,11 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190129172621-c8b1d7a94ddf/go.mod h1:aJ4qN3TfrelA6NZ6AXsXRfmEVaYin3EDbSPJrKS8OXo=
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
-github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
-github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
-github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8=
-github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk=
+github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g=
+github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
+github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA=
+github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM=
+github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
@@ -71,12 +72,15 @@ github.com/Percona-Lab/spec v0.20.5-percona h1:ViCJVq52QIZxpP8/Nv4/nIed+WnqUirNj
github.com/Percona-Lab/spec v0.20.5-percona/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA=
github.com/Percona-Lab/swagger-order v0.0.0-20191002141859-166b3973d026 h1:jvuxsQEuFpoSVw9HCP4kSF52BXYzTvB7CA3eryQXaRc=
github.com/Percona-Lab/swagger-order v0.0.0-20191002141859-166b3973d026/go.mod h1:rTCUGM0dF3N6kw5DdoxLDWe7FL49OxY13Y0Ev1jS/BQ=
-github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA=
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g=
+github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 h1:KLq8BE0KwCL+mmXnjLWEAOYO+2l2AE4YMmqG1ZpZHBs=
+github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=
github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
github.com/aclements/go-gg v0.0.0-20170118225347-6dbb4e4fefb0/go.mod h1:55qNq4vcpkIuHowELi5C8e+1yUHtoLoOUR9QU5j7Tes=
github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794 h1:xlwdaKcTNVW4PtpQb8aKA4Pjy0CdJHEqvFbAnvR5m2g=
github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794/go.mod h1:7e+I0LQFUI9AXWxOfsQROs9xPhoJtbsyWcjJqDd4KPY=
+github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ=
+github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/ajstarks/svgo v0.0.0-20210923152817-c3b6e2f0c527/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
@@ -86,12 +90,14 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc=
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
+github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
-github.com/apache/skywalking-eyes v0.4.0 h1:O13kdRU6FCEZevfD01mdhTgCZLLfPZIQ0GXZrLl7FpQ=
-github.com/apache/skywalking-eyes v0.4.0/go.mod h1:WblDbBgOLsLN0FJEBa9xj6PhuUA/J6spKYVTG4/F8Ls=
+github.com/apache/skywalking-eyes v0.5.0 h1:X41jAhmnJazHuR5mOGt1nZA7mFaAluf9mvB1JBzr5xI=
+github.com/apache/skywalking-eyes v0.5.0/go.mod h1:rwVEbfh8GovISedSOc7nHGrcnkQ7sfTc31iYU5hSpEE=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
+github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ=
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
@@ -152,7 +158,6 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc
github.com/cosiner/argv v0.1.0 h1:BVDiEL32lwHukgJKP87btEPenzrrHUjajs/8yzaqcXg=
github.com/cosiner/argv v0.1.0/go.mod h1:EusR6TucWKX+zFgtdUsKT2Cvg45K5rtpCcWz4hK06d8=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
-github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
@@ -180,6 +185,9 @@ github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
+github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 h1:RIB4cRk+lBqKK3Oy0r2gRX4ui7tuhiZq2SuTtTCi0/0=
+github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
+github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
@@ -187,8 +195,8 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
-github.com/envoyproxy/protoc-gen-validate v1.0.1 h1:kt9FtLiooDc0vbwTLhdg3dyNX1K9Qwa1EK9LcD4jVUQ=
-github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs=
+github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA=
+github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g=
@@ -204,6 +212,7 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY=
github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk=
github.com/go-chi/chi/v5 v5.0.10/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-delve/delve v1.21.0 h1:npcc8TZhdVxaMSJon+zqcE3bXM/ck8SSOOWw/id13jI=
@@ -215,6 +224,13 @@ github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3
github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY=
github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY=
github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY=
+github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
+github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic=
+github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4=
+github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg=
+github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f h1:Pz0DHeFij3XFhoBRGUDPzSJ+w2UcK5/0JvF8DRI58r8=
+github.com/go-git/go-git/v5 v5.8.0 h1:Rc543s6Tyq+YcyPwZRvU4jzZGM8rB/wWu94TnTIYALQ=
+github.com/go-git/go-git/v5 v5.8.0/go.mod h1:coJHKEOk5kUClpsNlXrUvPrDxY3w3gjHvhcZd8Fodw8=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
@@ -431,8 +447,8 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmg
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.17.0 h1:Rme6CE1aUTyV9WmrEPyGf1V+7W3iQzZ1DZkKnT6z9B0=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.17.0/go.mod h1:Hbb13e3/WtqQ8U5hLGkek9gJvBLasHuPFI0UEGfnQ10=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 h1:RtRsiaGvWxcwd8y3BiRZxsylPT8hLWZ5SPcfI+3IDNk=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0/go.mod h1:TzP6duP4Py2pHLVPPQp42aoYI92+PCrVotyR5e8Vqlk=
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
@@ -468,8 +484,9 @@ github.com/haya14busa/go-checkstyle v0.0.0-20170303121022-5e9d09f51fa1/go.mod h1
github.com/haya14busa/go-sarif v0.0.0-20210102043135-e2c5fed2fa3d/go.mod h1:1Hkn3JseGMB/hv1ywzkapVQDWV3bFgp6POZobZmR/5g=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
-github.com/huandu/xstrings v1.3.1 h1:4jgBlKK6tLKFvO8u5pmYjG91cqytmDCDvGh7ECVFfFs=
-github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
+github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
+github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU=
+github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
github.com/iancoleman/orderedmap v0.2.0 h1:sq1N/TFpYH++aViPcaKjys3bDClUEU7s5B+z6jq8pNA=
github.com/iancoleman/orderedmap v0.2.0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA=
github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0=
@@ -478,8 +495,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
-github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
-github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
+github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
+github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
@@ -487,6 +504,8 @@ github.com/jackc/fake v0.0.0-20150926172116-812a484cc733 h1:vr3AYkKovP8uR8AvSGGU
github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ=
github.com/jackc/pgx v3.6.2+incompatible h1:2zP5OD7kiyR3xzRYMhOcXVvkDZsImVXfj+yIyTQf3/o=
github.com/jackc/pgx v3.6.2+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I=
+github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
+github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84 h1:2uT3aivO7NVpUPGcQX7RbHijHMyWix/yCnIrCWc+5co=
github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84/go.mod h1:Zi/ZFkEqFHTm7qkjyNJjaWH4LQA9LQhGJyF0lTYGpxw=
github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc=
@@ -509,6 +528,8 @@ github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4=
github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA=
+github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
+github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg=
@@ -547,6 +568,8 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
+github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A=
+github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
@@ -568,8 +591,9 @@ github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
-github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ=
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
+github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
+github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
@@ -583,8 +607,8 @@ github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
-github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE=
-github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
+github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
+github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=
github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -610,6 +634,8 @@ github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha
github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY=
github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
+github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
+github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
@@ -665,18 +691,23 @@ github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfF
github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
-github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
+github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8=
+github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I=
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
+github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
+github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
-github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
+github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
+github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM=
+github.com/skeema/knownhosts v1.2.0/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
@@ -690,7 +721,6 @@ github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU=
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo=
-github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g=
github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
@@ -738,6 +768,8 @@ github.com/vvakame/sdlog v1.2.0 h1:gwZRXZ0EmhJQJN/Do/+PTQigcmFiSqZ07aDjxqGOLT8=
github.com/vvakame/sdlog v1.2.0/go.mod h1:gFYv2g/iR3pJSxkJz0YnkNmhNbXT5R3PzWsfZKGQADY=
github.com/xanzy/go-gitlab v0.91.1 h1:gnV57IPGYywWer32oXKBcdmc8dVxeKl3AauV8Bu17rw=
github.com/xanzy/go-gitlab v0.91.1/go.mod h1:5ryv+MnpZStBH8I/77HuQBsMbBGANtVpLWC15qOjWAw=
+github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
+github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs=
github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM=
@@ -747,7 +779,6 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg=
@@ -797,14 +828,14 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
-golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=
@@ -857,7 +888,6 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
@@ -900,10 +930,7 @@ golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
-golang.org/x/net v0.0.0-20220517181318-183a9ca12b87/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
@@ -921,7 +948,6 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE=
golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4=
golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4=
@@ -938,7 +964,6 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
@@ -984,6 +1009,7 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -996,10 +1022,7 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -1103,7 +1126,6 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
-golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=
@@ -1112,7 +1134,6 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk=
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
@@ -1216,8 +1237,8 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
-google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw=
-google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo=
+google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o=
+google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
@@ -1239,9 +1260,11 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQ
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
@@ -1249,6 +1272,8 @@ gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/reform.v1 v1.5.1 h1:7vhDFW1n1xAPC6oDSvIvVvpRkaRpXlxgJ4QB4s3aDdo=
gopkg.in/reform.v1 v1.5.1/go.mod h1:AIv0CbDRJ0ljQwptGeaIXfpDRo02uJwTq92aMFELEeU=
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
+gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
+gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
@@ -1262,7 +1287,6 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C
gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0-20220512140231-539c8e751b99/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0=
diff --git a/tools/tools.go b/tools/tools.go
index bbe45acd65..bac23abc14 100644
--- a/tools/tools.go
+++ b/tools/tools.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2021 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/update/ansible/playbook/tasks/files/datasources.yml b/update/ansible/playbook/tasks/files/datasources.yml
index 79ba5ebcd0..b11fa2d0c8 100644
--- a/update/ansible/playbook/tasks/files/datasources.yml
+++ b/update/ansible/playbook/tasks/files/datasources.yml
@@ -8,7 +8,7 @@ datasources:
orgId: 1
type: prometheus
access: proxy
- url: http://127.0.0.1:8430/prometheus/
+ url: http://127.0.0.1:8430/
isDefault: true
jsonData:
httpMethod: POST
diff --git a/update/ansible/playbook/tasks/roles/initialization/tasks/main.yml b/update/ansible/playbook/tasks/roles/initialization/tasks/main.yml
index 8cb4186e4b..2476b13d68 100644
--- a/update/ansible/playbook/tasks/roles/initialization/tasks/main.yml
+++ b/update/ansible/playbook/tasks/roles/initialization/tasks/main.yml
@@ -5,23 +5,6 @@
ui_upgrade: False
when: ui_upgrade is undefined
-
-# PMM-10858 - In certain environments, including AWS EC2, some of the
-# EPEL repository mirrors do not respond within the time limit defined
-# by pmm-update which is currently set to 30 seconds. This was causing
-# supervisord to kill pmm-update-checker
-- name: Update repository settings
- when:
- - ansible_distribution == "CentOS"
- - ansible_distribution_major_version == "7"
- command: yum-config-manager --setopt=epel.timeout=1 --save
- changed_when: True
-
-- name: Clean yum metadata
- command: yum clean metadata
- become: true
- changed_when: True
-
- name: Get current version
slurp:
src: /srv/grafana/PERCONA_DASHBOARDS_VERSION
@@ -51,6 +34,32 @@
debug:
msg: "Current version: {{ pmm_current_version }} Image Version: {{ pmm_image_version }}"
+
+# We use current_version_file['failed'] because we don't want to run this on creating container
+# and we use pmm_current_version is version(pmm_image_version, '>=') to run it only if upgrade is required
+- name: Enable maintenance mode only for docker upgrade
+ copy:
+ src: maintenance.html
+ dest: /usr/share/pmm-server/maintenance/
+ mode: 0644
+ when: not ui_upgrade and current_version_file['failed'] == false and not pmm_current_version is version(pmm_image_version, '>=')
+
+# PMM-10858 - In certain environments, including AWS EC2, some of the
+# EPEL repository mirrors do not respond within the time limit defined
+# by pmm-update which is currently set to 30 seconds. This was causing
+# supervisord to kill pmm-update-checker
+- name: Update repository settings
+ when:
+ - ansible_distribution == "CentOS"
+ - ansible_distribution_major_version == "7"
+ command: yum-config-manager --setopt=epel.timeout=1 --save
+ changed_when: True
+
+- name: Clean yum metadata
+ command: yum clean metadata
+ become: true
+ changed_when: True
+
- name: Check if we need an update or not
include_role:
name: dashboards_upgrade
@@ -102,12 +111,68 @@
path: /srv/grafana/grafana.db
register: is_database_sqlite
- - name: Migrate Grafana database from SQLite to Postgresql
- include_role:
- name: sqlite-to-postgres
+ - name: Temporary change database to SQLite
+ block:
+ - name: Remove database options (SQLite is default)
+ ini_file:
+ dest: /etc/grafana/grafana.ini
+ section: database
+ option: type
+ state: absent
+
+ - name: Remove database host
+ ini_file:
+ dest: /etc/grafana/grafana.ini
+ section: database
+ option: host
+ state: absent
+
+ - name: Remove database user
+ ini_file:
+ dest: /etc/grafana/grafana.ini
+ section: database
+ option: user
+ state: absent
+
+ - name: Remove database password
+ ini_file:
+ dest: /etc/grafana/grafana.ini
+ section: database
+ option: password
+ state: absent
+
+ - name: Upgrade grafana database (Get the latest schema)
+ command: grafana cli --homepath=/usr/share/grafana admin data-migration encrypt-datasource-passwords
+ changed_when: True
+
+ - name: Start grafana again
+ supervisorctl:
+ name: grafana
+ state: restarted
+
+ - name: Wait for grafana
+ pause: seconds=10
+
+ - name: Migrate Grafana database from SQLite to Postgresql
+ include_role:
+ name: sqlite-to-postgres
+ tags:
+ - skip_ansible_lint # '503 Tasks that run when changed should likely be handlers'.
when: is_database_sqlite.stat.exists
- tags:
- - skip_ansible_lint # '503 Tasks that run when changed should likely be handlers'.
+
+ - name: Wait for PMM to be ready
+ ansible.builtin.uri:
+ url: "http://127.0.0.1:7772/v1/readyz"
+ status_code: 200
+ method: GET
+ retries: 120
+ delay: 1
+
+ - name: Disable maintenance mode
+ file:
+ state: absent
+ path: /usr/share/pmm-server/maintenance/maintenance.html
# We use current_version_file['failed'] because we don't want to run this on creating container
- when: not ui_upgrade and current_version_file['failed'] == false
+ when: not ui_upgrade and current_version_file['failed'] == false and not pmm_current_version is version(pmm_image_version, '>=')
+
diff --git a/update/ansible/playbook/tasks/roles/sqlite-to-postgres/tasks/main.yml b/update/ansible/playbook/tasks/roles/sqlite-to-postgres/tasks/main.yml
index 7075c490d8..490ce26c7f 100644
--- a/update/ansible/playbook/tasks/roles/sqlite-to-postgres/tasks/main.yml
+++ b/update/ansible/playbook/tasks/roles/sqlite-to-postgres/tasks/main.yml
@@ -4,6 +4,8 @@
url: "http://127.0.0.1:3000/api/health"
status_code: 200
method: GET
+ register: healthcheck
+ until: healthcheck is not failed
retries: 120
delay: 1
diff --git a/update/ansible/playbook/tasks/update.yml b/update/ansible/playbook/tasks/update.yml
index db484e0cae..61ae3a43a2 100644
--- a/update/ansible/playbook/tasks/update.yml
+++ b/update/ansible/playbook/tasks/update.yml
@@ -239,7 +239,10 @@
- name: Wait for pmm-managed
pause: seconds=10
- - name: Update system packages
+ - name: Update system packages EL7
+ when:
+ - ansible_distribution == "CentOS"
+ - ansible_distribution_major_version == "7"
yum:
name: "*"
state: latest
@@ -247,7 +250,10 @@
exclude:
- nginx*
- - name: Updating only select packages
+ - name: Updating only select packages EL7
+ when:
+ - ansible_distribution == "CentOS"
+ - ansible_distribution_major_version == "7"
yum:
name: "{{ item }}"
state: latest
@@ -258,6 +264,38 @@
- sshpass
- vi
+ - name: Remove ansible RPM if installed | EL9
+ when:
+ - ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux'
+ - ansible_distribution_major_version == '9'
+ yum:
+ name: ansible
+ state: absent
+ ignore_errors: yes
+
+ - name: Install ansible-core RPM | EL9
+ when:
+ - ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux'
+ - ansible_distribution_major_version == '9'
+ yum:
+ name:
+ - ansible-core
+ - ansible-collection-community-general
+ - ansible-collection-community-postgresql
+ - ansible-collection-ansible-posix
+ state: present
+
+ - name: Update system packages EL9
+ when:
+ - ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux'
+ - ansible_distribution_major_version == '9'
+ - not ansible_check_mode
+ yum:
+ name: "*"
+ state: latest
+ exclude:
+ - nginx*
+
- name: Install nginx
include_role:
name: nginx
@@ -275,17 +313,6 @@
enabled: no
when: not is_docker
- - name: Remove old or redundant packages
- yum:
- state: absent
- name:
- - percona-qan-app # https://jira.percona.com/browse/PMM-6766
- - mariadb-libs # https://jira.percona.com/browse/PMM-5215
- - logrotate # https://jira.percona.com/browse/PMM-7627
- - pmm-server # https://jira.percona.com/browse/PMM-11239
- - screen
- - yum-cron
-
# https://jira.percona.com/browse/PMM-9298
- name: Copy rezise-xfs file for lvm
copy:
@@ -359,12 +386,46 @@
- /etc/yum/yum-cron-hourly.conf
- /etc/yum/yum-cron.conf
- - name: Enable pmm-update-perform-init after build
- ini_file:
- path: /etc/supervisord.d/pmm.ini
- section: program:pmm-update-perform-init
- option: autostart
- value: "true"
+ - name: Check that the SQLite grafana database exists
+ stat:
+ path: /srv/grafana/grafana.db
+ register: is_database_sqlite
+
+ - name: Migrate Grafana database from SQLite to Postgresql
+ include_role:
+ name: sqlite-to-postgres
+ when: is_database_sqlite.stat.exists
+ tags:
+ - skip_ansible_lint # '503 Tasks that run when changed should likely be handlers'.
+
+ - name: Fix grafana fields type
+ postgresql_query:
+ db: grafana
+ query: "{{ item }}"
+ loop:
+ - ALTER TABLE tag ALTER COLUMN key TYPE text;
+ - ALTER TABLE tag ALTER COLUMN value TYPE text;
+ - ALTER TABLE api_key ALTER COLUMN key TYPE text;
+ - ALTER TABLE api_key ALTER COLUMN name TYPE text;
+ when: not ansible_check_mode
+
+ # we need to put this step as one of the last steps, because it removes pmm.ini and /etc/alertmanager.yml
+ - name: Remove old or redundant packages
+ yum:
+ state: absent
+ name:
+ - percona-qan-app # https://jira.percona.com/browse/PMM-6766
+ - mariadb-libs # https://jira.percona.com/browse/PMM-5215
+ - logrotate # https://jira.percona.com/browse/PMM-7627
+ - pmm-server # https://jira.percona.com/browse/PMM-11239
+ - screen
+ - yum-cron
+
+ # Regenerating pmm.ini and enabling pmm-update-perform-init
+ - name: Generate new supervisor config
+ command: pmm-managed-init
+ register: managed_init_result
+ changed_when: True
- name: Reread pmm-update-perform-init supervisor config EL7
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '7'
@@ -378,6 +439,21 @@
register: reread_init__result
changed_when: "'No config updates to processes' not in reread_init__result.stdout"
+ # restarting pmm-managed to regenerate /etc/alertmanager.yml
+ - name: Restart pmm-managed EL7
+ when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '7'
+ command: supervisorctl {{ item }} pmm-managed
+ become: true
+ changed_when: true
+ with_items: ["stop", "remove", "add"]
+
+ - name: Restart pmm-managed EL9
+ when: (ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux') and ansible_distribution_major_version == '9'
+ command: /usr/local/bin/supervisorctl {{ item }} pmm-managed
+ become: true
+ changed_when: true
+ with_items: ["stop", "remove", "add"]
+
- name: Update/restart other services EL7
when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '7'
command: supervisorctl update
@@ -393,28 +469,15 @@
- name: Print other services's logs
debug: var=update_result.stdout_lines
- - name: Check that the SQLite grafana database exists
- stat:
- path: /srv/grafana/grafana.db
- register: is_database_sqlite
-
- - name: Migrate Grafana database from SQLite to Postgresql
- include_role:
- name: sqlite-to-postgres
- when: is_database_sqlite.stat.exists
- tags:
- - skip_ansible_lint # '503 Tasks that run when changed should likely be handlers'.
-
- - name: Fix grafana fields type
- postgresql_query:
- db: grafana
- query: "{{ item }}"
- loop:
- - ALTER TABLE tag ALTER COLUMN key TYPE text;
- - ALTER TABLE tag ALTER COLUMN value TYPE text;
- - ALTER TABLE api_key ALTER COLUMN key TYPE text;
- - ALTER TABLE api_key ALTER COLUMN name TYPE text;
- when: not ansible_check_mode
+ - name: Wait for PMM to be ready
+ ansible.builtin.uri:
+ url: "http://127.0.0.1:7772/v1/readyz"
+ status_code: 200
+ method: GET
+ register: healthcheck
+ until: healthcheck is not failed
+ retries: 120
+ delay: 1
# SIGUSR2 is sent to supervisord by pmm-managed right before the update for logging to work correctly.
# We use that fact to show what was restarted during the update.
@@ -430,14 +493,14 @@
register: maintail_result
changed_when: False
+ - name: Print supervisord logs
+ debug: var=maintail_result.stdout_lines
+
- name: Disable maintenance mode
file:
state: absent
path: /usr/share/pmm-server/maintenance/maintenance.html
- - name: Print supervisord logs
- debug: var=maintail_result.stdout_lines
-
- name: Cleanup yum cache
file:
state: absent
diff --git a/update/main.go b/update/main.go
index 01c71fa3ad..e1f87f921c 100644
--- a/update/main.go
+++ b/update/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/update/main_test.go b/update/main_test.go
index 5731973001..98a41a6c14 100644
--- a/update/main_test.go
+++ b/update/main_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/update/maincover_test.go b/update/maincover_test.go
index 921c29afbf..aa26b16d85 100644
--- a/update/maincover_test.go
+++ b/update/maincover_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/update/pkg/ansible/ansible.go b/update/pkg/ansible/ansible.go
index 00889e47bb..08c1d05547 100644
--- a/update/pkg/ansible/ansible.go
+++ b/update/pkg/ansible/ansible.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/update/pkg/ansible/ansible_test.go b/update/pkg/ansible/ansible_test.go
index a98f8d41c4..6f4e34eb20 100644
--- a/update/pkg/ansible/ansible_test.go
+++ b/update/pkg/ansible/ansible_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/update/pkg/run/run.go b/update/pkg/run/run.go
index b370d24963..399a903273 100644
--- a/update/pkg/run/run.go
+++ b/update/pkg/run/run.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/update/pkg/run/run_test.go b/update/pkg/run/run_test.go
index 1f73d825a8..8557880ab8 100644
--- a/update/pkg/run/run_test.go
+++ b/update/pkg/run/run_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/update/pkg/yum/info.go b/update/pkg/yum/info.go
index f705d2922e..95728e928d 100644
--- a/update/pkg/yum/info.go
+++ b/update/pkg/yum/info.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/update/pkg/yum/info_test.go b/update/pkg/yum/info_test.go
index d8cc827c80..1604e92d1d 100644
--- a/update/pkg/yum/info_test.go
+++ b/update/pkg/yum/info_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/update/pkg/yum/yum.go b/update/pkg/yum/yum.go
index f9b906f86d..008ad208b1 100644
--- a/update/pkg/yum/yum.go
+++ b/update/pkg/yum/yum.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/update/pkg/yum/yum_test.go b/update/pkg/yum/yum_test.go
index 5b3e70131a..d2ad230000 100644
--- a/update/pkg/yum/yum_test.go
+++ b/update/pkg/yum/yum_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/utils/depstests/depstests.go b/utils/depstests/depstests.go
index 67fa07dda4..f7b17754f1 100644
--- a/utils/depstests/depstests.go
+++ b/utils/depstests/depstests.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/utils/depstests/protobuf_test.go b/utils/depstests/protobuf_test.go
index 788c5ecbcc..941aa6f7f8 100644
--- a/utils/depstests/protobuf_test.go
+++ b/utils/depstests/protobuf_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/utils/errors/errors.go b/utils/errors/errors.go
index 9550f5843e..1499d84778 100644
--- a/utils/errors/errors.go
+++ b/utils/errors/errors.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/utils/logger/global.go b/utils/logger/global.go
index ec5ed4f4aa..9368bb145c 100644
--- a/utils/logger/global.go
+++ b/utils/logger/global.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/utils/logger/grpc.go b/utils/logger/grpc.go
index 1b5c04998d..fcc4f2219e 100644
--- a/utils/logger/grpc.go
+++ b/utils/logger/grpc.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/utils/logger/logger.go b/utils/logger/logger.go
index 2ff85b60a0..89a0211ad1 100644
--- a/utils/logger/logger.go
+++ b/utils/logger/logger.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2017 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/utils/nodeinfo/nodeinfo.go b/utils/nodeinfo/nodeinfo.go
index c8ade0b3a2..f8f928bf89 100644
--- a/utils/nodeinfo/nodeinfo.go
+++ b/utils/nodeinfo/nodeinfo.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/utils/nodeinfo/nodeinfo_test.go b/utils/nodeinfo/nodeinfo_test.go
index 159b824116..ea97b4b761 100644
--- a/utils/nodeinfo/nodeinfo_test.go
+++ b/utils/nodeinfo/nodeinfo_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/utils/pdeathsig/pdeathsig.go b/utils/pdeathsig/pdeathsig.go
index 28d33fbbbf..cf31b6ee32 100644
--- a/utils/pdeathsig/pdeathsig.go
+++ b/utils/pdeathsig/pdeathsig.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/utils/pdeathsig/pdeathsig_linux.go b/utils/pdeathsig/pdeathsig_linux.go
index 1738028d05..87ecf654a1 100644
--- a/utils/pdeathsig/pdeathsig_linux.go
+++ b/utils/pdeathsig/pdeathsig_linux.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/utils/sqlmetrics/reform.go b/utils/sqlmetrics/reform.go
index 843ffced74..c7d8577140 100644
--- a/utils/sqlmetrics/reform.go
+++ b/utils/sqlmetrics/reform.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/utils/sqlmetrics/sqlmetrics.go b/utils/sqlmetrics/sqlmetrics.go
index 3fe412feb3..00a582ef4d 100644
--- a/utils/sqlmetrics/sqlmetrics.go
+++ b/utils/sqlmetrics/sqlmetrics.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/utils/tlsconfig/tlsconfig.go b/utils/tlsconfig/tlsconfig.go
index 29e101e3b1..e527cc6371 100644
--- a/utils/tlsconfig/tlsconfig.go
+++ b/utils/tlsconfig/tlsconfig.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/version/parsed.go b/version/parsed.go
index c312272d52..dce3d6887d 100644
--- a/version/parsed.go
+++ b/version/parsed.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/version/parsed_test.go b/version/parsed_test.go
index c049811b19..cba04bd74a 100644
--- a/version/parsed_test.go
+++ b/version/parsed_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/version/release.go b/version/release.go
index 7e74cfc8df..e35ce12602 100644
--- a/version/release.go
+++ b/version/release.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/version/release_test.go b/version/release_test.go
index 019668c407..46db728e84 100644
--- a/version/release_test.go
+++ b/version/release_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/version/update.go b/version/update.go
index 165b712cf3..5441043343 100644
--- a/version/update.go
+++ b/version/update.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/vmproxy/Makefile b/vmproxy/Makefile
index 458aea2543..de22f04d71 100644
--- a/vmproxy/Makefile
+++ b/vmproxy/Makefile
@@ -16,7 +16,7 @@ ifeq ($(GOBIN),)
endif
LD_FLAGS = -ldflags " \
- -X 'github.com/percona/pmm/version.ProjectName=pmm-admin' \
+ -X 'github.com/percona/pmm/version.ProjectName=vmproxy' \
-X 'github.com/percona/pmm/version.Version=$(PMM_RELEASE_VERSION)' \
-X 'github.com/percona/pmm/version.PMMVersion=$(PMM_RELEASE_VERSION)' \
-X 'github.com/percona/pmm/version.Timestamp=$(PMM_RELEASE_TIMESTAMP)' \
diff --git a/vmproxy/main.go b/vmproxy/main.go
index a955dbf4a4..f52ed527f4 100644
--- a/vmproxy/main.go
+++ b/vmproxy/main.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/vmproxy/main_test.go b/vmproxy/main_test.go
index c4d72f4287..8b003d232b 100644
--- a/vmproxy/main_test.go
+++ b/vmproxy/main_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
diff --git a/vmproxy/proxy/proxy.go b/vmproxy/proxy/proxy.go
index 20fa20f33d..dbc1aa0730 100644
--- a/vmproxy/proxy/proxy.go
+++ b/vmproxy/proxy/proxy.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -24,6 +24,7 @@ import (
"net/http"
"net/http/httputil"
"net/url"
+ "strings"
"time"
"github.com/pkg/errors"
@@ -84,6 +85,12 @@ func director(target *url.URL, headerName string) func(*http.Request) {
req.URL.Scheme = target.Scheme
req.URL.Host = target.Host
+ rp, err := target.Parse(strings.TrimPrefix(req.URL.Path, "/"))
+ if err != nil {
+ logrus.Error(err)
+ }
+ req.URL.Path = rp.Path
+
// Replace extra filters if present
if filters := req.Header.Get(headerName); filters != "" {
q := req.URL.Query()
diff --git a/vmproxy/proxy/proxy_test.go b/vmproxy/proxy/proxy_test.go
index 6a5008ea8c..daa35dbd5b 100644
--- a/vmproxy/proxy/proxy_test.go
+++ b/vmproxy/proxy/proxy_test.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Percona LLC
+// Copyright (C) 2023 Percona LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by