From afe6a51664e23f420e580d231883018523a9f591 Mon Sep 17 00:00:00 2001 From: Alex Demidoff Date: Wed, 27 Mar 2024 06:51:33 +0000 Subject: [PATCH] PMM-12913 migrate /v1/management/Service --- admin/commands/management/management.go | 20 +- admin/commands/management/remove.go | 36 +- api-tests/management/external_test.go | 45 +- api-tests/management/haproxy_test.go | 45 +- api-tests/management/mongodb_test.go | 45 +- api-tests/management/mysql_test.go | 46 +- api-tests/management/postgresql_test.go | 45 +- api-tests/management/proxysql_test.go | 46 +- api/MIGRATION_EXAMPLES.md | 8 + api/MIGRATION_TO_V3.md | 28 +- api/management/v1/annotation.pb.go | 4 +- api/management/v1/annotation.proto | 4 +- api/management/v1/external.pb.go | 8 +- api/management/v1/external.proto | 8 +- .../add_annotation_responses.go | 8 +- .../add_external_responses.go | 6 +- .../management_service_client.go | 14 +- .../register_node_responses.go | 4 +- .../remove_service_parameters.go | 69 +- .../remove_service_responses.go | 117 +- api/management/v1/json/v1.json | 3374 ++++++++--------- api/management/v1/service.pb.go | 439 ++- api/management/v1/service.pb.gw.go | 68 +- api/management/v1/service.pb.validate.go | 4 +- api/management/v1/service.proto | 32 +- api/management/v1/service_grpc.pb.go | 12 +- api/swagger/swagger-dev.json | 946 +++-- api/swagger/swagger.json | 940 +++-- descriptor.bin | Bin 682249 -> 682813 bytes managed/services/management/service.go | 24 +- managed/services/management/service_test.go | 17 +- 31 files changed, 3120 insertions(+), 3342 deletions(-) diff --git a/admin/commands/management/management.go b/admin/commands/management/management.go index ef2586dc5c4..6d3921e9f55 100644 --- a/admin/commands/management/management.go +++ b/admin/commands/management/management.go @@ -16,23 +16,23 @@ package management import ( - mservice "github.com/percona/pmm/api/management/v1/json/client/management_service" + "github.com/percona/pmm/api/inventory/v1/types" ) var ( allNodeTypes = map[string]string{ - "generic": mservice.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE, - "container": mservice.RegisterNodeBodyNodeTypeNODETYPECONTAINERNODE, - "remote": mservice.RegisterNodeBodyNodeTypeNODETYPEREMOTENODE, + "generic": types.NodeTypeGenericNode, + "container": types.NodeTypeContainerNode, + "remote": types.NodeTypeRemoteNode, } allServiceTypes = map[string]string{ - "mysql": mservice.RemoveServiceBodyServiceTypeSERVICETYPEMYSQLSERVICE, - "mongodb": mservice.RemoveServiceBodyServiceTypeSERVICETYPEMONGODBSERVICE, - "postgresql": mservice.RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE, - "proxysql": mservice.RemoveServiceBodyServiceTypeSERVICETYPEPROXYSQLSERVICE, - "haproxy": mservice.RemoveServiceBodyServiceTypeSERVICETYPEHAPROXYSERVICE, - "external": mservice.RemoveServiceBodyServiceTypeSERVICETYPEEXTERNALSERVICE, + "mysql": types.ServiceTypeMySQLService, + "mongodb": types.ServiceTypeMongoDBService, + "postgresql": types.ServiceTypePostgreSQLService, + "proxysql": types.ServiceTypeProxySQLService, + "haproxy": types.ServiceTypeHAProxyService, + "external": types.ServiceTypeExternalService, } // AllServiceTypesKeys lists all possible service types. diff --git a/admin/commands/management/remove.go b/admin/commands/management/remove.go index f7bd18d4ebc..1527652babb 100644 --- a/admin/commands/management/remove.go +++ b/admin/commands/management/remove.go @@ -47,11 +47,16 @@ type RemoveCommand struct { // RunCmd runs the command for RemoveCommand. func (cmd *RemoveCommand) RunCmd() (commands.Result, error) { - if cmd.ServiceID == "" && cmd.ServiceName == "" { + // As RemoveService method accepts only one of the service ID or service name in its `serviceID` parameter. + // Therefore, we need to check if both are provided. If only one is provided, we take that one. + // If both are provided, we take the service ID. + var serviceID string + + switch { + case cmd.ServiceID == "" && cmd.ServiceName == "": // Automatic service lookup during removal // - // Get services and remove it automatically once it's only one - // service registered + // Remove the service automatically as long as it's the only service registered status, err := agentlocal.GetStatus(agentlocal.DoNotRequestNetworkInfo) if err != nil { return nil, err @@ -67,31 +72,32 @@ func (cmd *RemoveCommand) RunCmd() (commands.Result, error) { } switch { case len(servicesRes.Payload.Mysql) == 1: - cmd.ServiceID = servicesRes.Payload.Mysql[0].ServiceID + serviceID = servicesRes.Payload.Mysql[0].ServiceID case len(servicesRes.Payload.Mongodb) == 1: - cmd.ServiceID = servicesRes.Payload.Mongodb[0].ServiceID + serviceID = servicesRes.Payload.Mongodb[0].ServiceID case len(servicesRes.Payload.Postgresql) == 1: - cmd.ServiceID = servicesRes.Payload.Postgresql[0].ServiceID + serviceID = servicesRes.Payload.Postgresql[0].ServiceID case len(servicesRes.Payload.Proxysql) == 1: - cmd.ServiceID = servicesRes.Payload.Proxysql[0].ServiceID + serviceID = servicesRes.Payload.Proxysql[0].ServiceID case len(servicesRes.Payload.Haproxy) == 1: - cmd.ServiceID = servicesRes.Payload.Haproxy[0].ServiceID + serviceID = servicesRes.Payload.Haproxy[0].ServiceID case len(servicesRes.Payload.External) == 1: - cmd.ServiceID = servicesRes.Payload.External[0].ServiceID + serviceID = servicesRes.Payload.External[0].ServiceID } if cmd.ServiceID == "" { //nolint:revive,golint return nil, errors.New(`We could not find a service associated with the local node. Please provide "Service ID" or "Service name".`) } + case cmd.ServiceName != "" && cmd.ServiceID == "": + serviceID = cmd.ServiceName + default: + serviceID = cmd.ServiceID } params := &mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: cmd.ServiceID, - ServiceName: cmd.ServiceName, - ServiceType: cmd.serviceType(), - }, - Context: commands.Ctx, + ServiceID: serviceID, + ServiceType: cmd.serviceType(), + Context: commands.Ctx, } _, err := client.Default.ManagementService.RemoveService(params) if err != nil { diff --git a/api-tests/management/external_test.go b/api-tests/management/external_test.go index 141a3bc73f6..657a7a5b290 100644 --- a/api-tests/management/external_test.go +++ b/api-tests/management/external_test.go @@ -28,6 +28,7 @@ import ( agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" nodes "github.com/percona/pmm/api/inventory/v1/json/client/nodes_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" + "github.com/percona/pmm/api/inventory/v1/types" "github.com/percona/pmm/api/management/v1/json/client" mservice "github.com/percona/pmm/api/management/v1/json/client/management_service" ) @@ -428,11 +429,9 @@ func TestRemoveExternal(t *testing.T) { defer pmmapitests.RemoveNodes(t, nodeID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEEXTERNALSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceName, + ServiceType: pointer.ToString(types.ServiceTypeExternalService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -456,11 +455,9 @@ func TestRemoveExternal(t *testing.T) { defer pmmapitests.RemoveNodes(t, nodeID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEEXTERNALSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypeExternalService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -477,25 +474,6 @@ func TestRemoveExternal(t *testing.T) { assert.Nil(t, listAgents) }) - t.Run("Both params", func(t *testing.T) { - serviceName := pmmapitests.TestString(t, "service-remove-both-params") - nodeName := pmmapitests.TestString(t, "node-remove-both-params") - nodeID, serviceID := addExternal(t, serviceName, nodeName) - defer pmmapitests.RemoveNodes(t, nodeID) - defer pmmapitests.RemoveServices(t, serviceID) - - removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEEXTERNALSERVICE), - }, - Context: pmmapitests.Context, - }) - assert.Nil(t, removeServiceOK) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "service_id or service_name expected; not both") - }) - t.Run("Wrong type", func(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-remove-wrong-type") nodeName := pmmapitests.TestString(t, "node-remove-wrong-type") @@ -504,11 +482,9 @@ func TestRemoveExternal(t *testing.T) { defer pmmapitests.RemoveServices(t, serviceID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypePostgreSQLService), + Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "wrong service type") @@ -516,7 +492,6 @@ func TestRemoveExternal(t *testing.T) { t.Run("No params", func(t *testing.T) { removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{}, Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) diff --git a/api-tests/management/haproxy_test.go b/api-tests/management/haproxy_test.go index 803e9965373..f1518444e80 100644 --- a/api-tests/management/haproxy_test.go +++ b/api-tests/management/haproxy_test.go @@ -28,6 +28,7 @@ import ( agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" nodes "github.com/percona/pmm/api/inventory/v1/json/client/nodes_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" + "github.com/percona/pmm/api/inventory/v1/types" "github.com/percona/pmm/api/management/v1/json/client" mservice "github.com/percona/pmm/api/management/v1/json/client/management_service" ) @@ -389,11 +390,9 @@ func TestRemoveHAProxy(t *testing.T) { defer pmmapitests.RemoveNodes(t, nodeID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEHAPROXYSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceName, + ServiceType: pointer.ToString(types.ServiceTypeHAProxyService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -417,11 +416,9 @@ func TestRemoveHAProxy(t *testing.T) { defer pmmapitests.RemoveNodes(t, nodeID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEHAPROXYSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypeHAProxyService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -438,25 +435,6 @@ func TestRemoveHAProxy(t *testing.T) { assert.Nil(t, listAgents) }) - t.Run("Both params", func(t *testing.T) { - serviceName := pmmapitests.TestString(t, "service-remove-both-params") - nodeName := pmmapitests.TestString(t, "node-remove-both-params") - nodeID, serviceID := addHAProxy(t, serviceName, nodeName) - defer pmmapitests.RemoveNodes(t, nodeID) - defer pmmapitests.RemoveServices(t, serviceID) - - removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEHAPROXYSERVICE), - }, - Context: pmmapitests.Context, - }) - assert.Nil(t, removeServiceOK) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "service_id or service_name expected; not both") - }) - t.Run("Wrong type", func(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-remove-wrong-type") nodeName := pmmapitests.TestString(t, "node-remove-wrong-type") @@ -465,11 +443,9 @@ func TestRemoveHAProxy(t *testing.T) { defer pmmapitests.RemoveServices(t, serviceID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypePostgreSQLService), + Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "wrong service type") @@ -477,7 +453,6 @@ func TestRemoveHAProxy(t *testing.T) { t.Run("No params", func(t *testing.T) { removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{}, Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) diff --git a/api-tests/management/mongodb_test.go b/api-tests/management/mongodb_test.go index d7944f911bb..25849c8bdd2 100644 --- a/api-tests/management/mongodb_test.go +++ b/api-tests/management/mongodb_test.go @@ -27,6 +27,7 @@ import ( inventoryClient "github.com/percona/pmm/api/inventory/v1/json/client" agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" + "github.com/percona/pmm/api/inventory/v1/types" "github.com/percona/pmm/api/management/v1/json/client" mservice "github.com/percona/pmm/api/management/v1/json/client/management_service" ) @@ -878,11 +879,9 @@ func TestRemoveMongoDB(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEMONGODBSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceName, + ServiceType: pointer.ToString(types.ServiceTypeMongoDBService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -907,11 +906,9 @@ func TestRemoveMongoDB(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEMONGODBSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypeMongoDBService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -928,26 +925,6 @@ func TestRemoveMongoDB(t *testing.T) { assert.Nil(t, listAgents) }) - t.Run("Both params", func(t *testing.T) { - serviceName := pmmapitests.TestString(t, "service-remove-both-params") - nodeName := pmmapitests.TestString(t, "node-remove-both-params") - nodeID, pmmAgentID, serviceID := addMongoDB(t, serviceName, nodeName, false) - defer pmmapitests.RemoveNodes(t, nodeID) - defer pmmapitests.RemoveServices(t, serviceID) - defer RemovePMMAgentWithSubAgents(t, pmmAgentID) - - removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEMYSQLSERVICE), - }, - Context: pmmapitests.Context, - }) - assert.Nil(t, removeServiceOK) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "service_id or service_name expected; not both") - }) - t.Run("Wrong type", func(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-remove-wrong-type") nodeName := pmmapitests.TestString(t, "node-remove-wrong-type") @@ -957,11 +934,9 @@ func TestRemoveMongoDB(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypePostgreSQLService), + Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "wrong service type") diff --git a/api-tests/management/mysql_test.go b/api-tests/management/mysql_test.go index 05ee6e4c4e7..d1ff324b86c 100644 --- a/api-tests/management/mysql_test.go +++ b/api-tests/management/mysql_test.go @@ -27,6 +27,7 @@ import ( inventoryClient "github.com/percona/pmm/api/inventory/v1/json/client" agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" + "github.com/percona/pmm/api/inventory/v1/types" "github.com/percona/pmm/api/management/v1/json/client" mservice "github.com/percona/pmm/api/management/v1/json/client/management_service" ) @@ -875,11 +876,9 @@ func TestRemoveMySQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEMYSQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceName, + ServiceType: pointer.ToString(types.ServiceTypeMySQLService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -904,11 +903,9 @@ func TestRemoveMySQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEMYSQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypeMySQLService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -925,26 +922,6 @@ func TestRemoveMySQL(t *testing.T) { assert.Nil(t, listAgents) }) - t.Run("Both params", func(t *testing.T) { - serviceName := pmmapitests.TestString(t, "service-remove-both-params") - nodeName := pmmapitests.TestString(t, "node-remove-both-params") - nodeID, pmmAgentID, serviceID := addMySQL(t, serviceName, nodeName, false) - defer pmmapitests.RemoveNodes(t, nodeID) - defer pmmapitests.RemoveServices(t, serviceID) - defer RemovePMMAgentWithSubAgents(t, pmmAgentID) - - removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEMYSQLSERVICE), - }, - Context: pmmapitests.Context, - }) - assert.Nil(t, removeServiceOK) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "service_id or service_name expected; not both") - }) - t.Run("Wrong type", func(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-remove-wrong-type") nodeName := pmmapitests.TestString(t, "node-remove-wrong-type") @@ -954,11 +931,9 @@ func TestRemoveMySQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypePostgreSQLService), + Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "wrong service type") @@ -966,7 +941,6 @@ func TestRemoveMySQL(t *testing.T) { t.Run("No params", func(t *testing.T) { removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{}, Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) diff --git a/api-tests/management/postgresql_test.go b/api-tests/management/postgresql_test.go index ed004853987..5f35ffe52ca 100644 --- a/api-tests/management/postgresql_test.go +++ b/api-tests/management/postgresql_test.go @@ -27,6 +27,7 @@ import ( inventoryClient "github.com/percona/pmm/api/inventory/v1/json/client" agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" + "github.com/percona/pmm/api/inventory/v1/types" "github.com/percona/pmm/api/management/v1/json/client" mservice "github.com/percona/pmm/api/management/v1/json/client/management_service" ) @@ -859,11 +860,9 @@ func TestRemovePostgreSQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceName, + ServiceType: pointer.ToString(types.ServiceTypePostgreSQLService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -888,11 +887,9 @@ func TestRemovePostgreSQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypePostgreSQLService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -909,26 +906,6 @@ func TestRemovePostgreSQL(t *testing.T) { assert.Nil(t, listAgents) }) - t.Run("Both params", func(t *testing.T) { - serviceName := pmmapitests.TestString(t, "service-remove-both-params") - nodeName := pmmapitests.TestString(t, "node-remove-both-params") - nodeID, pmmAgentID, serviceID := addPostgreSQL(t, serviceName, nodeName, false) - defer pmmapitests.RemoveNodes(t, nodeID) - defer pmmapitests.RemoveServices(t, serviceID) - defer RemovePMMAgentWithSubAgents(t, pmmAgentID) - - removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE), - }, - Context: pmmapitests.Context, - }) - assert.Nil(t, removeServiceOK) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "service_id or service_name expected; not both") - }) - t.Run("Wrong type", func(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-remove-wrong-type") nodeName := pmmapitests.TestString(t, "node-remove-wrong-type") @@ -938,11 +915,9 @@ func TestRemovePostgreSQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEMYSQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypeMySQLService), + Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "wrong service type") diff --git a/api-tests/management/proxysql_test.go b/api-tests/management/proxysql_test.go index a4095342c00..d4fde2cdbe4 100644 --- a/api-tests/management/proxysql_test.go +++ b/api-tests/management/proxysql_test.go @@ -27,6 +27,7 @@ import ( inventoryClient "github.com/percona/pmm/api/inventory/v1/json/client" agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" + "github.com/percona/pmm/api/inventory/v1/types" "github.com/percona/pmm/api/management/v1/json/client" mservice "github.com/percona/pmm/api/management/v1/json/client/management_service" ) @@ -618,11 +619,9 @@ func TestRemoveProxySQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPROXYSQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceName, + ServiceType: pointer.ToString(types.ServiceTypeProxySQLService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -647,11 +646,9 @@ func TestRemoveProxySQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPROXYSQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypeProxySQLService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -668,26 +665,6 @@ func TestRemoveProxySQL(t *testing.T) { assert.Nil(t, listAgents) }) - t.Run("Both params", func(t *testing.T) { - serviceName := pmmapitests.TestString(t, "service-remove-both-params") - nodeName := pmmapitests.TestString(t, "node-remove-both-params") - nodeID, pmmAgentID, serviceID := addProxySQL(t, serviceName, nodeName) - defer pmmapitests.RemoveNodes(t, nodeID) - defer pmmapitests.RemoveServices(t, serviceID) - defer RemovePMMAgentWithSubAgents(t, pmmAgentID) - - removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPROXYSQLSERVICE), - }, - Context: pmmapitests.Context, - }) - assert.Nil(t, removeServiceOK) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "service_id or service_name expected; not both") - }) - t.Run("Wrong type", func(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-remove-wrong-type") nodeName := pmmapitests.TestString(t, "node-remove-wrong-type") @@ -697,11 +674,9 @@ func TestRemoveProxySQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypePostgreSQLService), + Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "wrong service type") @@ -709,7 +684,6 @@ func TestRemoveProxySQL(t *testing.T) { t.Run("No params", func(t *testing.T) { removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{}, Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) diff --git a/api/MIGRATION_EXAMPLES.md b/api/MIGRATION_EXAMPLES.md index a253363a8b7..64260913d3f 100644 --- a/api/MIGRATION_EXAMPLES.md +++ b/api/MIGRATION_EXAMPLES.md @@ -39,6 +39,9 @@ curl -s -X GET http://admin:admin@localhost:8080/v1/inventory/nodes/32c914d1-daf ### POST /v1/inventory/Services/Get -> GET /v1/inventory/services/{service_id} curl -s -X GET http://admin:admin@localhost:8080/v1/inventory/services/d4dfdccf-c07c-48a6-a101-b119b04d880f +### POST /v1/inventory/Services/List -> GET /v1/inventory/services +curl -s -X GET http://admin:admin@localhost:8080/v1/inventory/services + ### POST /v1/inventory/Services/Change -> PUT /v1/inventory/services/{service_id} curl -s -X PUT -d '{"cluster": "test2","environment":"dev","replication_set":"main"}' http://admin:admin@localhost:8080/v1/inventory/services/d4dfdccf-c07c-48a6-a101-b119b04d880f ### add/update custom labels @@ -48,3 +51,8 @@ curl -s -X PUT -d '{"replication_set":"","custom_labels":{}}' http://admin:admin ### POST /v1/inventory/Services/ListTypes -> POST /v1/inventory/services:getTypes curl -s -X POST http://admin:admin@localhost:8080/v1/inventory/services:getTypes + + +curl -s -X POST -d '{"service_name":"foo"}' http://admin:admin@localhost:8080/v1/management/Service/Remove +curl -s -X POST -d '{"service_id":"123"}' http://admin:admin@localhost:8080/v1/management/Service/Remove +curl -s -X DELETE http://admin:admin@localhost:8080/v1/management/services/123 diff --git a/api/MIGRATION_TO_V3.md b/api/MIGRATION_TO_V3.md index 1959d904c9a..a246a86ffb4 100644 --- a/api/MIGRATION_TO_V3.md +++ b/api/MIGRATION_TO_V3.md @@ -45,17 +45,17 @@ POST /v1/inventory/Services/CustomLabels/Add PUT /v1/inventory/services/{ POST /v1/inventory/Services/CustomLabels/Remove PUT /v1/inventory/services/{service_id} ✅ NOTE: merged into PUT /v1/inventory/services/{id} **ManagementService** **ManagementService** -POST /v1/management/Annotations/Add POST /v1/management/annotations -POST /v1/management/Node/Register POST /v1/management/nodes -POST /v1/management/External/Add POST /v1/management/services pass a service type in body -POST /v1/management/HAProxy/Add POST /v1/management/services pass a service type in body -POST /v1/management/MongoDB/Add POST /v1/management/services pass a service type in body -POST /v1/management/MySQL/Add POST /v1/management/services pass a service type in body -POST /v1/management/PostgreSQL/Add POST /v1/management/services pass a service type in body -POST /v1/management/ProxySQL/Add POST /v1/management/services pass a service type in body -POST /v1/management/RDS/Add POST /v1/management/services pass a service type in body -POST /v1/management/RDS/Discover POST /v1/management/services:discoverRDS -POST /v1/management/Service/Remove DELETE /v1/management/services/{id} ({service_id} or {service_name}) and optional {service_type} +POST /v1/management/Annotations/Add POST /v1/management/annotations ✅ +POST /v1/management/Node/Register POST /v1/management/nodes ✅ +POST /v1/management/External/Add POST /v1/management/services/external ✅ +POST /v1/management/HAProxy/Add POST /v1/management/services/haproxy ✅ +POST /v1/management/MongoDB/Add POST /v1/management/services/mongodb ✅ +POST /v1/management/MySQL/Add POST /v1/management/services/mysql ✅ +POST /v1/management/PostgreSQL/Add POST /v1/management/services/postgresql ✅ +POST /v1/management/ProxySQL/Add POST /v1/management/services/proxysql ✅ +POST /v1/management/RDS/Add POST /v1/management/services/rds ✅ +POST /v1/management/RDS/Discover POST /v1/management/services:discoverRDS ✅ +POST /v1/management/Service/Remove DELETE /v1/management/services/{service_id} ✅ {service_id}, optionally ?service_type= **ActionsService** **ActionService** POST /v1/actions/Cancel POST /v1/actions:cancel @@ -77,14 +77,14 @@ POST /v1/actions/StartPTSummary POST /v1/actions:startNodeAc **AlertingService** **AlertingService** POST /v1/alerting/Rules/Create POST /v1/alerting/rules POST /v1/alerting/Templates/Create POST /v1/alerting/templates -POST /v1/alerting/Templates/Update PUT /v1/alerting/templates/{name} !!! pass yaml in body +POST /v1/alerting/Templates/Update PUT /v1/alerting/templates/{name} POST /v1/alerting/Templates/List GET /v1/alerting/templates POST /v1/alerting/Templates/Delete DELETE /v1/alerting/templates/{name} **AdvisorService** **AdvisorService** -POST /v1/advisors/Change POST /v1/advisors/checks:batchChange !!! exception: updates multiple checks +POST /v1/advisors/Change POST /v1/advisors/checks:batchChange Note: allows to update multiple checks -POST /v1/advisors/FailedChecks GET /v1/advisors/checks/failedChecks ex: ?service_id=/service_id/1234-5678-abcd-efgh&page_params.page_size=100&page_params.index=1 +POST /v1/advisors/FailedChecks GET /v1/advisors/checks/failedChecks ex: ?service_id=1234-5678-abcd-efgh&page_params.page_size=100&page_params.index=1 POST /v1/advisors/List GET /v1/advisors POST /v1/advisors/ListChecks GET /v1/advisors/checks POST /v1/advisors/StartChecks POST /v1/advisors/checks:start diff --git a/api/management/v1/annotation.pb.go b/api/management/v1/annotation.pb.go index cf6fb5ae8da..a6450e0e3f7 100644 --- a/api/management/v1/annotation.pb.go +++ b/api/management/v1/annotation.pb.go @@ -32,9 +32,9 @@ type AddAnnotationRequest struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // Tags are used to filter annotations. Tags []string `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty"` - // Used for annotate node. + // Used for annotating a node. NodeName string `protobuf:"bytes,3,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` - // Used for annotate services. + // Used for annotating services. ServiceNames []string `protobuf:"bytes,4,rep,name=service_names,json=serviceNames,proto3" json:"service_names,omitempty"` } diff --git a/api/management/v1/annotation.proto b/api/management/v1/annotation.proto index 34139f53cdc..ba64c908063 100644 --- a/api/management/v1/annotation.proto +++ b/api/management/v1/annotation.proto @@ -10,9 +10,9 @@ message AddAnnotationRequest { string text = 1 [(validate.rules).string.min_len = 1]; // Tags are used to filter annotations. repeated string tags = 2; - // Used for annotate node. + // Used for annotating a node. string node_name = 3; - // Used for annotate services. + // Used for annotating services. repeated string service_names = 4; } diff --git a/api/management/v1/external.pb.go b/api/management/v1/external.pb.go index 3098abccffe..fe0fcfa0557 100644 --- a/api/management/v1/external.pb.go +++ b/api/management/v1/external.pb.go @@ -31,18 +31,18 @@ type AddExternalRequest struct { unknownFields protoimpl.UnknownFields // Node identifier on which an external exporter is been running. - // runs_on_node_id always should be passed with node_id. + // runs_on_node_id should always be passed with node_id. // Exactly one of these parameters should be present: node_id, node_name, add_node. RunsOnNodeId string `protobuf:"bytes,1,opt,name=runs_on_node_id,json=runsOnNodeId,proto3" json:"runs_on_node_id,omitempty"` // Node name on which a service and node is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeName string `protobuf:"bytes,2,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` // Create a new Node with those parameters. - // add_node always should be passed with address. + // add_node should always be passed with address. // Exactly one of these parameters should be present: node_id, node_name, add_node. AddNode *AddNodeParams `protobuf:"bytes,3,opt,name=add_node,json=addNode,proto3" json:"add_node,omitempty"` // Node and Exporter access address (DNS name or IP). - // address always should be passed with add_node. + // address should always be passed with add_node. Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` // Unique across all Services user-defined name. Required. ServiceName string `protobuf:"bytes,5,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` @@ -57,7 +57,7 @@ type AddExternalRequest struct { // Listen port for scraping metrics. ListenPort uint32 `protobuf:"varint,10,opt,name=listen_port,json=listenPort,proto3" json:"listen_port,omitempty"` // Node identifier on which an external service is been running. - // node_id always should be passed with runs_on_node_id. + // node_id should always be passed with runs_on_node_id. NodeId string `protobuf:"bytes,11,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` // Environment name. Environment string `protobuf:"bytes,12,opt,name=environment,proto3" json:"environment,omitempty"` diff --git a/api/management/v1/external.proto b/api/management/v1/external.proto index d04a6ad2617..ab0ab5765b9 100644 --- a/api/management/v1/external.proto +++ b/api/management/v1/external.proto @@ -13,18 +13,18 @@ import "validate/validate.proto"; message AddExternalRequest { // Node identifier on which an external exporter is been running. - // runs_on_node_id always should be passed with node_id. + // runs_on_node_id should always be passed with node_id. // Exactly one of these parameters should be present: node_id, node_name, add_node. string runs_on_node_id = 1; // Node name on which a service and node is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. string node_name = 2; // Create a new Node with those parameters. - // add_node always should be passed with address. + // add_node should always be passed with address. // Exactly one of these parameters should be present: node_id, node_name, add_node. AddNodeParams add_node = 3; // Node and Exporter access address (DNS name or IP). - // address always should be passed with add_node. + // address should always be passed with add_node. string address = 4; // Unique across all Services user-defined name. Required. string service_name = 5 [(validate.rules).string.min_len = 1]; @@ -42,7 +42,7 @@ message AddExternalRequest { lt: 65536 }]; // Node identifier on which an external service is been running. - // node_id always should be passed with runs_on_node_id. + // node_id should always be passed with runs_on_node_id. string node_id = 11; // Environment name. string environment = 12; diff --git a/api/management/v1/json/client/management_service/add_annotation_responses.go b/api/management/v1/json/client/management_service/add_annotation_responses.go index 9c9392c7a6b..d52e86eb658 100644 --- a/api/management/v1/json/client/management_service/add_annotation_responses.go +++ b/api/management/v1/json/client/management_service/add_annotation_responses.go @@ -58,7 +58,7 @@ type AddAnnotationOK struct { } func (o *AddAnnotationOK) Error() string { - return fmt.Sprintf("[POST /v1/management/Annotations/Add][%d] addAnnotationOk %+v", 200, o.Payload) + return fmt.Sprintf("[POST /v1/management/annotations][%d] addAnnotationOk %+v", 200, o.Payload) } func (o *AddAnnotationOK) GetPayload() interface{} { @@ -98,7 +98,7 @@ func (o *AddAnnotationDefault) Code() int { } func (o *AddAnnotationDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/Annotations/Add][%d] AddAnnotation default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /v1/management/annotations][%d] AddAnnotation default %+v", o._statusCode, o.Payload) } func (o *AddAnnotationDefault) GetPayload() *AddAnnotationDefaultBody { @@ -127,10 +127,10 @@ type AddAnnotationBody struct { // Tags are used to filter annotations. Tags []string `json:"tags"` - // Used for annotate node. + // Used for annotating a node. NodeName string `json:"node_name,omitempty"` - // Used for annotate services. + // Used for annotating services. ServiceNames []string `json:"service_names"` } diff --git a/api/management/v1/json/client/management_service/add_external_responses.go b/api/management/v1/json/client/management_service/add_external_responses.go index 16c57ced147..9cc46f3d113 100644 --- a/api/management/v1/json/client/management_service/add_external_responses.go +++ b/api/management/v1/json/client/management_service/add_external_responses.go @@ -126,7 +126,7 @@ swagger:model AddExternalBody */ type AddExternalBody struct { // Node identifier on which an external exporter is been running. - // runs_on_node_id always should be passed with node_id. + // runs_on_node_id should always be passed with node_id. // Exactly one of these parameters should be present: node_id, node_name, add_node. RunsOnNodeID string `json:"runs_on_node_id,omitempty"` @@ -135,7 +135,7 @@ type AddExternalBody struct { NodeName string `json:"node_name,omitempty"` // Node and Exporter access address (DNS name or IP). - // address always should be passed with add_node. + // address should always be passed with add_node. Address string `json:"address,omitempty"` // Unique across all Services user-defined name. Required. @@ -157,7 +157,7 @@ type AddExternalBody struct { ListenPort int64 `json:"listen_port,omitempty"` // Node identifier on which an external service is been running. - // node_id always should be passed with runs_on_node_id. + // node_id should always be passed with runs_on_node_id. NodeID string `json:"node_id,omitempty"` // Environment name. diff --git a/api/management/v1/json/client/management_service/management_service_client.go b/api/management/v1/json/client/management_service/management_service_client.go index 5c5b343a26c..562f9da9654 100644 --- a/api/management/v1/json/client/management_service/management_service_client.go +++ b/api/management/v1/json/client/management_service/management_service_client.go @@ -66,7 +66,7 @@ func (a *Client) AddAnnotation(params *AddAnnotationParams, opts ...ClientOption op := &runtime.ClientOperation{ ID: "AddAnnotation", Method: "POST", - PathPattern: "/v1/management/Annotations/Add", + PathPattern: "/v1/management/annotations", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -93,9 +93,9 @@ func (a *Client) AddAnnotation(params *AddAnnotationParams, opts ...ClientOption } /* -AddExternal adds external service +AddExternal adds a service -Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided "node_id", then adds an "external exporter" agent to inventory, which is running on provided "runs_on_node_id". +Adds a service and starts several agents. It automatically adds a service to inventory, which is running on provided "node_id", then adds an "external exporter" agent to inventory, which is running on provided "runs_on_node_id". */ func (a *Client) AddExternal(params *AddExternalParams, opts ...ClientOption) (*AddExternalOK, error) { // TODO: Validate the params before sending @@ -407,7 +407,7 @@ func (a *Client) DiscoverRDS(params *DiscoverRDSParams, opts ...ClientOption) (* /* RegisterNode registers node -Registers a new Node and pmm-agent. +Registers a new Node and a pmm-agent. */ func (a *Client) RegisterNode(params *RegisterNodeParams, opts ...ClientOption) (*RegisterNodeOK, error) { // TODO: Validate the params before sending @@ -417,7 +417,7 @@ func (a *Client) RegisterNode(params *RegisterNodeParams, opts ...ClientOption) op := &runtime.ClientOperation{ ID: "RegisterNode", Method: "POST", - PathPattern: "/v1/management/Node/Register", + PathPattern: "/v1/management/nodes", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -455,8 +455,8 @@ func (a *Client) RemoveService(params *RemoveServiceParams, opts ...ClientOption } op := &runtime.ClientOperation{ ID: "RemoveService", - Method: "POST", - PathPattern: "/v1/management/Service/Remove", + Method: "DELETE", + PathPattern: "/v1/management/services/{service_id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, diff --git a/api/management/v1/json/client/management_service/register_node_responses.go b/api/management/v1/json/client/management_service/register_node_responses.go index f850e8353fe..07804a91ab8 100644 --- a/api/management/v1/json/client/management_service/register_node_responses.go +++ b/api/management/v1/json/client/management_service/register_node_responses.go @@ -60,7 +60,7 @@ type RegisterNodeOK struct { } func (o *RegisterNodeOK) Error() string { - return fmt.Sprintf("[POST /v1/management/Node/Register][%d] registerNodeOk %+v", 200, o.Payload) + return fmt.Sprintf("[POST /v1/management/nodes][%d] registerNodeOk %+v", 200, o.Payload) } func (o *RegisterNodeOK) GetPayload() *RegisterNodeOKBody { @@ -102,7 +102,7 @@ func (o *RegisterNodeDefault) Code() int { } func (o *RegisterNodeDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/Node/Register][%d] RegisterNode default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /v1/management/nodes][%d] RegisterNode default %+v", o._statusCode, o.Payload) } func (o *RegisterNodeDefault) GetPayload() *RegisterNodeDefaultBody { diff --git a/api/management/v1/json/client/management_service/remove_service_parameters.go b/api/management/v1/json/client/management_service/remove_service_parameters.go index 238862f4b54..16511c1b2e4 100644 --- a/api/management/v1/json/client/management_service/remove_service_parameters.go +++ b/api/management/v1/json/client/management_service/remove_service_parameters.go @@ -60,8 +60,19 @@ RemoveServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveServiceParams struct { - // Body. - Body RemoveServiceBody + /* ServiceID. + + Either a Service ID or a Service Name. + */ + ServiceID string + + /* ServiceType. + + Service type. + + Default: "SERVICE_TYPE_UNSPECIFIED" + */ + ServiceType *string timeout time.Duration Context context.Context @@ -80,7 +91,16 @@ func (o *RemoveServiceParams) WithDefaults() *RemoveServiceParams { // // All values with no default are reset to their zero value. func (o *RemoveServiceParams) SetDefaults() { - // no default values defined for this parameter + serviceTypeDefault := string("SERVICE_TYPE_UNSPECIFIED") + + val := RemoveServiceParams{ + ServiceType: &serviceTypeDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val } // WithTimeout adds the timeout to the remove service params @@ -116,15 +136,26 @@ func (o *RemoveServiceParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithBody adds the body to the remove service params -func (o *RemoveServiceParams) WithBody(body RemoveServiceBody) *RemoveServiceParams { - o.SetBody(body) +// WithServiceID adds the serviceID to the remove service params +func (o *RemoveServiceParams) WithServiceID(serviceID string) *RemoveServiceParams { + o.SetServiceID(serviceID) return o } -// SetBody adds the body to the remove service params -func (o *RemoveServiceParams) SetBody(body RemoveServiceBody) { - o.Body = body +// SetServiceID adds the serviceId to the remove service params +func (o *RemoveServiceParams) SetServiceID(serviceID string) { + o.ServiceID = serviceID +} + +// WithServiceType adds the serviceType to the remove service params +func (o *RemoveServiceParams) WithServiceType(serviceType *string) *RemoveServiceParams { + o.SetServiceType(serviceType) + return o +} + +// SetServiceType adds the serviceType to the remove service params +func (o *RemoveServiceParams) SetServiceType(serviceType *string) { + o.ServiceType = serviceType } // WriteToRequest writes these params to a swagger request @@ -133,10 +164,28 @@ func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt return err } var res []error - if err := r.SetBodyParam(o.Body); err != nil { + + // path param service_id + if err := r.SetPathParam("service_id", o.ServiceID); err != nil { return err } + if o.ServiceType != nil { + + // query param service_type + var qrServiceType string + + if o.ServiceType != nil { + qrServiceType = *o.ServiceType + } + qServiceType := qrServiceType + if qServiceType != "" { + if err := r.SetQueryParam("service_type", qServiceType); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/api/management/v1/json/client/management_service/remove_service_responses.go b/api/management/v1/json/client/management_service/remove_service_responses.go index 55cd38fd3ff..c5dbf4c32a3 100644 --- a/api/management/v1/json/client/management_service/remove_service_responses.go +++ b/api/management/v1/json/client/management_service/remove_service_responses.go @@ -7,7 +7,6 @@ package management_service import ( "context" - "encoding/json" "fmt" "io" "strconv" @@ -16,7 +15,6 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/go-openapi/validate" ) // RemoveServiceReader is a Reader for the RemoveService structure. @@ -60,7 +58,7 @@ type RemoveServiceOK struct { } func (o *RemoveServiceOK) Error() string { - return fmt.Sprintf("[POST /v1/management/Service/Remove][%d] removeServiceOk %+v", 200, o.Payload) + return fmt.Sprintf("[DELETE /v1/management/services/{service_id}][%d] removeServiceOk %+v", 200, o.Payload) } func (o *RemoveServiceOK) GetPayload() interface{} { @@ -100,7 +98,7 @@ func (o *RemoveServiceDefault) Code() int { } func (o *RemoveServiceDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/Service/Remove][%d] RemoveService default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[DELETE /v1/management/services/{service_id}][%d] RemoveService default %+v", o._statusCode, o.Payload) } func (o *RemoveServiceDefault) GetPayload() *RemoveServiceDefaultBody { @@ -118,117 +116,6 @@ func (o *RemoveServiceDefault) readResponse(response runtime.ClientResponse, con return nil } -/* -RemoveServiceBody remove service body -swagger:model RemoveServiceBody -*/ -type RemoveServiceBody struct { - // ServiceType describes supported Service types. - // Enum: [SERVICE_TYPE_UNSPECIFIED SERVICE_TYPE_MYSQL_SERVICE SERVICE_TYPE_MONGODB_SERVICE SERVICE_TYPE_POSTGRESQL_SERVICE SERVICE_TYPE_PROXYSQL_SERVICE SERVICE_TYPE_HAPROXY_SERVICE SERVICE_TYPE_EXTERNAL_SERVICE] - ServiceType *string `json:"service_type,omitempty"` - - // Service ID or Service Name is required. - // Unique randomly generated instance identifier. - ServiceID string `json:"service_id,omitempty"` - - // Unique across all Services user-defined name. - ServiceName string `json:"service_name,omitempty"` -} - -// Validate validates this remove service body -func (o *RemoveServiceBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateServiceType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var removeServiceBodyTypeServiceTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["SERVICE_TYPE_UNSPECIFIED","SERVICE_TYPE_MYSQL_SERVICE","SERVICE_TYPE_MONGODB_SERVICE","SERVICE_TYPE_POSTGRESQL_SERVICE","SERVICE_TYPE_PROXYSQL_SERVICE","SERVICE_TYPE_HAPROXY_SERVICE","SERVICE_TYPE_EXTERNAL_SERVICE"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - removeServiceBodyTypeServiceTypePropEnum = append(removeServiceBodyTypeServiceTypePropEnum, v) - } -} - -const ( - - // RemoveServiceBodyServiceTypeSERVICETYPEUNSPECIFIED captures enum value "SERVICE_TYPE_UNSPECIFIED" - RemoveServiceBodyServiceTypeSERVICETYPEUNSPECIFIED string = "SERVICE_TYPE_UNSPECIFIED" - - // RemoveServiceBodyServiceTypeSERVICETYPEMYSQLSERVICE captures enum value "SERVICE_TYPE_MYSQL_SERVICE" - RemoveServiceBodyServiceTypeSERVICETYPEMYSQLSERVICE string = "SERVICE_TYPE_MYSQL_SERVICE" - - // RemoveServiceBodyServiceTypeSERVICETYPEMONGODBSERVICE captures enum value "SERVICE_TYPE_MONGODB_SERVICE" - RemoveServiceBodyServiceTypeSERVICETYPEMONGODBSERVICE string = "SERVICE_TYPE_MONGODB_SERVICE" - - // RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE captures enum value "SERVICE_TYPE_POSTGRESQL_SERVICE" - RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE string = "SERVICE_TYPE_POSTGRESQL_SERVICE" - - // RemoveServiceBodyServiceTypeSERVICETYPEPROXYSQLSERVICE captures enum value "SERVICE_TYPE_PROXYSQL_SERVICE" - RemoveServiceBodyServiceTypeSERVICETYPEPROXYSQLSERVICE string = "SERVICE_TYPE_PROXYSQL_SERVICE" - - // RemoveServiceBodyServiceTypeSERVICETYPEHAPROXYSERVICE captures enum value "SERVICE_TYPE_HAPROXY_SERVICE" - RemoveServiceBodyServiceTypeSERVICETYPEHAPROXYSERVICE string = "SERVICE_TYPE_HAPROXY_SERVICE" - - // RemoveServiceBodyServiceTypeSERVICETYPEEXTERNALSERVICE captures enum value "SERVICE_TYPE_EXTERNAL_SERVICE" - RemoveServiceBodyServiceTypeSERVICETYPEEXTERNALSERVICE string = "SERVICE_TYPE_EXTERNAL_SERVICE" -) - -// prop value enum -func (o *RemoveServiceBody) validateServiceTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, removeServiceBodyTypeServiceTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (o *RemoveServiceBody) validateServiceType(formats strfmt.Registry) error { - if swag.IsZero(o.ServiceType) { // not required - return nil - } - - // value enum - if err := o.validateServiceTypeEnum("body"+"."+"service_type", "body", *o.ServiceType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this remove service body based on context it is used -func (o *RemoveServiceBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *RemoveServiceBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *RemoveServiceBody) UnmarshalBinary(b []byte) error { - var res RemoveServiceBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - /* RemoveServiceDefaultBody remove service default body swagger:model RemoveServiceDefaultBody diff --git a/api/management/v1/json/v1.json b/api/management/v1/json/v1.json index e468fcac6da..de6f57aaddf 100644 --- a/api/management/v1/json/v1.json +++ b/api/management/v1/json/v1.json @@ -15,102 +15,13 @@ "version": "v1" }, "paths": { - "/v1/management/Annotations/Add": { - "post": { - "description": "Adds an annotation.", - "tags": [ - "ManagementService" - ], - "summary": "Add Annotation", - "operationId": "AddAnnotation", - "parameters": [ - { - "description": "AddAnnotationRequest is a params to add new annotation.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "description": "AddAnnotationRequest is a params to add new annotation.", - "type": "object", - "properties": { - "node_name": { - "description": "Used for annotate node.", - "type": "string", - "x-order": 2 - }, - "service_names": { - "description": "Used for annotate services.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 3 - }, - "tags": { - "description": "Tags are used to filter annotations.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - }, - "text": { - "description": "An annotation description. Required.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "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/management/External/Add": { "post": { - "description": "Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", + "description": "Adds a service and starts several agents. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", "tags": [ "ManagementService" ], - "summary": "Add External Service", + "summary": "Add a Service", "operationId": "AddExternal", "parameters": [ { @@ -190,7 +101,7 @@ "x-order": 2 }, "address": { - "description": "Node and Exporter access address (DNS name or IP).\naddress always should be passed with add_node.", + "description": "Node and Exporter access address (DNS name or IP).\naddress should always be passed with add_node.", "type": "string", "x-order": 3 }, @@ -240,7 +151,7 @@ "x-order": 8 }, "node_id": { - "description": "Node identifier on which an external service is been running.\nnode_id always should be passed with runs_on_node_id.", + "description": "Node identifier on which an external service is been running.\nnode_id should always be passed with runs_on_node_id.", "type": "string", "x-order": 10 }, @@ -260,7 +171,7 @@ "x-order": 13 }, "runs_on_node_id": { - "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id always should be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id should always be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 0 }, @@ -2139,14 +2050,14 @@ } } }, - "/v1/management/Node/Register": { + "/v1/management/PostgreSQL/Add": { "post": { - "description": "Registers a new Node and pmm-agent.", + "description": "Adds PostgreSQL Service and starts postgres exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"postgres_exporter\" with provided \"pmm_agent_id\" and other parameters.", "tags": [ "ManagementService" ], - "summary": "Register Node", - "operationId": "RegisterNode", + "summary": "Add PostgreSQL", + "operationId": "AddPostgreSQL", "parameters": [ { "name": "body", @@ -2155,38 +2066,108 @@ "schema": { "type": "object", "properties": { + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "type": "object", + "properties": { + "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 for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "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": 6 + }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "enum": [ + "NODE_TYPE_UNSPECIFIED", + "NODE_TYPE_GENERIC_NODE", + "NODE_TYPE_CONTAINER_NODE", + "NODE_TYPE_REMOTE_NODE", + "NODE_TYPE_REMOTE_RDS_NODE", + "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" + ], + "x-order": 0 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 7 + } + }, + "x-order": 2 + }, "address": { - "description": "Node address (DNS name or IP).", + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 2 + "x-order": 4 }, "agent_password": { "description": "Custom password for exporter endpoint /metrics.", "type": "string", - "x-order": 14 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 9 + "x-order": 28 }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", - "type": "string", - "x-order": 5 + "auto_discovery_limit": { + "description": "Limit for auto discovery.", + "type": "integer", + "format": "int32", + "x-order": 30 }, - "container_name": { - "description": "Container name.", + "cluster": { + "description": "Cluster name.", "type": "string", - "x-order": 6 + "x-order": 10 }, "custom_labels": { - "description": "Custom user-assigned labels for Node.", + "description": "Custom user-assigned labels for Service.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 10 + "x-order": 18 + }, + "database": { + "description": "Database name.", + "type": "string", + "x-order": 6 }, "disable_collectors": { "description": "List of collector names to disable in this exporter.", @@ -2194,22 +2175,54 @@ "items": { "type": "string" }, - "x-order": 13 + "x-order": 24 }, - "distro": { - "description": "Linux distribution name and version.", + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 20 + }, + "disable_query_examples": { + "description": "Disable query examples.", + "type": "boolean", + "x-order": 17 + }, + "environment": { + "description": "Environment name.", "type": "string", - "x-order": 4 + "x-order": 9 }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 15 + "x-order": 31 }, - "machine_id": { - "description": "Linux machine-id.", + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", - "x-order": 3 + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 29 + }, + "max_exporter_connections": { + "description": "Maximum number of connections that exporter can open to the database instance.", + "type": "integer", + "format": "int32", + "x-order": 32 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 16 }, "metrics_mode": { "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", @@ -2220,41 +2233,93 @@ "METRICS_MODE_PULL", "METRICS_MODE_PUSH" ], - "x-order": 12 + "x-order": 23 }, - "node_model": { - "description": "Node model.", + "node_id": { + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", - "x-order": 7 + "x-order": 0 }, "node_name": { - "description": "Unique across all Nodes user-defined name.", + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 1 }, - "node_type": { - "description": "NodeType describes supported Node types.", + "password": { + "description": "PostgreSQL password for scraping metrics.", "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "enum": [ - "NODE_TYPE_UNSPECIFIED", - "NODE_TYPE_GENERIC_NODE", - "NODE_TYPE_CONTAINER_NODE", - "NODE_TYPE_REMOTE_NODE", - "NODE_TYPE_REMOTE_RDS_NODE", - "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" - ], - "x-order": 0 + "x-order": 13 }, - "region": { - "description": "Node region.", + "pmm_agent_id": { + "description": "The \"pmm-agent\" identifier which should run agents. Required.", "type": "string", "x-order": 8 }, - "reregister": { - "description": "If true, and Node with that name already exist, it will be removed with all dependent Services and Agents.", + "port": { + "description": "Service Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 5 + }, + "qan_postgresql_pgstatements_agent": { + "description": "If true, adds qan-postgresql-pgstatements-agent for provided service.", + "type": "boolean", + "x-order": 14 + }, + "qan_postgresql_pgstatmonitor_agent": { + "description": "If true, adds qan-postgresql-pgstatmonitor-agent for provided service.", "type": "boolean", + "x-order": 15 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", "x-order": 11 + }, + "service_name": { + "description": "Unique across all Services user-defined name. Required.", + "type": "string", + "x-order": 3 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 19 + }, + "socket": { + "description": "Service Access socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 7 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 21 + }, + "tls_ca": { + "description": "TLS CA certificate.", + "type": "string", + "x-order": 25 + }, + "tls_cert": { + "description": "TLS Certifcate.", + "type": "string", + "x-order": 26 + }, + "tls_key": { + "description": "TLS Certificate Key.", + "type": "string", + "x-order": 27 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "type": "boolean", + "x-order": 22 + }, + "username": { + "description": "PostgreSQL username for scraping metrics.", + "type": "string", + "x-order": 12 } } } @@ -2266,29 +2331,20 @@ "schema": { "type": "object", "properties": { - "container_node": { - "description": "ContainerNode represents a Docker container.", + "postgres_exporter": { + "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", "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.", + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 4 + "x-order": 0 }, - "container_name": { - "description": "Container name.", - "type": "string", - "x-order": 5 + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 14 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -2296,93 +2352,108 @@ "additionalProperties": { "type": "string" }, + "x-order": 7 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "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 + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 15 }, - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 }, - "node_model": { - "description": "Node model.", + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", - "x-order": 6 + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 13 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 + "max_exporter_connections": { + "description": "Maximum number of connections that exporter can open to the database instance.", + "type": "integer", + "format": "int32", + "x-order": 16 }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 7 - } - }, - "x-order": 1 - }, - "generic_node": { - "description": "GenericNode represents a bare metal server or virtual machine.", - "type": "object", - "properties": { - "address": { - "description": "Node address (DNS name or IP).", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 2 + "x-order": 1 }, - "az": { - "description": "Node availability zone.", + "process_exec_path": { + "description": "Path to exec process.", "type": "string", - "x-order": 7 + "x-order": 12 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", "x-order": 8 }, - "distro": { - "description": "Linux distribution name and version.", - "type": "string", - "x-order": 4 - }, - "machine_id": { - "description": "Linux machine-id.", + "service_id": { + "description": "Service identifier.", "type": "string", "x-order": 3 }, - "node_id": { - "description": "Unique randomly generated instance identifier.", + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", "type": "string", - "x-order": 0 + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 }, - "node_model": { - "description": "Node model.", - "type": "string", + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", "x-order": 5 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "type": "boolean", + "x-order": 6 }, - "region": { - "description": "Node region.", + "username": { + "description": "PostgreSQL username for scraping metrics.", "type": "string", - "x-order": 6 + "x-order": 4 } }, - "x-order": 0 + "x-order": 1 }, - "pmm_agent": { - "description": "PMMAgent runs on Generic or Container Node.", + "qan_postgresql_pgstatements_agent": { + "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -2390,37 +2461,271 @@ "type": "string", "x-order": 0 }, - "connected": { - "description": "True if Agent is running and connected to pmm-managed.", - "type": "boolean", - "x-order": 3 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, + "x-order": 9 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 5 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", "x-order": 2 }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 12 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 6 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 4 + "x-order": 11 }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", + "service_id": { + "description": "Service identifier.", "type": "string", - "x-order": 1 + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 7 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 8 + }, + "username": { + "description": "PostgreSQL username for getting pg stat statements data.", + "type": "string", + "x-order": 4 } }, "x-order": 2 }, - "token": { - "description": "Token represents token for vmagent auth config.", - "type": "string", + "qan_postgresql_pgstatmonitor_agent": { + "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 10 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 7 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 13 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 8 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 12 + }, + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 9 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 11 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "username": { + "description": "PostgreSQL username for getting pg stat monitor data.", + "type": "string", + "x-order": 4 + } + }, "x-order": 3 }, + "service": { + "description": "PostgreSQLService represents a generic PostgreSQL instance.", + "type": "object", + "properties": { + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 4 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 12 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 10 + }, + "database_name": { + "description": "Database name.", + "type": "string", + "x-order": 2 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 7 + }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 3 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 5 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 9 + }, + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 6 + }, + "version": { + "description": "PostgreSQL version.", + "type": "string", + "x-order": 11 + } + }, + "x-order": 0 + }, "warning": { "description": "Warning message.", "type": "string", @@ -2463,14 +2768,14 @@ } } }, - "/v1/management/PostgreSQL/Add": { + "/v1/management/ProxySQL/Add": { "post": { - "description": "Adds PostgreSQL Service and starts postgres exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"postgres_exporter\" with provided \"pmm_agent_id\" and other parameters.", + "description": "Adds ProxySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"proxysql_exporter\" with provided \"pmm_agent_id\" and other parameters.", "tags": [ "ManagementService" ], - "summary": "Add PostgreSQL", - "operationId": "AddPostgreSQL", + "summary": "Add ProxySQL", + "operationId": "AddProxySQL", "parameters": [ { "name": "body", @@ -2556,18 +2861,12 @@ "agent_password": { "description": "Custom password for exporter endpoint /metrics.", "type": "string", - "x-order": 28 - }, - "auto_discovery_limit": { - "description": "Limit for auto discovery.", - "type": "integer", - "format": "int32", - "x-order": 30 + "x-order": 19 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 10 + "x-order": 9 }, "custom_labels": { "description": "Custom user-assigned labels for Service.", @@ -2575,12 +2874,7 @@ "additionalProperties": { "type": "string" }, - "x-order": 18 - }, - "database": { - "description": "Database name.", - "type": "string", - "x-order": 6 + "x-order": 13 }, "disable_collectors": { "description": "List of collector names to disable in this exporter.", @@ -2588,27 +2882,17 @@ "items": { "type": "string" }, - "x-order": 24 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 20 - }, - "disable_query_examples": { - "description": "Disable query examples.", - "type": "boolean", - "x-order": 17 + "x-order": 18 }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 9 + "x-order": 8 }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 31 + "x-order": 21 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -2623,19 +2907,7 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 29 - }, - "max_exporter_connections": { - "description": "Maximum number of connections that exporter can open to the database instance.", - "type": "integer", - "format": "int32", - "x-order": 32 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 16 + "x-order": 20 }, "metrics_mode": { "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", @@ -2646,7 +2918,7 @@ "METRICS_MODE_PULL", "METRICS_MODE_PUSH" ], - "x-order": 23 + "x-order": 17 }, "node_id": { "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", @@ -2659,14 +2931,14 @@ "x-order": 1 }, "password": { - "description": "PostgreSQL password for scraping metrics.", + "description": "ProxySQL password for scraping metrics.", "type": "string", - "x-order": 13 + "x-order": 12 }, "pmm_agent_id": { "description": "The \"pmm-agent\" identifier which should run agents. Required.", "type": "string", - "x-order": 8 + "x-order": 7 }, "port": { "description": "Service Access port.\nPort is required when the address present.", @@ -2674,20 +2946,10 @@ "format": "int64", "x-order": 5 }, - "qan_postgresql_pgstatements_agent": { - "description": "If true, adds qan-postgresql-pgstatements-agent for provided service.", - "type": "boolean", - "x-order": 14 - }, - "qan_postgresql_pgstatmonitor_agent": { - "description": "If true, adds qan-postgresql-pgstatmonitor-agent for provided service.", - "type": "boolean", - "x-order": 15 - }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 11 + "x-order": 10 }, "service_name": { "description": "Unique across all Services user-defined name. Required.", @@ -2697,42 +2959,27 @@ "skip_connection_check": { "description": "Skip connection check.", "type": "boolean", - "x-order": 19 + "x-order": 14 }, "socket": { "description": "Service Access socket.\nAddress (and port) or socket is required.", "type": "string", - "x-order": 7 + "x-order": 6 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 21 - }, - "tls_ca": { - "description": "TLS CA certificate.", - "type": "string", - "x-order": 25 - }, - "tls_cert": { - "description": "TLS Certifcate.", - "type": "string", - "x-order": 26 - }, - "tls_key": { - "description": "TLS Certificate Key.", - "type": "string", - "x-order": 27 + "x-order": 15 }, "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 22 + "x-order": 16 }, "username": { - "description": "PostgreSQL username for scraping metrics.", + "description": "ProxySQL username for scraping metrics.", "type": "string", - "x-order": 12 + "x-order": 11 } } } @@ -2744,8 +2991,8 @@ "schema": { "type": "object", "properties": { - "postgres_exporter": { - "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", + "proxysql_exporter": { + "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", "type": "object", "properties": { "agent_id": { @@ -2753,12 +3000,6 @@ "type": "string", "x-order": 0 }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 14 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", @@ -2783,7 +3024,7 @@ "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 15 + "x-order": 14 }, "listen_port": { "description": "Listen port for scraping metrics.", @@ -2806,12 +3047,6 @@ ], "x-order": 13 }, - "max_exporter_connections": { - "description": "Maximum number of connections that exporter can open to the database instance.", - "type": "integer", - "format": "int32", - "x-order": 16 - }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", "type": "string", @@ -2853,26 +3088,31 @@ "x-order": 5 }, "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "description": "Skip TLS certificate and hostname validation.", "type": "boolean", "x-order": 6 }, "username": { - "description": "PostgreSQL username for scraping metrics.", + "description": "ProxySQL username for scraping metrics.", "type": "string", "x-order": 4 } }, "x-order": 1 }, - "qan_postgresql_pgstatements_agent": { - "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "service": { + "description": "ProxySQLService represents a generic ProxySQL instance.", "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 0 + "x-order": 3 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 7 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -2882,292 +3122,74 @@ }, "x-order": 9 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 5 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "environment": { + "description": "Environment name.", "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 12 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", "x-order": 6 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "node_id": { + "description": "Node identifier where this instance runs.", "type": "string", - "x-order": 1 + "x-order": 2 }, - "process_exec_path": { - "description": "Path to exec process.", + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 4 + }, + "replication_set": { + "description": "Replication set name.", "type": "string", - "x-order": 11 + "x-order": 8 }, "service_id": { - "description": "Service identifier.", + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 3 + "x-order": 0 }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "service_name": { + "description": "Unique across all Services user-defined name.", "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 10 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 7 + "x-order": 1 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 8 + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 5 }, - "username": { - "description": "PostgreSQL username for getting pg stat statements data.", + "version": { + "description": "ProxySQL version.", "type": "string", - "x-order": 4 + "x-order": 10 } - }, - "x-order": 2 - }, - "qan_postgresql_pgstatmonitor_agent": { - "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 10 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 7 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 13 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 8 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 12 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 9 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 11 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, - "username": { - "description": "PostgreSQL username for getting pg stat monitor data.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 3 - }, - "service": { - "description": "PostgreSQLService represents a generic PostgreSQL instance.", - "type": "object", - "properties": { - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 4 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 12 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 10 - }, - "database_name": { - "description": "Database name.", - "type": "string", - "x-order": 2 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 7 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 3 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 9 - }, - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 1 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 6 - }, - "version": { - "description": "PostgreSQL version.", - "type": "string", - "x-order": 11 - } - }, - "x-order": 0 - }, - "warning": { - "description": "Warning message.", - "type": "string", - "x-order": 4 - } - } - } - }, - "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": 0 + } + } + } + }, + "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 }, @@ -3181,14 +3203,14 @@ } } }, - "/v1/management/ProxySQL/Add": { + "/v1/management/RDS/Add": { "post": { - "description": "Adds ProxySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"proxysql_exporter\" with provided \"pmm_agent_id\" and other parameters.", + "description": "Adds RDS instance.", "tags": [ "ManagementService" ], - "summary": "Add ProxySQL", - "operationId": "AddProxySQL", + "summary": "Add RDS", + "operationId": "AddRDS", "parameters": [ { "name": "body", @@ -3197,130 +3219,101 @@ "schema": { "type": "object", "properties": { - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "address": { + "description": "Address used to connect to it.", + "type": "string", + "x-order": 4 + }, + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 28 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 30 + }, + "aws_access_key": { + "description": "AWS Access key.", + "type": "string", + "x-order": 14 + }, + "aws_secret_key": { + "description": "AWS Secret key.", + "type": "string", + "x-order": 15 + }, + "az": { + "description": "AWS availability zone.", + "type": "string", + "x-order": 1 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 10 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node and Service.", "type": "object", - "properties": { - "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 for Node.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "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": 6 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "node_type": { - "description": "NodeType describes supported Node types.", - "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "enum": [ - "NODE_TYPE_UNSPECIFIED", - "NODE_TYPE_GENERIC_NODE", - "NODE_TYPE_CONTAINER_NODE", - "NODE_TYPE_REMOTE_NODE", - "NODE_TYPE_REMOTE_RDS_NODE", - "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" - ], - "x-order": 0 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 7 - } + "additionalProperties": { + "type": "string" }, - "x-order": 2 + "x-order": 18 }, - "address": { - "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", + "database": { + "description": "Database name.", "type": "string", - "x-order": 4 + "x-order": 29 }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 19 + "disable_basic_metrics": { + "description": "Disable basic metrics.", + "type": "boolean", + "x-order": 24 }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 9 + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 31 }, - "custom_labels": { - "description": "Custom user-assigned labels for Service.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 13 + "disable_enhanced_metrics": { + "description": "Disable enhanced metrics.", + "type": "boolean", + "x-order": 25 }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 18 + "disable_query_examples": { + "description": "Disable query examples.", + "type": "boolean", + "x-order": 22 + }, + "engine": { + "description": "DiscoverRDSEngine describes supported RDS instance engines.", + "type": "string", + "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "enum": [ + "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "DISCOVER_RDS_ENGINE_MYSQL", + "DISCOVER_RDS_ENGINE_POSTGRESQL" + ], + "x-order": 6 }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 8 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 21 + "x-order": 9 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "instance_id": { + "description": "AWS instance ID.", "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 20 + "x-order": 2 + }, + "max_postgresql_exporter_connections": { + "description": "Maximum number of exporter connections to PostgreSQL instance.", + "type": "integer", + "format": "int32", + "x-order": 32 }, "metrics_mode": { "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", @@ -3331,68 +3324,84 @@ "METRICS_MODE_PULL", "METRICS_MODE_PUSH" ], - "x-order": 17 + "x-order": 26 }, - "node_id": { - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "node_model": { + "description": "AWS instance class.", "type": "string", - "x-order": 0 + "x-order": 3 }, "node_name": { - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "description": "Unique across all Nodes user-defined name. Defaults to AWS instance ID.", "type": "string", - "x-order": 1 + "x-order": 7 }, "password": { - "description": "ProxySQL password for scraping metrics.", - "type": "string", - "x-order": 12 - }, - "pmm_agent_id": { - "description": "The \"pmm-agent\" identifier which should run agents. Required.", + "description": "Password for scraping metrics.", "type": "string", - "x-order": 7 + "x-order": 13 }, "port": { - "description": "Service Access port.\nPort is required when the address present.", + "description": "Access port.", "type": "integer", "format": "int64", "x-order": 5 }, + "qan_mysql_perfschema": { + "description": "If true, adds qan-mysql-perfschema-agent.", + "type": "boolean", + "x-order": 17 + }, + "qan_postgresql_pgstatements": { + "type": "boolean", + "title": "If true, add qan-pgstatements", + "x-order": 27 + }, + "rds_exporter": { + "description": "If true, adds rds_exporter.", + "type": "boolean", + "x-order": 16 + }, + "region": { + "description": "AWS region.", + "type": "string", + "x-order": 0 + }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 10 + "x-order": 11 }, "service_name": { - "description": "Unique across all Services user-defined name. Required.", + "description": "Unique across all Services user-defined name. Defaults to AWS instance ID.", "type": "string", - "x-order": 3 + "x-order": 8 }, "skip_connection_check": { "description": "Skip connection check.", "type": "boolean", - "x-order": 14 + "x-order": 19 }, - "socket": { - "description": "Service Access socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 6 + "tablestats_group_table_limit": { + "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them.", + "type": "integer", + "format": "int32", + "x-order": 23 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 15 + "x-order": 20 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 16 + "x-order": 21 }, "username": { - "description": "ProxySQL username for scraping metrics.", + "description": "Username for scraping metrics.", "type": "string", - "x-order": 11 + "x-order": 12 } } } @@ -3404,14 +3413,19 @@ "schema": { "type": "object", "properties": { - "proxysql_exporter": { - "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", + "mysql": { + "description": "MySQLService represents a generic MySQL instance.", "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 0 + "x-order": 3 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 7 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -3419,32 +3433,93 @@ "additionalProperties": { "type": "string" }, - "x-order": 7 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, "x-order": 9 }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 14 + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 6 }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 2 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", "format": "int64", + "x-order": 4 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 8 + }, + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 5 + }, + "version": { + "description": "MySQL version.", + "type": "string", + "x-order": 10 + } + }, + "x-order": 2 + }, + "mysqld_exporter": { + "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, "x-order": 11 }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 13 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 20 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 16 + }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", @@ -3458,7 +3533,7 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 13 + "x-order": 19 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", @@ -3468,12 +3543,12 @@ "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 12 + "x-order": 18 }, "push_metrics_enabled": { "description": "True if exporter uses push metrics mode.", "type": "boolean", - "x-order": 8 + "x-order": 12 }, "service_id": { "description": "Service identifier.", @@ -3493,6 +3568,23 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], + "x-order": 15 + }, + "table_count": { + "description": "Actual table count at the moment of adding.", + "type": "integer", + "format": "int32", + "x-order": 14 + }, + "tablestats_group_disabled": { + "description": "True if tablestats group collectors are currently disabled.", + "type": "boolean", + "x-order": 17 + }, + "tablestats_group_table_limit": { + "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled.", + "type": "integer", + "format": "int32", "x-order": 10 }, "tls": { @@ -3500,32 +3592,98 @@ "type": "boolean", "x-order": 5 }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 7 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 8 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 9 + }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", "x-order": 6 }, "username": { - "description": "ProxySQL username for scraping metrics.", + "description": "MySQL username for scraping metrics.", "type": "string", "x-order": 4 } }, - "x-order": 1 + "x-order": 3 }, - "service": { - "description": "ProxySQLService represents a generic ProxySQL instance.", + "node": { + "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", "type": "object", "properties": { "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "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": 0 + }, + "postgresql": { + "description": "PostgreSQLService represents a generic PostgreSQL instance.", + "type": "object", + "properties": { + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 4 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 12 + }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 7 + "x-order": 8 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -3533,28 +3691,33 @@ "additionalProperties": { "type": "string" }, - "x-order": 9 + "x-order": 10 + }, + "database_name": { + "description": "Database name.", + "type": "string", + "x-order": 2 }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 6 + "x-order": 7 }, "node_id": { "description": "Node identifier where this instance runs.", "type": "string", - "x-order": 2 + "x-order": 3 }, "port": { "description": "Access port.\nPort is required when the address present.", "type": "integer", "format": "int64", - "x-order": 4 + "x-order": 5 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 8 + "x-order": 9 }, "service_id": { "description": "Unique randomly generated instance identifier.", @@ -3569,276 +3732,30 @@ "socket": { "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", - "x-order": 5 + "x-order": 6 }, "version": { - "description": "ProxySQL version.", + "description": "PostgreSQL version.", "type": "string", - "x-order": 10 + "x-order": 11 } }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 + "x-order": 5 }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } + "postgresql_exporter": { + "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/RDS/Add": { - "post": { - "description": "Adds RDS instance.", - "tags": [ - "ManagementService" - ], - "summary": "Add RDS", - "operationId": "AddRDS", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "address": { - "description": "Address used to connect to it.", - "type": "string", - "x-order": 4 - }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 28 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 30 - }, - "aws_access_key": { - "description": "AWS Access key.", - "type": "string", - "x-order": 14 - }, - "aws_secret_key": { - "description": "AWS Secret key.", - "type": "string", - "x-order": 15 - }, - "az": { - "description": "AWS availability zone.", - "type": "string", - "x-order": 1 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 10 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Node and Service.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 18 - }, - "database": { - "description": "Database name.", - "type": "string", - "x-order": 29 - }, - "disable_basic_metrics": { - "description": "Disable basic metrics.", - "type": "boolean", - "x-order": 24 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 31 - }, - "disable_enhanced_metrics": { - "description": "Disable enhanced metrics.", - "type": "boolean", - "x-order": 25 - }, - "disable_query_examples": { - "description": "Disable query examples.", - "type": "boolean", - "x-order": 22 - }, - "engine": { - "description": "DiscoverRDSEngine describes supported RDS instance engines.", - "type": "string", - "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", - "enum": [ - "DISCOVER_RDS_ENGINE_UNSPECIFIED", - "DISCOVER_RDS_ENGINE_MYSQL", - "DISCOVER_RDS_ENGINE_POSTGRESQL" - ], - "x-order": 6 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 9 - }, - "instance_id": { - "description": "AWS instance ID.", - "type": "string", - "x-order": 2 - }, - "max_postgresql_exporter_connections": { - "description": "Maximum number of exporter connections to PostgreSQL instance.", - "type": "integer", - "format": "int32", - "x-order": 32 - }, - "metrics_mode": { - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", - "type": "string", - "default": "METRICS_MODE_UNSPECIFIED", - "enum": [ - "METRICS_MODE_UNSPECIFIED", - "METRICS_MODE_PULL", - "METRICS_MODE_PUSH" - ], - "x-order": 26 - }, - "node_model": { - "description": "AWS instance class.", - "type": "string", - "x-order": 3 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name. Defaults to AWS instance ID.", - "type": "string", - "x-order": 7 - }, - "password": { - "description": "Password for scraping metrics.", - "type": "string", - "x-order": 13 - }, - "port": { - "description": "Access port.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "qan_mysql_perfschema": { - "description": "If true, adds qan-mysql-perfschema-agent.", - "type": "boolean", - "x-order": 17 - }, - "qan_postgresql_pgstatements": { - "type": "boolean", - "title": "If true, add qan-pgstatements", - "x-order": 27 - }, - "rds_exporter": { - "description": "If true, adds rds_exporter.", - "type": "boolean", - "x-order": 16 - }, - "region": { - "description": "AWS region.", - "type": "string", - "x-order": 0 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 11 - }, - "service_name": { - "description": "Unique across all Services user-defined name. Defaults to AWS instance ID.", - "type": "string", - "x-order": 8 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 19 - }, - "tablestats_group_table_limit": { - "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them.", - "type": "integer", - "format": "int32", - "x-order": 23 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 20 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 21 - }, - "username": { - "description": "Username for scraping metrics.", - "type": "string", - "x-order": 12 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "mysql": { - "description": "MySQLService represents a generic MySQL instance.", - "type": "object", - "properties": { - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 3 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 14 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -3846,54 +3763,108 @@ "additionalProperties": { "type": "string" }, - "x-order": 9 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 + "x-order": 7 }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", "x-order": 2 }, - "port": { - "description": "Access port.\nPort is required when the address present.", + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 15 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", "type": "integer", "format": "int64", - "x-order": 4 + "x-order": 11 }, - "replication_set": { - "description": "Replication set name.", + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", - "x-order": 8 - }, - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 13 }, - "service_name": { - "description": "Unique across all Services user-defined name.", + "max_exporter_connections": { + "description": "Maximum number of connections that exporter can open to the database instance.", + "type": "integer", + "format": "int32", + "x-order": 16 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", "x-order": 1 }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", + "process_exec_path": { + "description": "Path to exec process.", "type": "string", - "x-order": 5 + "x-order": 12 }, - "version": { - "description": "MySQL version.", + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 8 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], "x-order": 10 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "type": "boolean", + "x-order": 6 + }, + "username": { + "description": "PostgreSQL username for scraping metrics.", + "type": "string", + "x-order": 4 } }, - "x-order": 2 + "x-order": 6 }, - "mysqld_exporter": { - "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", + "qan_mysql_perfschema": { + "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -3907,32 +3878,18 @@ "additionalProperties": { "type": "string" }, - "x-order": 11 + "x-order": 13 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 10 }, "disabled": { "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", "x-order": 2 }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 13 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 20 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 16 - }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", @@ -3946,7 +3903,13 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 19 + "x-order": 16 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 11 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", @@ -3956,10 +3919,10 @@ "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 18 + "x-order": 15 }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", + "query_examples_disabled": { + "description": "True if query examples are disabled.", "type": "boolean", "x-order": 12 }, @@ -3981,25 +3944,8 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 15 - }, - "table_count": { - "description": "Actual table count at the moment of adding.", - "type": "integer", - "format": "int32", "x-order": 14 }, - "tablestats_group_disabled": { - "description": "True if tablestats group collectors are currently disabled.", - "type": "boolean", - "x-order": 17 - }, - "tablestats_group_table_limit": { - "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled.", - "type": "integer", - "format": "int32", - "x-order": 10 - }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", @@ -4026,26 +3972,21 @@ "x-order": 6 }, "username": { - "description": "MySQL username for scraping metrics.", + "description": "MySQL username for getting performance data.", "type": "string", "x-order": 4 } }, - "x-order": 3 + "x-order": 4 }, - "node": { - "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", + "qan_postgresql_pgstatements": { + "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", "properties": { - "address": { - "description": "DB instance identifier.", - "type": "string", - "x-order": 2 - }, - "az": { - "description": "Node availability zone.", + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 5 + "x-order": 0 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -4053,49 +3994,110 @@ "additionalProperties": { "type": "string" }, + "x-order": 9 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 5 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 12 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", "x-order": 6 }, - "node_id": { - "description": "Unique randomly generated instance identifier.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 0 + "x-order": 1 }, - "node_model": { - "description": "Node model.", + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 11 + }, + "service_id": { + "description": "Service identifier.", "type": "string", "x-order": 3 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", "type": "string", - "x-order": 1 + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 }, - "region": { - "description": "Node region.", + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 7 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 8 + }, + "username": { + "description": "PostgreSQL username for getting pg stat statements data.", "type": "string", "x-order": 4 } }, - "x-order": 0 + "x-order": 7 }, - "postgresql": { - "description": "PostgreSQLService represents a generic PostgreSQL instance.", + "rds_exporter": { + "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", "type": "object", "properties": { - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 4 + "x-order": 0 }, "auto_discovery_limit": { "description": "Limit of databases for auto-discovery.", "type": "integer", "format": "int32", - "x-order": 12 + "x-order": 13 }, - "cluster": { - "description": "Cluster name.", + "aws_access_key": { + "description": "AWS Access Key.", "type": "string", + "x-order": 4 + }, + "basic_metrics_disabled": { + "description": "Basic metrics are disabled.", + "type": "boolean", "x-order": 8 }, "custom_labels": { @@ -4104,103 +4106,23 @@ "additionalProperties": { "type": "string" }, - "x-order": 10 - }, - "database_name": { - "description": "Database name.", - "type": "string", - "x-order": 2 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 7 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 3 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 9 - }, - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 1 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 6 - }, - "version": { - "description": "PostgreSQL version.", - "type": "string", - "x-order": 11 - } - }, - "x-order": 5 - }, - "postgresql_exporter": { - "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 14 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 7 + "x-order": 5 }, "disabled": { "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", "x-order": 2 }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 9 - }, - "expose_exporter": { + "enhanced_metrics_disabled": { + "description": "Enhanced metrics are disabled.", "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 15 + "x-order": 9 }, "listen_port": { - "description": "Listen port for scraping metrics.", + "description": "Listen port for scraping metrics (the same for several configurations).", "type": "integer", "format": "int64", - "x-order": 11 + "x-order": 7 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -4215,191 +4137,502 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 13 + "x-order": 12 }, - "max_exporter_connections": { - "description": "Maximum number of connections that exporter can open to the database instance.", - "type": "integer", - "format": "int32", - "x-order": 16 + "node_id": { + "description": "Node identifier.", + "type": "string", + "x-order": 3 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 1 + "x-order": 1 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 11 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 10 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 6 + } + }, + "x-order": 1 + } + } + } + }, + "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/management/RDS/Discover": { + "post": { + "description": "Discovers RDS instances.", + "tags": [ + "ManagementService" + ], + "summary": "Discover RDS", + "operationId": "DiscoverRDS", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "aws_access_key": { + "description": "AWS Access key. Optional.", + "type": "string", + "x-order": 0 + }, + "aws_secret_key": { + "description": "AWS Secret key. Optional.", + "type": "string", + "x-order": 1 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "rds_instances": { + "type": "array", + "items": { + "description": "DiscoverRDSInstance models an unique RDS instance for the list of instances returned by Discovery.", + "type": "object", + "properties": { + "address": { + "description": "Address used to connect to it.", + "type": "string", + "x-order": 4 + }, + "az": { + "description": "AWS availability zone.", + "type": "string", + "x-order": 1 + }, + "engine": { + "description": "DiscoverRDSEngine describes supported RDS instance engines.", + "type": "string", + "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "enum": [ + "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "DISCOVER_RDS_ENGINE_MYSQL", + "DISCOVER_RDS_ENGINE_POSTGRESQL" + ], + "x-order": 6 + }, + "engine_version": { + "description": "Engine version.", + "type": "string", + "x-order": 7 + }, + "instance_id": { + "description": "AWS instance ID.", + "type": "string", + "x-order": 2 + }, + "node_model": { + "description": "AWS instance class.", + "type": "string", + "x-order": 3 + }, + "port": { + "description": "Access port.", + "type": "integer", + "format": "int64", + "x-order": 5 + }, + "region": { + "description": "AWS region.", + "type": "string", + "x-order": 0 + } + } + }, + "x-order": 0 + } + } + } + }, + "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/management/annotations": { + "post": { + "description": "Adds an annotation.", + "tags": [ + "ManagementService" + ], + "summary": "Add Annotation", + "operationId": "AddAnnotation", + "parameters": [ + { + "description": "AddAnnotationRequest is a params to add new annotation.", + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "AddAnnotationRequest is a params to add new annotation.", + "type": "object", + "properties": { + "node_name": { + "description": "Used for annotating a node.", + "type": "string", + "x-order": 2 + }, + "service_names": { + "description": "Used for annotating services.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 3 + }, + "tags": { + "description": "Tags are used to filter annotations.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 1 + }, + "text": { + "description": "An annotation description. Required.", + "type": "string", + "x-order": 0 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "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/management/nodes": { + "post": { + "description": "Registers a new Node and a pmm-agent.", + "tags": [ + "ManagementService" + ], + "summary": "Register Node", + "operationId": "RegisterNode", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "address": { + "description": "Node address (DNS name or IP).", + "type": "string", + "x-order": 2 + }, + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 14 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 9 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 5 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 6 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 10 + }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 13 + }, + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 4 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 15 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 3 + }, + "metrics_mode": { + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", + "type": "string", + "default": "METRICS_MODE_UNSPECIFIED", + "enum": [ + "METRICS_MODE_UNSPECIFIED", + "METRICS_MODE_PULL", + "METRICS_MODE_PUSH" + ], + "x-order": 12 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 7 + }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "enum": [ + "NODE_TYPE_UNSPECIFIED", + "NODE_TYPE_GENERIC_NODE", + "NODE_TYPE_CONTAINER_NODE", + "NODE_TYPE_REMOTE_NODE", + "NODE_TYPE_REMOTE_RDS_NODE", + "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" + ], + "x-order": 0 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 8 + }, + "reregister": { + "description": "If true, and Node with that name already exist, it will be removed with all dependent Services and Agents.", + "type": "boolean", + "x-order": 11 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "container_node": { + "description": "ContainerNode represents a Docker container.", + "type": "object", + "properties": { + "address": { + "description": "Node address (DNS name or IP).", + "type": "string", + "x-order": 2 }, - "process_exec_path": { - "description": "Path to exec process.", + "az": { + "description": "Node availability zone.", "type": "string", - "x-order": 12 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", "x-order": 8 }, - "service_id": { - "description": "Service identifier.", + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", "type": "string", - "x-order": 3 + "x-order": 4 }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "container_name": { + "description": "Container name.", "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 10 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", "x-order": 5 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", - "type": "boolean", - "x-order": 6 - }, - "username": { - "description": "PostgreSQL username for scraping metrics.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 6 - }, - "qan_mysql_perfschema": { - "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 13 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 10 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 16 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 11 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 15 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 12 + "x-order": 9 }, - "service_id": { - "description": "Service identifier.", + "machine_id": { + "description": "Linux machine-id of the Generic Node where this Container Node runs.", "type": "string", "x-order": 3 }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 14 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", + "node_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 7 + "x-order": 0 }, - "tls_cert": { - "description": "Client certificate.", + "node_model": { + "description": "Node model.", "type": "string", - "x-order": 8 + "x-order": 6 }, - "tls_key": { - "description": "Password for decrypting tls_cert.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", - "x-order": 9 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 + "x-order": 1 }, - "username": { - "description": "MySQL username for getting performance data.", + "region": { + "description": "Node region.", "type": "string", - "x-order": 4 + "x-order": 7 } }, - "x-order": 4 + "x-order": 1 }, - "qan_postgresql_pgstatements": { - "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "generic_node": { + "description": "GenericNode represents a bare metal server or virtual machine.", "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", + "address": { + "description": "Node address (DNS name or IP).", "type": "string", - "x-order": 0 + "x-order": 2 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 7 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -4407,89 +4640,43 @@ "additionalProperties": { "type": "string" }, - "x-order": 9 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 5 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 12 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 6 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 + "x-order": 8 }, - "process_exec_path": { - "description": "Path to exec process.", + "distro": { + "description": "Linux distribution name and version.", "type": "string", - "x-order": 11 + "x-order": 4 }, - "service_id": { - "description": "Service identifier.", + "machine_id": { + "description": "Linux machine-id.", "type": "string", "x-order": 3 }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "node_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 10 + "x-order": 0 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 7 + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 5 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 8 + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 }, - "username": { - "description": "PostgreSQL username for getting pg stat statements data.", + "region": { + "description": "Node region.", "type": "string", - "x-order": 4 + "x-order": 6 } }, - "x-order": 7 + "x-order": 0 }, - "rds_exporter": { - "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", + "pmm_agent": { + "description": "PMMAgent runs on Generic or Container Node.", "type": "object", "properties": { "agent_id": { @@ -4497,21 +4684,10 @@ "type": "string", "x-order": 0 }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 13 - }, - "aws_access_key": { - "description": "AWS Access Key.", - "type": "string", - "x-order": 4 - }, - "basic_metrics_disabled": { - "description": "Basic metrics are disabled.", + "connected": { + "description": "True if Agent is running and connected to pmm-managed.", "type": "boolean", - "x-order": 8 + "x-order": 3 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -4519,206 +4695,30 @@ "additionalProperties": { "type": "string" }, - "x-order": 5 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", "x-order": 2 }, - "enhanced_metrics_disabled": { - "description": "Enhanced metrics are disabled.", - "type": "boolean", - "x-order": 9 - }, - "listen_port": { - "description": "Listen port for scraping metrics (the same for several configurations).", - "type": "integer", - "format": "int64", - "x-order": 7 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 12 - }, - "node_id": { - "description": "Node identifier.", - "type": "string", - "x-order": 3 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 11 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 10 + "x-order": 4 }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 6 + "x-order": 1 } }, - "x-order": 1 - } - } - } - }, - "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/management/RDS/Discover": { - "post": { - "description": "Discovers RDS instances.", - "tags": [ - "ManagementService" - ], - "summary": "Discover RDS", - "operationId": "DiscoverRDS", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "aws_access_key": { - "description": "AWS Access key. Optional.", + "token": { + "description": "Token represents token for vmagent auth config.", "type": "string", - "x-order": 0 + "x-order": 3 }, - "aws_secret_key": { - "description": "AWS Secret key. Optional.", + "warning": { + "description": "Warning message.", "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "rds_instances": { - "type": "array", - "items": { - "description": "DiscoverRDSInstance models an unique RDS instance for the list of instances returned by Discovery.", - "type": "object", - "properties": { - "address": { - "description": "Address used to connect to it.", - "type": "string", - "x-order": 4 - }, - "az": { - "description": "AWS availability zone.", - "type": "string", - "x-order": 1 - }, - "engine": { - "description": "DiscoverRDSEngine describes supported RDS instance engines.", - "type": "string", - "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", - "enum": [ - "DISCOVER_RDS_ENGINE_UNSPECIFIED", - "DISCOVER_RDS_ENGINE_MYSQL", - "DISCOVER_RDS_ENGINE_POSTGRESQL" - ], - "x-order": 6 - }, - "engine_version": { - "description": "Engine version.", - "type": "string", - "x-order": 7 - }, - "instance_id": { - "description": "AWS instance ID.", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "AWS instance class.", - "type": "string", - "x-order": 3 - }, - "port": { - "description": "Access port.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "region": { - "description": "AWS region.", - "type": "string", - "x-order": 0 - } - } - }, - "x-order": 0 + "x-order": 4 } } } @@ -4757,8 +4757,8 @@ } } }, - "/v1/management/Service/Remove": { - "post": { + "/v1/management/services/{service_id}": { + "delete": { "description": "Removes a Service along with Agents.", "tags": [ "ManagementService" @@ -4767,39 +4767,27 @@ "operationId": "RemoveService", "parameters": [ { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "service_id": { - "description": "Service ID or Service Name is required.\nUnique randomly generated instance identifier.", - "type": "string", - "x-order": 1 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 2 - }, - "service_type": { - "description": "ServiceType describes supported Service types.", - "type": "string", - "default": "SERVICE_TYPE_UNSPECIFIED", - "enum": [ - "SERVICE_TYPE_UNSPECIFIED", - "SERVICE_TYPE_MYSQL_SERVICE", - "SERVICE_TYPE_MONGODB_SERVICE", - "SERVICE_TYPE_POSTGRESQL_SERVICE", - "SERVICE_TYPE_PROXYSQL_SERVICE", - "SERVICE_TYPE_HAPROXY_SERVICE", - "SERVICE_TYPE_EXTERNAL_SERVICE" - ], - "x-order": 0 - } - } - } + "type": "string", + "description": "Either a Service ID or a Service Name.", + "name": "service_id", + "in": "path", + "required": true + }, + { + "enum": [ + "SERVICE_TYPE_UNSPECIFIED", + "SERVICE_TYPE_MYSQL_SERVICE", + "SERVICE_TYPE_MONGODB_SERVICE", + "SERVICE_TYPE_POSTGRESQL_SERVICE", + "SERVICE_TYPE_PROXYSQL_SERVICE", + "SERVICE_TYPE_HAPROXY_SERVICE", + "SERVICE_TYPE_EXTERNAL_SERVICE" + ], + "type": "string", + "default": "SERVICE_TYPE_UNSPECIFIED", + "description": "Service type.", + "name": "service_type", + "in": "query" } ], "responses": { diff --git a/api/management/v1/service.pb.go b/api/management/v1/service.pb.go index b69638d3bea..32cc6fffdec 100644 --- a/api/management/v1/service.pb.go +++ b/api/management/v1/service.pb.go @@ -30,13 +30,10 @@ type RemoveServiceRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Either a Service ID or a Service Name. + ServiceId string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` // Service type. - ServiceType v1.ServiceType `protobuf:"varint,1,opt,name=service_type,json=serviceType,proto3,enum=inventory.v1.ServiceType" json:"service_type,omitempty"` - // Service ID or Service Name is required. - // Unique randomly generated instance identifier. - ServiceId string `protobuf:"bytes,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` - // Unique across all Services user-defined name. - ServiceName string `protobuf:"bytes,3,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` + ServiceType v1.ServiceType `protobuf:"varint,2,opt,name=service_type,json=serviceType,proto3,enum=inventory.v1.ServiceType" json:"service_type,omitempty"` } func (x *RemoveServiceRequest) Reset() { @@ -71,13 +68,6 @@ func (*RemoveServiceRequest) Descriptor() ([]byte, []int) { return file_management_v1_service_proto_rawDescGZIP(), []int{0} } -func (x *RemoveServiceRequest) GetServiceType() v1.ServiceType { - if x != nil { - return x.ServiceType - } - return v1.ServiceType(0) -} - func (x *RemoveServiceRequest) GetServiceId() string { if x != nil { return x.ServiceId @@ -85,11 +75,11 @@ func (x *RemoveServiceRequest) GetServiceId() string { return "" } -func (x *RemoveServiceRequest) GetServiceName() string { +func (x *RemoveServiceRequest) GetServiceType() v1.ServiceType { if x != nil { - return x.ServiceName + return x.ServiceType } - return "" + return v1.ServiceType(0) } type RemoveServiceResponse struct { @@ -158,95 +148,116 @@ var file_management_v1_service_proto_rawDesc = []byte{ 0x31, 0x2f, 0x72, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x01, 0x0a, 0x14, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x69, 0x6e, 0x76, - 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, - 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc3, 0x18, - 0x0a, 0x11, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0xad, 0x01, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x41, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x51, 0x92, 0x41, 0x25, 0x12, 0x0e, 0x41, 0x64, 0x64, 0x20, 0x41, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x13, 0x41, 0x64, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, - 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x2f, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x41, 0x64, 0x64, 0x12, 0xb7, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e, 0x92, - 0x41, 0x34, 0x12, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x20, 0x4e, 0x6f, 0x64, - 0x65, 0x1a, 0x23, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x73, 0x20, 0x61, 0x20, 0x6e, - 0x65, 0x77, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x6d, 0x6d, 0x2d, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, - 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, - 0x4e, 0x6f, 0x64, 0x65, 0x2f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x86, 0x03, - 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x21, 0x2e, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, - 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaf, 0x02, 0x92, 0x41, 0x85, 0x02, 0x12, 0x14, 0x41, 0x64, 0x64, - 0x20, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x1a, 0xec, 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x64, - 0x64, 0x73, 0x20, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x65, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, - 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x73, 0x0a, 0x14, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, + 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x22, 0x17, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xae, 0x18, 0x0a, 0x11, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0xa9, 0x01, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x92, 0x41, + 0x25, 0x12, 0x0e, 0x41, 0x64, 0x64, 0x20, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x1a, 0x13, 0x41, 0x64, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, + 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xb1, 0x01, 0x0a, 0x0c, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x2e, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, 0x92, 0x41, 0x36, 0x12, 0x0d, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x25, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x73, 0x20, 0x61, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x20, + 0x61, 0x6e, 0x64, 0x20, 0x61, 0x20, 0x70, 0x6d, 0x6d, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, + 0xf7, 0x02, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, + 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa0, 0x02, 0x92, 0x41, 0xf6, 0x01, 0x12, 0x0d, 0x41, + 0x64, 0x64, 0x20, 0x61, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0xe4, 0x01, 0x41, + 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, + 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, + 0x20, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, + 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, + 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, + 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x64, 0x20, 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, + 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x22, 0x65, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, - 0x20, 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, - 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x22, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, - 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, - 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x72, - 0x75, 0x6e, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2e, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xcb, 0x02, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x48, 0x41, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x48, 0x41, 0x50, 0x72, 0x6f, - 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf7, 0x01, 0x92, 0x41, 0xce, - 0x01, 0x12, 0x0b, 0x41, 0x64, 0x64, 0x20, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x1a, 0xbe, - 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x20, 0x49, 0x74, 0x20, - 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, - 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, - 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, - 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x73, - 0x20, 0x61, 0x6e, 0x20, 0x22, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x65, 0x78, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x6f, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x2f, 0x41, 0x64, 0x64, 0x12, 0x80, 0x03, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x4d, 0x79, 0x53, 0x51, - 0x4c, 0x12, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0xb2, 0x02, 0x92, 0x41, 0x8b, 0x02, 0x12, 0x09, 0x41, 0x64, 0x64, 0x20, 0x4d, - 0x79, 0x53, 0x51, 0x4c, 0x1a, 0xfd, 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x4d, 0x79, 0x53, 0x51, - 0x4c, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, + 0x20, 0x22, 0x72, 0x75, 0x6e, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, + 0x64, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, + 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x45, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xcb, 0x02, 0x0a, 0x0a, 0x41, 0x64, + 0x64, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x48, 0x41, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x48, 0x41, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf7, 0x01, + 0x92, 0x41, 0xce, 0x01, 0x12, 0x0b, 0x41, 0x64, 0x64, 0x20, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x1a, 0xbe, 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x20, + 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, + 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, + 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, 0x77, 0x68, + 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, + 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, + 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, + 0x64, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x22, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, + 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x48, 0x41, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x41, 0x64, 0x64, 0x12, 0x80, 0x03, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x4d, + 0x79, 0x53, 0x51, 0x4c, 0x12, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb2, 0x02, 0x92, 0x41, 0x8b, 0x02, 0x12, 0x09, 0x41, 0x64, + 0x64, 0x20, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x1a, 0xfd, 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x4d, + 0x79, 0x53, 0x51, 0x4c, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, + 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, + 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, + 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, + 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, + 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x22, 0x6d, 0x79, 0x73, + 0x71, 0x6c, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x2c, 0x20, 0x61, + 0x6e, 0x64, 0x20, 0x22, 0x71, 0x61, 0x6e, 0x5f, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x65, + 0x72, 0x66, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x20, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, + 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x64, 0x20, 0x22, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x22, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, + 0x22, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2f, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x2f, 0x41, 0x64, 0x64, 0x12, 0x8d, 0x03, 0x0a, 0x0a, 0x41, + 0x64, 0x64, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x6f, 0x6e, + 0x67, 0x6f, 0x44, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, + 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb9, + 0x02, 0x92, 0x41, 0x90, 0x02, 0x12, 0x0b, 0x41, 0x64, 0x64, 0x20, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, + 0x44, 0x42, 0x1a, 0x80, 0x02, 0x41, 0x64, 0x64, 0x73, 0x20, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, + 0x42, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, @@ -254,130 +265,106 @@ var file_management_v1_service_proto_rawDesc = []byte{ 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, - 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x22, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x64, - 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, - 0x22, 0x71, 0x61, 0x6e, 0x5f, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x20, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x77, 0x69, - 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, - 0x22, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x20, 0x61, - 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f, - 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x4d, 0x79, - 0x53, 0x51, 0x4c, 0x2f, 0x41, 0x64, 0x64, 0x12, 0x8d, 0x03, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x4d, - 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, - 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x6f, 0x6e, 0x67, - 0x6f, 0x44, 0x42, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb9, 0x02, 0x92, 0x41, - 0x90, 0x02, 0x12, 0x0b, 0x41, 0x64, 0x64, 0x20, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x1a, - 0x80, 0x02, 0x41, 0x64, 0x64, 0x73, 0x20, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x20, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x73, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, - 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, - 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, - 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, - 0x20, 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, - 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x22, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x5f, 0x65, - 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x22, 0x71, - 0x61, 0x6e, 0x5f, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x72, 0x22, 0x20, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x70, - 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x20, 0x61, 0x6e, 0x64, - 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, - 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x4d, 0x6f, 0x6e, 0x67, - 0x6f, 0x44, 0x42, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xf8, 0x02, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x50, - 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x73, - 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, - 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x64, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x02, 0x92, 0x41, 0xef, 0x01, 0x12, 0x0e, 0x41, 0x64, 0x64, - 0x20, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x1a, 0xdc, 0x01, 0x41, 0x64, - 0x64, 0x73, 0x20, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x20, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, - 0x20, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x72, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, - 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, - 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, - 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, - 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, - 0x64, 0x64, 0x73, 0x20, 0x22, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x5f, 0x65, 0x78, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x5f, 0x69, 0x64, 0x22, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, - 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x2f, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x2f, 0x41, - 0x64, 0x64, 0x12, 0xe9, 0x02, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, - 0x51, 0x4c, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x22, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, + 0x62, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x2c, 0x20, 0x61, 0x6e, 0x64, + 0x20, 0x22, 0x71, 0x61, 0x6e, 0x5f, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x5f, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x22, 0x20, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x77, + 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, + 0x20, 0x22, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x20, + 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x4d, + 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xf8, 0x02, 0x0a, 0x0d, 0x41, + 0x64, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x12, 0x23, 0x2e, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, + 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x02, 0x92, 0x41, 0xef, 0x01, 0x12, 0x0e, + 0x41, 0x64, 0x64, 0x20, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x1a, 0xdc, + 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, + 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x73, 0x20, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x20, 0x65, 0x78, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, + 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, + 0x6f, 0x72, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, + 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x64, 0x20, 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, + 0x6e, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x22, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, + 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, + 0x72, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, + 0x4c, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xe9, 0x02, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x53, 0x51, 0x4c, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, - 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x92, 0x02, 0x92, 0x41, 0xe8, 0x01, - 0x12, 0x0c, 0x41, 0x64, 0x64, 0x20, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x1a, 0xd7, - 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x20, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x73, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, - 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, - 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, - 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, - 0x73, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x64, 0x20, 0x22, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x22, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, - 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x2f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xa7, - 0x01, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x12, 0x21, - 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x92, 0x41, 0x28, 0x12, 0x0c, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x20, 0x52, 0x44, 0x53, 0x1a, 0x18, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x73, 0x20, 0x52, 0x44, 0x53, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, - 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x52, 0x44, 0x53, 0x2f, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x88, 0x01, 0x0a, 0x06, 0x41, 0x64, 0x64, - 0x52, 0x44, 0x53, 0x12, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x41, 0x92, 0x41, 0x1d, 0x12, 0x07, 0x41, 0x64, 0x64, 0x20, 0x52, 0x44, 0x53, 0x1a, 0x12, - 0x41, 0x64, 0x64, 0x73, 0x20, 0x52, 0x44, 0x53, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x76, 0x31, - 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x52, 0x44, 0x53, 0x2f, - 0x41, 0x64, 0x64, 0x12, 0xbd, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x61, 0x92, 0x41, 0x36, 0x12, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x24, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x73, 0x20, 0x61, - 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x77, - 0x69, 0x74, 0x68, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x42, 0xad, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 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, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x92, 0x02, 0x92, + 0x41, 0xe8, 0x01, 0x12, 0x0c, 0x41, 0x64, 0x64, 0x20, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, + 0x4c, 0x1a, 0xd7, 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, + 0x4c, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x73, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x41, 0x67, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, + 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, + 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, + 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, + 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, + 0x61, 0x64, 0x64, 0x73, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x65, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x22, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x2f, 0x41, 0x64, + 0x64, 0x12, 0xa7, 0x01, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, + 0x53, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x92, 0x41, 0x28, 0x12, 0x0c, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x52, 0x44, 0x53, 0x1a, 0x18, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x20, 0x52, 0x44, 0x53, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x52, + 0x44, 0x53, 0x2f, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x88, 0x01, 0x0a, 0x06, + 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x12, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x41, 0x92, 0x41, 0x1d, 0x12, 0x07, 0x41, 0x64, 0x64, 0x20, 0x52, 0x44, + 0x53, 0x1a, 0x12, 0x41, 0x64, 0x64, 0x73, 0x20, 0x52, 0x44, 0x53, 0x20, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x52, + 0x44, 0x53, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xc1, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x65, 0x92, 0x41, 0x36, 0x12, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x24, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x73, 0x20, 0x61, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6c, 0x6f, 0x6e, + 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x26, 0x2a, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x42, 0xad, 0x01, 0x0a, 0x11, 0x63, + 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x35, 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, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, + 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, + 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, + 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/api/management/v1/service.pb.gw.go b/api/management/v1/service.pb.gw.go index 032b873580e..cc9ce528dd6 100644 --- a/api/management/v1/service.pb.gw.go +++ b/api/management/v1/service.pb.gw.go @@ -273,11 +273,33 @@ func local_request_ManagementService_AddRDS_0(ctx context.Context, marshaler run return msg, metadata, err } +var filter_ManagementService_RemoveService_0 = &utilities.DoubleArray{Encoding: map[string]int{"service_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + func request_ManagementService_RemoveService_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RemoveServiceRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["service_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "service_id") + } + + protoReq.ServiceId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "service_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ManagementService_RemoveService_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -289,7 +311,27 @@ func local_request_ManagementService_RemoveService_0(ctx context.Context, marsha var protoReq RemoveServiceRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["service_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "service_id") + } + + protoReq.ServiceId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "service_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ManagementService_RemoveService_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -310,7 +352,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/AddAnnotation", runtime.WithHTTPPathPattern("/v1/management/Annotations/Add")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/AddAnnotation", runtime.WithHTTPPathPattern("/v1/management/annotations")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -334,7 +376,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/RegisterNode", runtime.WithHTTPPathPattern("/v1/management/Node/Register")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/RegisterNode", runtime.WithHTTPPathPattern("/v1/management/nodes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -542,7 +584,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se forward_ManagementService_AddRDS_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_ManagementService_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_ManagementService_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -550,7 +592,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/RemoveService", runtime.WithHTTPPathPattern("/v1/management/Service/Remove")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/RemoveService", runtime.WithHTTPPathPattern("/v1/management/services/{service_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -612,7 +654,7 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.ManagementService/AddAnnotation", runtime.WithHTTPPathPattern("/v1/management/Annotations/Add")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.ManagementService/AddAnnotation", runtime.WithHTTPPathPattern("/v1/management/annotations")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -633,7 +675,7 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.ManagementService/RegisterNode", runtime.WithHTTPPathPattern("/v1/management/Node/Register")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.ManagementService/RegisterNode", runtime.WithHTTPPathPattern("/v1/management/nodes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -816,13 +858,13 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se forward_ManagementService_AddRDS_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_ManagementService_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_ManagementService_RemoveService_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, "/management.v1.ManagementService/RemoveService", runtime.WithHTTPPathPattern("/v1/management/Service/Remove")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.ManagementService/RemoveService", runtime.WithHTTPPathPattern("/v1/management/services/{service_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -841,9 +883,9 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } var ( - pattern_ManagementService_AddAnnotation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Annotations", "Add"}, "")) + pattern_ManagementService_AddAnnotation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "management", "annotations"}, "")) - pattern_ManagementService_RegisterNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Node", "Register"}, "")) + pattern_ManagementService_RegisterNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "management", "nodes"}, "")) pattern_ManagementService_AddExternal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "External", "Add"}, "")) @@ -861,7 +903,7 @@ var ( pattern_ManagementService_AddRDS_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "RDS", "Add"}, "")) - pattern_ManagementService_RemoveService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Service", "Remove"}, "")) + pattern_ManagementService_RemoveService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "management", "services", "service_id"}, "")) ) var ( diff --git a/api/management/v1/service.pb.validate.go b/api/management/v1/service.pb.validate.go index f39b95e18b3..0a2ab001f97 100644 --- a/api/management/v1/service.pb.validate.go +++ b/api/management/v1/service.pb.validate.go @@ -61,11 +61,9 @@ func (m *RemoveServiceRequest) validate(all bool) error { var errors []error - // no validation rules for ServiceType - // no validation rules for ServiceId - // no validation rules for ServiceName + // no validation rules for ServiceType if len(errors) > 0 { return RemoveServiceRequestMultiError(errors) diff --git a/api/management/v1/service.proto b/api/management/v1/service.proto index a949f176269..2c1ccfc750c 100644 --- a/api/management/v1/service.proto +++ b/api/management/v1/service.proto @@ -16,13 +16,10 @@ import "management/v1/rds.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; message RemoveServiceRequest { + // Either a Service ID or a Service Name. + string service_id = 1; // Service type. - inventory.v1.ServiceType service_type = 1; - // Service ID or Service Name is required. - // Unique randomly generated instance identifier. - string service_id = 2; - // Unique across all Services user-defined name. - string service_name = 3; + inventory.v1.ServiceType service_type = 2; } message RemoveServiceResponse {} @@ -32,7 +29,7 @@ service ManagementService { // AddAnnotation adds an annotation. rpc AddAnnotation(AddAnnotationRequest) returns (AddAnnotationResponse) { option (google.api.http) = { - post: "/v1/management/Annotations/Add" + post: "/v1/management/annotations" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { @@ -40,15 +37,15 @@ service ManagementService { description: "Adds an annotation." }; } - // RegisterNode registers a new Node and pmm-agent. + // RegisterNode registers a new Node and a pmm-agent. rpc RegisterNode(RegisterNodeRequest) returns (RegisterNodeResponse) { option (google.api.http) = { - post: "/v1/management/Node/Register" + post: "/v1/management/nodes" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { summary: "Register Node" - description: "Registers a new Node and pmm-agent." + description: "Registers a new Node and a pmm-agent." }; } // AddExternal adds external service and adds external exporter. @@ -60,8 +57,8 @@ service ManagementService { body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Add External Service" - description: "Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\"." + summary: "Add a Service" + description: "Adds a service and starts several agents. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\"." }; } // AddHAProxy adds HAProxy service and adds external exporter. @@ -142,7 +139,7 @@ service ManagementService { description: "Discovers RDS instances." }; } - // AddRDS adds RDS instance. + // AddRDS adds an RDS instance. rpc AddRDS(AddRDSRequest) returns (AddRDSResponse) { option (google.api.http) = { post: "/v1/management/RDS/Add" @@ -153,15 +150,12 @@ service ManagementService { description: "Adds RDS instance." }; } - // RemoveService removes Service with Agents. + // RemoveService removes a Service along with its Agents. rpc RemoveService(RemoveServiceRequest) returns (RemoveServiceResponse) { - option (google.api.http) = { - post: "/v1/management/Service/Remove" - body: "*" - }; + option (google.api.http) = {delete: "/v1/management/services/{service_id}"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { summary: "Remove Service" - description: "Removes a Service along with Agents." + description: "Removes a Service along with its Agents." }; } } diff --git a/api/management/v1/service_grpc.pb.go b/api/management/v1/service_grpc.pb.go index 79405bfee46..e5f8095df06 100644 --- a/api/management/v1/service_grpc.pb.go +++ b/api/management/v1/service_grpc.pb.go @@ -39,7 +39,7 @@ const ( type ManagementServiceClient interface { // AddAnnotation adds an annotation. AddAnnotation(ctx context.Context, in *AddAnnotationRequest, opts ...grpc.CallOption) (*AddAnnotationResponse, error) - // RegisterNode registers a new Node and pmm-agent. + // RegisterNode registers a new Node and a pmm-agent. RegisterNode(ctx context.Context, in *RegisterNodeRequest, opts ...grpc.CallOption) (*RegisterNodeResponse, error) // AddExternal adds external service and adds external exporter. // It automatically adds a service to inventory, which is running on provided "node_id", @@ -69,9 +69,9 @@ type ManagementServiceClient interface { AddProxySQL(ctx context.Context, in *AddProxySQLRequest, opts ...grpc.CallOption) (*AddProxySQLResponse, error) // DiscoverRDS discovers RDS instances. DiscoverRDS(ctx context.Context, in *DiscoverRDSRequest, opts ...grpc.CallOption) (*DiscoverRDSResponse, error) - // AddRDS adds RDS instance. + // AddRDS adds an RDS instance. AddRDS(ctx context.Context, in *AddRDSRequest, opts ...grpc.CallOption) (*AddRDSResponse, error) - // RemoveService removes Service with Agents. + // RemoveService removes a Service along with its with Agents. RemoveService(ctx context.Context, in *RemoveServiceRequest, opts ...grpc.CallOption) (*RemoveServiceResponse, error) } @@ -188,7 +188,7 @@ func (c *managementServiceClient) RemoveService(ctx context.Context, in *RemoveS type ManagementServiceServer interface { // AddAnnotation adds an annotation. AddAnnotation(context.Context, *AddAnnotationRequest) (*AddAnnotationResponse, error) - // RegisterNode registers a new Node and pmm-agent. + // RegisterNode registers a new Node and a pmm-agent. RegisterNode(context.Context, *RegisterNodeRequest) (*RegisterNodeResponse, error) // AddExternal adds external service and adds external exporter. // It automatically adds a service to inventory, which is running on provided "node_id", @@ -218,9 +218,9 @@ type ManagementServiceServer interface { AddProxySQL(context.Context, *AddProxySQLRequest) (*AddProxySQLResponse, error) // DiscoverRDS discovers RDS instances. DiscoverRDS(context.Context, *DiscoverRDSRequest) (*DiscoverRDSResponse, error) - // AddRDS adds RDS instance. + // AddRDS adds an RDS instance. AddRDS(context.Context, *AddRDSRequest) (*AddRDSResponse, error) - // RemoveService removes Service with Agents. + // RemoveService removes a Service along with its with Agents. RemoveService(context.Context, *RemoveServiceRequest) (*RemoveServiceResponse, error) mustEmbedUnimplementedManagementServiceServer() } diff --git a/api/swagger/swagger-dev.json b/api/swagger/swagger-dev.json index fab705f4823..04332d10063 100644 --- a/api/swagger/swagger-dev.json +++ b/api/swagger/swagger-dev.json @@ -16919,95 +16919,6 @@ } } }, - "/v1/management/Annotations/Add": { - "post": { - "description": "Adds an annotation.", - "tags": [ - "ManagementService" - ], - "summary": "Add Annotation", - "operationId": "AddAnnotation", - "parameters": [ - { - "description": "AddAnnotationRequest is a params to add new annotation.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "description": "AddAnnotationRequest is a params to add new annotation.", - "type": "object", - "properties": { - "text": { - "description": "An annotation description. Required.", - "type": "string", - "x-order": 0 - }, - "tags": { - "description": "Tags are used to filter annotations.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - }, - "node_name": { - "description": "Used for annotate node.", - "type": "string", - "x-order": 2 - }, - "service_names": { - "description": "Used for annotate services.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 3 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "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/management/AzureDatabase/Add": { "post": { "description": "Adds an Azure Database instance.", @@ -17359,11 +17270,11 @@ }, "/v1/management/External/Add": { "post": { - "description": "Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", + "description": "Adds a service and starts several agents. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", "tags": [ "ManagementService" ], - "summary": "Add External Service", + "summary": "Add a Service", "operationId": "AddExternal", "parameters": [ { @@ -17374,7 +17285,7 @@ "type": "object", "properties": { "runs_on_node_id": { - "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id always should be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id should always be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 0 }, @@ -17453,7 +17364,7 @@ "x-order": 2 }, "address": { - "description": "Node and Exporter access address (DNS name or IP).\naddress always should be passed with add_node.", + "description": "Node and Exporter access address (DNS name or IP).\naddress should always be passed with add_node.", "type": "string", "x-order": 3 }, @@ -17489,7 +17400,7 @@ "x-order": 9 }, "node_id": { - "description": "Node identifier on which an external service is been running.\nnode_id always should be passed with runs_on_node_id.", + "description": "Node identifier on which an external service is been running.\nnode_id should always be passed with runs_on_node_id.", "type": "string", "x-order": 10 }, @@ -19838,14 +19749,14 @@ } } }, - "/v1/management/Node/Register": { + "/v1/management/PostgreSQL/Add": { "post": { - "description": "Registers a new Node and pmm-agent.", + "description": "Adds PostgreSQL Service and starts postgres exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"postgres_exporter\" with provided \"pmm_agent_id\" and other parameters.", "tags": [ "ManagementService" ], - "summary": "Register Node", - "operationId": "RegisterNode", + "summary": "Add PostgreSQL", + "operationId": "AddPostgreSQL", "parameters": [ { "name": "body", @@ -19854,124 +19765,32 @@ "schema": { "type": "object", "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", + "node_id": { + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "enum": [ - "NODE_TYPE_UNSPECIFIED", - "NODE_TYPE_GENERIC_NODE", - "NODE_TYPE_CONTAINER_NODE", - "NODE_TYPE_REMOTE_NODE", - "NODE_TYPE_REMOTE_RDS_NODE", - "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" - ], "x-order": 0 }, "node_name": { - "description": "Unique across all Nodes user-defined name.", + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "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 - }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", - "type": "string", - "x-order": 5 - }, - "container_name": { - "description": "Container name.", - "type": "string", - "x-order": 6 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 7 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 8 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 9 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Node.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 10 - }, - "reregister": { - "description": "If true, and Node with that name already exist, it will be removed with all dependent Services and Agents.", - "type": "boolean", - "x-order": 11 - }, - "metrics_mode": { - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", - "type": "string", - "default": "METRICS_MODE_UNSPECIFIED", - "enum": [ - "METRICS_MODE_UNSPECIFIED", - "METRICS_MODE_PULL", - "METRICS_MODE_PUSH" - ], - "x-order": 12 - }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 13 - }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 14 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 15 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "generic_node": { - "description": "GenericNode represents a bare metal server or virtual machine.", + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", "type": "object", "properties": { - "node_id": { - "description": "Unique randomly generated instance identifier.", + "node_type": { + "description": "NodeType describes supported Node types.", "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "enum": [ + "NODE_TYPE_UNSPECIFIED", + "NODE_TYPE_GENERIC_NODE", + "NODE_TYPE_CONTAINER_NODE", + "NODE_TYPE_REMOTE_NODE", + "NODE_TYPE_REMOTE_RDS_NODE", + "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" + ], "x-order": 0 }, "node_name": { @@ -19979,283 +19798,51 @@ "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 + "x-order": 2 }, "distro": { "description": "Linux distribution name and version.", "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": 5 + "x-order": 6 }, "region": { "description": "Node region.", "type": "string", - "x-order": 6 + "x-order": 7 }, "az": { "description": "Node availability zone.", "type": "string", - "x-order": 7 + "x-order": 8 }, "custom_labels": { - "description": "Custom user-assigned labels.", + "description": "Custom user-assigned labels for Node.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 8 + "x-order": 9 } }, - "x-order": 0 - }, - "container_node": { - "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 - }, - "pmm_agent": { - "description": "PMMAgent runs on Generic or Container Node.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 1 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 2 - }, - "connected": { - "description": "True if Agent is running and connected to pmm-managed.", - "type": "boolean", - "x-order": 3 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 2 - }, - "token": { - "description": "Token represents token for vmagent auth config.", - "type": "string", - "x-order": 3 - }, - "warning": { - "description": "Warning message.", - "type": "string", - "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/management/PostgreSQL/Add": { - "post": { - "description": "Adds PostgreSQL Service and starts postgres exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"postgres_exporter\" with provided \"pmm_agent_id\" and other parameters.", - "tags": [ - "ManagementService" - ], - "summary": "Add PostgreSQL", - "operationId": "AddPostgreSQL", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "node_id": { - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 1 - }, - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", - "type": "object", - "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", - "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "enum": [ - "NODE_TYPE_UNSPECIFIED", - "NODE_TYPE_GENERIC_NODE", - "NODE_TYPE_CONTAINER_NODE", - "NODE_TYPE_REMOTE_NODE", - "NODE_TYPE_REMOTE_RDS_NODE", - "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" - ], - "x-order": 0 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "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 - }, - "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 for Node.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - } - }, - "x-order": 2 + "x-order": 2 }, "service_name": { "description": "Unique across all Services user-defined name. Required.", @@ -22970,50 +22557,451 @@ } } }, - "/v1/management/Service/Remove": { + "/v1/management/annotations": { "post": { - "description": "Removes a Service along with Agents.", + "description": "Adds an annotation.", "tags": [ "ManagementService" ], - "summary": "Remove Service", - "operationId": "RemoveServiceMixin3", + "summary": "Add Annotation", + "operationId": "AddAnnotation", "parameters": [ { + "description": "AddAnnotationRequest is a params to add new annotation.", "name": "body", "in": "body", "required": true, "schema": { + "description": "AddAnnotationRequest is a params to add new annotation.", "type": "object", "properties": { - "service_type": { - "description": "ServiceType describes supported Service types.", + "text": { + "description": "An annotation description. Required.", "type": "string", - "default": "SERVICE_TYPE_UNSPECIFIED", - "enum": [ - "SERVICE_TYPE_UNSPECIFIED", - "SERVICE_TYPE_MYSQL_SERVICE", - "SERVICE_TYPE_MONGODB_SERVICE", - "SERVICE_TYPE_POSTGRESQL_SERVICE", - "SERVICE_TYPE_PROXYSQL_SERVICE", - "SERVICE_TYPE_HAPROXY_SERVICE", - "SERVICE_TYPE_EXTERNAL_SERVICE" - ], "x-order": 0 }, - "service_id": { - "description": "Service ID or Service Name is required.\nUnique randomly generated instance identifier.", - "type": "string", - "x-order": 1 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", + "tags": { + "description": "Tags are used to filter annotations.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 1 + }, + "node_name": { + "description": "Used for annotating a node.", + "type": "string", + "x-order": 2 + }, + "service_names": { + "description": "Used for annotating services.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 3 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "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/management/nodes": { + "post": { + "description": "Registers a new Node and a pmm-agent.", + "tags": [ + "ManagementService" + ], + "summary": "Register Node", + "operationId": "RegisterNode", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "enum": [ + "NODE_TYPE_UNSPECIFIED", + "NODE_TYPE_GENERIC_NODE", + "NODE_TYPE_CONTAINER_NODE", + "NODE_TYPE_REMOTE_NODE", + "NODE_TYPE_REMOTE_RDS_NODE", + "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" + ], + "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 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 5 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 6 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 7 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 8 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 9 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 10 + }, + "reregister": { + "description": "If true, and Node with that name already exist, it will be removed with all dependent Services and Agents.", + "type": "boolean", + "x-order": 11 + }, + "metrics_mode": { + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", + "type": "string", + "default": "METRICS_MODE_UNSPECIFIED", + "enum": [ + "METRICS_MODE_UNSPECIFIED", + "METRICS_MODE_PULL", + "METRICS_MODE_PUSH" + ], + "x-order": 12 + }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 13 + }, + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 14 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 15 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "generic_node": { + "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_node": { + "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 + }, + "pmm_agent": { + "description": "PMMAgent runs on Generic or Container Node.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 1 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 2 + }, + "connected": { + "description": "True if Agent is running and connected to pmm-managed.", + "type": "boolean", + "x-order": 3 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 4 + } + }, + "x-order": 2 + }, + "token": { + "description": "Token represents token for vmagent auth config.", + "type": "string", + "x-order": 3 + }, + "warning": { + "description": "Warning message.", + "type": "string", + "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/management/services/{service_id}": { + "delete": { + "description": "Removes a Service along with Agents.", + "tags": [ + "ManagementService" + ], + "summary": "Remove Service", + "operationId": "RemoveServiceMixin3", + "parameters": [ + { + "type": "string", + "description": "Either a Service ID or a Service Name.", + "name": "service_id", + "in": "path", + "required": true + }, + { + "enum": [ + "SERVICE_TYPE_UNSPECIFIED", + "SERVICE_TYPE_MYSQL_SERVICE", + "SERVICE_TYPE_MONGODB_SERVICE", + "SERVICE_TYPE_POSTGRESQL_SERVICE", + "SERVICE_TYPE_PROXYSQL_SERVICE", + "SERVICE_TYPE_HAPROXY_SERVICE", + "SERVICE_TYPE_EXTERNAL_SERVICE" + ], + "type": "string", + "default": "SERVICE_TYPE_UNSPECIFIED", + "description": "Service type.", + "name": "service_type", + "in": "query" + } ], "responses": { "200": { diff --git a/api/swagger/swagger.json b/api/swagger/swagger.json index b85963c460b..879577b03f0 100644 --- a/api/swagger/swagger.json +++ b/api/swagger/swagger.json @@ -5276,102 +5276,13 @@ } } }, - "/v1/management/Annotations/Add": { - "post": { - "description": "Adds an annotation.", - "tags": [ - "ManagementService" - ], - "summary": "Add Annotation", - "operationId": "AddAnnotation", - "parameters": [ - { - "description": "AddAnnotationRequest is a params to add new annotation.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "description": "AddAnnotationRequest is a params to add new annotation.", - "type": "object", - "properties": { - "text": { - "description": "An annotation description. Required.", - "type": "string", - "x-order": 0 - }, - "tags": { - "description": "Tags are used to filter annotations.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - }, - "node_name": { - "description": "Used for annotate node.", - "type": "string", - "x-order": 2 - }, - "service_names": { - "description": "Used for annotate services.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 3 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "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/management/External/Add": { "post": { - "description": "Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", + "description": "Adds a service and starts several agents. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", "tags": [ "ManagementService" ], - "summary": "Add External Service", + "summary": "Add a Service", "operationId": "AddExternal", "parameters": [ { @@ -5382,7 +5293,7 @@ "type": "object", "properties": { "runs_on_node_id": { - "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id always should be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id should always be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 0 }, @@ -5461,7 +5372,7 @@ "x-order": 2 }, "address": { - "description": "Node and Exporter access address (DNS name or IP).\naddress always should be passed with add_node.", + "description": "Node and Exporter access address (DNS name or IP).\naddress should always be passed with add_node.", "type": "string", "x-order": 3 }, @@ -5497,7 +5408,7 @@ "x-order": 9 }, "node_id": { - "description": "Node identifier on which an external service is been running.\nnode_id always should be passed with runs_on_node_id.", + "description": "Node identifier on which an external service is been running.\nnode_id should always be passed with runs_on_node_id.", "type": "string", "x-order": 10 }, @@ -7400,14 +7311,14 @@ } } }, - "/v1/management/Node/Register": { + "/v1/management/PostgreSQL/Add": { "post": { - "description": "Registers a new Node and pmm-agent.", + "description": "Adds PostgreSQL Service and starts postgres exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"postgres_exporter\" with provided \"pmm_agent_id\" and other parameters.", "tags": [ "ManagementService" ], - "summary": "Register Node", - "operationId": "RegisterNode", + "summary": "Add PostgreSQL", + "operationId": "AddPostgreSQL", "parameters": [ { "name": "body", @@ -7416,124 +7327,32 @@ "schema": { "type": "object", "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", + "node_id": { + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "enum": [ - "NODE_TYPE_UNSPECIFIED", - "NODE_TYPE_GENERIC_NODE", - "NODE_TYPE_CONTAINER_NODE", - "NODE_TYPE_REMOTE_NODE", - "NODE_TYPE_REMOTE_RDS_NODE", - "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" - ], "x-order": 0 }, "node_name": { - "description": "Unique across all Nodes user-defined name.", + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "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 - }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", - "type": "string", - "x-order": 5 - }, - "container_name": { - "description": "Container name.", - "type": "string", - "x-order": 6 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 7 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 8 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 9 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Node.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 10 - }, - "reregister": { - "description": "If true, and Node with that name already exist, it will be removed with all dependent Services and Agents.", - "type": "boolean", - "x-order": 11 - }, - "metrics_mode": { - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", - "type": "string", - "default": "METRICS_MODE_UNSPECIFIED", - "enum": [ - "METRICS_MODE_UNSPECIFIED", - "METRICS_MODE_PULL", - "METRICS_MODE_PUSH" - ], - "x-order": 12 - }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 13 - }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 14 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 15 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "generic_node": { - "description": "GenericNode represents a bare metal server or virtual machine.", + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", "type": "object", "properties": { - "node_id": { - "description": "Unique randomly generated instance identifier.", + "node_type": { + "description": "NodeType describes supported Node types.", "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "enum": [ + "NODE_TYPE_UNSPECIFIED", + "NODE_TYPE_GENERIC_NODE", + "NODE_TYPE_CONTAINER_NODE", + "NODE_TYPE_REMOTE_NODE", + "NODE_TYPE_REMOTE_RDS_NODE", + "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" + ], "x-order": 0 }, "node_name": { @@ -7541,283 +7360,51 @@ "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 + "x-order": 2 }, "distro": { "description": "Linux distribution name and version.", "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": 5 + "x-order": 6 }, "region": { "description": "Node region.", "type": "string", - "x-order": 6 + "x-order": 7 }, "az": { "description": "Node availability zone.", "type": "string", - "x-order": 7 + "x-order": 8 }, "custom_labels": { - "description": "Custom user-assigned labels.", + "description": "Custom user-assigned labels for Node.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 8 + "x-order": 9 } }, - "x-order": 0 - }, - "container_node": { - "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 - }, - "pmm_agent": { - "description": "PMMAgent runs on Generic or Container Node.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 1 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 2 - }, - "connected": { - "description": "True if Agent is running and connected to pmm-managed.", - "type": "boolean", - "x-order": 3 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 2 - }, - "token": { - "description": "Token represents token for vmagent auth config.", - "type": "string", - "x-order": 3 - }, - "warning": { - "description": "Warning message.", - "type": "string", - "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/management/PostgreSQL/Add": { - "post": { - "description": "Adds PostgreSQL Service and starts postgres exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"postgres_exporter\" with provided \"pmm_agent_id\" and other parameters.", - "tags": [ - "ManagementService" - ], - "summary": "Add PostgreSQL", - "operationId": "AddPostgreSQL", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "node_id": { - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 1 - }, - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", - "type": "object", - "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", - "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "enum": [ - "NODE_TYPE_UNSPECIFIED", - "NODE_TYPE_GENERIC_NODE", - "NODE_TYPE_CONTAINER_NODE", - "NODE_TYPE_REMOTE_NODE", - "NODE_TYPE_REMOTE_RDS_NODE", - "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" - ], - "x-order": 0 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "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 - }, - "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 for Node.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - } - }, - "x-order": 2 + "x-order": 2 }, "service_name": { "description": "Unique across all Services user-defined name. Required.", @@ -10018,46 +9605,49 @@ } } }, - "/v1/management/Service/Remove": { + "/v1/management/annotations": { "post": { - "description": "Removes a Service along with Agents.", + "description": "Adds an annotation.", "tags": [ "ManagementService" ], - "summary": "Remove Service", - "operationId": "RemoveService", + "summary": "Add Annotation", + "operationId": "AddAnnotation", "parameters": [ { + "description": "AddAnnotationRequest is a params to add new annotation.", "name": "body", "in": "body", "required": true, "schema": { + "description": "AddAnnotationRequest is a params to add new annotation.", "type": "object", "properties": { - "service_type": { - "description": "ServiceType describes supported Service types.", + "text": { + "description": "An annotation description. Required.", "type": "string", - "default": "SERVICE_TYPE_UNSPECIFIED", - "enum": [ - "SERVICE_TYPE_UNSPECIFIED", - "SERVICE_TYPE_MYSQL_SERVICE", - "SERVICE_TYPE_MONGODB_SERVICE", - "SERVICE_TYPE_POSTGRESQL_SERVICE", - "SERVICE_TYPE_PROXYSQL_SERVICE", - "SERVICE_TYPE_HAPROXY_SERVICE", - "SERVICE_TYPE_EXTERNAL_SERVICE" - ], "x-order": 0 }, - "service_id": { - "description": "Service ID or Service Name is required.\nUnique randomly generated instance identifier.", - "type": "string", + "tags": { + "description": "Tags are used to filter annotations.", + "type": "array", + "items": { + "type": "string" + }, "x-order": 1 }, - "service_name": { - "description": "Unique across all Services user-defined name.", + "node_name": { + "description": "Used for annotating a node.", "type": "string", "x-order": 2 + }, + "service_names": { + "description": "Used for annotating services.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 3 } } } @@ -10104,6 +9694,404 @@ } } }, + "/v1/management/nodes": { + "post": { + "description": "Registers a new Node and a pmm-agent.", + "tags": [ + "ManagementService" + ], + "summary": "Register Node", + "operationId": "RegisterNode", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "enum": [ + "NODE_TYPE_UNSPECIFIED", + "NODE_TYPE_GENERIC_NODE", + "NODE_TYPE_CONTAINER_NODE", + "NODE_TYPE_REMOTE_NODE", + "NODE_TYPE_REMOTE_RDS_NODE", + "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" + ], + "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 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 5 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 6 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 7 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 8 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 9 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 10 + }, + "reregister": { + "description": "If true, and Node with that name already exist, it will be removed with all dependent Services and Agents.", + "type": "boolean", + "x-order": 11 + }, + "metrics_mode": { + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", + "type": "string", + "default": "METRICS_MODE_UNSPECIFIED", + "enum": [ + "METRICS_MODE_UNSPECIFIED", + "METRICS_MODE_PULL", + "METRICS_MODE_PUSH" + ], + "x-order": 12 + }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 13 + }, + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 14 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 15 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "generic_node": { + "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_node": { + "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 + }, + "pmm_agent": { + "description": "PMMAgent runs on Generic or Container Node.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 1 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 2 + }, + "connected": { + "description": "True if Agent is running and connected to pmm-managed.", + "type": "boolean", + "x-order": 3 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 4 + } + }, + "x-order": 2 + }, + "token": { + "description": "Token represents token for vmagent auth config.", + "type": "string", + "x-order": 3 + }, + "warning": { + "description": "Warning message.", + "type": "string", + "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/management/services/{service_id}": { + "delete": { + "description": "Removes a Service along with Agents.", + "tags": [ + "ManagementService" + ], + "summary": "Remove Service", + "operationId": "RemoveService", + "parameters": [ + { + "type": "string", + "description": "Either a Service ID or a Service Name.", + "name": "service_id", + "in": "path", + "required": true + }, + { + "enum": [ + "SERVICE_TYPE_UNSPECIFIED", + "SERVICE_TYPE_MYSQL_SERVICE", + "SERVICE_TYPE_MONGODB_SERVICE", + "SERVICE_TYPE_POSTGRESQL_SERVICE", + "SERVICE_TYPE_PROXYSQL_SERVICE", + "SERVICE_TYPE_HAPROXY_SERVICE", + "SERVICE_TYPE_EXTERNAL_SERVICE" + ], + "type": "string", + "default": "SERVICE_TYPE_UNSPECIFIED", + "description": "Service type.", + "name": "service_type", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "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/qan/Filters/Get": { "post": { "description": "Provides a filtered map of metrics names.", diff --git a/descriptor.bin b/descriptor.bin index 99bc30990c1f805043e40cb156ac3307c791314b..f8eb2e752fa216fdd31f40550d7b89a0d2a0f361 100644 GIT binary patch delta 3693 zcmZvfe{fXQ70379bKl#$7ebP^`2h8Bp0hv`-+q9** zsXM(TmCj}Q`kS(;zAfDwQrQJvsoW#|y{W8sj0mwbm6Pq?ajFX^wmb7-+@2joL_H@G zc^~9U-+-#Zgy)tHn`MECu_I7k6_}vRNeP>Zi@Wo{YV9h)+}*&uz*Nf+PXs3B z?uMGFHkW#A53uQWkzy*Em4S(=d!Wh>OibMacTTgZXzc}dhgr;1z+ANBHW)B>FH}qk zOdVb8+g#?ceMMr1sb~ho3{&?Ni5aHuD-t^%+aH#t4yK|RpJnSfn7hAN*1_EUfMp*N z)Wt7w5F+o(o4;{ZdIy15iw6aBBiMTP5YQuX>08dS{2}}uYA@x-<{X0fjKIXb4ngyh zz{KD16JYm=auHL(?A5Dh>#VEP-T>?rct0 zTy|RXN5R#N!yJMTN1F&Kff81)*k6Cns;3dFj; zqMJZH_Y}}yBS?cUuU~fNKZhWW1~IPnZf{>EmzgWx9R^X6?85tT=5{L7W-oVo@b2_BTvX^GnZ7g=b&8h!msCE1OcCpUNc$<0qC z`?Du0KR`a~k}m`Q@N=%wIG_VZG^H)ac+w%+Of6Dg~l9iuqbE@U`v$0zF zql~k#xvpANcBFbTTT-ixBy^;*y_s}2HRsidqI^X%jV}b)Hw!k?O*8p6c^gW;#=e=^b*{89s4#((mo*Y1Eyb z{p_`mUZ9hdK2<1v>Ius=r7CsEQyZ@+F5jD<+|fM zL6Y+0WBdVGc9sj7`30|#WyiQ*IB}GJz{wl(hbNJ{OMY^a-#fQ{){M{93k0$0oA$4D z>10pp>18)38wnhh&8OT-_2sMNP=WX7t57dd`cT`ToKF!g`s+qKh|`IQdVfiGZX^Ei zkkx-+v9G2gVE0$z?z07IgoEP~aa0};EZj04iw71?OuVXEOwk2!sggD%N`3j#JG^SK zt4t-1Y8RpwC*KuVm{&RLZV^MZ#)XLyU-PPO#j6uffZ}TDW;lco#(QE||*hPE%e?(!>{-_l5cU#Z6S5+TRinhP#r?4fR?7V z+mvD+yC*0cD1~;JvZxen0b3Z9)jDAu?-AV;yzAQNgOIpNluF#++TNGh+V9JgXZe+U z8w!>wi&_C~s8`lPh_+C!P$}3V_O$@Q>V$C_2o-9$xMzI}4wlNzEp#zmPxAqa?pJ>;e= zVU@zT426o=z#b1Mv`QGqf6WI$4cJ6;kobrGAnloKuB$J#N;(($$C*vxNpTTkQ+QHb zgxD0G6caBugno~xC(GjQ>;}|} zz7F}`8~m>P06_`^&+(uP5X7)1PVfLh4x_^y)q0SyAuMBFaNMf3brz#`5cWJqnWrSz zYHeM!^-#td`PnXJ<=si+qS`*Fw=(@fU2LNf`^9U=4pGA-0^soGLha2!NLb{9)MHQZgC(jp-zgyCTXI!mMXPKmGY&Hf>enQQ6FdS z%)MK+-}e0X%$(nyd+zzq`QNub{kztoVKj_~$uND>*qx@A77!QLQmmoWpEe$Dj6`_N zmmf)GdYq(_8|dBVbUFF{Y$h)r95()qo)ixrGA`4Dh6@L!#Q0ee9#_P8?bB<}mqJji$Ucm{C zAQ`X~d>6-Nz%q}Kz@oTz$=GQfBP_!2=hO^f&?g8!A>wn!w&DaaExwc+QpXmZAmJ7- zBr;r|;FaoMYMI9g{Sh&Fn1^IKot`__4mRSXc*q`Juq0b-i0xkE!>*!~Sd&-f5nLugS!$gDRB zE%^}Gh0xNiE(Ed68G60uVE02m;%`Md;f;1kn&$R1h-j zSA@RfLl752OPwwRq|6dL4-ieZSUqpF7iWnX){jmBVwNnw#R~yqmTb6Jp9F=q?-Kf3 zAA)KKEh-3^b&1d`J_L0kw4{2%u*|Cj|55eC2lGba(W_+$10b%JAq;@HT81!S`}Ya` z(1$QIgccQq%=(DXKll)a3n8V^p#`Hfv|xVp8F|g*qW*PulNgu_F7Pvyn-&cOEL&WN zldxDj!zxPOx*UunyMw>qADQdJA8YS99hYg#-Og6p88Yk>%p1c~&PXE`*keg-%i}jx3s0Vpoz` zvJaE9<2A$4SF*qWA`H>1@}jU5B)JNo?0 zj<|Z#UYKef@pRfMiOEy!fts(6$2VF_yPTfhe8I`tJF{sgcC%P^n$>OW@9SFwbuxvu zPk#8Y*=al;KZLF2;`#++IgR}d#YOr&TPGHO&QhiA z)9haiofr3?1>%(W=~?zAap)JUM)beWSXGzPmmP4necGUA=#-cgtW6vUvkI|mhGmL% zh;ta60c4SC*1#LwHx{r+7`MkNZG9fLJk_@b|fIs|`)!?YcA7SLxWjc{}Gk{_WnJlU~ck_2-PwuM1#g$fZp0isVM2 zuopp%+S&+*L8f{zDvtly*eI5L-!Kyx7DoMr7#2oDHF_b2h0$mo4}ojIAN61w^4aC? z_23!Zu4fpHfhlqHE!JJt$m;ld?HJU?tpcB8>x(wb1~>=h7sQ6qpd;AahRLA4gj#eZ zZI&+ZUtXc4a>gopiwUE|_X+9>ce*vf$=dKn66>_Rc96Yci=Ulib;WWkxi1A^Elhy1+P3trA_6#MJGq%wk z9)#-`)D_0nv%?Na+)ZK!v4q%hAh~C|ol2LQf6Xu|Ce3BKE*J+%RyKMOP$XM#(-dF` z^egnM9)&gyB`FG-@iqF8N8uWV5`>~KESkcPlGsy$vH{U zc9H$PnDM_8=oXUkzY`N6GX8gBLWwNRc@U zj}?V%isT+4e#1U44*IPb1c*VuHG=>#=(lDNN_>|VJ&2%&a3$rQkYNrXdJxGR`MCyN z_tcWQ%)kw61mPn9(qeDz&F_P;D?XcLt;G=p6zX9Zd^jTrFmwnVJ%WHkRbfzN6wzm( zin?Ml?c`c4XFZGPVV{M$ELv)Fzm$+=jv;&uSnBNxXw$B(Nodk^UcB)xixtO^xkM9$ z0B8&?jd>vejiFT=G*AeD#u5FY4;0csT2w$X>nNhn`#>QVNK5Lv$>Gk8@XG+yZWom& zc`lH19V+j;!V|rPN9?%t$vjw&Iw%g)a02