From b20073a13b000f800df2afdfacba2ebc14759fda Mon Sep 17 00:00:00 2001 From: Alex Demidoff Date: Sun, 24 Mar 2024 07:16:49 +0000 Subject: [PATCH] PMM-12913 migrate /v1/inventory/Nodes --- Makefile.include | 34 +- admin/commands/annotation.go | 4 +- admin/commands/inventory/list_nodes.go | 4 +- admin/commands/inventory/remove_node.go | 8 +- admin/commands/management/unregister.go | 11 +- api-tests/helpers.go | 4 +- api-tests/inventory/nodes_test.go | 59 +- api-tests/management/external_test.go | 4 +- api-tests/management/haproxy_test.go | 4 +- api-tests/management/helpers.go | 4 +- api-tests/management/rds_test.go | 8 +- api/MIGRATION_TO_V3.md | 8 +- .../nodes_service/add_node_responses.go | 4 +- .../nodes_service/get_node_parameters.go | 23 +- .../nodes_service/get_node_responses.go | 41 +- .../nodes_service/list_nodes_parameters.go | 49 +- .../nodes_service/list_nodes_responses.go | 107 +- .../nodes_service/nodes_service_client.go | 14 +- .../nodes_service/remove_node_parameters.go | 57 +- .../nodes_service/remove_node_responses.go | 44 +- api/inventory/v1/json/v1.json | 12870 ++++++++-------- api/inventory/v1/nodes.pb.go | 88 +- api/inventory/v1/nodes.pb.gw.go | 128 +- api/inventory/v1/nodes.proto | 17 +- api/swagger/swagger-dev.json | 12056 ++++++++------- managed/services/inventory/nodes.go | 3 +- 26 files changed, 12761 insertions(+), 12892 deletions(-) diff --git a/Makefile.include b/Makefile.include index 9742ee1554..7ba90da1e6 100644 --- a/Makefile.include +++ b/Makefile.include @@ -148,23 +148,23 @@ clean: clean_swagger ## Remove generated files find api -name '*.validate.go' -print -delete SPECS="\ - api/agentlocal/v1 \ - api/server/v1 \ - api/user/v1 \ - api/inventory/v1 \ - api/management/v1 \ - api/management/v1/agent \ - api/management/v1/node \ - api/management/v1/service \ - api/actions/v1 \ - api/alerting/v1 \ - api/advisors/v1 \ - api/backup/v1 \ - api/dump/v1 \ - api/role/v1 \ - api/qan/v1 \ - api/platform/v1"; \ - for API in $$SPECS; do \ + api/agentlocal/v1 \ + api/server/v1 \ + api/user/v1 \ + api/inventory/v1 \ + api/management/v1 \ + api/management/v1/agent \ + api/management/v1/node \ + api/management/v1/service \ + api/actions/v1 \ + api/alerting/v1 \ + api/advisors/v1 \ + api/backup/v1 \ + api/dump/v1 \ + api/role/v1 \ + api/qan/v1 \ + api/platform/v1"; \ + for API in $$SPECS; do \ rm -fr $$API/json/client $$API/json/models $$API/json/$$(basename $$API).json ; \ done rm -f api/swagger/swagger.json api/swagger/swagger-dev.json diff --git a/admin/commands/annotation.go b/admin/commands/annotation.go index b92e04d517..c7db7750a4 100644 --- a/admin/commands/annotation.go +++ b/admin/commands/annotation.go @@ -77,9 +77,7 @@ func (cmd *AnnotationCommand) getCurrentNode() (*nodes.GetNodeOKBody, error) { } params := &nodes.GetNodeParams{ - Body: nodes.GetNodeBody{ - NodeID: status.NodeID, - }, + NodeID: status.NodeID, Context: Ctx, } diff --git a/admin/commands/inventory/list_nodes.go b/admin/commands/inventory/list_nodes.go index 8bf40e41e0..31a8840147 100644 --- a/admin/commands/inventory/list_nodes.go +++ b/admin/commands/inventory/list_nodes.go @@ -71,8 +71,8 @@ func (cmd *ListNodesCommand) RunCmd() (commands.Result, error) { } params := &nodes.ListNodesParams{ - Body: nodes.ListNodesBody{NodeType: nodeType}, - Context: commands.Ctx, + NodeType: nodeType, + Context: commands.Ctx, } result, err := client.Default.NodesService.ListNodes(params) if err != nil { diff --git a/admin/commands/inventory/remove_node.go b/admin/commands/inventory/remove_node.go index 40cfb67836..eab76b5406 100644 --- a/admin/commands/inventory/remove_node.go +++ b/admin/commands/inventory/remove_node.go @@ -15,6 +15,8 @@ package inventory import ( + "github.com/AlekSi/pointer" + "github.com/percona/pmm/admin/commands" "github.com/percona/pmm/api/inventory/v1/json/client" nodes "github.com/percona/pmm/api/inventory/v1/json/client/nodes_service" @@ -41,10 +43,8 @@ type RemoveNodeCommand struct { // RunCmd runs the command for RemoveNodeCommand. func (cmd *RemoveNodeCommand) RunCmd() (commands.Result, error) { params := &nodes.RemoveNodeParams{ - Body: nodes.RemoveNodeBody{ - NodeID: cmd.NodeID, - Force: cmd.Force, - }, + NodeID: cmd.NodeID, + Force: pointer.ToBool(cmd.Force), Context: commands.Ctx, } _, err := client.Default.NodesService.RemoveNode(params) diff --git a/admin/commands/management/unregister.go b/admin/commands/management/unregister.go index 3ce7452da0..d2db97d997 100644 --- a/admin/commands/management/unregister.go +++ b/admin/commands/management/unregister.go @@ -15,6 +15,7 @@ package management import ( + "github.com/AlekSi/pointer" "github.com/pkg/errors" "github.com/percona/pmm/admin/agentlocal" @@ -65,9 +66,7 @@ func (cmd *UnregisterCommand) RunCmd() (commands.Result, error) { nodeID = status.NodeID node, err := client.Default.NodesService.GetNode(&nodes.GetNodeParams{ Context: commands.Ctx, - Body: nodes.GetNodeBody{ - NodeID: nodeID, - }, + NodeID: nodeID, }) if err != nil { return nil, err @@ -79,10 +78,8 @@ func (cmd *UnregisterCommand) RunCmd() (commands.Result, error) { } params := &nodes.RemoveNodeParams{ - Body: nodes.RemoveNodeBody{ - NodeID: nodeID, - Force: cmd.Force, - }, + NodeID: nodeID, + Force: pointer.ToBool(cmd.Force), Context: commands.Ctx, } diff --git a/api-tests/helpers.go b/api-tests/helpers.go index 18dc2e782b..d74f850e67 100644 --- a/api-tests/helpers.go +++ b/api-tests/helpers.go @@ -136,9 +136,7 @@ func RemoveNodes(t TestingT, nodeIDs ...string) { for _, nodeID := range nodeIDs { params := &nodes.RemoveNodeParams{ - Body: nodes.RemoveNodeBody{ - NodeID: nodeID, - }, + NodeID: nodeID, Context: context.Background(), } res, err := client.Default.NodesService.RemoveNode(params) diff --git a/api-tests/inventory/nodes_test.go b/api-tests/inventory/nodes_test.go index 0130afc468..05af976ce5 100644 --- a/api-tests/inventory/nodes_test.go +++ b/api-tests/inventory/nodes_test.go @@ -29,6 +29,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" ) func TestNodes(t *testing.T) { @@ -77,10 +78,8 @@ func TestNodes(t *testing.T) { }, "There should be a remote node with id `%s`", remoteNodeID) res, err = client.Default.NodesService.ListNodes(&nodes.ListNodesParams{ - Body: nodes.ListNodesBody{ - NodeType: pointer.ToString(nodes.ListNodesBodyNodeTypeNODETYPEGENERICNODE), - }, - Context: pmmapitests.Context, + NodeType: pointer.ToString(types.NodeTypeGenericNode), + Context: pmmapitests.Context, }) require.NoError(t, err) require.NotEmptyf(t, res.Payload.Generic, "There should be at least one generic node") @@ -125,7 +124,7 @@ func TestGetNode(t *testing.T) { } params := &nodes.GetNodeParams{ - Body: nodes.GetNodeBody{NodeID: nodeID}, + NodeID: nodeID, Context: pmmapitests.Context, } res, err := client.Default.NodesService.GetNode(params) @@ -137,7 +136,7 @@ func TestGetNode(t *testing.T) { t.Parallel() params := &nodes.GetNodeParams{ - Body: nodes.GetNodeBody{NodeID: "pmm-not-found"}, + NodeID: "pmm-not-found", Context: pmmapitests.Context, } res, err := client.Default.NodesService.GetNode(params) @@ -149,7 +148,6 @@ func TestGetNode(t *testing.T) { t.Parallel() params := &nodes.GetNodeParams{ - Body: nodes.GetNodeBody{}, Context: pmmapitests.Context, } res, err := client.Default.NodesService.GetNode(params) @@ -182,7 +180,7 @@ func TestGenericNode(t *testing.T) { // Check that the node exists in DB. getNodeRes, err := client.Default.NodesService.GetNode(&nodes.GetNodeParams{ - Body: nodes.GetNodeBody{NodeID: nodeID}, + NodeID: nodeID, Context: pmmapitests.Context, }) require.NoError(t, err) @@ -249,7 +247,7 @@ func TestContainerNode(t *testing.T) { // Check that the node exists in DB. getNodeRes, err := client.Default.NodesService.GetNode(&nodes.GetNodeParams{ - Body: nodes.GetNodeBody{NodeID: nodeID}, + NodeID: nodeID, Context: pmmapitests.Context, }) require.NoError(t, err) @@ -319,7 +317,7 @@ func TestRemoteNode(t *testing.T) { // Check node exists in DB. getNodeRes, err := client.Default.NodesService.GetNode(&nodes.GetNodeParams{ - Body: nodes.GetNodeBody{NodeID: nodeID}, + NodeID: nodeID, Context: pmmapitests.Context, }) require.NoError(t, err) @@ -378,9 +376,7 @@ func TestRemoveNode(t *testing.T) { nodeID := node.Generic.NodeID removeResp, err := client.Default.NodesService.RemoveNode(&nodes.RemoveNodeParams{ - Body: nodes.RemoveNodeBody{ - NodeID: nodeID, - }, + NodeID: nodeID, Context: context.Background(), }) assert.NoError(t, err) @@ -412,9 +408,7 @@ func TestRemoveNode(t *testing.T) { serviceID := service.Mysql.ServiceID removeResp, err := client.Default.NodesService.RemoveNode(&nodes.RemoveNodeParams{ - Body: nodes.RemoveNodeBody{ - NodeID: node.Generic.NodeID, - }, + NodeID: node.Generic.NodeID, Context: context.Background(), }) pmmapitests.AssertAPIErrorf(t, err, 400, codes.FailedPrecondition, `Node with ID %q has services.`, node.Generic.NodeID) @@ -422,7 +416,7 @@ func TestRemoveNode(t *testing.T) { // Check that node and service isn't removed. getServiceResp, err := client.Default.NodesService.GetNode(&nodes.GetNodeParams{ - Body: nodes.GetNodeBody{NodeID: node.Generic.NodeID}, + NodeID: node.Generic.NodeID, Context: pmmapitests.Context, }) assert.NotNil(t, getServiceResp) @@ -448,10 +442,8 @@ func TestRemoveNode(t *testing.T) { // Remove with force flag. params := &nodes.RemoveNodeParams{ - Body: nodes.RemoveNodeBody{ - NodeID: node.Generic.NodeID, - Force: true, - }, + NodeID: node.Generic.NodeID, + Force: pointer.ToBool(true), Context: pmmapitests.Context, } res, err := client.Default.NodesService.RemoveNode(params) @@ -460,7 +452,7 @@ func TestRemoveNode(t *testing.T) { // Check that the node and agents are removed. getServiceResp, err = client.Default.NodesService.GetNode(&nodes.GetNodeParams{ - Body: nodes.GetNodeBody{NodeID: node.Generic.NodeID}, + NodeID: node.Generic.NodeID, Context: pmmapitests.Context, }) pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, "Node with ID %q not found.", node.Generic.NodeID) @@ -499,9 +491,7 @@ func TestRemoveNode(t *testing.T) { _ = pmmapitests.AddPMMAgent(t, node.Generic.NodeID) removeResp, err := client.Default.NodesService.RemoveNode(&nodes.RemoveNodeParams{ - Body: nodes.RemoveNodeBody{ - NodeID: node.Generic.NodeID, - }, + NodeID: node.Generic.NodeID, Context: context.Background(), }) pmmapitests.AssertAPIErrorf(t, err, 400, codes.FailedPrecondition, `Node with ID %q has pmm-agent.`, node.Generic.NodeID) @@ -509,10 +499,8 @@ func TestRemoveNode(t *testing.T) { // Remove with force flag. params := &nodes.RemoveNodeParams{ - Body: nodes.RemoveNodeBody{ - NodeID: node.Generic.NodeID, - Force: true, - }, + NodeID: node.Generic.NodeID, + Force: pointer.ToBool(true), Context: pmmapitests.Context, } res, err := client.Default.NodesService.RemoveNode(params) @@ -521,7 +509,7 @@ func TestRemoveNode(t *testing.T) { // Check that the node and agents are removed. getServiceResp, err := client.Default.NodesService.GetNode(&nodes.GetNodeParams{ - Body: nodes.GetNodeBody{NodeID: node.Generic.NodeID}, + NodeID: node.Generic.NodeID, Context: pmmapitests.Context, }) pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, "Node with ID %q not found.", node.Generic.NodeID) @@ -539,9 +527,7 @@ func TestRemoveNode(t *testing.T) { t.Parallel() nodeID := "not-exist-node-id" removeResp, err := client.Default.NodesService.RemoveNode(&nodes.RemoveNodeParams{ - Body: nodes.RemoveNodeBody{ - NodeID: nodeID, - }, + NodeID: nodeID, Context: context.Background(), }) pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, `Node with ID %q not found.`, nodeID) @@ -551,7 +537,6 @@ func TestRemoveNode(t *testing.T) { t.Run("Empty params", func(t *testing.T) { t.Parallel() removeResp, err := client.Default.NodesService.RemoveNode(&nodes.RemoveNodeParams{ - Body: nodes.RemoveNodeBody{}, Context: context.Background(), }) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid RemoveNodeRequest.NodeId: value length must be at least 1 runes") @@ -562,10 +547,8 @@ func TestRemoveNode(t *testing.T) { t.Parallel() removeResp, err := client.Default.NodesService.RemoveNode(&nodes.RemoveNodeParams{ - Body: nodes.RemoveNodeBody{ - NodeID: "pmm-server", - Force: true, - }, + NodeID: "pmm-server", + Force: pointer.ToBool(true), Context: context.Background(), }) pmmapitests.AssertAPIErrorf(t, err, 403, codes.PermissionDenied, "PMM Server node can't be removed.") diff --git a/api-tests/management/external_test.go b/api-tests/management/external_test.go index bdf3fcea94..f0236d1e82 100644 --- a/api-tests/management/external_test.go +++ b/api-tests/management/external_test.go @@ -191,9 +191,7 @@ func TestAddExternal(t *testing.T) { // Check that node is created and its fields. node, err := inventoryClient.Default.NodesService.GetNode(&nodes.GetNodeParams{ - Body: nodes.GetNodeBody{ - NodeID: nodeID, - }, + NodeID: nodeID, Context: pmmapitests.Context, }) assert.NoError(t, err) diff --git a/api-tests/management/haproxy_test.go b/api-tests/management/haproxy_test.go index 7917d54f91..f42adc8967 100644 --- a/api-tests/management/haproxy_test.go +++ b/api-tests/management/haproxy_test.go @@ -190,9 +190,7 @@ func TestAddHAProxy(t *testing.T) { // Check that node is created and its fields. node, err := inventoryClient.Default.NodesService.GetNode(&nodes.GetNodeParams{ - Body: nodes.GetNodeBody{ - NodeID: nodeID, - }, + NodeID: nodeID, Context: pmmapitests.Context, }) assert.NoError(t, err) diff --git a/api-tests/management/helpers.go b/api-tests/management/helpers.go index 738ce85be7..aeca07a57b 100644 --- a/api-tests/management/helpers.go +++ b/api-tests/management/helpers.go @@ -112,9 +112,7 @@ func assertNodeCreated(t pmmapitests.TestingT, nodeID string, expectedResult nod t.Helper() nodeOK, err := inventoryClient.Default.NodesService.GetNode(&nodes.GetNodeParams{ - Body: nodes.GetNodeBody{ - NodeID: nodeID, - }, + NodeID: nodeID, Context: pmmapitests.Context, }) assert.NoError(t, err) diff --git a/api-tests/management/rds_test.go b/api-tests/management/rds_test.go index 46678b6523..5bf2c246b1 100644 --- a/api-tests/management/rds_test.go +++ b/api-tests/management/rds_test.go @@ -109,9 +109,7 @@ func TestAddRds(t *testing.T) { pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, fmt.Sprintf(`Agent with ID "%s" not found.`, body.RDSExporter.AgentID)) _, err = inventoryClient.Default.NodesService.GetNode(&nodes.GetNodeParams{ - Body: nodes.GetNodeBody{ - NodeID: body.Mysql.NodeID, - }, + NodeID: body.Mysql.NodeID, Context: pmmapitests.Context, }) pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, fmt.Sprintf(`Node with ID "%s" not found.`, body.Mysql.NodeID)) @@ -167,9 +165,7 @@ func TestAddRds(t *testing.T) { pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, fmt.Sprintf(`Agent with ID "%s" not found.`, body.RDSExporter.AgentID)) _, err = inventoryClient.Default.NodesService.GetNode(&nodes.GetNodeParams{ - Body: nodes.GetNodeBody{ - NodeID: body.Postgresql.NodeID, - }, + NodeID: body.Postgresql.NodeID, Context: pmmapitests.Context, }) pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, fmt.Sprintf(`Node with ID "%s" not found.`, body.Postgresql.NodeID)) diff --git a/api/MIGRATION_TO_V3.md b/api/MIGRATION_TO_V3.md index 6e05663334..ccd73704d9 100644 --- a/api/MIGRATION_TO_V3.md +++ b/api/MIGRATION_TO_V3.md @@ -29,10 +29,10 @@ POST /v1/inventory/Agents/Remove DELETE /v1/inventory/agents/ POST /v1/inventory/Agents/GetLogs GET /v1/inventory/agents/{id}/logs ✅ **NodesService** **NodesService** -POST /v1/inventory/Nodes/Add POST /v1/inventory/nodes -POST /v1/inventory/Nodes/Get GET /v1/inventory/nodes/{id} -POST /v1/inventory/Nodes/Delete DELETE /v1/inventory/nodes/{id} -POST /v1/inventory/Nodes/List GET /v1/inventory/nodes +POST /v1/inventory/Nodes/Add POST /v1/inventory/nodes ✅ +POST /v1/inventory/Nodes/Get GET /v1/inventory/nodes/{node_id} ✅ +POST /v1/inventory/Nodes/Delete DELETE /v1/inventory/nodes/{node_id} ✅ +POST /v1/inventory/Nodes/List GET /v1/inventory/nodes ✅ **ServicesService** **ServicesService** POST /v1/inventory/Services/Add POST /v1/inventory/services diff --git a/api/inventory/v1/json/client/nodes_service/add_node_responses.go b/api/inventory/v1/json/client/nodes_service/add_node_responses.go index ef09cc9141..f1f41ef77e 100644 --- a/api/inventory/v1/json/client/nodes_service/add_node_responses.go +++ b/api/inventory/v1/json/client/nodes_service/add_node_responses.go @@ -58,7 +58,7 @@ type AddNodeOK struct { } func (o *AddNodeOK) Error() string { - return fmt.Sprintf("[POST /v1/inventory/Nodes/Add][%d] addNodeOk %+v", 200, o.Payload) + return fmt.Sprintf("[POST /v1/inventory/nodes][%d] addNodeOk %+v", 200, o.Payload) } func (o *AddNodeOK) GetPayload() *AddNodeOKBody { @@ -100,7 +100,7 @@ func (o *AddNodeDefault) Code() int { } func (o *AddNodeDefault) Error() string { - return fmt.Sprintf("[POST /v1/inventory/Nodes/Add][%d] AddNode default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /v1/inventory/nodes][%d] AddNode default %+v", o._statusCode, o.Payload) } func (o *AddNodeDefault) GetPayload() *AddNodeDefaultBody { diff --git a/api/inventory/v1/json/client/nodes_service/get_node_parameters.go b/api/inventory/v1/json/client/nodes_service/get_node_parameters.go index db286b596d..3498346e1f 100644 --- a/api/inventory/v1/json/client/nodes_service/get_node_parameters.go +++ b/api/inventory/v1/json/client/nodes_service/get_node_parameters.go @@ -60,8 +60,11 @@ GetNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetNodeParams struct { - // Body. - Body GetNodeBody + /* NodeID. + + Unique randomly generated instance identifier. + */ + NodeID string timeout time.Duration Context context.Context @@ -116,15 +119,15 @@ func (o *GetNodeParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithBody adds the body to the get node params -func (o *GetNodeParams) WithBody(body GetNodeBody) *GetNodeParams { - o.SetBody(body) +// WithNodeID adds the nodeID to the get node params +func (o *GetNodeParams) WithNodeID(nodeID string) *GetNodeParams { + o.SetNodeID(nodeID) return o } -// SetBody adds the body to the get node params -func (o *GetNodeParams) SetBody(body GetNodeBody) { - o.Body = body +// SetNodeID adds the nodeId to the get node params +func (o *GetNodeParams) SetNodeID(nodeID string) { + o.NodeID = nodeID } // WriteToRequest writes these params to a swagger request @@ -133,7 +136,9 @@ func (o *GetNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis return err } var res []error - if err := r.SetBodyParam(o.Body); err != nil { + + // path param node_id + if err := r.SetPathParam("node_id", o.NodeID); err != nil { return err } diff --git a/api/inventory/v1/json/client/nodes_service/get_node_responses.go b/api/inventory/v1/json/client/nodes_service/get_node_responses.go index e5897e09ec..805d894543 100644 --- a/api/inventory/v1/json/client/nodes_service/get_node_responses.go +++ b/api/inventory/v1/json/client/nodes_service/get_node_responses.go @@ -58,7 +58,7 @@ type GetNodeOK struct { } func (o *GetNodeOK) Error() string { - return fmt.Sprintf("[POST /v1/inventory/Nodes/Get][%d] getNodeOk %+v", 200, o.Payload) + return fmt.Sprintf("[GET /v1/inventory/nodes/{node_id}][%d] getNodeOk %+v", 200, o.Payload) } func (o *GetNodeOK) GetPayload() *GetNodeOKBody { @@ -100,7 +100,7 @@ func (o *GetNodeDefault) Code() int { } func (o *GetNodeDefault) Error() string { - return fmt.Sprintf("[POST /v1/inventory/Nodes/Get][%d] GetNode default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /v1/inventory/nodes/{node_id}][%d] GetNode default %+v", o._statusCode, o.Payload) } func (o *GetNodeDefault) GetPayload() *GetNodeDefaultBody { @@ -118,43 +118,6 @@ func (o *GetNodeDefault) readResponse(response runtime.ClientResponse, consumer return nil } -/* -GetNodeBody get node body -swagger:model GetNodeBody -*/ -type GetNodeBody struct { - // Unique randomly generated instance identifier. - NodeID string `json:"node_id,omitempty"` -} - -// Validate validates this get node body -func (o *GetNodeBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get node body based on context it is used -func (o *GetNodeBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetNodeBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetNodeBody) UnmarshalBinary(b []byte) error { - var res GetNodeBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - /* GetNodeDefaultBody get node default body swagger:model GetNodeDefaultBody diff --git a/api/inventory/v1/json/client/nodes_service/list_nodes_parameters.go b/api/inventory/v1/json/client/nodes_service/list_nodes_parameters.go index 05f40fe7a4..63128821ce 100644 --- a/api/inventory/v1/json/client/nodes_service/list_nodes_parameters.go +++ b/api/inventory/v1/json/client/nodes_service/list_nodes_parameters.go @@ -60,8 +60,13 @@ ListNodesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListNodesParams struct { - // Body. - Body ListNodesBody + /* NodeType. + + Return only Nodes with matching Node type. + + Default: "NODE_TYPE_UNSPECIFIED" + */ + NodeType *string timeout time.Duration Context context.Context @@ -80,7 +85,16 @@ func (o *ListNodesParams) WithDefaults() *ListNodesParams { // // All values with no default are reset to their zero value. func (o *ListNodesParams) SetDefaults() { - // no default values defined for this parameter + nodeTypeDefault := string("NODE_TYPE_UNSPECIFIED") + + val := ListNodesParams{ + NodeType: &nodeTypeDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val } // WithTimeout adds the timeout to the list nodes params @@ -116,15 +130,15 @@ func (o *ListNodesParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithBody adds the body to the list nodes params -func (o *ListNodesParams) WithBody(body ListNodesBody) *ListNodesParams { - o.SetBody(body) +// WithNodeType adds the nodeType to the list nodes params +func (o *ListNodesParams) WithNodeType(nodeType *string) *ListNodesParams { + o.SetNodeType(nodeType) return o } -// SetBody adds the body to the list nodes params -func (o *ListNodesParams) SetBody(body ListNodesBody) { - o.Body = body +// SetNodeType adds the nodeType to the list nodes params +func (o *ListNodesParams) SetNodeType(nodeType *string) { + o.NodeType = nodeType } // WriteToRequest writes these params to a swagger request @@ -133,8 +147,21 @@ func (o *ListNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg return err } var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err + + if o.NodeType != nil { + + // query param node_type + var qrNodeType string + + if o.NodeType != nil { + qrNodeType = *o.NodeType + } + qNodeType := qrNodeType + if qNodeType != "" { + if err := r.SetQueryParam("node_type", qNodeType); err != nil { + return err + } + } } if len(res) > 0 { diff --git a/api/inventory/v1/json/client/nodes_service/list_nodes_responses.go b/api/inventory/v1/json/client/nodes_service/list_nodes_responses.go index 66c7ea96f8..28c0f07b35 100644 --- a/api/inventory/v1/json/client/nodes_service/list_nodes_responses.go +++ b/api/inventory/v1/json/client/nodes_service/list_nodes_responses.go @@ -7,7 +7,6 @@ package nodes_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" ) // ListNodesReader is a Reader for the ListNodes structure. @@ -60,7 +58,7 @@ type ListNodesOK struct { } func (o *ListNodesOK) Error() string { - return fmt.Sprintf("[POST /v1/inventory/Nodes/List][%d] listNodesOk %+v", 200, o.Payload) + return fmt.Sprintf("[GET /v1/inventory/nodes][%d] listNodesOk %+v", 200, o.Payload) } func (o *ListNodesOK) GetPayload() *ListNodesOKBody { @@ -102,7 +100,7 @@ func (o *ListNodesDefault) Code() int { } func (o *ListNodesDefault) Error() string { - return fmt.Sprintf("[POST /v1/inventory/Nodes/List][%d] ListNodes default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /v1/inventory/nodes][%d] ListNodes default %+v", o._statusCode, o.Payload) } func (o *ListNodesDefault) GetPayload() *ListNodesDefaultBody { @@ -120,107 +118,6 @@ func (o *ListNodesDefault) readResponse(response runtime.ClientResponse, consume return nil } -/* -ListNodesBody list nodes body -swagger:model ListNodesBody -*/ -type ListNodesBody struct { - // NodeType describes supported Node types. - // 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] - NodeType *string `json:"node_type,omitempty"` -} - -// Validate validates this list nodes body -func (o *ListNodesBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateNodeType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var listNodesBodyTypeNodeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - listNodesBodyTypeNodeTypePropEnum = append(listNodesBodyTypeNodeTypePropEnum, v) - } -} - -const ( - - // ListNodesBodyNodeTypeNODETYPEUNSPECIFIED captures enum value "NODE_TYPE_UNSPECIFIED" - ListNodesBodyNodeTypeNODETYPEUNSPECIFIED string = "NODE_TYPE_UNSPECIFIED" - - // ListNodesBodyNodeTypeNODETYPEGENERICNODE captures enum value "NODE_TYPE_GENERIC_NODE" - ListNodesBodyNodeTypeNODETYPEGENERICNODE string = "NODE_TYPE_GENERIC_NODE" - - // ListNodesBodyNodeTypeNODETYPECONTAINERNODE captures enum value "NODE_TYPE_CONTAINER_NODE" - ListNodesBodyNodeTypeNODETYPECONTAINERNODE string = "NODE_TYPE_CONTAINER_NODE" - - // ListNodesBodyNodeTypeNODETYPEREMOTENODE captures enum value "NODE_TYPE_REMOTE_NODE" - ListNodesBodyNodeTypeNODETYPEREMOTENODE string = "NODE_TYPE_REMOTE_NODE" - - // ListNodesBodyNodeTypeNODETYPEREMOTERDSNODE captures enum value "NODE_TYPE_REMOTE_RDS_NODE" - ListNodesBodyNodeTypeNODETYPEREMOTERDSNODE string = "NODE_TYPE_REMOTE_RDS_NODE" - - // ListNodesBodyNodeTypeNODETYPEREMOTEAZUREDATABASENODE captures enum value "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" - ListNodesBodyNodeTypeNODETYPEREMOTEAZUREDATABASENODE string = "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" -) - -// prop value enum -func (o *ListNodesBody) validateNodeTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, listNodesBodyTypeNodeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (o *ListNodesBody) validateNodeType(formats strfmt.Registry) error { - if swag.IsZero(o.NodeType) { // not required - return nil - } - - // value enum - if err := o.validateNodeTypeEnum("body"+"."+"node_type", "body", *o.NodeType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this list nodes body based on context it is used -func (o *ListNodesBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListNodesBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListNodesBody) UnmarshalBinary(b []byte) error { - var res ListNodesBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - /* ListNodesDefaultBody list nodes default body swagger:model ListNodesDefaultBody diff --git a/api/inventory/v1/json/client/nodes_service/nodes_service_client.go b/api/inventory/v1/json/client/nodes_service/nodes_service_client.go index 4dbd2e309d..e951a2e7f3 100644 --- a/api/inventory/v1/json/client/nodes_service/nodes_service_client.go +++ b/api/inventory/v1/json/client/nodes_service/nodes_service_client.go @@ -52,7 +52,7 @@ func (a *Client) AddNode(params *AddNodeParams, opts ...ClientOption) (*AddNodeO op := &runtime.ClientOperation{ ID: "AddNode", Method: "POST", - PathPattern: "/v1/inventory/Nodes/Add", + PathPattern: "/v1/inventory/nodes", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -90,8 +90,8 @@ func (a *Client) GetNode(params *GetNodeParams, opts ...ClientOption) (*GetNodeO } op := &runtime.ClientOperation{ ID: "GetNode", - Method: "POST", - PathPattern: "/v1/inventory/Nodes/Get", + Method: "GET", + PathPattern: "/v1/inventory/nodes/{node_id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -129,8 +129,8 @@ func (a *Client) ListNodes(params *ListNodesParams, opts ...ClientOption) (*List } op := &runtime.ClientOperation{ ID: "ListNodes", - Method: "POST", - PathPattern: "/v1/inventory/Nodes/List", + Method: "GET", + PathPattern: "/v1/inventory/nodes", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -168,8 +168,8 @@ func (a *Client) RemoveNode(params *RemoveNodeParams, opts ...ClientOption) (*Re } op := &runtime.ClientOperation{ ID: "RemoveNode", - Method: "POST", - PathPattern: "/v1/inventory/Nodes/Remove", + Method: "DELETE", + PathPattern: "/v1/inventory/nodes/{node_id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, diff --git a/api/inventory/v1/json/client/nodes_service/remove_node_parameters.go b/api/inventory/v1/json/client/nodes_service/remove_node_parameters.go index 3e97f1fc26..62194bd1a8 100644 --- a/api/inventory/v1/json/client/nodes_service/remove_node_parameters.go +++ b/api/inventory/v1/json/client/nodes_service/remove_node_parameters.go @@ -14,6 +14,7 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" ) // NewRemoveNodeParams creates a new RemoveNodeParams object, @@ -60,8 +61,17 @@ RemoveNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveNodeParams struct { - // Body. - Body RemoveNodeBody + /* Force. + + Remove node with all dependencies. + */ + Force *bool + + /* NodeID. + + Unique randomly generated instance identifier. + */ + NodeID string timeout time.Duration Context context.Context @@ -116,15 +126,26 @@ func (o *RemoveNodeParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithBody adds the body to the remove node params -func (o *RemoveNodeParams) WithBody(body RemoveNodeBody) *RemoveNodeParams { - o.SetBody(body) +// WithForce adds the force to the remove node params +func (o *RemoveNodeParams) WithForce(force *bool) *RemoveNodeParams { + o.SetForce(force) return o } -// SetBody adds the body to the remove node params -func (o *RemoveNodeParams) SetBody(body RemoveNodeBody) { - o.Body = body +// SetForce adds the force to the remove node params +func (o *RemoveNodeParams) SetForce(force *bool) { + o.Force = force +} + +// WithNodeID adds the nodeID to the remove node params +func (o *RemoveNodeParams) WithNodeID(nodeID string) *RemoveNodeParams { + o.SetNodeID(nodeID) + return o +} + +// SetNodeID adds the nodeId to the remove node params +func (o *RemoveNodeParams) SetNodeID(nodeID string) { + o.NodeID = nodeID } // WriteToRequest writes these params to a swagger request @@ -133,7 +154,25 @@ func (o *RemoveNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re return err } var res []error - if err := r.SetBodyParam(o.Body); err != nil { + + if o.Force != nil { + + // query param force + var qrForce bool + + if o.Force != nil { + qrForce = *o.Force + } + qForce := swag.FormatBool(qrForce) + if qForce != "" { + if err := r.SetQueryParam("force", qForce); err != nil { + return err + } + } + } + + // path param node_id + if err := r.SetPathParam("node_id", o.NodeID); err != nil { return err } diff --git a/api/inventory/v1/json/client/nodes_service/remove_node_responses.go b/api/inventory/v1/json/client/nodes_service/remove_node_responses.go index ac1ae28633..c1b94b61bd 100644 --- a/api/inventory/v1/json/client/nodes_service/remove_node_responses.go +++ b/api/inventory/v1/json/client/nodes_service/remove_node_responses.go @@ -58,7 +58,7 @@ type RemoveNodeOK struct { } func (o *RemoveNodeOK) Error() string { - return fmt.Sprintf("[POST /v1/inventory/Nodes/Remove][%d] removeNodeOk %+v", 200, o.Payload) + return fmt.Sprintf("[DELETE /v1/inventory/nodes/{node_id}][%d] removeNodeOk %+v", 200, o.Payload) } func (o *RemoveNodeOK) GetPayload() interface{} { @@ -98,7 +98,7 @@ func (o *RemoveNodeDefault) Code() int { } func (o *RemoveNodeDefault) Error() string { - return fmt.Sprintf("[POST /v1/inventory/Nodes/Remove][%d] RemoveNode default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[DELETE /v1/inventory/nodes/{node_id}][%d] RemoveNode default %+v", o._statusCode, o.Payload) } func (o *RemoveNodeDefault) GetPayload() *RemoveNodeDefaultBody { @@ -116,46 +116,6 @@ func (o *RemoveNodeDefault) readResponse(response runtime.ClientResponse, consum return nil } -/* -RemoveNodeBody remove node body -swagger:model RemoveNodeBody -*/ -type RemoveNodeBody struct { - // Unique randomly generated instance identifier. - NodeID string `json:"node_id,omitempty"` - - // Remove node with all dependencies. - Force bool `json:"force,omitempty"` -} - -// Validate validates this remove node body -func (o *RemoveNodeBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this remove node body based on context it is used -func (o *RemoveNodeBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *RemoveNodeBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *RemoveNodeBody) UnmarshalBinary(b []byte) error { - var res RemoveNodeBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - /* RemoveNodeDefaultBody remove node default body swagger:model RemoveNodeDefaultBody diff --git a/api/inventory/v1/json/v1.json b/api/inventory/v1/json/v1.json index 6564a50373..9a6014064c 100644 --- a/api/inventory/v1/json/v1.json +++ b/api/inventory/v1/json/v1.json @@ -15,14 +15,14 @@ "version": "v1" }, "paths": { - "/v1/inventory/Nodes/Add": { + "/v1/inventory/Services/Add": { "post": { - "description": "Adds a Node.", + "description": "Adds a Service.", "tags": [ - "NodesService" + "ServicesService" ], - "summary": "Add a Node", - "operationId": "AddNode", + "summary": "Add a Service", + "operationId": "AddService", "parameters": [ { "name": "body", @@ -31,70 +31,99 @@ "schema": { "type": "object", "properties": { - "container": { + "external": { "type": "object", "properties": { - "address": { - "description": "Node address (DNS name or IP).", + "cluster": { + "description": "Cluster name.", "type": "string", - "x-order": 1 + "x-order": 3 }, - "az": { - "description": "Node availability zone.", + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 5 + }, + "environment": { + "description": "Environment name.", "type": "string", - "x-order": 7 + "x-order": 2 }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "group": { + "description": "Group name of external service.", "type": "string", - "x-order": 3 + "x-order": 6 }, - "container_name": { - "description": "Container name.", + "node_id": { + "description": "Node identifier where this instance runs. Required.", + "type": "string", + "x-order": 1 + }, + "replication_set": { + "description": "Replication set name.", "type": "string", "x-order": 4 }, + "service_name": { + "description": "Unique across all Services user-defined name. Required.", + "type": "string", + "x-order": 0 + } + }, + "x-order": 5 + }, + "haproxy": { + "type": "object", + "properties": { + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 3 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 8 + "x-order": 5 }, - "machine_id": { - "description": "Linux machine-id of the Generic Node where this Container Node runs.", + "environment": { + "description": "Environment name.", "type": "string", "x-order": 2 }, - "node_model": { - "description": "Node model.", + "node_id": { + "description": "Node identifier where this instance runs. Required.", "type": "string", - "x-order": 5 + "x-order": 1 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "replication_set": { + "description": "Replication set name.", "type": "string", - "x-order": 0 + "x-order": 4 }, - "region": { - "description": "Node region.", + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", - "x-order": 6 + "x-order": 0 } }, - "x-order": 1 + "x-order": 4 }, - "generic": { + "mongodb": { "type": "object", "properties": { "address": { - "description": "Node address (DNS name or IP).", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 1 + "x-order": 2 }, - "az": { - "description": "Node availability zone.", + "cluster": { + "description": "Cluster name.", "type": "string", "x-order": 6 }, @@ -104,48 +133,54 @@ "additionalProperties": { "type": "string" }, - "x-order": 7 + "x-order": 8 }, - "distro": { - "description": "Linux distribution name and version.", + "environment": { + "description": "Environment name.", "type": "string", - "x-order": 3 + "x-order": 5 }, - "machine_id": { - "description": "Linux machine-id.", + "node_id": { + "description": "Node identifier where this instance runs. Required.", "type": "string", - "x-order": 2 + "x-order": 1 }, - "node_model": { - "description": "Node model.", + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 3 + }, + "replication_set": { + "description": "Replication set name.", "type": "string", - "x-order": 4 + "x-order": 7 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 0 }, - "region": { - "description": "Node region.", + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", - "x-order": 5 + "x-order": 4 } }, - "x-order": 0 + "x-order": 1 }, - "remote": { + "mysql": { "type": "object", "properties": { "address": { - "description": "Node address (DNS name or IP).", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 1 + "x-order": 2 }, - "az": { - "description": "Node availability zone.", + "cluster": { + "description": "Cluster name.", "type": "string", - "x-order": 4 + "x-order": 6 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -153,38 +188,60 @@ "additionalProperties": { "type": "string" }, + "x-order": 8 + }, + "environment": { + "description": "Environment name.", + "type": "string", "x-order": 5 }, - "node_model": { - "description": "Node model.", + "node_id": { + "description": "Node identifier where this instance runs. Required.", "type": "string", - "x-order": 2 + "x-order": 1 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 3 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 7 + }, + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 0 }, - "region": { - "description": "Node region.", + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", - "x-order": 3 + "x-order": 4 } }, - "x-order": 2 + "x-order": 0 }, - "remote_azure": { + "postgresql": { "type": "object", "properties": { "address": { - "description": "DB instance identifier.", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 1 + "x-order": 2 }, - "az": { - "description": "Node availability zone.", + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 9 + }, + "cluster": { + "description": "Cluster name.", "type": "string", - "x-order": 4 + "x-order": 6 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -192,38 +249,54 @@ "additionalProperties": { "type": "string" }, + "x-order": 8 + }, + "environment": { + "description": "Environment name.", + "type": "string", "x-order": 5 }, - "node_model": { - "description": "Node model.", + "node_id": { + "description": "Node identifier where this instance runs. Required.", "type": "string", - "x-order": 2 + "x-order": 1 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 3 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 7 + }, + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 0 }, - "region": { - "description": "Node region.", + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", - "x-order": 3 + "x-order": 4 } }, - "x-order": 4 + "x-order": 2 }, - "remote_rds": { + "proxysql": { "type": "object", "properties": { "address": { - "description": "DB instance identifier.", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 1 + "x-order": 2 }, - "az": { - "description": "Node availability zone.", + "cluster": { + "description": "Cluster name.", "type": "string", - "x-order": 4 + "x-order": 6 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -231,22 +304,38 @@ "additionalProperties": { "type": "string" }, - "x-order": 5 + "x-order": 8 }, - "node_model": { - "description": "Node model.", + "environment": { + "description": "Environment name.", "type": "string", - "x-order": 2 + "x-order": 5 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "node_id": { + "description": "Node identifier where this instance runs. Required.", + "type": "string", + "x-order": 1 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 3 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 7 + }, + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 0 }, - "region": { - "description": "Node region.", + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", - "x-order": 3 + "x-order": 4 } }, "x-order": 3 @@ -261,79 +350,64 @@ "schema": { "type": "object", "properties": { - "container": { - "description": "ContainerNode represents a Docker container.", + "external": { + "description": "ExternalService represents a generic External service instance.", "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.", + "cluster": { + "description": "Cluster name.", "type": "string", "x-order": 4 }, - "container_name": { - "description": "Container name.", - "type": "string", - "x-order": 5 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 9 + "x-order": 6 }, - "machine_id": { - "description": "Linux machine-id of the Generic Node where this Container Node runs.", + "environment": { + "description": "Environment name.", "type": "string", "x-order": 3 }, + "group": { + "description": "Group name of external service.", + "type": "string", + "x-order": 7 + }, "node_id": { - "description": "Unique randomly generated instance identifier.", + "description": "Node identifier where this service instance runs.", "type": "string", - "x-order": 0 + "x-order": 2 }, - "node_model": { - "description": "Node model.", + "replication_set": { + "description": "Replication set name.", "type": "string", - "x-order": 6 + "x-order": 5 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "service_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 1 + "x-order": 0 }, - "region": { - "description": "Node region.", + "service_name": { + "description": "Unique across all Services user-defined name.", "type": "string", - "x-order": 7 + "x-order": 1 } }, - "x-order": 1 + "x-order": 5 }, - "generic": { - "description": "GenericNode represents a bare metal server or virtual machine.", + "haproxy": { + "description": "HAProxyService represents a generic HAProxy service instance.", "type": "object", "properties": { - "address": { - "description": "Node address (DNS name or IP).", - "type": "string", - "x-order": 2 - }, - "az": { - "description": "Node availability zone.", + "cluster": { + "description": "Cluster name.", "type": "string", - "x-order": 7 + "x-order": 4 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -341,54 +415,49 @@ "additionalProperties": { "type": "string" }, - "x-order": 8 - }, - "distro": { - "description": "Linux distribution name and version.", - "type": "string", - "x-order": 4 + "x-order": 6 }, - "machine_id": { - "description": "Linux machine-id.", + "environment": { + "description": "Environment name.", "type": "string", "x-order": 3 }, "node_id": { - "description": "Unique randomly generated instance identifier.", + "description": "Node identifier where this service instance runs.", "type": "string", - "x-order": 0 + "x-order": 2 }, - "node_model": { - "description": "Node model.", + "replication_set": { + "description": "Replication set name.", "type": "string", "x-order": 5 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "service_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 1 + "x-order": 0 }, - "region": { - "description": "Node region.", + "service_name": { + "description": "Unique across all Services user-defined name.", "type": "string", - "x-order": 6 + "x-order": 1 } }, - "x-order": 0 + "x-order": 4 }, - "remote": { - "description": "RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes.", + "mongodb": { + "description": "MongoDBService represents a generic MongoDB instance.", "type": "object", "properties": { "address": { - "description": "Node address (DNS name or IP).", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 2 + "x-order": 3 }, - "az": { - "description": "Node availability zone.", + "cluster": { + "description": "Cluster name.", "type": "string", - "x-order": 5 + "x-order": 7 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -396,44 +465,65 @@ "additionalProperties": { "type": "string" }, + "x-order": 9 + }, + "environment": { + "description": "Environment name.", + "type": "string", "x-order": 6 }, "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 }, - "node_model": { - "description": "Node model.", + "service_name": { + "description": "Unique across all Services user-defined name.", "type": "string", - "x-order": 3 + "x-order": 1 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", - "x-order": 1 + "x-order": 5 }, - "region": { - "description": "Node region.", + "version": { + "description": "MongoDB version.", "type": "string", - "x-order": 4 + "x-order": 10 } }, - "x-order": 2 + "x-order": 1 }, - "remote_azure_database": { - "description": "RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes.", + "mysql": { + "description": "MySQLService represents a generic MySQL instance.", "type": "object", "properties": { "address": { - "description": "DB instance identifier.", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 2 + "x-order": 3 }, - "az": { - "description": "Node availability zone.", + "cluster": { + "description": "Cluster name.", "type": "string", - "x-order": 5 + "x-order": 7 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -441,72 +531,191 @@ "additionalProperties": { "type": "string" }, + "x-order": 9 + }, + "environment": { + "description": "Environment name.", + "type": "string", "x-order": 6 }, "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 }, - "node_model": { - "description": "Node model.", + "service_name": { + "description": "Unique across all Services user-defined name.", "type": "string", - "x-order": 3 + "x-order": 1 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", - "x-order": 1 + "x-order": 5 }, - "region": { - "description": "Node region.", + "version": { + "description": "MySQL version.", "type": "string", - "x-order": 4 + "x-order": 10 } }, - "x-order": 4 + "x-order": 0 }, - "remote_rds": { - "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", + "postgresql": { + "description": "PostgreSQLService represents a generic PostgreSQL instance.", "type": "object", "properties": { "address": { - "description": "DB instance identifier.", - "type": "string", - "x-order": 2 - }, - "az": { - "description": "Node availability zone.", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 5 + "x-order": 4 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", + "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": 6 + "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 }, - "node_model": { - "description": "Node model.", + "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": 2 + }, + "proxysql": { + "description": "ProxySQLService represents a generic ProxySQL instance.", + "type": "object", + "properties": { + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", "x-order": 3 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "cluster": { + "description": "Cluster name.", "type": "string", - "x-order": 1 + "x-order": 7 }, - "region": { - "description": "Node region.", + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 6 + }, + "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": "ProxySQL version.", + "type": "string", + "x-order": 10 } }, "x-order": 3 @@ -548,14 +757,14 @@ } } }, - "/v1/inventory/Nodes/Get": { + "/v1/inventory/Services/Change": { "post": { - "description": "Returns a single Node by ID.", + "description": "Changes service configuration. If a new cluster label is specified, it removes all backup/restore tasks scheduled for the related services. Fails if there are running backup/restore tasks.", "tags": [ - "NodesService" + "ServicesService" ], - "summary": "Get a Node", - "operationId": "GetNode", + "summary": "Change service", + "operationId": "ChangeService", "parameters": [ { "name": "body", @@ -564,8 +773,27 @@ "schema": { "type": "object", "properties": { - "node_id": { - "description": "Unique randomly generated instance identifier.", + "cluster": { + "type": "string", + "x-nullable": true, + "x-order": 2 + }, + "environment": { + "type": "string", + "x-nullable": true, + "x-order": 1 + }, + "external_group": { + "type": "string", + "x-nullable": true, + "x-order": 4 + }, + "replication_set": { + "type": "string", + "x-nullable": true, + "x-order": 3 + }, + "service_id": { "type": "string", "x-order": 0 } @@ -576,261 +804,83 @@ "responses": { "200": { "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", "schema": { "type": "object", "properties": { - "container": { - "description": "ContainerNode represents a Docker container.", - "type": "object", - "properties": { - "address": { - "description": "Node address (DNS name or IP).", - "type": "string", - "x-order": 2 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 8 - }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", - "type": "string", - "x-order": 4 - }, - "container_name": { - "description": "Container name.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "machine_id": { - "description": "Linux machine-id of the Generic Node where this Container Node runs.", - "type": "string", - "x-order": 3 - }, - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 6 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 7 - } + "additionalProperties": false }, - "x-order": 1 + "x-order": 2 }, - "generic": { - "description": "GenericNode represents a bare metal server or virtual machine.", - "type": "object", - "properties": { - "address": { - "description": "Node address (DNS name or IP).", - "type": "string", - "x-order": 2 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 7 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 8 - }, - "distro": { - "description": "Linux distribution name and version.", - "type": "string", - "x-order": 4 - }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", - "x-order": 3 - }, - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 5 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 6 - } - }, - "x-order": 0 - }, - "remote": { - "description": "RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes.", - "type": "object", - "properties": { - "address": { - "description": "Node address (DNS name or IP).", - "type": "string", - "x-order": 2 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - }, - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 3 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 2 - }, - "remote_azure_database": { - "description": "RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes.", + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + } + }, + "/v1/inventory/Services/CustomLabels/Add": { + "post": { + "description": "Adds or replaces (if the key exists) custom labels for a Service.", + "tags": [ + "ServicesService" + ], + "summary": "Add/replace custom labels", + "operationId": "AddCustomLabels", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "custom_labels": { + "description": "Custom user-assigned labels to be added.", "type": "object", - "properties": { - "address": { - "description": "DB instance identifier.", - "type": "string", - "x-order": 2 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - }, - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 3 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 4 - } + "additionalProperties": { + "type": "string" }, - "x-order": 4 + "x-order": 1 }, - "remote_rds": { - "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", - "type": "object", - "properties": { - "address": { - "description": "DB instance identifier.", - "type": "string", - "x-order": 2 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - }, - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 3 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 3 + "service_id": { + "description": "Unique Service ID.", + "type": "string", + "x-order": 0 } } } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } }, "default": { "description": "An unexpected error response.", @@ -866,14 +916,14 @@ } } }, - "/v1/inventory/Nodes/List": { + "/v1/inventory/Services/CustomLabels/Remove": { "post": { - "description": "Returns a list of all Nodes.", + "description": "Removes custom labels from a Service by key.", "tags": [ - "NodesService" + "ServicesService" ], - "summary": "List Nodes", - "operationId": "ListNodes", + "summary": "Remove custom labels", + "operationId": "RemoveCustomLabels", "parameters": [ { "name": "body", @@ -882,18 +932,17 @@ "schema": { "type": "object", "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", + "custom_label_keys": { + "description": "Custom user-assigned label keys to be removed.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 1 + }, + "service_id": { + "description": "Unique Service ID.", "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 } } @@ -903,449 +952,183 @@ "responses": { "200": { "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", "schema": { "type": "object", "properties": { - "container": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "details": { "type": "array", "items": { - "description": "ContainerNode represents a Docker container.", "type": "object", "properties": { - "address": { - "description": "Node address (DNS name or IP).", - "type": "string", - "x-order": 2 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 8 - }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", - "type": "string", - "x-order": 4 - }, - "container_name": { - "description": "Container name.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "machine_id": { - "description": "Linux machine-id of the Generic Node where this Container Node runs.", - "type": "string", - "x-order": 3 - }, - "node_id": { - "description": "Unique randomly generated instance identifier.", + "@type": { "type": "string", "x-order": 0 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 6 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 7 } - } + }, + "additionalProperties": false }, - "x-order": 1 + "x-order": 2 }, - "generic": { - "type": "array", - "items": { - "description": "GenericNode represents a bare metal server or virtual machine.", - "type": "object", - "properties": { - "address": { - "description": "Node address (DNS name or IP).", - "type": "string", - "x-order": 2 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 7 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 8 - }, - "distro": { - "description": "Linux distribution name and version.", - "type": "string", - "x-order": 4 - }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", - "x-order": 3 - }, - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 5 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 6 - } - } - }, + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + } + }, + "/v1/inventory/Services/Get": { + "post": { + "description": "Returns a single Service by ID.", + "tags": [ + "ServicesService" + ], + "summary": "Get a Service", + "operationId": "GetService", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", "x-order": 0 - }, - "remote": { - "type": "array", - "items": { - "description": "RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes.", - "type": "object", - "properties": { - "address": { - "description": "Node address (DNS name or IP).", - "type": "string", - "x-order": 2 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - }, - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 3 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "external": { + "description": "ExternalService represents a generic External service instance.", + "type": "object", + "properties": { + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 4 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 4 - } + "x-order": 6 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 3 + }, + "group": { + "description": "Group name of external service.", + "type": "string", + "x-order": 7 + }, + "node_id": { + "description": "Node identifier where this service instance runs.", + "type": "string", + "x-order": 2 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 5 + }, + "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 } }, - "x-order": 2 + "x-order": 5 }, - "remote_azure_database": { - "type": "array", - "items": { - "description": "RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes.", - "type": "object", - "properties": { - "address": { - "description": "DB instance identifier.", - "type": "string", - "x-order": 2 + "haproxy": { + "description": "HAProxyService represents a generic HAProxy service instance.", + "type": "object", + "properties": { + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 4 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - }, - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 3 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 4 - } - } - }, - "x-order": 4 - }, - "remote_rds": { - "type": "array", - "items": { - "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", - "type": "object", - "properties": { - "address": { - "description": "DB instance identifier.", - "type": "string", - "x-order": 2 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - }, - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 3 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 4 - } - } - }, - "x-order": 3 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/inventory/Nodes/Remove": { - "post": { - "description": "Removes a Node.", - "tags": [ - "NodesService" - ], - "summary": "Remove a Node", - "operationId": "RemoveNode", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "force": { - "description": "Remove node with all dependencies.", - "type": "boolean", - "x-order": 1 - }, - "node_id": { - "description": "Unique randomly generated instance identifier.", - "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/inventory/Services/Add": { - "post": { - "description": "Adds a Service.", - "tags": [ - "ServicesService" - ], - "summary": "Add a Service", - "operationId": "AddService", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "external": { - "type": "object", - "properties": { - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 3 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 5 + "x-order": 6 }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 2 - }, - "group": { - "description": "Group name of external service.", - "type": "string", - "x-order": 6 + "x-order": 3 }, "node_id": { - "description": "Node identifier where this instance runs. Required.", + "description": "Node identifier where this service instance runs.", "type": "string", - "x-order": 1 + "x-order": 2 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 4 + "x-order": 5 }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", + "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 } }, - "x-order": 5 + "x-order": 4 }, - "haproxy": { + "mongodb": { + "description": "MongoDBService represents a generic MongoDB 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": 3 + "x-order": 7 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -1353,98 +1136,65 @@ "additionalProperties": { "type": "string" }, - "x-order": 5 + "x-order": 9 }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 2 - }, - "node_id": { - "description": "Node identifier where this instance runs. Required.", - "type": "string", - "x-order": 1 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 4 - }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 4 - }, - "mongodb": { - "type": "object", - "properties": { - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 2 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", "x-order": 6 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 8 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 5 - }, "node_id": { - "description": "Node identifier where this instance runs. Required.", + "description": "Node identifier where this instance runs.", "type": "string", - "x-order": 1 + "x-order": 2 }, "port": { "description": "Access port.\nPort is required when the address present.", "type": "integer", "format": "int64", - "x-order": 3 + "x-order": 4 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 7 + "x-order": 8 }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", + "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": 4 + "x-order": 5 + }, + "version": { + "description": "MongoDB version.", + "type": "string", + "x-order": 10 } }, "x-order": 1 }, "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": 2 + "x-order": 3 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 6 + "x-order": 7 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -1452,60 +1202,71 @@ "additionalProperties": { "type": "string" }, - "x-order": 8 + "x-order": 9 }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 5 + "x-order": 6 }, "node_id": { - "description": "Node identifier where this instance runs. Required.", + "description": "Node identifier where this instance runs.", "type": "string", - "x-order": 1 + "x-order": 2 }, "port": { "description": "Access port.\nPort is required when the address present.", "type": "integer", "format": "int64", - "x-order": 3 + "x-order": 4 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 7 + "x-order": 8 }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", + "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": 4 + "x-order": 5 + }, + "version": { + "description": "MySQL version.", + "type": "string", + "x-order": 10 } }, "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": 2 + "x-order": 4 }, "auto_discovery_limit": { "description": "Limit of databases for auto-discovery.", "type": "integer", "format": "int32", - "x-order": 9 + "x-order": 12 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 6 + "x-order": 8 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -1513,54 +1274,70 @@ "additionalProperties": { "type": "string" }, - "x-order": 8 + "x-order": 10 + }, + "database_name": { + "description": "Database name.", + "type": "string", + "x-order": 2 }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 5 + "x-order": 7 }, "node_id": { - "description": "Node identifier where this instance runs. Required.", + "description": "Node identifier where this instance runs.", "type": "string", - "x-order": 1 + "x-order": 3 }, "port": { "description": "Access port.\nPort is required when the address present.", "type": "integer", "format": "int64", - "x-order": 3 + "x-order": 5 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 7 + "x-order": 9 }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", + "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": 4 + "x-order": 6 + }, + "version": { + "description": "PostgreSQL version.", + "type": "string", + "x-order": 11 } }, "x-order": 2 }, "proxysql": { + "description": "ProxySQLService represents a generic ProxySQL instance.", "type": "object", "properties": { "address": { "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 2 + "x-order": 3 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 6 + "x-order": 7 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -1568,44 +1345,132 @@ "additionalProperties": { "type": "string" }, - "x-order": 8 + "x-order": 9 }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 5 + "x-order": 6 }, "node_id": { - "description": "Node identifier where this instance runs. Required.", + "description": "Node identifier where this instance runs.", "type": "string", - "x-order": 1 + "x-order": 2 }, "port": { "description": "Access port.\nPort is required when the address present.", "type": "integer", "format": "int64", - "x-order": 3 + "x-order": 4 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 7 + "x-order": 8 }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", + "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": 4 + "x-order": 5 + }, + "version": { + "description": "ProxySQL version.", + "type": "string", + "x-order": 10 } }, "x-order": 3 } } } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + }, + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + } + }, + "/v1/inventory/Services/List": { + "post": { + "description": "Returns a list of Services filtered by type.", + "tags": [ + "ServicesService" + ], + "summary": "List Services", + "operationId": "ListServices", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "external_group": { + "description": "Return only services in this external group.", + "type": "string", + "x-order": 2 + }, + "node_id": { + "description": "Return only Services running on that Node.", + "type": "string", + "x-order": 0 + }, + "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": 1 + } + } + } } ], "responses": { @@ -1615,394 +1480,412 @@ "type": "object", "properties": { "external": { - "description": "ExternalService represents a generic External service instance.", - "type": "object", - "properties": { - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 4 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" + "type": "array", + "items": { + "description": "ExternalService represents a generic External service instance.", + "type": "object", + "properties": { + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 4 }, - "x-order": 6 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 3 - }, - "group": { - "description": "Group name of external service.", - "type": "string", - "x-order": 7 - }, - "node_id": { - "description": "Node identifier where this service instance runs.", - "type": "string", - "x-order": 2 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 5 - }, - "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 + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 3 + }, + "group": { + "description": "Group name of external service.", + "type": "string", + "x-order": 7 + }, + "node_id": { + "description": "Node identifier where this service instance runs.", + "type": "string", + "x-order": 2 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 5 + }, + "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 + } } }, "x-order": 5 }, "haproxy": { - "description": "HAProxyService represents a generic HAProxy service instance.", - "type": "object", - "properties": { - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 4 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" + "type": "array", + "items": { + "description": "HAProxyService represents a generic HAProxy service instance.", + "type": "object", + "properties": { + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 4 }, - "x-order": 6 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 3 - }, - "node_id": { - "description": "Node identifier where this service instance runs.", - "type": "string", - "x-order": 2 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 5 - }, - "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 + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 3 + }, + "node_id": { + "description": "Node identifier where this service instance runs.", + "type": "string", + "x-order": 2 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 5 + }, + "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 + } } }, "x-order": 4 }, "mongodb": { - "description": "MongoDBService represents a generic MongoDB 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 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" + "type": "array", + "items": { + "description": "MongoDBService represents a generic MongoDB instance.", + "type": "object", + "properties": { + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 3 }, - "x-order": 9 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "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": "MongoDB version.", - "type": "string", - "x-order": 10 - } - }, - "x-order": 1 - }, - "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 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 7 }, - "x-order": 9 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "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": 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": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "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": 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": 2 - }, - "proxysql": { - "description": "ProxySQLService represents a generic ProxySQL 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 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 6 }, - "x-order": 9 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "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": "ProxySQL version.", - "type": "string", - "x-order": 10 + "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": "MongoDB version.", + "type": "string", + "x-order": 10 + } } }, - "x-order": 3 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 + "x-order": 1 }, - "details": { + "mysql": { "type": "array", "items": { + "description": "MySQLService represents a generic MySQL instance.", "type": "object", "properties": { - "@type": { + "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 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 6 + }, + "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": 0 + }, + "postgresql": { + "type": "array", + "items": { + "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": 2 + }, + "proxysql": { + "type": "array", + "items": { + "description": "ProxySQLService represents a generic ProxySQL 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 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 6 + }, + "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": "ProxySQL version.", + "type": "string", + "x-order": 10 + } + } + }, + "x-order": 3 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { "type": "string", "x-order": 0 } @@ -2021,56 +1904,50 @@ } } }, - "/v1/inventory/Services/Change": { + "/v1/inventory/Services/ListTypes": { "post": { - "description": "Changes service configuration. If a new cluster label is specified, it removes all backup/restore tasks scheduled for the related services. Fails if there are running backup/restore tasks.", + "description": "Returns a list of active Service types.", "tags": [ "ServicesService" ], - "summary": "Change service", - "operationId": "ChangeService", + "summary": "List Active Service Types", + "operationId": "ListActiveServiceTypes", "parameters": [ { "name": "body", "in": "body", "required": true, + "schema": { + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", "schema": { "type": "object", "properties": { - "cluster": { - "type": "string", - "x-nullable": true, - "x-order": 2 - }, - "environment": { - "type": "string", - "x-nullable": true, - "x-order": 1 - }, - "external_group": { - "type": "string", - "x-nullable": true, - "x-order": 4 - }, - "replication_set": { - "type": "string", - "x-nullable": true, - "x-order": 3 - }, - "service_id": { - "type": "string", + "service_types": { + "type": "array", + "items": { + "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 } } } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } }, "default": { "description": "An unexpected error response.", @@ -2106,14 +1983,14 @@ } } }, - "/v1/inventory/Services/CustomLabels/Add": { + "/v1/inventory/Services/Remove": { "post": { - "description": "Adds or replaces (if the key exists) custom labels for a Service.", + "description": "Removes Service.", "tags": [ "ServicesService" ], - "summary": "Add/replace custom labels", - "operationId": "AddCustomLabels", + "summary": "Remove Service", + "operationId": "RemoveService", "parameters": [ { "name": "body", @@ -2122,16 +1999,13 @@ "schema": { "type": "object", "properties": { - "custom_labels": { - "description": "Custom user-assigned labels to be added.", - "type": "object", - "additionalProperties": { - "type": "string" - }, + "force": { + "description": "Remove service with all dependencies.", + "type": "boolean", "x-order": 1 }, "service_id": { - "description": "Unique Service ID.", + "description": "Unique randomly generated instance identifier. Required.", "type": "string", "x-order": 0 } @@ -2180,579 +2054,244 @@ } } }, - "/v1/inventory/Services/CustomLabels/Remove": { - "post": { - "description": "Removes custom labels from a Service by key.", + "/v1/inventory/agents": { + "get": { + "description": "Returns a list of all Agents.", "tags": [ - "ServicesService" + "AgentsService" ], - "summary": "Remove custom labels", - "operationId": "RemoveCustomLabels", + "summary": "List Agents", + "operationId": "ListAgents", "parameters": [ { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "custom_label_keys": { - "description": "Custom user-assigned label keys to be removed.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - }, - "service_id": { - "description": "Unique Service ID.", - "type": "string", - "x-order": 0 - } - } - } + "type": "string", + "description": "Return only Agents started by this pmm-agent.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id.", + "name": "pmm_agent_id", + "in": "query" + }, + { + "type": "string", + "description": "Return only Agents that provide insights for that Node.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id.", + "name": "node_id", + "in": "query" + }, + { + "type": "string", + "description": "Return only Agents that provide insights for that Service.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id.", + "name": "service_id", + "in": "query" + }, + { + "enum": [ + "AGENT_TYPE_UNSPECIFIED", + "AGENT_TYPE_PMM_AGENT", + "AGENT_TYPE_VM_AGENT", + "AGENT_TYPE_NODE_EXPORTER", + "AGENT_TYPE_MYSQLD_EXPORTER", + "AGENT_TYPE_MONGODB_EXPORTER", + "AGENT_TYPE_POSTGRES_EXPORTER", + "AGENT_TYPE_PROXYSQL_EXPORTER", + "AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT", + "AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT", + "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT", + "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT", + "AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT", + "AGENT_TYPE_EXTERNAL_EXPORTER", + "AGENT_TYPE_RDS_EXPORTER", + "AGENT_TYPE_AZURE_DATABASE_EXPORTER" + ], + "type": "string", + "default": "AGENT_TYPE_UNSPECIFIED", + "description": "Return only agents of a particular type.", + "name": "agent_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 - }, - "details": { + "azure_database_exporter": { "type": "array", "items": { + "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics.", "type": "object", "properties": { - "@type": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 + }, + "azure_database_resource_type": { + "type": "string", + "title": "Azure database resource type (mysql, maria, postgres)", + "x-order": 5 + }, + "azure_database_subscription_id": { + "description": "Azure database subscription ID.", + "type": "string", + "x-order": 4 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "listen_port": { + "description": "Listen port for scraping metrics (the same for several configurations).", + "type": "integer", + "format": "int64", + "x-order": 8 + }, + "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": 11 + }, + "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": 10 + }, + "push_metrics_enabled": { + "description": "True if the exporter operates in push metrics mode.", + "type": "boolean", + "x-order": 9 + }, + "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": 7 } - }, - "additionalProperties": false + } }, - "x-order": 2 + "x-order": 14 }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/inventory/Services/Get": { - "post": { - "description": "Returns a single Service by ID.", - "tags": [ - "ServicesService" - ], - "summary": "Get a Service", - "operationId": "GetService", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "external": { - "description": "ExternalService represents a generic External service instance.", - "type": "object", - "properties": { - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 4 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" + "external_exporter": { + "type": "array", + "items": { + "description": "ExternalExporter runs on any Node type, including Remote Node.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "x-order": 6 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 3 - }, - "group": { - "description": "Group name of external service.", - "type": "string", - "x-order": 7 - }, - "node_id": { - "description": "Node identifier where this service instance runs.", - "type": "string", - "x-order": 2 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 5 - }, - "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 - } - }, - "x-order": 5 - }, - "haproxy": { - "description": "HAProxyService represents a generic HAProxy service instance.", - "type": "object", - "properties": { - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 4 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 }, - "x-order": 6 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 3 - }, - "node_id": { - "description": "Node identifier where this service instance runs.", - "type": "string", - "x-order": 2 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 5 - }, - "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 - } - }, - "x-order": 4 - }, - "mongodb": { - "description": "MongoDBService represents a generic MongoDB 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 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" + "disabled": { + "description": "If disabled, metrics from this exporter will not be collected.", + "type": "boolean", + "x-order": 2 }, - "x-order": 9 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "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": "MongoDB version.", - "type": "string", - "x-order": 10 + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 8 + }, + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI.", + "type": "string", + "x-order": 6 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 9 + }, + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 1 + }, + "scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints.", + "type": "string", + "x-order": 5 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "HTTP basic auth username for collecting metrics.", + "type": "string", + "x-order": 4 + } } }, - "x-order": 1 + "x-order": 12 }, - "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 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "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": 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": 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": 2 - }, - "proxysql": { - "description": "ProxySQLService represents a generic ProxySQL 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 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "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": "ProxySQL version.", - "type": "string", - "x-order": 10 - } - }, - "x-order": 3 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { + "mongodb_exporter": { "type": "array", "items": { + "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", "type": "object", "properties": { - "@type": { + "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/inventory/Services/List": { - "post": { - "description": "Returns a list of Services filtered by type.", - "tags": [ - "ServicesService" - ], - "summary": "List Services", - "operationId": "ListServices", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "external_group": { - "description": "Return only services in this external group.", - "type": "string", - "x-order": 2 - }, - "node_id": { - "description": "Return only Services running on that Node.", - "type": "string", - "x-order": 0 - }, - "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": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "external": { - "type": "array", - "items": { - "description": "ExternalService represents a generic External service instance.", - "type": "object", - "properties": { - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 4 + }, + "collections_limit": { + "type": "integer", + "format": "int32", + "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", + "x-order": 13 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -2760,105 +2299,124 @@ "additionalProperties": { "type": "string" }, - "x-order": 6 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 3 - }, - "group": { - "description": "Group name of external service.", - "type": "string", "x-order": 7 }, - "node_id": { - "description": "Node identifier where this service instance runs.", - "type": "string", + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", "x-order": 2 }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 5 + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 }, - "service_id": { - "description": "Unique randomly generated instance identifier.", + "enable_all_collectors": { + "description": "Enable All collectors.", + "type": "boolean", + "x-order": 14 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 17 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "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": 16 }, - "service_name": { - "description": "Unique across all Services user-defined name.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", "x-order": 1 - } - } - }, - "x-order": 5 - }, - "haproxy": { - "type": "array", - "items": { - "description": "HAProxyService represents a generic HAProxy service instance.", - "type": "object", - "properties": { - "cluster": { - "description": "Cluster name.", + }, + "process_exec_path": { + "description": "Path to exec process.", "type": "string", - "x-order": 4 + "x-order": 15 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 8 }, - "environment": { - "description": "Environment name.", + "service_id": { + "description": "Service identifier.", "type": "string", "x-order": 3 }, - "node_id": { - "description": "Node identifier where this service instance runs.", - "type": "string", - "x-order": 2 + "stats_collections": { + "type": "array", + "title": "List of colletions to get stats from. Can use *", + "items": { + "type": "string" + }, + "x-order": 12 }, - "replication_set": { - "description": "Replication set 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", + "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 }, - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 }, - "service_name": { - "description": "Unique across all Services user-defined name.", + "username": { + "description": "MongoDB username for scraping metrics.", "type": "string", - "x-order": 1 + "x-order": 4 } } }, "x-order": 4 }, - "mongodb": { + "mysqld_exporter": { "type": "array", "items": { - "description": "MongoDBService represents a generic MongoDB instance.", + "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", "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.", + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 7 + "x-order": 0 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -2866,143 +2424,143 @@ "additionalProperties": { "type": "string" }, - "x-order": 9 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 + "x-order": 11 }, - "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": 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": 4 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 + "x-order": 16 }, - "service_id": { - "description": "Unique randomly generated instance identifier.", + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "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": 19 }, - "service_name": { - "description": "Unique across all Services user-defined name.", + "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": 18 }, - "version": { - "description": "MongoDB version.", - "type": "string", - "x-order": 10 - } - } - }, - "x-order": 1 - }, - "mysql": { - "type": "array", - "items": { - "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.", + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 12 + }, + "service_id": { + "description": "Service identifier.", "type": "string", "x-order": 3 }, - "cluster": { - "description": "Cluster 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": 7 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 + "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": 15 }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 + "table_count": { + "description": "Actual table count at the moment of adding.", + "type": "integer", + "format": "int32", + "x-order": 14 }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 2 + "tablestats_group_disabled": { + "description": "True if tablestats group collectors are currently disabled.", + "type": "boolean", + "x-order": 17 }, - "port": { - "description": "Access port.\nPort is required when the address present.", + "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": "int64", - "x-order": 4 + "format": "int32", + "x-order": 10 }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 }, - "service_id": { - "description": "Unique randomly generated instance identifier.", + "tls_ca": { + "description": "Certificate Authority certificate chain.", "type": "string", - "x-order": 0 + "x-order": 7 }, - "service_name": { - "description": "Unique across all Services user-defined name.", + "tls_cert": { + "description": "Client certificate.", "type": "string", - "x-order": 1 + "x-order": 8 }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", + "tls_key": { + "description": "Password for decrypting tls_cert.", "type": "string", - "x-order": 5 + "x-order": 9 }, - "version": { - "description": "MySQL version.", + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "username": { + "description": "MySQL username for scraping metrics.", "type": "string", - "x-order": 10 + "x-order": 4 } } }, - "x-order": 0 + "x-order": 3 }, - "postgresql": { + "node_exporter": { "type": "array", "items": { - "description": "PostgreSQLService represents a generic PostgreSQL instance.", + "description": "NodeExporter runs on Generic or Container Node and exposes its metrics.", "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.", + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 8 + "x-order": 0 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -3010,73 +2568,96 @@ "additionalProperties": { "type": "string" }, - "x-order": 10 + "x-order": 3 }, - "database_name": { - "description": "Database name.", - "type": "string", + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", "x-order": 2 }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 7 + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 5 }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 3 + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 10 }, - "port": { - "description": "Access port.\nPort is required when the address present.", + "listen_port": { + "description": "Listen port for scraping metrics.", "type": "integer", "format": "int64", - "x-order": 5 + "x-order": 7 }, - "replication_set": { - "description": "Replication set name.", + "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": 9 }, - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", + "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": 6 + "x-order": 8 }, - "version": { - "description": "PostgreSQL version.", + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "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.", "type": "string", - "x-order": 11 + "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": 2 }, - "proxysql": { + "pmm_agent": { "type": "array", "items": { - "description": "ProxySQLService represents a generic ProxySQL instance.", + "description": "PMMAgent runs on Generic or Container Node.", "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": 3 + "x-order": 0 }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 + "connected": { + "description": "True if Agent is running and connected to pmm-managed.", + "type": "boolean", + "x-order": 3 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -3084,319 +2665,268 @@ "additionalProperties": { "type": "string" }, - "x-order": 9 + "x-order": 2 }, - "environment": { - "description": "Environment name.", + "process_exec_path": { + "description": "Path to exec process.", "type": "string", - "x-order": 6 + "x-order": 4 }, - "node_id": { + "runs_on_node_id": { "description": "Node identifier where this instance runs.", "type": "string", - "x-order": 2 + "x-order": 1 + } + } + }, + "x-order": 0 + }, + "postgres_exporter": { + "type": "array", + "items": { + "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 }, - "port": { - "description": "Access port.\nPort is required when the address present.", + "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 + }, + "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": 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", + "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_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 + }, + "process_exec_path": { + "description": "Path to exec process.", "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.", + "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": 5 + }, + "proxysql_exporter": { + "type": "array", + "items": { + "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", + "type": "object", + "properties": { + "agent_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "service_name": { - "description": "Unique across all Services user-defined name.", + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "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 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 + }, + "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 + }, + "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": "ProxySQL 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.", + "type": "boolean", + "x-order": 6 + }, + "username": { + "description": "ProxySQL username for scraping metrics.", + "type": "string", + "x-order": 4 } } }, - "x-order": 3 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 + "x-order": 6 }, - "details": { + "qan_mongodb_profiler_agent": { "type": "array", "items": { + "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", "type": "object", "properties": { - "@type": { + "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/inventory/Services/ListTypes": { - "post": { - "description": "Returns a list of active Service types.", - "tags": [ - "ServicesService" - ], - "summary": "List Active Service Types", - "operationId": "ListActiveServiceTypes", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "service_types": { - "type": "array", - "items": { - "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 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/inventory/Services/Remove": { - "post": { - "description": "Removes Service.", - "tags": [ - "ServicesService" - ], - "summary": "Remove Service", - "operationId": "RemoveService", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "force": { - "description": "Remove service with all dependencies.", - "type": "boolean", - "x-order": 1 - }, - "service_id": { - "description": "Unique randomly generated instance identifier. 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/inventory/agents": { - "get": { - "description": "Returns a list of all Agents.", - "tags": [ - "AgentsService" - ], - "summary": "List Agents", - "operationId": "ListAgents", - "parameters": [ - { - "type": "string", - "description": "Return only Agents started by this pmm-agent.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id.", - "name": "pmm_agent_id", - "in": "query" - }, - { - "type": "string", - "description": "Return only Agents that provide insights for that Node.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id.", - "name": "node_id", - "in": "query" - }, - { - "type": "string", - "description": "Return only Agents that provide insights for that Service.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id.", - "name": "service_id", - "in": "query" - }, - { - "enum": [ - "AGENT_TYPE_UNSPECIFIED", - "AGENT_TYPE_PMM_AGENT", - "AGENT_TYPE_VM_AGENT", - "AGENT_TYPE_NODE_EXPORTER", - "AGENT_TYPE_MYSQLD_EXPORTER", - "AGENT_TYPE_MONGODB_EXPORTER", - "AGENT_TYPE_POSTGRES_EXPORTER", - "AGENT_TYPE_PROXYSQL_EXPORTER", - "AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT", - "AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT", - "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT", - "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT", - "AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT", - "AGENT_TYPE_EXTERNAL_EXPORTER", - "AGENT_TYPE_RDS_EXPORTER", - "AGENT_TYPE_AZURE_DATABASE_EXPORTER" - ], - "type": "string", - "default": "AGENT_TYPE_UNSPECIFIED", - "description": "Return only agents of a particular type.", - "name": "agent_type", - "in": "query" - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "azure_database_exporter": { - "type": "array", - "items": { - "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "azure_database_resource_type": { - "type": "string", - "title": "Azure database resource type (mysql, maria, postgres)", - "x-order": 5 - }, - "azure_database_subscription_id": { - "description": "Azure database subscription ID.", - "type": "string", - "x-order": 4 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -3404,19 +2934,13 @@ "additionalProperties": { "type": "string" }, - "x-order": 6 + "x-order": 8 }, "disabled": { "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", "x-order": 2 }, - "listen_port": { - "description": "Listen port for scraping metrics (the same for several configurations).", - "type": "integer", - "format": "int64", - "x-order": 8 - }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", @@ -3432,10 +2956,11 @@ ], "x-order": 11 }, - "node_id": { - "description": "Node identifier.", - "type": "string", - "x-order": 3 + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", @@ -3447,10 +2972,10 @@ "type": "string", "x-order": 10 }, - "push_metrics_enabled": { - "description": "True if the exporter operates in push metrics mode.", - "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.", @@ -3465,85 +2990,31 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 7 - } - } - }, - "x-order": 14 - }, - "external_exporter": { - "type": "array", - "items": { - "description": "ExternalExporter runs on any Node type, including Remote Node.", - "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": 7 - }, - "disabled": { - "description": "If disabled, metrics from this exporter will not be collected.", - "type": "boolean", - "x-order": 2 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 8 - }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI.", - "type": "string", - "x-order": 6 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 10 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", "x-order": 9 }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 1 - }, - "scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints.", - "type": "string", + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", "x-order": 5 }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 }, "username": { - "description": "HTTP basic auth username for collecting metrics.", + "description": "MongoDB username for getting profiler data.", "type": "string", "x-order": 4 } } }, - "x-order": 12 + "x-order": 9 }, - "mongodb_exporter": { + "qan_mysql_perfschema_agent": { "type": "array", "items": { - "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", + "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -3551,49 +3022,24 @@ "type": "string", "x-order": 0 }, - "collections_limit": { - "type": "integer", - "format": "int32", - "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", - "x-order": 13 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 7 + "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": 9 - }, - "enable_all_collectors": { - "description": "Enable All collectors.", - "type": "boolean", - "x-order": 14 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 17 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 - }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", @@ -3609,6 +3055,12 @@ ], "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", @@ -3619,24 +3071,16 @@ "type": "string", "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": 8 + "x-order": 12 }, "service_id": { "description": "Service identifier.", "type": "string", "x-order": 3 }, - "stats_collections": { - "type": "array", - "title": "List of colletions to get stats from. Can use *", - "items": { - "type": "string" - }, - "x-order": 12 - }, "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", @@ -3650,31 +3094,46 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 10 + "x-order": 14 }, "tls": { "description": "Use TLS for database connections.", "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": "MongoDB username for scraping metrics.", + "description": "MySQL username for getting performance data.", "type": "string", "x-order": 4 } } }, - "x-order": 4 + "x-order": 7 }, - "mysqld_exporter": { + "qan_mysql_slowlog_agent": { "type": "array", "items": { - "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", + "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -3688,32 +3147,18 @@ "additionalProperties": { "type": "string" }, - "x-order": 11 + "x-order": 14 + }, + "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", @@ -3727,7 +3172,19 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 19 + "x-order": 17 + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "title": "Limit query length in QAN (default: server-defined; -1: no limit)", + "x-order": 11 + }, + "max_slowlog_file_size": { + "description": "Slowlog file is rotated at this size if \u003e 0.", + "type": "string", + "format": "int64", + "x-order": 13 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", @@ -3735,12 +3192,12 @@ "x-order": 1 }, "process_exec_path": { - "description": "Path to exec process.", "type": "string", - "x-order": 18 + "title": "mod tidy", + "x-order": 16 }, - "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 }, @@ -3764,23 +3221,6 @@ ], "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", @@ -3807,18 +3247,18 @@ "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": 8 }, - "node_exporter": { + "qan_postgresql_pgstatements_agent": { "type": "array", "items": { - "description": "NodeExporter runs on Generic or Container Node and exposes its metrics.", + "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -3832,31 +3272,17 @@ "additionalProperties": { "type": "string" }, - "x-order": 3 + "x-order": 9 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", "type": "boolean", - "x-order": 2 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, "x-order": 5 }, - "expose_exporter": { + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 10 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 7 + "x-order": 2 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -3871,22 +3297,28 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 9 + "x-order": 12 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 + "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": 8 + "x-order": 11 }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 4 + "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.", @@ -3901,54 +3333,31 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 6 - } - } - }, - "x-order": 2 - }, - "pmm_agent": { - "type": "array", - "items": { - "description": "PMMAgent runs on Generic or Container Node.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 + "x-order": 10 }, - "connected": { - "description": "True if Agent is running and connected to pmm-managed.", + "tls": { + "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 3 + "x-order": 7 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 2 + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 8 }, - "process_exec_path": { - "description": "Path to exec process.", + "username": { + "description": "PostgreSQL username for getting pg stat statements data.", "type": "string", "x-order": 4 - }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 1 } } }, - "x-order": 0 + "x-order": 10 }, - "postgres_exporter": { + "qan_postgresql_pgstatmonitor_agent": { "type": "array", "items": { - "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", + "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -3956,18 +3365,17 @@ "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": 10 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", "x-order": 7 }, "disabled": { @@ -3975,25 +3383,6 @@ "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": 15 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 - }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", @@ -4009,11 +3398,11 @@ ], "x-order": 13 }, - "max_exporter_connections": { - "description": "Maximum number of connections that exporter can open to the database instance.", + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 16 + "x-order": 8 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", @@ -4025,10 +3414,10 @@ "type": "string", "x-order": 12 }, - "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": 8 + "x-order": 9 }, "service_id": { "description": "Service identifier.", @@ -4048,7 +3437,7 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 10 + "x-order": 11 }, "tls": { "description": "Use TLS for database connections.", @@ -4056,23 +3445,23 @@ "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": "PostgreSQL username for getting pg stat monitor data.", "type": "string", "x-order": 4 } } }, - "x-order": 5 + "x-order": 11 }, - "proxysql_exporter": { + "rds_exporter": { "type": "array", "items": { - "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", + "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", "type": "object", "properties": { "agent_id": { @@ -4080,37 +3469,45 @@ "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.", + "type": "boolean", + "x-order": 8 + }, "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": 14 + "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", @@ -4125,7 +3522,12 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 13 + "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.", @@ -4135,17 +3537,12 @@ "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 12 + "x-order": 11 }, "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 + "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.", @@ -4160,31 +3557,16 @@ "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.", - "type": "boolean", "x-order": 6 - }, - "username": { - "description": "ProxySQL username for scraping metrics.", - "type": "string", - "x-order": 4 } } }, - "x-order": 6 + "x-order": 13 }, - "qan_mongodb_profiler_agent": { + "vm_agent": { "type": "array", "items": { - "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "description": "VMAgent runs on Generic or Container Node alongside pmm-agent.\nIt scrapes other exporter Agents that are configured with push_metrics_enabled\nand uses Prometheus remote write protocol to push metrics to PMM Server.", "type": "object", "properties": { "agent_id": { @@ -4192,39 +3574,11 @@ "type": "string", "x-order": 0 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 8 - }, - "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": 11 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "listen_port": { + "description": "Listen port for scraping metrics.", "type": "integer", - "format": "int32", - "x-order": 7 + "format": "int64", + "x-order": 4 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", @@ -4234,11 +3588,6 @@ "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 10 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", "x-order": 3 }, "status": { @@ -4254,708 +3603,1822 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 9 - }, - "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": "MongoDB username for getting profiler data.", - "type": "string", - "x-order": 4 + "x-order": 2 } } }, - "x-order": 9 - }, - "qan_mysql_perfschema_agent": { + "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": { - "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": { "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 - }, - "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": 14 - }, - "tls": { - "description": "Use TLS for database connections.", - "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": "MySQL username for getting performance data.", - "type": "string", - "x-order": 4 } + }, + "additionalProperties": false + }, + "x-order": 2 + }, + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + }, + "post": { + "description": "Adds an Agent to Inventory. Only one agent at a time can be passed.", + "tags": [ + "AgentsService" + ], + "summary": "Add an Agent to Inventory", + "operationId": "AddAgent", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "azure_database_exporter": { + "type": "object", + "properties": { + "azure_client_id": { + "type": "string", + "title": "Azure client ID", + "x-order": 2 + }, + "azure_client_secret": { + "type": "string", + "title": "Azure client secret", + "x-order": 3 + }, + "azure_database_resource_type": { + "type": "string", + "title": "Azure resource type (mysql, maria, postgres)", + "x-order": 7 + }, + "azure_resource_group": { + "description": "Azure resource group.", + "type": "string", + "x-order": 6 + }, + "azure_subscription_id": { + "type": "string", + "title": "Azure subscription ID", + "x-order": 5 + }, + "azure_tenant_id": { + "type": "string", + "title": "Azure tanant ID", + "x-order": 4 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "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": 11 + }, + "node_id": { + "description": "Node identifier.", + "type": "string", + "x-order": 1 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "push_metrics": { + "description": "Enables push metrics mode for exporter.", + "type": "boolean", + "x-order": 10 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 9 } }, - "x-order": 7 + "x-order": 8 }, - "qan_mysql_slowlog_agent": { - "type": "array", - "items": { - "description": "QANMySQLSlowlogAgent 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 + "external_exporter": { + "type": "object", + "properties": { + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 14 - }, - "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": 17 - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "title": "Limit query length in QAN (default: server-defined; -1: no limit)", - "x-order": 11 - }, - "max_slowlog_file_size": { - "description": "Slowlog file is rotated at this size if \u003e 0.", - "type": "string", - "format": "int64", - "x-order": 13 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "process_exec_path": { - "type": "string", - "title": "mod tidy", - "x-order": 16 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 12 - }, - "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": 15 - }, - "tls": { - "description": "Use TLS for database connections.", - "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": "MySQL username for getting performance data.", - "type": "string", - "x-order": 4 - } + "x-order": 7 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 6 + }, + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI(default: /metrics).", + "type": "string", + "x-order": 5 + }, + "password": { + "description": "HTTP basic auth password for collecting metrics.", + "type": "string", + "x-order": 3 + }, + "push_metrics": { + "description": "Enables push metrics mode for exporter.", + "type": "boolean", + "x-order": 8 + }, + "runs_on_node_id": { + "description": "The node identifier where this instance is run.", + "type": "string", + "x-order": 0 + }, + "scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints(default: http).", + "type": "string", + "x-order": 4 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "username": { + "description": "HTTP basic auth username for collecting metrics.", + "type": "string", + "x-order": 2 } }, - "x-order": 8 + "x-order": 6 }, - "qan_postgresql_pgstatements_agent": { - "type": "array", - "items": { - "description": "QANPostgreSQLPgStatementsAgent 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 + "mongodb_exporter": { + "type": "object", + "properties": { + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 15 + }, + "authentication_database": { + "description": "Authentication database.", + "type": "string", + "x-order": 14 + }, + "authentication_mechanism": { + "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", + "type": "string", + "x-order": 13 + }, + "collections_limit": { + "type": "integer", + "format": "int32", + "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", + "x-order": 17 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 + "x-order": 9 + }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 5 + "x-order": 12 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 19 + }, + "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": 18 + }, + "password": { + "description": "MongoDB password for scraping metrics.", + "type": "string", + "x-order": 3 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "push_metrics": { + "description": "Enables push metrics mode for exporter.", + "type": "boolean", + "x-order": 11 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 10 + }, + "stats_collections": { + "type": "array", + "title": "List of colletions to get stats from. Can use *", + "items": { + "type": "string" }, - "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": 16 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 8 + }, + "tls_certificate_key": { + "description": "Client certificate and key.", + "type": "string", + "x-order": 6 + }, + "tls_certificate_key_file_password": { + "description": "Password for decrypting tls_certificate_key.", + "type": "string", + "x-order": 7 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "username": { + "description": "MongoDB username for scraping metrics.", + "type": "string", + "x-order": 2 + } + }, + "x-order": 3 + }, + "mysqld_exporter": { + "type": "object", + "properties": { + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 14 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 11 + "x-order": 10 + }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 + "x-order": 13 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 16 + }, + "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": 15 + }, + "password": { + "description": "MySQL password for scraping metrics.", + "type": "string", + "x-order": 3 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "push_metrics": { + "description": "Enables push metrics mode for exporter.", + "type": "boolean", + "x-order": 12 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 11 + }, + "tablestats_group_table_limit": { + "description": "Tablestats group collectors will be 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": 9 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 6 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 7 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 8 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "username": { + "description": "MySQL username for scraping metrics.", + "type": "string", + "x-order": 2 + } + }, + "x-order": 2 + }, + "node_exporter": { + "type": "object", + "properties": { + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" }, - "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 + "x-order": 1 + }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 7 + "x-order": 3 + }, + "expose_exporter": { + "type": "boolean", + "title": "Expose the node_exporter process on all public interfaces", + "x-order": 5 + }, + "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": 4 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "push_metrics": { + "description": "Enables push metrics mode for exporter.", + "type": "boolean", + "x-order": 2 + } + }, + "x-order": 1 + }, + "pmm_agent": { + "type": "object", + "properties": { + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 8 + "x-order": 1 + }, + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 0 + } + }, + "x-order": 0 + }, + "postgres_exporter": { + "type": "object", + "properties": { + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 13 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 15 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 + }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 16 + }, + "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": 14 + }, + "max_exporter_connections": { + "description": "Maximum number of connections that exporter can open to the database instance.", + "type": "integer", + "format": "int32", + "x-order": 17 + }, + "password": { + "description": "PostgreSQL password for scraping metrics.", + "type": "string", + "x-order": 3 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "push_metrics": { + "description": "Enables push metrics mode for exporter.", + "type": "boolean", + "x-order": 8 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 7 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_ca": { + "description": "TLS CA certificate.", + "type": "string", + "x-order": 10 + }, + "tls_cert": { + "description": "TLS Certifcate.", + "type": "string", + "x-order": 11 + }, + "tls_key": { + "description": "TLS Certificate Key.", + "type": "string", + "x-order": 12 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "type": "boolean", + "x-order": 5 + }, + "username": { + "description": "PostgreSQL username for scraping metrics.", + "type": "string", + "x-order": 2 + } + }, + "x-order": 4 + }, + "proxysql_exporter": { + "type": "object", + "properties": { + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 10 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 + }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 12 + }, + "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": 11 + }, + "password": { + "description": "ProxySQL password for scraping metrics.", + "type": "string", + "x-order": 3 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "push_metrics": { + "description": "Enables push metrics mode for exporter.", + "type": "boolean", + "x-order": 8 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 7 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "username": { + "description": "ProxySQL username for scraping metrics.", + "type": "string", + "x-order": 2 + } + }, + "x-order": 5 + }, + "qan_mongodb_profiler_agent": { + "type": "object", + "properties": { + "authentication_database": { + "description": "Authentication database.", + "type": "string", + "x-order": 13 + }, + "authentication_mechanism": { + "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", + "type": "string", + "x-order": 12 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 10 + }, + "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": 14 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 9 + }, + "password": { + "description": "MongoDB password for getting profile data.", + "type": "string", + "x-order": 3 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 11 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 8 + }, + "tls_certificate_key": { + "description": "Client certificate and key.", + "type": "string", + "x-order": 6 + }, + "tls_certificate_key_file_password": { + "description": "Password for decrypting tls_certificate_key.", + "type": "string", + "x-order": 7 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "username": { + "description": "MongoDB username for getting profile data.", + "type": "string", + "x-order": 2 + } + }, + "x-order": 11 + }, + "qan_mysql_perfschema_agent": { + "type": "object", + "properties": { + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 11 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 13 + }, + "disable_query_examples": { + "description": "Disable query examples.", + "type": "boolean", + "x-order": 10 + }, + "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": 14 + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "title": "Limit query length in QAN (default: server-defined; -1: no limit)", + "x-order": 9 + }, + "password": { + "description": "MySQL password for getting performance data.", + "type": "string", + "x-order": 3 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 12 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 6 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 7 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 8 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "username": { + "description": "MySQL username for getting performance data.", + "type": "string", + "x-order": 2 + } + }, + "x-order": 9 + }, + "qan_mysql_slowlog_agent": { + "type": "object", + "properties": { + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 12 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 14 + }, + "disable_query_examples": { + "description": "Disable query examples.", + "type": "boolean", + "x-order": 10 + }, + "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": 15 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 9 + }, + "max_slowlog_file_size": { + "description": "Rotate slowlog file at this size if \u003e 0.\nUse zero or negative value to disable rotation.", + "type": "string", + "format": "int64", + "x-order": 11 + }, + "password": { + "description": "MySQL password for getting slowlog data.", + "type": "string", + "x-order": 3 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 13 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 6 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 7 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 8 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "username": { + "description": "MySQL username for getting slowlog data.", + "type": "string", + "x-order": 2 + } + }, + "x-order": 10 + }, + "qan_postgresql_pgstatements_agent": { + "type": "object", + "properties": { + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 8 + }, + "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": 9 + }, + "password": { + "description": "PostgreSQL password for getting pg stat statements data.", + "type": "string", + "x-order": 3 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 7 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_ca": { + "description": "TLS CA certificate.", + "type": "string", + "x-order": 10 + }, + "tls_cert": { + "description": "TLS Certifcate.", + "type": "string", + "x-order": 11 + }, + "tls_key": { + "description": "TLS Certificate Key.", + "type": "string", + "x-order": 12 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "username": { + "description": "PostgreSQL username for getting pg stat statements data.", + "type": "string", + "x-order": 2 + } + }, + "x-order": 12 + }, + "qan_postgresql_pgstatmonitor_agent": { + "type": "object", + "properties": { + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" }, - "username": { - "description": "PostgreSQL username for getting pg stat statements data.", - "type": "string", - "x-order": 4 - } + "x-order": 8 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 10 + }, + "disable_query_examples": { + "description": "Disable query examples.", + "type": "boolean", + "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": 14 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 6 + }, + "password": { + "description": "PostgreSQL password for getting pg stat monitor data.", + "type": "string", + "x-order": 3 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 9 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_ca": { + "description": "TLS CA certificate.", + "type": "string", + "x-order": 11 + }, + "tls_cert": { + "description": "TLS Certifcate.", + "type": "string", + "x-order": 12 + }, + "tls_key": { + "description": "TLS Certificate Key.", + "type": "string", + "x-order": 13 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "username": { + "description": "PostgreSQL username for getting pg stat monitor data.", + "type": "string", + "x-order": 2 + } + }, + "x-order": 13 + }, + "rds_exporter": { + "type": "object", + "properties": { + "aws_access_key": { + "description": "AWS Access Key.", + "type": "string", + "x-order": 2 + }, + "aws_secret_key": { + "description": "AWS Secret Key.", + "type": "string", + "x-order": 3 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 4 + }, + "disable_basic_metrics": { + "description": "Disable basic metrics.", + "type": "boolean", + "x-order": 6 + }, + "disable_enhanced_metrics": { + "description": "Disable enhanced metrics.", + "type": "boolean", + "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": 9 + }, + "node_id": { + "description": "Node identifier.", + "type": "string", + "x-order": 1 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "push_metrics": { + "description": "Enables push metrics mode for exporter.", + "type": "boolean", + "x-order": 8 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 5 + } + }, + "x-order": 7 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "azure_database_exporter": { + "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "azure_database_resource_type": { + "type": "string", + "title": "Azure database resource type (mysql, maria, postgres)", + "x-order": 5 + }, + "azure_database_subscription_id": { + "description": "Azure database subscription ID.", + "type": "string", + "x-order": 4 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "listen_port": { + "description": "Listen port for scraping metrics (the same for several configurations).", + "type": "integer", + "format": "int64", + "x-order": 8 + }, + "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": 11 + }, + "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": 10 + }, + "push_metrics_enabled": { + "description": "True if the exporter operates in push metrics mode.", + "type": "boolean", + "x-order": 9 + }, + "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": 7 } }, - "x-order": 10 + "x-order": 8 }, - "qan_postgresql_pgstatmonitor_agent": { - "type": "array", - "items": { - "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 + "external_exporter": { + "description": "ExternalExporter runs on any Node type, including Remote Node.", + "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" }, - "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 + "x-order": 7 + }, + "disabled": { + "description": "If disabled, metrics from this exporter will not be collected.", + "type": "boolean", + "x-order": 2 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 8 + }, + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI.", + "type": "string", + "x-order": 6 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 9 + }, + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 1 + }, + "scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints.", + "type": "string", + "x-order": 5 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "HTTP basic auth username for collecting metrics.", + "type": "string", + "x-order": 4 + } + }, + "x-order": 6 + }, + "mongodb_exporter": { + "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "collections_limit": { + "type": "integer", + "format": "int32", + "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", + "x-order": 13 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 + "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" }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 + "x-order": 9 + }, + "enable_all_collectors": { + "description": "Enable All collectors.", + "type": "boolean", + "x-order": 14 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 17 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 + }, + "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 + }, + "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 + }, + "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 + }, + "stats_collections": { + "type": "array", + "title": "List of colletions to get stats from. Can use *", + "items": { + "type": "string" }, - "username": { - "description": "PostgreSQL username for getting pg stat monitor data.", - "type": "string", - "x-order": 4 - } + "x-order": 12 + }, + "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.", + "type": "boolean", + "x-order": 6 + }, + "username": { + "description": "MongoDB username for scraping metrics.", + "type": "string", + "x-order": 4 } }, - "x-order": 11 + "x-order": 3 }, - "rds_exporter": { - "type": "array", - "items": { - "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node 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": 13 - }, - "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": { - "description": "Custom user-assigned labels.", - "type": "object", - "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 + "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" }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 10 + "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" }, - "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": 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", + "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": 19 + }, + "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": 18 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 12 + }, + "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": 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", + "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": "MySQL username for scraping metrics.", + "type": "string", + "x-order": 4 } }, - "x-order": 13 + "x-order": 2 }, - "vm_agent": { - "type": "array", - "items": { - "description": "VMAgent runs on Generic or Container Node alongside pmm-agent.\nIt scrapes other exporter Agents that are configured with push_metrics_enabled\nand uses Prometheus remote write protocol to push metrics to PMM Server.", - "type": "object", - "properties": { - "agent_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": 4 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 + "node_exporter": { + "description": "NodeExporter runs on Generic or Container Node and exposes its 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" }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 3 + "x-order": 3 + }, + "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" }, - "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": 2 - } + "x-order": 5 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 10 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "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": 9 + }, + "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": 8 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "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.", + "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 - } - } - } - } - } - }, - "post": { - "description": "Adds an Agent to Inventory. Only one agent at a time can be passed.", - "tags": [ - "AgentsService" - ], - "summary": "Add an Agent to Inventory", - "operationId": "AddAgent", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "azure_database_exporter": { + "pmm_agent": { + "description": "PMMAgent runs on Generic or Container Node.", "type": "object", "properties": { - "azure_client_id": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "title": "Azure client ID", - "x-order": 2 + "x-order": 0 }, - "azure_client_secret": { - "type": "string", - "title": "Azure client secret", + "connected": { + "description": "True if Agent is running and connected to pmm-managed.", + "type": "boolean", "x-order": 3 }, - "azure_database_resource_type": { - "type": "string", - "title": "Azure resource type (mysql, maria, postgres)", - "x-order": 7 + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 2 }, - "azure_resource_group": { - "description": "Azure resource group.", + "process_exec_path": { + "description": "Path to exec process.", "type": "string", - "x-order": 6 + "x-order": 4 }, - "azure_subscription_id": { + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", "type": "string", - "title": "Azure subscription ID", - "x-order": 5 - }, - "azure_tenant_id": { + "x-order": 1 + } + }, + "x-order": 0 + }, + "postgres_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", - "title": "Azure tanant ID", - "x-order": 4 + "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.", @@ -4963,7 +5426,31 @@ "additionalProperties": { "type": "string" }, - "x-order": 8 + "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": 15 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -4978,34 +5465,76 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 11 + "x-order": 13 }, - "node_id": { - "description": "Node identifier.", - "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 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 0 + "x-order": 1 }, - "push_metrics": { - "description": "Enables push metrics mode for exporter.", + "process_exec_path": { + "description": "Path to exec process.", + "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.", + "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 }, - "skip_connection_check": { - "description": "Skip connection check.", + "tls": { + "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 9 + "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": 8 + "x-order": 4 }, - "external_exporter": { + "proxysql_exporter": { + "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL 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", @@ -5014,73 +5543,106 @@ }, "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 + }, "listen_port": { "description": "Listen port for scraping metrics.", "type": "integer", "format": "int64", - "x-order": 6 + "x-order": 11 }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI(default: /metrics).", + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", - "x-order": 5 + "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 }, - "password": { - "description": "HTTP basic auth password for collecting metrics.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 3 + "x-order": 1 }, - "push_metrics": { - "description": "Enables push metrics mode for exporter.", + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 12 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", "type": "boolean", "x-order": 8 }, - "runs_on_node_id": { - "description": "The node identifier where this instance is run.", + "service_id": { + "description": "Service identifier.", "type": "string", - "x-order": 0 + "x-order": 3 }, - "scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints(default: http).", + "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": 4 + "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 }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 1 + "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": "HTTP basic auth username for collecting metrics.", + "description": "ProxySQL username for scraping metrics.", "type": "string", - "x-order": 2 + "x-order": 4 } }, - "x-order": 6 + "x-order": 5 }, - "mongodb_exporter": { + "qan_mongodb_profiler_agent": { + "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", "type": "object", "properties": { - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 15 - }, - "authentication_database": { - "description": "Authentication database.", - "type": "string", - "x-order": 14 - }, - "authentication_mechanism": { - "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 13 - }, - "collections_limit": { - "type": "integer", - "format": "int32", - "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", - "x-order": 17 + "x-order": 0 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -5088,20 +5650,12 @@ "additionalProperties": { "type": "string" }, - "x-order": 9 - }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 12 + "x-order": 8 }, - "expose_exporter": { + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 19 + "x-order": 2 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -5116,81 +5670,70 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 18 + "x-order": 11 }, - "password": { - "description": "MongoDB password for scraping metrics.", - "type": "string", - "x-order": 3 + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 0 + "x-order": 1 }, - "push_metrics": { - "description": "Enables push metrics mode for exporter.", - "type": "boolean", - "x-order": 11 + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 }, "service_id": { "description": "Service identifier.", "type": "string", - "x-order": 1 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 10 + "x-order": 3 }, - "stats_collections": { - "type": "array", - "title": "List of colletions to get stats from. Can use *", - "items": { - "type": "string" - }, - "x-order": 16 + "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": 9 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 4 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 8 - }, - "tls_certificate_key": { - "description": "Client certificate and key.", - "type": "string", - "x-order": 6 - }, - "tls_certificate_key_file_password": { - "description": "Password for decrypting tls_certificate_key.", - "type": "string", - "x-order": 7 + "x-order": 5 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 5 + "x-order": 6 }, "username": { - "description": "MongoDB username for scraping metrics.", + "description": "MongoDB username for getting profiler data.", "type": "string", - "x-order": 2 + "x-order": 4 } }, - "x-order": 3 + "x-order": 11 }, - "mysqld_exporter": { + "qan_mysql_perfschema_agent": { + "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", "type": "object", "properties": { - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 14 + "x-order": 0 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -5198,20 +5741,17 @@ "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 }, - "expose_exporter": { + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 16 + "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", @@ -5226,156 +5766,212 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 15 + "x-order": 16 }, - "password": { - "description": "MySQL password for scraping metrics.", - "type": "string", - "x-order": 3 + "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": 0 + "x-order": 1 }, - "push_metrics": { - "description": "Enables push metrics mode for exporter.", + "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 }, "service_id": { "description": "Service identifier.", "type": "string", - "x-order": 1 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 11 + "x-order": 3 }, - "tablestats_group_table_limit": { - "description": "Tablestats group collectors will be 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": 9 + "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": 4 + "x-order": 5 }, "tls_ca": { "description": "Certificate Authority certificate chain.", "type": "string", - "x-order": 6 + "x-order": 7 }, "tls_cert": { "description": "Client certificate.", "type": "string", - "x-order": 7 + "x-order": 8 }, "tls_key": { "description": "Password for decrypting tls_cert.", "type": "string", - "x-order": 8 + "x-order": 9 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 5 + "x-order": 6 }, "username": { - "description": "MySQL username for scraping metrics.", + "description": "MySQL username for getting performance data.", "type": "string", - "x-order": 2 + "x-order": 4 } }, - "x-order": 2 + "x-order": 9 }, - "node_exporter": { + "qan_mysql_slowlog_agent": { + "description": "QANMySQLSlowlogAgent 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": 14 + }, + "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": 17 + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "title": "Limit query length in QAN (default: server-defined; -1: no limit)", + "x-order": 11 + }, + "max_slowlog_file_size": { + "description": "Slowlog file is rotated at this size if \u003e 0.", + "type": "string", + "format": "int64", + "x-order": 13 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", "x-order": 1 }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", - "type": "array", - "items": { - "type": "string" - }, + "process_exec_path": { + "type": "string", + "title": "mod tidy", + "x-order": 16 + }, + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 12 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", "x-order": 3 }, - "expose_exporter": { + "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": 15 + }, + "tls": { + "description": "Use TLS for database connections.", "type": "boolean", - "title": "Expose the node_exporter process on all public interfaces", "x-order": 5 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "tls_ca": { + "description": "Certificate Authority certificate chain.", "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": 4 + "x-order": 7 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "tls_cert": { + "description": "Client certificate.", "type": "string", - "x-order": 0 + "x-order": 8 }, - "push_metrics": { - "description": "Enables push metrics mode for exporter.", + "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": 2 - } - }, - "x-order": 1 - }, - "pmm_agent": { - "type": "object", - "properties": { - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 1 + "x-order": 6 }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", + "username": { + "description": "MySQL username for getting performance data.", "type": "string", - "x-order": 0 + "x-order": 4 } }, - "x-order": 0 + "x-order": 10 }, - "postgres_exporter": { + "qan_postgresql_pgstatements_agent": { + "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", "properties": { - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 13 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 15 + "x-order": 0 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -5383,20 +5979,17 @@ "additionalProperties": { "type": "string" }, - "x-order": 6 - }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", - "type": "array", - "items": { - "type": "string" - }, "x-order": 9 }, - "expose_exporter": { + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 16 + "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", @@ -5411,79 +6004,70 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 14 + "x-order": 12 }, - "max_exporter_connections": { - "description": "Maximum number of connections that exporter can open to the database instance.", + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 17 - }, - "password": { - "description": "PostgreSQL password for scraping metrics.", - "type": "string", - "x-order": 3 + "x-order": 6 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 0 + "x-order": 1 }, - "push_metrics": { - "description": "Enables push metrics mode for exporter.", - "type": "boolean", - "x-order": 8 + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 11 }, "service_id": { "description": "Service identifier.", "type": "string", - "x-order": 1 + "x-order": 3 }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 7 + "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": 4 - }, - "tls_ca": { - "description": "TLS CA certificate.", - "type": "string", - "x-order": 10 - }, - "tls_cert": { - "description": "TLS Certifcate.", - "type": "string", - "x-order": 11 - }, - "tls_key": { - "description": "TLS Certificate Key.", - "type": "string", - "x-order": 12 + "x-order": 7 }, "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": 5 + "x-order": 8 }, "username": { - "description": "PostgreSQL username for scraping metrics.", + "description": "PostgreSQL username for getting pg stat statements data.", "type": "string", - "x-order": 2 + "x-order": 4 } }, - "x-order": 4 + "x-order": 12 }, - "proxysql_exporter": { + "qan_postgresql_pgstatmonitor_agent": { + "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", "properties": { - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 10 + "x-order": 0 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -5491,20 +6075,17 @@ "additionalProperties": { "type": "string" }, - "x-order": 6 + "x-order": 10 }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 9 + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 7 }, - "expose_exporter": { + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 12 + "x-order": 2 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -5519,63 +6100,91 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 11 + "x-order": 13 }, - "password": { - "description": "ProxySQL password for scraping metrics.", - "type": "string", - "x-order": 3 + "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": 0 + "x-order": 1 }, - "push_metrics": { - "description": "Enables push metrics mode for exporter.", + "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": 8 + "x-order": 9 }, "service_id": { "description": "Service identifier.", "type": "string", - "x-order": 1 + "x-order": 3 }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 7 + "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": 4 + "x-order": 5 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 5 + "x-order": 6 }, "username": { - "description": "ProxySQL username for scraping metrics.", + "description": "PostgreSQL username for getting pg stat monitor data.", "type": "string", - "x-order": 2 + "x-order": 4 } }, - "x-order": 5 + "x-order": 13 }, - "qan_mongodb_profiler_agent": { + "rds_exporter": { + "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", "type": "object", "properties": { - "authentication_database": { - "description": "Authentication database.", + "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": 13 }, - "authentication_mechanism": { - "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", + "aws_access_key": { + "description": "AWS Access Key.", "type": "string", - "x-order": 12 + "x-order": 4 + }, + "basic_metrics_disabled": { + "description": "Basic metrics are disabled.", + "type": "boolean", + "x-order": 8 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -5583,7 +6192,23 @@ "additionalProperties": { "type": "string" }, - "x-order": 10 + "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", @@ -5598,87 +6223,143 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 14 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 9 + "x-order": 12 }, - "password": { - "description": "MongoDB password for getting profile data.", + "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": 0 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", "x-order": 1 }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", "x-order": 11 }, - "tls": { - "description": "Use TLS for database connections.", + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", "type": "boolean", - "x-order": 4 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 8 + "x-order": 10 }, - "tls_certificate_key": { - "description": "Client certificate and key.", + "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": 7 + } + } + } + }, + "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 + } }, - "tls_certificate_key_file_password": { - "description": "Password for decrypting tls_certificate_key.", + "additionalProperties": false + }, + "x-order": 2 + }, + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + } + }, + "/v1/inventory/agents/{agent_id}": { + "get": { + "description": "Returns a single Agent by ID.", + "tags": [ + "AgentsService" + ], + "summary": "Get Agent", + "operationId": "GetAgent", + "parameters": [ + { + "type": "string", + "description": "Unique randomly generated instance identifier.", + "name": "agent_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "azure_database_exporter": { + "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 7 + "x-order": 0 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", + "azure_database_resource_type": { + "type": "string", + "title": "Azure database resource type (mysql, maria, postgres)", "x-order": 5 }, - "username": { - "description": "MongoDB username for getting profile data.", + "azure_database_subscription_id": { + "description": "Azure database subscription ID.", "type": "string", - "x-order": 2 - } - }, - "x-order": 11 - }, - "qan_mysql_perfschema_agent": { - "type": "object", - "properties": { + "x-order": 4 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 11 + "x-order": 6 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", - "x-order": 13 + "x-order": 2 }, - "disable_query_examples": { - "description": "Disable query examples.", - "type": "boolean", - "x-order": 10 + "listen_port": { + "description": "Listen port for scraping metrics (the same for several configurations).", + "type": "integer", + "format": "int64", + "x-order": 8 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -5693,87 +6374,163 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 14 - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "title": "Limit query length in QAN (default: server-defined; -1: no limit)", - "x-order": 9 + "x-order": 11 }, - "password": { - "description": "MySQL password for getting performance data.", + "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": 0 + "x-order": 1 }, - "service_id": { - "description": "Service identifier.", + "process_exec_path": { + "description": "Path to exec process.", "type": "string", - "x-order": 1 + "x-order": 10 }, - "skip_connection_check": { - "description": "Skip connection check.", + "push_metrics_enabled": { + "description": "True if the exporter operates in push metrics mode.", "type": "boolean", - "x-order": 12 + "x-order": 9 }, - "tls": { - "description": "Use TLS for database connections.", + "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": 7 + } + }, + "x-order": 14 + }, + "external_exporter": { + "description": "ExternalExporter runs on any Node type, including Remote Node.", + "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": 7 + }, + "disabled": { + "description": "If disabled, metrics from this exporter will not be collected.", "type": "boolean", - "x-order": 4 + "x-order": 2 }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 8 + }, + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI.", "type": "string", "x-order": 6 }, - "tls_cert": { - "description": "Client certificate.", + "process_exec_path": { + "description": "Path to exec process.", "type": "string", - "x-order": 7 + "x-order": 10 }, - "tls_key": { - "description": "Password for decrypting tls_cert.", + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 9 + }, + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", "type": "string", - "x-order": 8 + "x-order": 1 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", + "scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints.", + "type": "string", "x-order": 5 }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, "username": { - "description": "MySQL username for getting performance data.", + "description": "HTTP basic auth username for collecting metrics.", "type": "string", - "x-order": 2 + "x-order": 4 } }, - "x-order": 9 + "x-order": 12 }, - "qan_mysql_slowlog_agent": { + "mongodb_exporter": { + "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", "type": "object", "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "collections_limit": { + "type": "integer", + "format": "int32", + "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", + "x-order": 13 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 12 + "x-order": 7 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", + "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 + }, + "enable_all_collectors": { + "description": "Enable All collectors.", "type": "boolean", "x-order": 14 }, - "disable_query_examples": { - "description": "Disable query examples.", + "expose_exporter": { "type": "boolean", - "x-order": 10 + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 17 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -5788,88 +6545,109 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 15 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 9 + "x-order": 16 }, - "max_slowlog_file_size": { - "description": "Rotate slowlog file at this size if \u003e 0.\nUse zero or negative value to disable rotation.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "format": "int64", - "x-order": 11 + "x-order": 1 }, - "password": { - "description": "MySQL password for getting slowlog data.", + "process_exec_path": { + "description": "Path to exec process.", "type": "string", - "x-order": 3 + "x-order": 15 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 0 + "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": 1 + "x-order": 3 }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 13 + "stats_collections": { + "type": "array", + "title": "List of colletions to get stats from. Can use *", + "items": { + "type": "string" + }, + "x-order": 12 + }, + "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": 4 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 6 - }, - "tls_cert": { - "description": "Client certificate.", - "type": "string", - "x-order": 7 - }, - "tls_key": { - "description": "Password for decrypting tls_cert.", - "type": "string", - "x-order": 8 + "x-order": 5 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 5 + "x-order": 6 }, "username": { - "description": "MySQL username for getting slowlog data.", + "description": "MongoDB username for scraping metrics.", "type": "string", - "x-order": 2 + "x-order": 4 } }, - "x-order": 10 + "x-order": 4 }, - "qan_postgresql_pgstatements_agent": { + "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": 6 + "x-order": 11 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", - "x-order": 8 + "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", @@ -5884,86 +6662,132 @@ "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": 9 - }, - "password": { - "description": "PostgreSQL password for getting pg stat statements data.", - "type": "string", - "x-order": 3 + "x-order": 19 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 0 + "x-order": 1 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 18 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 12 }, "service_id": { "description": "Service identifier.", "type": "string", - "x-order": 1 + "x-order": 3 }, - "skip_connection_check": { - "description": "Skip connection check.", + "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": 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": 7 + "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", - "x-order": 4 + "x-order": 5 }, "tls_ca": { - "description": "TLS CA certificate.", + "description": "Certificate Authority certificate chain.", "type": "string", - "x-order": 10 + "x-order": 7 }, "tls_cert": { - "description": "TLS Certifcate.", + "description": "Client certificate.", "type": "string", - "x-order": 11 + "x-order": 8 }, "tls_key": { - "description": "TLS Certificate Key.", + "description": "Password for decrypting tls_cert.", "type": "string", - "x-order": 12 + "x-order": 9 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 5 + "x-order": 6 }, "username": { - "description": "PostgreSQL username for getting pg stat statements data.", + "description": "MySQL username for scraping metrics.", "type": "string", - "x-order": 2 + "x-order": 4 } }, - "x-order": 12 + "x-order": 3 }, - "qan_postgresql_pgstatmonitor_agent": { + "node_exporter": { + "description": "NodeExporter runs on Generic or Container Node and exposes its 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": 8 + "x-order": 3 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", - "x-order": 10 + "x-order": 2 }, - "disable_query_examples": { - "description": "Disable query examples.", + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 5 + }, + "expose_exporter": { "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 10 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", "x-order": 7 }, "log_level": { @@ -5979,79 +6803,90 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 14 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 6 - }, - "password": { - "description": "PostgreSQL password for getting pg stat monitor data.", - "type": "string", - "x-order": 3 + "x-order": 9 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 0 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", "x-order": 1 }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 9 + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 8 }, - "tls": { - "description": "Use TLS for database connections.", + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", "type": "boolean", "x-order": 4 }, - "tls_ca": { - "description": "TLS CA certificate.", - "type": "string", - "x-order": 11 - }, - "tls_cert": { - "description": "TLS Certifcate.", + "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": 12 - }, - "tls_key": { - "description": "TLS Certificate Key.", + "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": 2 + }, + "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": 13 + "x-order": 0 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", + "connected": { + "description": "True if Agent is running and connected to pmm-managed.", "type": "boolean", - "x-order": 5 + "x-order": 3 }, - "username": { - "description": "PostgreSQL username for getting pg stat monitor data.", - "type": "string", + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, "x-order": 2 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 4 + }, + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 1 } }, - "x-order": 13 + "x-order": 0 }, - "rds_exporter": { + "postgres_exporter": { + "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", "type": "object", "properties": { - "aws_access_key": { - "description": "AWS Access Key.", + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 2 + "x-order": 0 }, - "aws_secret_key": { - "description": "AWS Secret Key.", - "type": "string", - "x-order": 3 + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 14 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -6059,17 +6894,31 @@ "additionalProperties": { "type": "string" }, - "x-order": 4 + "x-order": 7 }, - "disable_basic_metrics": { - "description": "Disable basic metrics.", + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", - "x-order": 6 + "x-order": 2 }, - "disable_enhanced_metrics": { - "description": "Disable enhanced metrics.", + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "expose_exporter": { "type": "boolean", - "x-order": 7 + "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": 11 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -6084,43 +6933,69 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 9 + "x-order": 13 }, - "node_id": { - "description": "Node identifier.", - "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 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 0 + "x-order": 1 }, - "push_metrics": { - "description": "Enables push metrics mode for exporter.", + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 12 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", "type": "boolean", "x-order": 8 }, - "skip_connection_check": { - "description": "Skip connection check.", + "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": 5 + "x-order": 6 + }, + "username": { + "description": "PostgreSQL username for scraping metrics.", + "type": "string", + "x-order": 4 } }, - "x-order": 7 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "azure_database_exporter": { - "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics.", + "x-order": 5 + }, + "proxysql_exporter": { + "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", "type": "object", "properties": { "agent_id": { @@ -6128,34 +7003,37 @@ "type": "string", "x-order": 0 }, - "azure_database_resource_type": { - "type": "string", - "title": "Azure database resource type (mysql, maria, postgres)", - "x-order": 5 - }, - "azure_database_subscription_id": { - "description": "Azure database subscription ID.", - "type": "string", - "x-order": 4 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 6 + "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 + }, "listen_port": { - "description": "Listen port for scraping metrics (the same for several configurations).", + "description": "Listen port for scraping metrics.", "type": "integer", "format": "int64", - "x-order": 8 + "x-order": 11 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -6170,12 +7048,7 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 11 - }, - "node_id": { - "description": "Node identifier.", - "type": "string", - "x-order": 3 + "x-order": 13 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", @@ -6185,12 +7058,17 @@ "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 10 + "x-order": 12 }, "push_metrics_enabled": { - "description": "True if the exporter operates in push metrics mode.", + "description": "True if exporter uses push metrics mode.", "type": "boolean", - "x-order": 9 + "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.", @@ -6205,13 +7083,28 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 7 + "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.", + "type": "boolean", + "x-order": 6 + }, + "username": { + "description": "ProxySQL username for scraping metrics.", + "type": "string", + "x-order": 4 } }, - "x-order": 8 + "x-order": 6 }, - "external_exporter": { - "description": "ExternalExporter runs on any Node type, including Remote Node.", + "qan_mongodb_profiler_agent": { + "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -6225,59 +7118,84 @@ "additionalProperties": { "type": "string" }, - "x-order": 7 + "x-order": 8 }, "disabled": { - "description": "If disabled, metrics from this exporter will not be collected.", + "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", "x-order": 2 }, - "listen_port": { - "description": "Listen port for scraping metrics.", + "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": 11 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", - "format": "int64", - "x-order": 8 + "format": "int32", + "x-order": 7 }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 6 + "x-order": 1 }, "process_exec_path": { "description": "Path to exec process.", "type": "string", "x-order": 10 }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 9 - }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", + "service_id": { + "description": "Service identifier.", "type": "string", - "x-order": 1 + "x-order": 3 }, - "scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints.", + "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": 9 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", "x-order": 5 }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 }, "username": { - "description": "HTTP basic auth username for collecting metrics.", + "description": "MongoDB username for getting profiler data.", "type": "string", "x-order": 4 } }, - "x-order": 6 + "x-order": 9 }, - "mongodb_exporter": { - "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", + "qan_mysql_perfschema_agent": { + "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -6285,49 +7203,24 @@ "type": "string", "x-order": 0 }, - "collections_limit": { - "type": "integer", - "format": "int32", - "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", - "x-order": 13 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 7 + "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": 9 - }, - "enable_all_collectors": { - "description": "Enable All collectors.", - "type": "boolean", - "x-order": 14 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 17 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 - }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", @@ -6343,6 +7236,12 @@ ], "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", @@ -6353,24 +7252,16 @@ "type": "string", "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": 8 + "x-order": 12 }, "service_id": { "description": "Service identifier.", "type": "string", "x-order": 3 }, - "stats_collections": { - "type": "array", - "title": "List of colletions to get stats from. Can use *", - "items": { - "type": "string" - }, - "x-order": 12 - }, "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", @@ -6384,28 +7275,43 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 10 + "x-order": 14 }, "tls": { "description": "Use TLS for database connections.", "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": "MongoDB username for scraping metrics.", + "description": "MySQL username for getting performance data.", "type": "string", "x-order": 4 } }, - "x-order": 3 + "x-order": 7 }, - "mysqld_exporter": { - "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", + "qan_mysql_slowlog_agent": { + "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -6419,32 +7325,18 @@ "additionalProperties": { "type": "string" }, - "x-order": 11 + "x-order": 14 + }, + "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", @@ -6458,7 +7350,19 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 19 + "x-order": 17 + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "title": "Limit query length in QAN (default: server-defined; -1: no limit)", + "x-order": 11 + }, + "max_slowlog_file_size": { + "description": "Slowlog file is rotated at this size if \u003e 0.", + "type": "string", + "format": "int64", + "x-order": 13 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", @@ -6466,12 +7370,12 @@ "x-order": 1 }, "process_exec_path": { - "description": "Path to exec process.", "type": "string", - "x-order": 18 + "title": "mod tidy", + "x-order": 16 }, - "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 }, @@ -6495,23 +7399,6 @@ ], "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", @@ -6538,15 +7425,15 @@ "x-order": 6 }, "username": { - "description": "MySQL username for scraping metrics.", + "description": "MySQL username for getting performance data.", "type": "string", "x-order": 4 } }, - "x-order": 2 + "x-order": 8 }, - "node_exporter": { - "description": "NodeExporter runs on Generic or Container Node and exposes its metrics.", + "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": { @@ -6560,31 +7447,17 @@ "additionalProperties": { "type": "string" }, - "x-order": 3 + "x-order": 9 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", "type": "boolean", - "x-order": 2 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, "x-order": 5 }, - "expose_exporter": { + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 10 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 7 + "x-order": 2 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -6599,7 +7472,13 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 9 + "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.", @@ -6609,12 +7488,12 @@ "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 8 + "x-order": 11 }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 4 + "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.", @@ -6629,48 +7508,28 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 6 - } - }, - "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 + "x-order": 10 }, - "connected": { - "description": "True if Agent is running and connected to pmm-managed.", + "tls": { + "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 3 + "x-order": 7 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 2 + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 8 }, - "process_exec_path": { - "description": "Path to exec process.", + "username": { + "description": "PostgreSQL username for getting pg stat statements data.", "type": "string", "x-order": 4 - }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 1 } }, - "x-order": 0 + "x-order": 10 }, - "postgres_exporter": { - "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", + "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": { @@ -6678,18 +7537,17 @@ "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": 10 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", "x-order": 7 }, "disabled": { @@ -6697,25 +7555,6 @@ "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": 15 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 - }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", @@ -6731,11 +7570,11 @@ ], "x-order": 13 }, - "max_exporter_connections": { - "description": "Maximum number of connections that exporter can open to the database instance.", + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 16 + "x-order": 8 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", @@ -6747,10 +7586,10 @@ "type": "string", "x-order": 12 }, - "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": 8 + "x-order": 9 }, "service_id": { "description": "Service identifier.", @@ -6770,7 +7609,7 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 10 + "x-order": 11 }, "tls": { "description": "Use TLS for database connections.", @@ -6778,20 +7617,20 @@ "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": "PostgreSQL username for getting pg stat monitor data.", "type": "string", "x-order": 4 } }, - "x-order": 4 + "x-order": 11 }, - "proxysql_exporter": { - "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", + "rds_exporter": { + "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", "type": "object", "properties": { "agent_id": { @@ -6799,37 +7638,45 @@ "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.", + "type": "boolean", + "x-order": 8 + }, "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": 14 + "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", @@ -6844,7 +7691,12 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 13 + "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.", @@ -6854,17 +7706,12 @@ "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 12 + "x-order": 11 }, "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 + "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.", @@ -6879,28 +7726,13 @@ "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.", - "type": "boolean", "x-order": 6 - }, - "username": { - "description": "ProxySQL username for scraping metrics.", - "type": "string", - "x-order": 4 } }, - "x-order": 5 + "x-order": 13 }, - "qan_mongodb_profiler_agent": { - "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "vmagent": { + "description": "VMAgent runs on Generic or Container Node alongside pmm-agent.\nIt scrapes other exporter Agents that are configured with push_metrics_enabled\nand uses Prometheus remote write protocol to push metrics to PMM Server.", "type": "object", "properties": { "agent_id": { @@ -6908,39 +7740,11 @@ "type": "string", "x-order": 0 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 8 - }, - "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": 11 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "listen_port": { + "description": "Listen port for scraping metrics.", "type": "integer", - "format": "int32", - "x-order": 7 + "format": "int64", + "x-order": 4 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", @@ -6950,11 +7754,6 @@ "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 10 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", "x-order": 3 }, "status": { @@ -6970,616 +7769,500 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 9 + "x-order": 2 + } + }, + "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 + } }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 + "additionalProperties": false + }, + "x-order": 2 + }, + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + }, + "put": { + "description": "Updates an Agent in Inventory. Only one agent at a time can be passed.", + "tags": [ + "AgentsService" + ], + "summary": "Update an Agent in Inventory", + "operationId": "ChangeAgent", + "parameters": [ + { + "type": "string", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "azure_database_exporter": { + "type": "object", + "properties": { + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, + "x-order": 1 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", "type": "boolean", - "x-order": 6 + "x-nullable": true, + "x-order": 0 }, - "username": { - "description": "MongoDB username for getting profiler data.", - "type": "string", - "x-order": 4 + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", + "type": "boolean", + "x-nullable": true, + "x-order": 2 } }, - "x-order": 11 + "x-order": 7 }, - "qan_mysql_perfschema_agent": { - "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "external_exporter": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, "custom_labels": { - "description": "Custom user-assigned labels.", + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", "type": "object", - "additionalProperties": { - "type": "string" + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } }, - "x-order": 13 + "x-nullable": true, + "x-order": 1 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", "type": "boolean", - "x-order": 10 + "x-nullable": true, + "x-order": 0 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", "type": "boolean", + "x-nullable": true, "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": 5 + }, + "mongodb_exporter": { + "type": "object", + "properties": { + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, "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.", + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", "type": "boolean", - "x-order": 12 - }, - "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": 14 + "x-nullable": true, + "x-order": 0 }, - "tls": { - "description": "Use TLS for database connections.", + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", "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 + "x-nullable": true, + "x-order": 2 + } + }, + "x-order": 2 + }, + "mysqld_exporter": { + "type": "object", + "properties": { + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, + "x-order": 1 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", "type": "boolean", - "x-order": 6 + "x-nullable": true, + "x-order": 0 }, - "username": { - "description": "MySQL username for getting performance data.", - "type": "string", - "x-order": 4 + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", + "type": "boolean", + "x-nullable": true, + "x-order": 2 } }, - "x-order": 9 + "x-order": 1 }, - "qan_mysql_slowlog_agent": { - "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "node_exporter": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, "custom_labels": { - "description": "Custom user-assigned labels.", + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", "type": "object", - "additionalProperties": { - "type": "string" + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } }, - "x-order": 14 + "x-nullable": true, + "x-order": 1 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", "type": "boolean", - "x-order": 10 + "x-nullable": true, + "x-order": 0 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", "type": "boolean", + "x-nullable": true, "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": 17 - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "title": "Limit query length in QAN (default: server-defined; -1: no limit)", - "x-order": 11 - }, - "max_slowlog_file_size": { - "description": "Slowlog file is rotated at this size if \u003e 0.", - "type": "string", - "format": "int64", - "x-order": 13 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", + } + }, + "x-order": 0 + }, + "postgres_exporter": { + "type": "object", + "properties": { + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, "x-order": 1 }, - "process_exec_path": { - "type": "string", - "title": "mod tidy", - "x-order": 16 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", "type": "boolean", - "x-order": 12 - }, - "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": 15 + "x-nullable": true, + "x-order": 0 }, - "tls": { - "description": "Use TLS for database connections.", + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", "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 + "x-nullable": true, + "x-order": 2 + } + }, + "x-order": 3 + }, + "proxysql_exporter": { + "type": "object", + "properties": { + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, + "x-order": 1 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", "type": "boolean", - "x-order": 6 + "x-nullable": true, + "x-order": 0 }, - "username": { - "description": "MySQL username for getting performance data.", - "type": "string", - "x-order": 4 + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", + "type": "boolean", + "x-nullable": true, + "x-order": 2 } }, - "x-order": 10 + "x-order": 4 }, - "qan_postgresql_pgstatements_agent": { - "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "qan_mongodb_profiler_agent": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, "custom_labels": { - "description": "Custom user-assigned labels.", + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", "type": "object", - "additionalProperties": { - "type": "string" + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } }, - "x-order": 9 + "x-nullable": true, + "x-order": 1 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", "type": "boolean", - "x-order": 5 + "x-nullable": true, + "x-order": 0 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", "type": "boolean", + "x-nullable": true, "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": 10 + }, + "qan_mysql_perfschema_agent": { + "type": "object", + "properties": { + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, "x-order": 1 }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 11 - }, - "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.", + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", "type": "boolean", - "x-order": 7 + "x-nullable": true, + "x-order": 0 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", "type": "boolean", - "x-order": 8 - }, - "username": { - "description": "PostgreSQL username for getting pg stat statements data.", - "type": "string", - "x-order": 4 + "x-nullable": true, + "x-order": 2 } }, - "x-order": 12 + "x-order": 8 }, - "qan_postgresql_pgstatmonitor_agent": { - "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "qan_mysql_slowlog_agent": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, "custom_labels": { - "description": "Custom user-assigned labels.", + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", "type": "object", - "additionalProperties": { - "type": "string" + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } }, - "x-order": 10 + "x-nullable": true, + "x-order": 1 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", "type": "boolean", - "x-order": 7 + "x-nullable": true, + "x-order": 0 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", "type": "boolean", + "x-nullable": true, "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": 9 + }, + "qan_postgresql_pgstatements_agent": { + "type": "object", + "properties": { + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, "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.", + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", "type": "boolean", - "x-order": 5 + "x-nullable": true, + "x-order": 0 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", "type": "boolean", - "x-order": 6 - }, - "username": { - "description": "PostgreSQL username for getting pg stat monitor data.", - "type": "string", - "x-order": 4 + "x-nullable": true, + "x-order": 2 } }, - "x-order": 13 + "x-order": 11 }, - "rds_exporter": { - "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", + "qan_postgresql_pgstatmonitor_agent": { "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": 13 - }, - "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": { - "description": "Custom user-assigned labels.", + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", "type": "object", - "additionalProperties": { - "type": "string" + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } }, - "x-order": 5 + "x-nullable": true, + "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", "type": "boolean", - "x-order": 2 + "x-nullable": true, + "x-order": 0 }, - "enhanced_metrics_disabled": { - "description": "Enhanced metrics are disabled.", + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", "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-nullable": true, + "x-order": 2 + } + }, + "x-order": 12 + }, + "rds_exporter": { + "type": "object", + "properties": { + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, "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.", + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", "type": "boolean", - "x-order": 10 + "x-nullable": true, + "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.", - "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 + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", + "type": "boolean", + "x-nullable": true, + "x-order": 2 } }, - "x-order": 7 - } - } - } - }, - "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 + "x-order": 6 } } } } - } - } - }, - "/v1/inventory/agents/{agent_id}": { - "get": { - "description": "Returns a single Agent by ID.", - "tags": [ - "AgentsService" - ], - "summary": "Get Agent", - "operationId": "GetAgent", - "parameters": [ - { - "type": "string", - "description": "Unique randomly generated instance identifier.", - "name": "agent_id", - "in": "path", - "required": true - } ], "responses": { "200": { @@ -7676,7 +8359,7 @@ "x-order": 7 } }, - "x-order": 14 + "x-order": 7 }, "external_exporter": { "description": "ExternalExporter runs on any Node type, including Remote Node.", @@ -7742,7 +8425,7 @@ "x-order": 4 } }, - "x-order": 12 + "x-order": 5 }, "mongodb_exporter": { "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", @@ -7870,7 +8553,7 @@ "x-order": 4 } }, - "x-order": 4 + "x-order": 2 }, "mysqld_exporter": { "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", @@ -8011,7 +8694,7 @@ "x-order": 4 } }, - "x-order": 3 + "x-order": 1 }, "node_exporter": { "description": "NodeExporter runs on Generic or Container Node and exposes its metrics.", @@ -8088,51 +8771,16 @@ "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": 2 - }, - "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 - }, - "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": 2 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 4 - }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 1 + "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": 0 @@ -8256,7 +8904,7 @@ "x-order": 4 } }, - "x-order": 5 + "x-order": 3 }, "proxysql_exporter": { "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", @@ -8365,7 +9013,7 @@ "x-order": 4 } }, - "x-order": 6 + "x-order": 4 }, "qan_mongodb_profiler_agent": { "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", @@ -8456,7 +9104,7 @@ "x-order": 4 } }, - "x-order": 9 + "x-order": 10 }, "qan_mysql_perfschema_agent": { "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", @@ -8572,7 +9220,7 @@ "x-order": 4 } }, - "x-order": 7 + "x-order": 8 }, "qan_mysql_slowlog_agent": { "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", @@ -8694,7 +9342,7 @@ "x-order": 4 } }, - "x-order": 8 + "x-order": 9 }, "qan_postgresql_pgstatements_agent": { "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", @@ -8790,7 +9438,7 @@ "x-order": 4 } }, - "x-order": 10 + "x-order": 11 }, "qan_postgresql_pgstatmonitor_agent": { "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", @@ -8891,7 +9539,7 @@ "x-order": 4 } }, - "x-order": 11 + "x-order": 12 }, "rds_exporter": { "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", @@ -8993,50 +9641,7 @@ "x-order": 6 } }, - "x-order": 13 - }, - "vmagent": { - "description": "VMAgent runs on Generic or Container Node alongside pmm-agent.\nIt scrapes other exporter Agents that are configured with push_metrics_enabled\nand uses Prometheus remote write protocol to push metrics to PMM Server.", - "type": "object", - "properties": { - "agent_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": 4 - }, - "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": 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": 2 - } - }, - "x-order": 1 + "x-order": 6 } } } @@ -9074,13 +9679,13 @@ } } }, - "put": { - "description": "Updates an Agent in Inventory. Only one agent at a time can be passed.", + "delete": { + "description": "Removes an Agent from Inventory.", "tags": [ "AgentsService" ], - "summary": "Update an Agent in Inventory", - "operationId": "ChangeAgent", + "summary": "Remove an Agent from Inventory", + "operationId": "RemoveAgent", "parameters": [ { "type": "string", @@ -9089,744 +9694,501 @@ "required": true }, { - "name": "body", - "in": "body", - "required": true, + "type": "boolean", + "description": "Remove agent with all dependencies.", + "name": "force", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", "schema": { "type": "object", "properties": { - "azure_database_exporter": { - "type": "object", - "properties": { - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } - }, - "x-nullable": true, - "x-order": 1 - }, - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 - } - }, - "x-order": 7 - }, - "external_exporter": { - "type": "object", - "properties": { - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } - }, - "x-nullable": true, - "x-order": 1 - }, - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 - } - }, - "x-order": 5 + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 }, - "mongodb_exporter": { - "type": "object", - "properties": { - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } - }, - "x-nullable": true, - "x-order": 1 - }, - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 - } + "additionalProperties": false }, "x-order": 2 }, - "mysqld_exporter": { - "type": "object", - "properties": { - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } - }, - "x-nullable": true, - "x-order": 1 - }, - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 - } - }, + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + } + }, + "/v1/inventory/agents/{agent_id}/logs": { + "get": { + "description": "Returns Agent logs by ID.", + "tags": [ + "AgentsService" + ], + "summary": "Get Agent logs", + "operationId": "GetAgentLogs", + "parameters": [ + { + "type": "string", + "description": "Unique randomly generated instance identifier.", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "Limit the number of log lines to this value. Pass 0 for no limit.", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "agent_config_log_lines_count": { + "type": "integer", + "format": "int64", "x-order": 1 }, - "node_exporter": { - "type": "object", - "properties": { - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } - }, - "x-nullable": true, - "x-order": 1 - }, - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 - } + "logs": { + "type": "array", + "items": { + "type": "string" }, "x-order": 0 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 }, - "postgres_exporter": { - "type": "object", - "properties": { - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } - }, - "x-nullable": true, - "x-order": 1 - }, - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 - } + "additionalProperties": false }, - "x-order": 3 + "x-order": 2 }, - "proxysql_exporter": { - "type": "object", - "properties": { - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + } + }, + "/v1/inventory/nodes": { + "get": { + "description": "Returns a list of all Nodes.", + "tags": [ + "NodesService" + ], + "summary": "List Nodes", + "operationId": "ListNodes", + "parameters": [ + { + "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" + ], + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "description": "Return only Nodes with matching Node type.", + "name": "node_type", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "container": { + "type": "array", + "items": { + "description": "ContainerNode represents a Docker container.", + "type": "object", + "properties": { + "address": { + "description": "Node address (DNS name or IP).", + "type": "string", + "x-order": 2 }, - "x-nullable": true, - "x-order": 1 - }, - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 - } - }, - "x-order": 4 - }, - "qan_mongodb_profiler_agent": { - "type": "object", - "properties": { - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 8 }, - "x-nullable": true, - "x-order": 1 - }, - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 - } - }, - "x-order": 10 - }, - "qan_mysql_perfschema_agent": { - "type": "object", - "properties": { - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 4 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 5 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "machine_id": { + "description": "Linux machine-id of the Generic Node where this Container Node runs.", + "type": "string", + "x-order": 3 + }, + "node_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "x-nullable": true, - "x-order": 1 - }, - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "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 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 7 + } } }, - "x-order": 8 + "x-order": 1 }, - "qan_mysql_slowlog_agent": { - "type": "object", - "properties": { - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } + "generic": { + "type": "array", + "items": { + "description": "GenericNode represents a bare metal server or virtual machine.", + "type": "object", + "properties": { + "address": { + "description": "Node address (DNS name or IP).", + "type": "string", + "x-order": 2 }, - "x-nullable": true, - "x-order": 1 - }, - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 4 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 3 + }, + "node_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 5 + }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 6 + } } }, - "x-order": 9 + "x-order": 0 }, - "qan_postgresql_pgstatements_agent": { - "type": "object", - "properties": { - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } + "remote": { + "type": "array", + "items": { + "description": "RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes.", + "type": "object", + "properties": { + "address": { + "description": "Node address (DNS name or IP).", + "type": "string", + "x-order": 2 }, - "x-nullable": true, - "x-order": 1 - }, - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "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": 11 + "x-order": 2 }, - "qan_postgresql_pgstatmonitor_agent": { - "type": "object", - "properties": { - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } + "remote_azure_database": { + "type": "array", + "items": { + "description": "RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes.", + "type": "object", + "properties": { + "address": { + "description": "DB instance identifier.", + "type": "string", + "x-order": 2 }, - "x-nullable": true, - "x-order": 1 - }, - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "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": 12 + "x-order": 4 }, - "rds_exporter": { - "type": "object", - "properties": { - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } + "remote_rds": { + "type": "array", + "items": { + "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", + "type": "object", + "properties": { + "address": { + "description": "DB instance identifier.", + "type": "string", + "x-order": 2 }, - "x-nullable": true, - "x-order": 1 - }, - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "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": 6 + "x-order": 3 } } } - } - ], - "responses": { - "200": { - "description": "A successful response.", + }, + "default": { + "description": "An unexpected error response.", "schema": { "type": "object", "properties": { - "azure_database_exporter": { - "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "azure_database_resource_type": { - "type": "string", - "title": "Azure database resource type (mysql, maria, postgres)", - "x-order": 5 - }, - "azure_database_subscription_id": { - "description": "Azure database subscription ID.", - "type": "string", - "x-order": 4 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "listen_port": { - "description": "Listen port for scraping metrics (the same for several configurations).", - "type": "integer", - "format": "int64", - "x-order": 8 - }, - "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": 11 - }, - "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": 10 - }, - "push_metrics_enabled": { - "description": "True if the exporter operates in push metrics mode.", - "type": "boolean", - "x-order": 9 - }, - "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": 7 - } - }, - "x-order": 7 + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 }, - "external_exporter": { - "description": "ExternalExporter runs on any Node type, including Remote Node.", - "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": 7 - }, - "disabled": { - "description": "If disabled, metrics from this exporter will not be collected.", - "type": "boolean", - "x-order": 2 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 8 - }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI.", - "type": "string", - "x-order": 6 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 10 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 9 - }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 1 - }, - "scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints.", - "type": "string", - "x-order": 5 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } }, - "username": { - "description": "HTTP basic auth username for collecting metrics.", - "type": "string", - "x-order": 4 - } + "additionalProperties": false }, - "x-order": 5 + "x-order": 2 }, - "mongodb_exporter": { - "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + }, + "post": { + "description": "Adds a Node.", + "tags": [ + "NodesService" + ], + "summary": "Add a Node", + "operationId": "AddNode", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "container": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "collections_limit": { - "type": "integer", - "format": "int32", - "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", - "x-order": 13 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "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 - }, - "enable_all_collectors": { - "description": "Enable All collectors.", - "type": "boolean", - "x-order": 14 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 17 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 - }, - "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 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "address": { + "description": "Node address (DNS name or IP).", "type": "string", "x-order": 1 }, - "process_exec_path": { - "description": "Path to exec process.", + "az": { + "description": "Node availability zone.", "type": "string", - "x-order": 15 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 8 + "x-order": 7 }, - "service_id": { - "description": "Service identifier.", + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", "type": "string", "x-order": 3 }, - "stats_collections": { - "type": "array", - "title": "List of colletions to get stats from. Can use *", - "items": { - "type": "string" - }, - "x-order": 12 - }, - "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.", - "type": "boolean", - "x-order": 6 - }, - "username": { - "description": "MongoDB username for scraping metrics.", + "container_name": { + "description": "Container name.", "type": "string", "x-order": 4 - } - }, - "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.", @@ -9834,140 +10196,43 @@ "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", - "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": 19 - }, - "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": 18 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 12 - }, - "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": 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", - "x-order": 5 + "x-order": 8 }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", + "machine_id": { + "description": "Linux machine-id of the Generic Node where this Container Node runs.", "type": "string", - "x-order": 7 + "x-order": 2 }, - "tls_cert": { - "description": "Client certificate.", + "node_model": { + "description": "Node model.", "type": "string", - "x-order": 8 + "x-order": 5 }, - "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": 0 }, - "username": { - "description": "MySQL username for scraping metrics.", + "region": { + "description": "Node region.", "type": "string", - "x-order": 4 + "x-order": 6 } }, "x-order": 1 }, - "node_exporter": { - "description": "NodeExporter runs on Generic or Container Node and exposes its metrics.", + "generic": { "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": 1 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 6 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -9975,94 +10240,48 @@ "additionalProperties": { "type": "string" }, - "x-order": 3 - }, - "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": 5 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 10 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", "x-order": 7 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "distro": { + "description": "Linux distribution name and version.", "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": 9 + "x-order": 3 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "machine_id": { + "description": "Linux machine-id.", "type": "string", - "x-order": 1 + "x-order": 2 }, - "process_exec_path": { - "description": "Path to exec process.", + "node_model": { + "description": "Node model.", "type": "string", - "x-order": 8 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", "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.", + "node_name": { + "description": "Unique across all Nodes 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": 6 + "x-order": 0 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 5 } }, "x-order": 0 }, - "postgres_exporter": { - "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", + "remote": { "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": 1 }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 14 + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 4 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -10070,114 +10289,77 @@ "additionalProperties": { "type": "string" }, - "x-order": 7 + "x-order": 5 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "node_model": { + "description": "Node model.", + "type": "string", "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": 15 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "node_name": { + "description": "Unique across all Nodes user-defined 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": 13 - }, - "max_exporter_connections": { - "description": "Maximum number of connections that exporter can open to the database instance.", - "type": "integer", - "format": "int32", - "x-order": 16 + "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "region": { + "description": "Node region.", + "type": "string", + "x-order": 3 + } + }, + "x-order": 2 + }, + "remote_azure": { + "type": "object", + "properties": { + "address": { + "description": "DB instance identifier.", "type": "string", "x-order": 1 }, - "process_exec_path": { - "description": "Path to exec process.", + "az": { + "description": "Node availability zone.", "type": "string", - "x-order": 12 + "x-order": 4 }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 8 + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 5 }, - "service_id": { - "description": "Service identifier.", + "node_model": { + "description": "Node model.", "type": "string", - "x-order": 3 + "x-order": 2 }, - "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_name": { + "description": "Unique across all Nodes 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": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", - "type": "boolean", - "x-order": 6 + "x-order": 0 }, - "username": { - "description": "PostgreSQL username for scraping metrics.", + "region": { + "description": "Node region.", "type": "string", - "x-order": 4 + "x-order": 3 } }, - "x-order": 3 + "x-order": 4 }, - "proxysql_exporter": { - "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", + "remote_rds": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", + "address": { + "description": "DB instance identifier.", "type": "string", - "x-order": 0 + "x-order": 1 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 4 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -10185,108 +10367,109 @@ "additionalProperties": { "type": "string" }, - "x-order": 7 + "x-order": 5 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "node_model": { + "description": "Node model.", + "type": "string", "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 + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 0 }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 + "region": { + "description": "Node region.", + "type": "string", + "x-order": 3 + } + }, + "x-order": 3 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "container": { + "description": "ContainerNode represents a Docker container.", + "type": "object", + "properties": { + "address": { + "description": "Node address (DNS name or IP).", + "type": "string", + "x-order": 2 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "az": { + "description": "Node availability zone.", "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 + "x-order": 8 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", "type": "string", - "x-order": 1 + "x-order": 4 }, - "process_exec_path": { - "description": "Path to exec process.", + "container_name": { + "description": "Container name.", "type": "string", - "x-order": 12 + "x-order": 5 }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 8 + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "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.", + "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 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 + "x-order": 0 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", + "node_model": { + "description": "Node model.", + "type": "string", "x-order": 6 }, - "username": { - "description": "ProxySQL username for scraping metrics.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", - "x-order": 4 + "x-order": 1 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 7 } }, - "x-order": 4 + "x-order": 1 }, - "qan_mongodb_profiler_agent": { - "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "generic": { + "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.", @@ -10296,88 +10479,52 @@ }, "x-order": 8 }, - "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": 11 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 7 - }, - "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.", + "distro": { + "description": "Linux distribution name and version.", "type": "string", - "x-order": 10 + "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": 9 + "x-order": 0 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", + "node_model": { + "description": "Node model.", + "type": "string", "x-order": 5 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 }, - "username": { - "description": "MongoDB username for getting profiler data.", + "region": { + "description": "Node region.", "type": "string", - "x-order": 4 + "x-order": 6 } }, - "x-order": 10 + "x-order": 0 }, - "qan_mysql_perfschema_agent": { - "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "remote": { + "description": "RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes.", "type": "object", "properties": { - "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": 5 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -10385,115 +10532,89 @@ "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 + "x-order": 6 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "node_id": { + "description": "Unique randomly generated instance identifier.", "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 + "x-order": 0 }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 11 + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 3 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", "x-order": 1 }, - "process_exec_path": { - "description": "Path to exec process.", + "region": { + "description": "Node region.", "type": "string", - "x-order": 15 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 12 - }, - "service_id": { - "description": "Service identifier.", + "x-order": 4 + } + }, + "x-order": 2 + }, + "remote_azure_database": { + "description": "RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes.", + "type": "object", + "properties": { + "address": { + "description": "DB instance identifier.", "type": "string", - "x-order": 3 + "x-order": 2 }, - "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.", + "az": { + "description": "Node availability zone.", "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.", - "type": "string", - "x-order": 7 + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 }, - "tls_cert": { - "description": "Client certificate.", + "node_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 8 + "x-order": 0 }, - "tls_key": { - "description": "Password for decrypting tls_cert.", + "node_model": { + "description": "Node model.", "type": "string", - "x-order": 9 + "x-order": 3 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 }, - "username": { - "description": "MySQL username for getting performance data.", + "region": { + "description": "Node region.", "type": "string", "x-order": 4 } }, - "x-order": 8 + "x-order": 4 }, - "qan_mysql_slowlog_agent": { - "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "remote_rds": { + "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", + "address": { + "description": "DB instance identifier.", "type": "string", - "x-order": 0 + "x-order": 2 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 5 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -10501,121 +10622,164 @@ "additionalProperties": { "type": "string" }, - "x-order": 14 + "x-order": 6 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 10 + "node_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 3 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "node_name": { + "description": "Unique across all Nodes user-defined 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": 17 + "x-order": 1 }, - "max_query_length": { - "type": "integer", - "format": "int32", - "title": "Limit query length in QAN (default: server-defined; -1: no limit)", - "x-order": 11 + "region": { + "description": "Node region.", + "type": "string", + "x-order": 4 + } + }, + "x-order": 3 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + }, + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + } + }, + "/v1/inventory/nodes/{node_id}": { + "get": { + "description": "Returns a single Node by ID.", + "tags": [ + "NodesService" + ], + "summary": "Get a Node", + "operationId": "GetNode", + "parameters": [ + { + "type": "string", + "description": "Unique randomly generated instance identifier.", + "name": "node_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "container": { + "description": "ContainerNode represents a Docker container.", + "type": "object", + "properties": { + "address": { + "description": "Node address (DNS name or IP).", + "type": "string", + "x-order": 2 }, - "max_slowlog_file_size": { - "description": "Slowlog file is rotated at this size if \u003e 0.", + "az": { + "description": "Node availability zone.", "type": "string", - "format": "int64", - "x-order": 13 + "x-order": 8 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", "type": "string", - "x-order": 1 + "x-order": 4 }, - "process_exec_path": { + "container_name": { + "description": "Container name.", "type": "string", - "title": "mod tidy", - "x-order": 16 + "x-order": 5 }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 12 + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "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": 15 - }, - "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": 9 + "x-order": 1 }, - "qan_postgresql_pgstatements_agent": { - "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "generic": { + "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.", @@ -10623,95 +10787,54 @@ "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 + "x-order": 8 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "distro": { + "description": "Linux distribution name and version.", "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 + "x-order": 4 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "machine_id": { + "description": "Linux machine-id.", "type": "string", - "x-order": 1 + "x-order": 3 }, - "process_exec_path": { - "description": "Path to exec process.", + "node_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 11 + "x-order": 0 }, - "service_id": { - "description": "Service identifier.", + "node_model": { + "description": "Node model.", "type": "string", - "x-order": 3 + "x-order": 5 }, - "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_name": { + "description": "Unique across all Nodes 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 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 8 + "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": 11 + "x-order": 0 }, - "qan_postgresql_pgstatmonitor_agent": { - "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "remote": { + "description": "RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes.", "type": "object", "properties": { - "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": 5 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -10719,116 +10842,89 @@ "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 + "x-order": 6 }, - "process_exec_path": { - "description": "Path to exec process.", + "node_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 12 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 9 + "x-order": 0 }, - "service_id": { - "description": "Service identifier.", + "node_model": { + "description": "Node model.", "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_name": { + "description": "Unique across all Nodes 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": 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 + "x-order": 1 }, - "username": { - "description": "PostgreSQL username for getting pg stat monitor data.", + "region": { + "description": "Node region.", "type": "string", "x-order": 4 } }, - "x-order": 12 + "x-order": 2 }, - "rds_exporter": { - "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", + "remote_azure_database": { + "description": "RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes.", "type": "object", "properties": { - "agent_id": { + "address": { + "description": "DB instance identifier.", + "type": "string", + "x-order": 2 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 5 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 + }, + "node_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 13 + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 3 }, - "aws_access_key": { - "description": "AWS Access Key.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "region": { + "description": "Node region.", "type": "string", "x-order": 4 + } + }, + "x-order": 4 + }, + "remote_rds": { + "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", + "type": "object", + "properties": { + "address": { + "description": "DB instance identifier.", + "type": "string", + "x-order": 2 }, - "basic_metrics_disabled": { - "description": "Basic metrics are disabled.", - "type": "boolean", - "x-order": 8 + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 5 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -10836,76 +10932,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 + "x-order": 6 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "node_id": { + "description": "Unique randomly generated instance identifier.", "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 + "x-order": 0 }, - "node_id": { - "description": "Node identifier.", + "node_model": { + "description": "Node model.", "type": "string", "x-order": 3 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "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 - }, - "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.", + "region": { + "description": "Node region.", "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": 4 } }, - "x-order": 6 + "x-order": 3 } } } @@ -10944,22 +10994,23 @@ } }, "delete": { - "description": "Removes an Agent from Inventory.", + "description": "Removes a Node.", "tags": [ - "AgentsService" + "NodesService" ], - "summary": "Remove an Agent from Inventory", - "operationId": "RemoveAgent", + "summary": "Remove a Node", + "operationId": "RemoveNode", "parameters": [ { "type": "string", - "name": "agent_id", + "description": "Unique randomly generated instance identifier.", + "name": "node_id", "in": "path", "required": true }, { "type": "boolean", - "description": "Remove agent with all dependencies.", + "description": "Remove node with all dependencies.", "name": "force", "in": "query" } @@ -11004,85 +11055,6 @@ } } } - }, - "/v1/inventory/agents/{agent_id}/logs": { - "get": { - "description": "Returns Agent logs by ID.", - "tags": [ - "AgentsService" - ], - "summary": "Get Agent logs", - "operationId": "GetAgentLogs", - "parameters": [ - { - "type": "string", - "description": "Unique randomly generated instance identifier.", - "name": "agent_id", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "Limit the number of log lines to this value. Pass 0 for no limit.", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "agent_config_log_lines_count": { - "type": "integer", - "format": "int64", - "x-order": 1 - }, - "logs": { - "type": "array", - "items": { - "type": "string" - }, - "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 - } - } - } - } - } - } } }, "tags": [ diff --git a/api/inventory/v1/nodes.pb.go b/api/inventory/v1/nodes.pb.go index ec5d1c91c1..2a98249a3d 100644 --- a/api/inventory/v1/nodes.pb.go +++ b/api/inventory/v1/nodes.pb.go @@ -2141,57 +2141,57 @@ var file_inventory_v1_nodes_proto_rawDesc = []byte{ 0x45, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x44, 0x53, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x10, 0x04, 0x12, 0x28, 0x0a, 0x24, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x41, 0x5a, 0x55, 0x52, 0x45, 0x5f, 0x44, 0x41, - 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x10, 0x05, 0x32, 0xef, 0x04, - 0x0a, 0x0c, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9e, + 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x10, 0x05, 0x32, 0xe6, 0x04, + 0x0a, 0x0c, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x96, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x92, + 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x92, 0x41, 0x2a, 0x12, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x1a, 0x1c, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, - 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x12, - 0x97, 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x69, 0x6e, - 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x69, 0x6e, 0x76, 0x65, - 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x92, 0x41, 0x2a, 0x12, 0x0a, 0x47, - 0x65, 0x74, 0x20, 0x61, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x1c, 0x52, 0x65, 0x74, 0x75, 0x72, - 0x6e, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x4e, 0x6f, 0x64, 0x65, - 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, - 0x22, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, - 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x47, 0x65, 0x74, 0x12, 0x87, 0x01, 0x0a, 0x07, 0x41, 0x64, - 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x3f, 0x92, 0x41, 0x1a, 0x12, 0x0a, 0x41, 0x64, 0x64, 0x20, 0x61, 0x20, 0x4e, - 0x6f, 0x64, 0x65, 0x1a, 0x0c, 0x41, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x4e, 0x6f, 0x64, 0x65, - 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x76, 0x31, 0x2f, - 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x2f, - 0x41, 0x64, 0x64, 0x12, 0x99, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, - 0x64, 0x65, 0x12, 0x1f, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x92, 0x41, 0x20, 0x12, 0x0d, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x20, 0x61, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x73, 0x20, 0x61, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, - 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, - 0x72, 0x79, 0x2f, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, - 0xa4, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, - 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, - 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x6e, 0x76, 0x65, - 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x0c, - 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x49, - 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x49, 0x6e, - 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, - 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, + 0x79, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x52, 0x92, 0x41, 0x2a, 0x12, 0x0a, 0x47, 0x65, 0x74, 0x20, 0x61, 0x20, 0x4e, 0x6f, 0x64, + 0x65, 0x1a, 0x1c, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0x2e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, + 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x83, 0x01, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, + 0x12, 0x1c, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, + 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x92, + 0x41, 0x1a, 0x12, 0x0a, 0x41, 0x64, 0x64, 0x20, 0x61, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x0c, + 0x41, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, + 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x99, 0x01, 0x0a, 0x0a, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x2e, 0x69, 0x6e, 0x76, 0x65, + 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, + 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x69, 0x6e, 0x76, + 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x92, 0x41, + 0x20, 0x12, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x61, 0x20, 0x4e, 0x6f, 0x64, 0x65, + 0x1a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x73, 0x20, 0x61, 0x20, 0x4e, 0x6f, 0x64, 0x65, + 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x2a, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, + 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x6f, + 0x64, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x42, 0xa4, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x69, + 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x4e, 0x6f, 0x64, + 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, + 0x76, 0x31, 0x3b, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x18, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, + 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/inventory/v1/nodes.pb.gw.go b/api/inventory/v1/nodes.pb.gw.go index 7b55405e46..2c7ec866a9 100644 --- a/api/inventory/v1/nodes.pb.gw.go +++ b/api/inventory/v1/nodes.pb.gw.go @@ -33,11 +33,16 @@ var ( _ = metadata.Join ) +var filter_NodesService_ListNodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + func request_NodesService_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, client NodesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListNodesRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NodesService_ListNodes_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -49,7 +54,10 @@ func local_request_NodesService_ListNodes_0(ctx context.Context, marshaler runti var protoReq ListNodesRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NodesService_ListNodes_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -61,8 +69,21 @@ func request_NodesService_GetNode_0(ctx context.Context, marshaler runtime.Marsh var protoReq GetNodeRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["node_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") + } + + protoReq.NodeId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) } msg, err := client.GetNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -73,8 +94,21 @@ func local_request_NodesService_GetNode_0(ctx context.Context, marshaler runtime var protoReq GetNodeRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["node_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") + } + + protoReq.NodeId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) } msg, err := server.GetNode(ctx, &protoReq) @@ -105,11 +139,33 @@ func local_request_NodesService_AddNode_0(ctx context.Context, marshaler runtime return msg, metadata, err } +var filter_NodesService_RemoveNode_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + func request_NodesService_RemoveNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RemoveNodeRequest 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["node_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") + } + + protoReq.NodeId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_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_NodesService_RemoveNode_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -121,7 +177,27 @@ func local_request_NodesService_RemoveNode_0(ctx context.Context, marshaler runt var protoReq RemoveNodeRequest 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["node_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") + } + + protoReq.NodeId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_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_NodesService_RemoveNode_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -134,7 +210,7 @@ func local_request_NodesService_RemoveNode_0(ctx context.Context, marshaler runt // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNodesServiceHandlerFromEndpoint instead. func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NodesServiceServer) error { - mux.Handle("POST", pattern_NodesService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_NodesService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -142,7 +218,7 @@ func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/inventory.v1.NodesService/ListNodes", runtime.WithHTTPPathPattern("/v1/inventory/Nodes/List")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/inventory.v1.NodesService/ListNodes", runtime.WithHTTPPathPattern("/v1/inventory/nodes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -158,7 +234,7 @@ func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu forward_NodesService_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_NodesService_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_NodesService_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -166,7 +242,7 @@ func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/inventory.v1.NodesService/GetNode", runtime.WithHTTPPathPattern("/v1/inventory/Nodes/Get")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/inventory.v1.NodesService/GetNode", runtime.WithHTTPPathPattern("/v1/inventory/nodes/{node_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -190,7 +266,7 @@ func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/inventory.v1.NodesService/AddNode", runtime.WithHTTPPathPattern("/v1/inventory/Nodes/Add")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/inventory.v1.NodesService/AddNode", runtime.WithHTTPPathPattern("/v1/inventory/nodes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -206,7 +282,7 @@ func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu forward_NodesService_AddNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_NodesService_RemoveNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_NodesService_RemoveNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -214,7 +290,7 @@ func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/inventory.v1.NodesService/RemoveNode", runtime.WithHTTPPathPattern("/v1/inventory/Nodes/Remove")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/inventory.v1.NodesService/RemoveNode", runtime.WithHTTPPathPattern("/v1/inventory/nodes/{node_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -270,13 +346,13 @@ func RegisterNodesServiceHandler(ctx context.Context, mux *runtime.ServeMux, con // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "NodesServiceClient" to call the correct interceptors. func RegisterNodesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NodesServiceClient) error { - mux.Handle("POST", pattern_NodesService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_NodesService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/inventory.v1.NodesService/ListNodes", runtime.WithHTTPPathPattern("/v1/inventory/Nodes/List")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/inventory.v1.NodesService/ListNodes", runtime.WithHTTPPathPattern("/v1/inventory/nodes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -291,13 +367,13 @@ func RegisterNodesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu forward_NodesService_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_NodesService_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_NodesService_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/inventory.v1.NodesService/GetNode", runtime.WithHTTPPathPattern("/v1/inventory/Nodes/Get")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/inventory.v1.NodesService/GetNode", runtime.WithHTTPPathPattern("/v1/inventory/nodes/{node_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -318,7 +394,7 @@ func RegisterNodesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/inventory.v1.NodesService/AddNode", runtime.WithHTTPPathPattern("/v1/inventory/Nodes/Add")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/inventory.v1.NodesService/AddNode", runtime.WithHTTPPathPattern("/v1/inventory/nodes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -333,13 +409,13 @@ func RegisterNodesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu forward_NodesService_AddNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_NodesService_RemoveNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_NodesService_RemoveNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/inventory.v1.NodesService/RemoveNode", runtime.WithHTTPPathPattern("/v1/inventory/Nodes/Remove")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/inventory.v1.NodesService/RemoveNode", runtime.WithHTTPPathPattern("/v1/inventory/nodes/{node_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -358,13 +434,13 @@ func RegisterNodesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu } var ( - pattern_NodesService_ListNodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "inventory", "Nodes", "List"}, "")) + pattern_NodesService_ListNodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "inventory", "nodes"}, "")) - pattern_NodesService_GetNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "inventory", "Nodes", "Get"}, "")) + pattern_NodesService_GetNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "inventory", "nodes", "node_id"}, "")) - pattern_NodesService_AddNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "inventory", "Nodes", "Add"}, "")) + pattern_NodesService_AddNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "inventory", "nodes"}, "")) - pattern_NodesService_RemoveNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "inventory", "Nodes", "Remove"}, "")) + pattern_NodesService_RemoveNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "inventory", "nodes", "node_id"}, "")) ) var ( diff --git a/api/inventory/v1/nodes.proto b/api/inventory/v1/nodes.proto index 9e7d4e3ec0..cbf6504d91 100644 --- a/api/inventory/v1/nodes.proto +++ b/api/inventory/v1/nodes.proto @@ -280,10 +280,7 @@ message RemoveNodeResponse {} service NodesService { // ListNodes returns a list of all Nodes. rpc ListNodes(ListNodesRequest) returns (ListNodesResponse) { - option (google.api.http) = { - post: "/v1/inventory/Nodes/List" - body: "*" - }; + option (google.api.http) = {get: "/v1/inventory/nodes"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { summary: "List Nodes" description: "Returns a list of all Nodes." @@ -291,10 +288,7 @@ service NodesService { } // GetNode returns a single Node by ID. rpc GetNode(GetNodeRequest) returns (GetNodeResponse) { - option (google.api.http) = { - post: "/v1/inventory/Nodes/Get" - body: "*" - }; + option (google.api.http) = {get: "/v1/inventory/nodes/{node_id}"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { summary: "Get a Node" description: "Returns a single Node by ID." @@ -303,7 +297,7 @@ service NodesService { // AddNode adds any type of Node. rpc AddNode(AddNodeRequest) returns (AddNodeResponse) { option (google.api.http) = { - post: "/v1/inventory/Nodes/Add" + post: "/v1/inventory/nodes" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { @@ -313,10 +307,7 @@ service NodesService { } // RemoveNode removes a Node. rpc RemoveNode(RemoveNodeRequest) returns (RemoveNodeResponse) { - option (google.api.http) = { - post: "/v1/inventory/Nodes/Remove" - body: "*" - }; + option (google.api.http) = {delete: "/v1/inventory/nodes/{node_id}"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { summary: "Remove a Node" description: "Removes a Node." diff --git a/api/swagger/swagger-dev.json b/api/swagger/swagger-dev.json index f52986e17b..f7ce0f7fa9 100644 --- a/api/swagger/swagger-dev.json +++ b/api/swagger/swagger-dev.json @@ -5277,14 +5277,14 @@ } } }, - "/v1/inventory/Nodes/Add": { + "/v1/inventory/Services/Add": { "post": { - "description": "Adds a Node.", + "description": "Adds a Service.", "tags": [ - "NodesService" + "ServicesService" ], - "summary": "Add a Node", - "operationId": "AddNode", + "summary": "Add a Service", + "operationId": "AddService", "parameters": [ { "name": "body", @@ -5293,95 +5293,102 @@ "schema": { "type": "object", "properties": { - "generic": { + "mysql": { "type": "object", "properties": { - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 0 }, - "address": { - "description": "Node address (DNS name or IP).", + "node_id": { + "description": "Node identifier where this instance runs. Required.", "type": "string", "x-order": 1 }, - "machine_id": { - "description": "Linux machine-id.", + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", "x-order": 2 }, - "distro": { - "description": "Linux distribution name and version.", - "type": "string", + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", "x-order": 3 }, - "node_model": { - "description": "Node model.", + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", "x-order": 4 }, - "region": { - "description": "Node region.", + "environment": { + "description": "Environment name.", "type": "string", "x-order": 5 }, - "az": { - "description": "Node availability zone.", + "cluster": { + "description": "Cluster name.", "type": "string", "x-order": 6 }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 7 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 7 + "x-order": 8 } }, "x-order": 0 }, - "container": { + "mongodb": { "type": "object", "properties": { - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 0 }, - "address": { - "description": "Node address (DNS name or IP).", + "node_id": { + "description": "Node identifier where this instance runs. Required.", "type": "string", "x-order": 1 }, - "machine_id": { - "description": "Linux machine-id of the Generic Node where this Container Node runs.", + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", "x-order": 2 }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", - "type": "string", + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", "x-order": 3 }, - "container_name": { - "description": "Container name.", + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", "x-order": 4 }, - "node_model": { - "description": "Node model.", + "environment": { + "description": "Environment name.", "type": "string", "x-order": 5 }, - "region": { - "description": "Node region.", + "cluster": { + "description": "Cluster name.", "type": "string", "x-order": 6 }, - "az": { - "description": "Node availability zone.", + "replication_set": { + "description": "Replication set name.", "type": "string", "x-order": 7 }, @@ -5396,109 +5403,147 @@ }, "x-order": 1 }, - "remote": { + "postgresql": { "type": "object", "properties": { - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 0 }, - "address": { - "description": "Node address (DNS name or IP).", + "node_id": { + "description": "Node identifier where this instance runs. Required.", "type": "string", "x-order": 1 }, - "node_model": { - "description": "Node model.", + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", "x-order": 2 }, - "region": { - "description": "Node region.", - "type": "string", + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", "x-order": 3 }, - "az": { - "description": "Node availability zone.", + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", "x-order": 4 }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 5 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 6 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 7 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 5 + "x-order": 8 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 9 } }, "x-order": 2 }, - "remote_rds": { + "proxysql": { "type": "object", "properties": { - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 0 }, - "address": { - "description": "DB instance identifier.", + "node_id": { + "description": "Node identifier where this instance runs. Required.", "type": "string", "x-order": 1 }, - "node_model": { - "description": "Node model.", + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", "x-order": 2 }, - "region": { - "description": "Node region.", - "type": "string", + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", "x-order": 3 }, - "az": { - "description": "Node availability zone.", + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", "x-order": 4 }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 5 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 6 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 7 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 5 + "x-order": 8 } }, "x-order": 3 }, - "remote_azure": { + "haproxy": { "type": "object", "properties": { - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 0 }, - "address": { - "description": "DB instance identifier.", + "node_id": { + "description": "Node identifier where this instance runs. Required.", "type": "string", "x-order": 1 }, - "node_model": { - "description": "Node model.", + "environment": { + "description": "Environment name.", "type": "string", "x-order": 2 }, - "region": { - "description": "Node region.", + "cluster": { + "description": "Cluster name.", "type": "string", "x-order": 3 }, - "az": { - "description": "Node availability zone.", + "replication_set": { + "description": "Replication set name.", "type": "string", "x-order": 4 }, @@ -5512,118 +5557,108 @@ } }, "x-order": 4 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "generic": { - "description": "GenericNode represents a bare metal server or virtual machine.", + }, + "external": { "type": "object", "properties": { - "node_id": { - "description": "Unique randomly generated instance identifier.", + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 0 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "node_id": { + "description": "Node identifier where this instance runs. Required.", "type": "string", "x-order": 1 }, - "address": { - "description": "Node address (DNS name or IP).", + "environment": { + "description": "Environment name.", "type": "string", "x-order": 2 }, - "machine_id": { - "description": "Linux machine-id.", + "cluster": { + "description": "Cluster name.", "type": "string", "x-order": 3 }, - "distro": { - "description": "Linux distribution name and version.", + "replication_set": { + "description": "Replication set name.", "type": "string", "x-order": 4 }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 5 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 6 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 7 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 8 + "x-order": 5 + }, + "group": { + "description": "Group name of external service.", + "type": "string", + "x-order": 6 } }, - "x-order": 0 - }, - "container": { - "description": "ContainerNode represents a Docker container.", + "x-order": 5 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "mysql": { + "description": "MySQLService represents a generic MySQL instance.", "type": "object", "properties": { - "node_id": { + "service_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "service_name": { + "description": "Unique across all Services user-defined name.", "type": "string", "x-order": 1 }, - "address": { - "description": "Node address (DNS name or IP).", + "node_id": { + "description": "Node identifier where this instance runs.", "type": "string", "x-order": 2 }, - "machine_id": { - "description": "Linux machine-id of the Generic Node where this Container Node runs.", + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", "x-order": 3 }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", - "type": "string", + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", "x-order": 4 }, - "container_name": { - "description": "Container name.", + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", "x-order": 5 }, - "node_model": { - "description": "Node model.", + "environment": { + "description": "Environment name.", "type": "string", "x-order": 6 }, - "region": { - "description": "Node region.", + "cluster": { + "description": "Cluster name.", "type": "string", "x-order": 7 }, - "az": { - "description": "Node availability zone.", + "replication_set": { + "description": "Replication set name.", "type": "string", "x-order": 8 }, @@ -5634,359 +5669,300 @@ "type": "string" }, "x-order": 9 + }, + "version": { + "description": "MySQL version.", + "type": "string", + "x-order": 10 } }, - "x-order": 1 + "x-order": 0 }, - "remote": { - "description": "RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes.", + "mongodb": { + "description": "MongoDBService represents a generic MongoDB instance.", "type": "object", "properties": { - "node_id": { + "service_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "service_name": { + "description": "Unique across all Services user-defined name.", "type": "string", "x-order": 1 }, - "address": { - "description": "Node address (DNS name or IP).", + "node_id": { + "description": "Node identifier where this instance runs.", "type": "string", "x-order": 2 }, - "node_model": { - "description": "Node model.", + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", "x-order": 3 }, - "region": { - "description": "Node region.", - "type": "string", + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", "x-order": 4 }, - "az": { - "description": "Node availability zone.", + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", "x-order": 5 }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 6 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 7 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 8 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 6 + "x-order": 9 + }, + "version": { + "description": "MongoDB version.", + "type": "string", + "x-order": 10 } }, - "x-order": 2 + "x-order": 1 }, - "remote_rds": { - "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", + "postgresql": { + "description": "PostgreSQLService represents a generic PostgreSQL instance.", "type": "object", "properties": { - "node_id": { + "service_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "service_name": { + "description": "Unique across all Services user-defined name.", "type": "string", "x-order": 1 }, - "address": { - "description": "DB instance identifier.", + "database_name": { + "description": "Database name.", "type": "string", "x-order": 2 }, - "node_model": { - "description": "Node model.", + "node_id": { + "description": "Node identifier where this instance runs.", "type": "string", "x-order": 3 }, - "region": { - "description": "Node region.", + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", "x-order": 4 }, - "az": { - "description": "Node availability zone.", - "type": "string", + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", "x-order": 5 }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 6 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 7 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 8 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 9 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 6 + "x-order": 10 + }, + "version": { + "description": "PostgreSQL version.", + "type": "string", + "x-order": 11 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 12 } }, - "x-order": 3 + "x-order": 2 }, - "remote_azure_database": { - "description": "RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes.", + "proxysql": { + "description": "ProxySQLService represents a generic ProxySQL instance.", "type": "object", "properties": { - "node_id": { + "service_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "service_name": { + "description": "Unique across all Services user-defined name.", "type": "string", "x-order": 1 }, - "address": { - "description": "DB instance identifier.", + "node_id": { + "description": "Node identifier where this instance runs.", "type": "string", "x-order": 2 }, - "node_model": { - "description": "Node model.", + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", "x-order": 3 }, - "region": { - "description": "Node region.", - "type": "string", + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", "x-order": 4 }, - "az": { - "description": "Node availability zone.", + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", "x-order": 5 }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 6 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 7 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 8 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 6 + "x-order": 9 + }, + "version": { + "description": "ProxySQL version.", + "type": "string", + "x-order": 10 } }, - "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 + "x-order": 3 }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/inventory/Nodes/Get": { - "post": { - "description": "Returns a single Node by ID.", - "tags": [ - "NodesService" - ], - "summary": "Get a Node", - "operationId": "GetNode", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "generic": { - "description": "GenericNode represents a bare metal server or virtual machine.", + "haproxy": { + "description": "HAProxyService represents a generic HAProxy service instance.", "type": "object", "properties": { - "node_id": { + "service_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "service_name": { + "description": "Unique across all Services user-defined name.", "type": "string", "x-order": 1 }, - "address": { - "description": "Node address (DNS name or IP).", - "type": "string", - "x-order": 2 - }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", - "x-order": 3 - }, - "distro": { - "description": "Linux distribution name and version.", - "type": "string", - "x-order": 4 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 5 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 6 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 7 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 8 - } - }, - "x-order": 0 - }, - "container": { - "description": "ContainerNode represents a Docker container.", - "type": "object", - "properties": { "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "address": { - "description": "Node address (DNS name or IP).", + "description": "Node identifier where this service instance runs.", "type": "string", "x-order": 2 }, - "machine_id": { - "description": "Linux machine-id of the Generic Node where this Container Node runs.", + "environment": { + "description": "Environment name.", "type": "string", "x-order": 3 }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "cluster": { + "description": "Cluster name.", "type": "string", "x-order": 4 }, - "container_name": { - "description": "Container name.", + "replication_set": { + "description": "Replication set 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": 6 } }, - "x-order": 1 + "x-order": 4 }, - "remote": { - "description": "RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes.", + "external": { + "description": "ExternalService represents a generic External service instance.", "type": "object", "properties": { - "node_id": { + "service_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "service_name": { + "description": "Unique across all Services user-defined name.", "type": "string", "x-order": 1 }, - "address": { - "description": "Node address (DNS name or IP).", + "node_id": { + "description": "Node identifier where this service instance runs.", "type": "string", "x-order": 2 }, - "node_model": { - "description": "Node model.", + "environment": { + "description": "Environment name.", "type": "string", "x-order": 3 }, - "region": { - "description": "Node region.", + "cluster": { + "description": "Cluster name.", "type": "string", "x-order": 4 }, - "az": { - "description": "Node availability zone.", + "replication_set": { + "description": "Replication set name.", "type": "string", "x-order": 5 }, @@ -5997,102 +5973,102 @@ "type": "string" }, "x-order": 6 - } - }, - "x-order": 2 - }, - "remote_rds": { - "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", - "type": "object", - "properties": { - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "address": { - "description": "DB instance identifier.", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 3 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 4 }, - "az": { - "description": "Node availability zone.", + "group": { + "description": "Group name of external service.", "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 + "x-order": 7 } }, - "x-order": 3 + "x-order": 5 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 }, - "remote_azure_database": { - "description": "RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes.", - "type": "object", - "properties": { - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } }, - "address": { - "description": "DB instance identifier.", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 3 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 4 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - } + "additionalProperties": false }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/inventory/Services/Change": { + "post": { + "description": "Changes service configuration. If a new cluster label is specified, it removes all backup/restore tasks scheduled for the related services. Fails if there are running backup/restore tasks.", + "tags": [ + "ServicesService" + ], + "summary": "Change service", + "operationId": "ChangeService", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "x-order": 0 + }, + "environment": { + "type": "string", + "x-nullable": true, + "x-order": 1 + }, + "cluster": { + "type": "string", + "x-nullable": true, + "x-order": 2 + }, + "replication_set": { + "type": "string", + "x-nullable": true, + "x-order": 3 + }, + "external_group": { + "type": "string", + "x-nullable": true, "x-order": 4 } } } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } }, "default": { "description": "An unexpected error response.", @@ -6128,14 +6104,14 @@ } } }, - "/v1/inventory/Nodes/List": { + "/v1/inventory/Services/CustomLabels/Add": { "post": { - "description": "Returns a list of all Nodes.", + "description": "Adds or replaces (if the key exists) custom labels for a Service.", "tags": [ - "NodesService" + "ServicesService" ], - "summary": "List Nodes", - "operationId": "ListNodes", + "summary": "Add/replace custom labels", + "operationId": "AddCustomLabels", "parameters": [ { "name": "body", @@ -6144,19 +6120,18 @@ "schema": { "type": "object", "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", + "service_id": { + "description": "Unique Service ID.", "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 + }, + "custom_labels": { + "description": "Custom user-assigned labels to be added.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 1 } } } @@ -6165,297 +6140,104 @@ "responses": { "200": { "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", "schema": { "type": "object", "properties": { - "generic": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { "type": "array", "items": { - "description": "GenericNode represents a bare metal server or virtual machine.", "type": "object", "properties": { - "node_id": { - "description": "Unique randomly generated instance identifier.", + "@type": { "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 } - } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/inventory/Services/CustomLabels/Remove": { + "post": { + "description": "Removes custom labels from a Service by key.", + "tags": [ + "ServicesService" + ], + "summary": "Remove custom labels", + "operationId": "RemoveCustomLabels", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "Unique Service ID.", + "type": "string", + "x-order": 0 + }, + "custom_label_keys": { + "description": "Custom user-assigned label keys to be removed.", + "type": "array", + "items": { + "type": "string" }, + "x-order": 1 + } + } + } + } + ], + "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 }, - "container": { + "message": { + "type": "string", + "x-order": 1 + }, + "details": { "type": "array", "items": { - "description": "ContainerNode represents a Docker container.", "type": "object", "properties": { - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "address": { - "description": "Node address (DNS name or IP).", - "type": "string", - "x-order": 2 - }, - "machine_id": { - "description": "Linux machine-id of the Generic Node where this Container Node runs.", - "type": "string", - "x-order": 3 - }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", - "type": "string", - "x-order": 4 - }, - "container_name": { - "description": "Container name.", - "type": "string", - "x-order": 5 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 6 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 7 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - } - } - }, - "x-order": 1 - }, - "remote": { - "type": "array", - "items": { - "description": "RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes.", - "type": "object", - "properties": { - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "address": { - "description": "Node address (DNS name or IP).", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 3 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 4 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - } - } - }, - "x-order": 2 - }, - "remote_rds": { - "type": "array", - "items": { - "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", - "type": "object", - "properties": { - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "address": { - "description": "DB instance identifier.", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 3 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 4 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - } - } - }, - "x-order": 3 - }, - "remote_azure_database": { - "type": "array", - "items": { - "description": "RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes.", - "type": "object", - "properties": { - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "address": { - "description": "DB instance identifier.", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 3 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 4 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - } - } - }, - "x-order": 4 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { + "@type": { "type": "string", "x-order": 0 } @@ -6470,14 +6252,14 @@ } } }, - "/v1/inventory/Nodes/Remove": { + "/v1/inventory/Services/Get": { "post": { - "description": "Removes a Node.", + "description": "Returns a single Service by ID.", "tags": [ - "NodesService" + "ServicesService" ], - "summary": "Remove a Node", - "operationId": "RemoveNode", + "summary": "Get a Service", + "operationId": "GetService", "parameters": [ { "name": "body", @@ -6486,15 +6268,10 @@ "schema": { "type": "object", "properties": { - "node_id": { + "service_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 - }, - "force": { - "description": "Remove node with all dependencies.", - "type": "boolean", - "x-order": 1 } } } @@ -6503,103 +6280,58 @@ "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 - } + "mysql": { + "description": "MySQLService represents a generic MySQL instance.", + "type": "object", + "properties": { + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/inventory/Services/Add": { - "post": { - "description": "Adds a Service.", - "tags": [ - "ServicesService" - ], - "summary": "Add a Service", - "operationId": "AddService", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "mysql": { - "type": "object", - "properties": { "service_name": { - "description": "Unique across all Services user-defined name. Required.", + "description": "Unique across all Services user-defined name.", "type": "string", - "x-order": 0 + "x-order": 1 }, "node_id": { - "description": "Node identifier where this instance runs. Required.", + "description": "Node identifier where this instance runs.", "type": "string", - "x-order": 1 + "x-order": 2 }, "address": { "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "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": 3 + "x-order": 4 }, "socket": { "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", - "x-order": 4 + "x-order": 5 }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 5 + "x-order": 6 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 6 + "x-order": 7 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 7 + "x-order": 8 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -6607,54 +6339,65 @@ "additionalProperties": { "type": "string" }, - "x-order": 8 + "x-order": 9 + }, + "version": { + "description": "MySQL version.", + "type": "string", + "x-order": 10 } }, "x-order": 0 }, "mongodb": { + "description": "MongoDBService represents a generic MongoDB instance.", "type": "object", "properties": { - "service_name": { - "description": "Unique across all Services user-defined name. Required.", + "service_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "node_id": { - "description": "Node identifier where this instance runs. Required.", + "service_name": { + "description": "Unique across all Services user-defined name.", "type": "string", "x-order": 1 }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 2 + }, "address": { "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "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": 3 + "x-order": 4 }, "socket": { "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", - "x-order": 4 + "x-order": 5 }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 5 + "x-order": 6 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 6 + "x-order": 7 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 7 + "x-order": 8 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -6662,54 +6405,70 @@ "additionalProperties": { "type": "string" }, - "x-order": 8 + "x-order": 9 + }, + "version": { + "description": "MongoDB version.", + "type": "string", + "x-order": 10 } }, "x-order": 1 }, "postgresql": { + "description": "PostgreSQLService represents a generic PostgreSQL instance.", "type": "object", "properties": { - "service_name": { - "description": "Unique across all Services user-defined name. Required.", + "service_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "node_id": { - "description": "Node identifier where this instance runs. Required.", + "service_name": { + "description": "Unique across all Services user-defined name.", "type": "string", "x-order": 1 }, + "database_name": { + "description": "Database name.", + "type": "string", + "x-order": 2 + }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 3 + }, "address": { "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 2 + "x-order": 4 }, "port": { "description": "Access port.\nPort is required when the address present.", "type": "integer", "format": "int64", - "x-order": 3 + "x-order": 5 }, "socket": { "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", - "x-order": 4 + "x-order": 6 }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 5 + "x-order": 7 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 6 + "x-order": 8 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 7 + "x-order": 9 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -6717,60 +6476,71 @@ "additionalProperties": { "type": "string" }, - "x-order": 8 + "x-order": 10 + }, + "version": { + "description": "PostgreSQL version.", + "type": "string", + "x-order": 11 }, "auto_discovery_limit": { "description": "Limit of databases for auto-discovery.", "type": "integer", "format": "int32", - "x-order": 9 + "x-order": 12 } }, "x-order": 2 }, "proxysql": { + "description": "ProxySQLService represents a generic ProxySQL instance.", "type": "object", "properties": { - "service_name": { - "description": "Unique across all Services user-defined name. Required.", + "service_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "node_id": { - "description": "Node identifier where this instance runs. Required.", + "service_name": { + "description": "Unique across all Services user-defined name.", "type": "string", "x-order": 1 }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 2 + }, "address": { "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "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": 3 + "x-order": 4 }, "socket": { "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", - "x-order": 4 + "x-order": 5 }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 5 + "x-order": 6 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 6 + "x-order": 7 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 7 + "x-order": 8 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -6778,38 +6548,49 @@ "additionalProperties": { "type": "string" }, - "x-order": 8 + "x-order": 9 + }, + "version": { + "description": "ProxySQL version.", + "type": "string", + "x-order": 10 } }, "x-order": 3 }, "haproxy": { + "description": "HAProxyService represents a generic HAProxy service instance.", "type": "object", "properties": { - "service_name": { - "description": "Unique across all Services user-defined name. Required.", + "service_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "node_id": { - "description": "Node identifier where this instance runs. Required.", + "service_name": { + "description": "Unique across all Services user-defined name.", "type": "string", "x-order": 1 }, + "node_id": { + "description": "Node identifier where this service instance runs.", + "type": "string", + "x-order": 2 + }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 2 + "x-order": 3 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 3 + "x-order": 4 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 4 + "x-order": 5 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -6817,38 +6598,44 @@ "additionalProperties": { "type": "string" }, - "x-order": 5 + "x-order": 6 } }, "x-order": 4 }, "external": { + "description": "ExternalService represents a generic External service instance.", "type": "object", "properties": { - "service_name": { - "description": "Unique across all Services user-defined name. Required.", + "service_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "node_id": { - "description": "Node identifier where this instance runs. Required.", + "service_name": { + "description": "Unique across all Services user-defined name.", "type": "string", "x-order": 1 }, + "node_id": { + "description": "Node identifier where this service instance runs.", + "type": "string", + "x-order": 2 + }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 2 + "x-order": 3 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 3 + "x-order": 4 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 4 + "x-order": 5 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -6856,392 +6643,488 @@ "additionalProperties": { "type": "string" }, - "x-order": 5 + "x-order": 6 }, "group": { "description": "Group name of external service.", "type": "string", - "x-order": 6 + "x-order": 7 } }, "x-order": 5 } } } - } - ], - "responses": { - "200": { - "description": "A successful response.", + }, + "default": { + "description": "An unexpected error response.", "schema": { "type": "object", "properties": { - "mysql": { - "description": "MySQLService represents a generic MySQL instance.", - "type": "object", - "properties": { - "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 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 2 + "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 + } }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 3 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 4 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 5 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "version": { - "description": "MySQL version.", - "type": "string", - "x-order": 10 - } + "additionalProperties": false }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/inventory/Services/List": { + "post": { + "description": "Returns a list of Services filtered by type.", + "tags": [ + "ServicesService" + ], + "summary": "List Services", + "operationId": "ListServices", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "node_id": { + "description": "Return only Services running on that Node.", + "type": "string", "x-order": 0 }, - "mongodb": { - "description": "MongoDBService represents a generic MongoDB instance.", - "type": "object", - "properties": { - "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 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 2 - }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 3 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 4 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 5 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" + "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": 1 + }, + "external_group": { + "description": "Return only services in this external group.", + "type": "string", + "x-order": 2 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "mysql": { + "type": "array", + "items": { + "description": "MySQLService represents a generic MySQL instance.", + "type": "object", + "properties": { + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "x-order": 9 - }, - "version": { - "description": "MongoDB version.", - "type": "string", - "x-order": 10 + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 2 + }, + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 3 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 4 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 5 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 6 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 7 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "version": { + "description": "MySQL version.", + "type": "string", + "x-order": 10 + } } }, - "x-order": 1 + "x-order": 0 }, - "postgresql": { - "description": "PostgreSQLService represents a generic PostgreSQL instance.", - "type": "object", - "properties": { - "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 - }, - "database_name": { - "description": "Database name.", - "type": "string", - "x-order": 2 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 3 - }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 4 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 6 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 7 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 8 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 9 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" + "mongodb": { + "type": "array", + "items": { + "description": "MongoDBService represents a generic MongoDB instance.", + "type": "object", + "properties": { + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "x-order": 10 - }, - "version": { - "description": "PostgreSQL version.", - "type": "string", - "x-order": 11 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 12 + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 2 + }, + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 3 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 4 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 5 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 6 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 7 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "version": { + "description": "MongoDB version.", + "type": "string", + "x-order": 10 + } } }, - "x-order": 2 + "x-order": 1 }, - "proxysql": { - "description": "ProxySQLService represents a generic ProxySQL instance.", - "type": "object", - "properties": { - "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 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 2 - }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 3 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 4 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 5 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" + "postgresql": { + "type": "array", + "items": { + "description": "PostgreSQLService represents a generic PostgreSQL instance.", + "type": "object", + "properties": { + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "x-order": 9 - }, - "version": { - "description": "ProxySQL version.", - "type": "string", - "x-order": 10 + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "database_name": { + "description": "Database name.", + "type": "string", + "x-order": 2 + }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 3 + }, + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 4 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 5 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 6 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 7 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 8 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 9 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 10 + }, + "version": { + "description": "PostgreSQL version.", + "type": "string", + "x-order": 11 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 12 + } } }, - "x-order": 3 + "x-order": 2 }, - "haproxy": { - "description": "HAProxyService represents a generic HAProxy service instance.", - "type": "object", - "properties": { - "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 - }, - "node_id": { - "description": "Node identifier where this service instance runs.", - "type": "string", - "x-order": 2 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 3 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 4 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" + "proxysql": { + "type": "array", + "items": { + "description": "ProxySQLService represents a generic ProxySQL instance.", + "type": "object", + "properties": { + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "x-order": 6 + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 2 + }, + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 3 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 4 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 5 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 6 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 7 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "version": { + "description": "ProxySQL version.", + "type": "string", + "x-order": 10 + } + } + }, + "x-order": 3 + }, + "haproxy": { + "type": "array", + "items": { + "description": "HAProxyService represents a generic HAProxy service instance.", + "type": "object", + "properties": { + "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 + }, + "node_id": { + "description": "Node identifier where this service instance runs.", + "type": "string", + "x-order": 2 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 3 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 4 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 5 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 + } } }, "x-order": 4 }, "external": { - "description": "ExternalService represents a generic External service instance.", - "type": "object", - "properties": { - "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 - }, - "node_id": { - "description": "Node identifier where this service instance runs.", - "type": "string", - "x-order": 2 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 3 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 4 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" + "type": "array", + "items": { + "description": "ExternalService represents a generic External service instance.", + "type": "object", + "properties": { + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "x-order": 6 - }, - "group": { - "description": "Group name of external service.", - "type": "string", - "x-order": 7 + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "node_id": { + "description": "Node identifier where this service instance runs.", + "type": "string", + "x-order": 2 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 3 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 4 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 5 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 + }, + "group": { + "description": "Group name of external service.", + "type": "string", + "x-order": 7 + } } }, "x-order": 5 @@ -7283,56 +7166,50 @@ } } }, - "/v1/inventory/Services/Change": { + "/v1/inventory/Services/ListTypes": { "post": { - "description": "Changes service configuration. If a new cluster label is specified, it removes all backup/restore tasks scheduled for the related services. Fails if there are running backup/restore tasks.", + "description": "Returns a list of active Service types.", "tags": [ "ServicesService" ], - "summary": "Change service", - "operationId": "ChangeService", + "summary": "List Active Service Types", + "operationId": "ListActiveServiceTypes", "parameters": [ { "name": "body", "in": "body", "required": true, + "schema": { + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", "schema": { "type": "object", "properties": { - "service_id": { - "type": "string", - "x-order": 0 - }, - "environment": { - "type": "string", - "x-nullable": true, - "x-order": 1 - }, - "cluster": { - "type": "string", - "x-nullable": true, - "x-order": 2 - }, - "replication_set": { - "type": "string", - "x-nullable": true, - "x-order": 3 - }, - "external_group": { - "type": "string", - "x-nullable": true, - "x-order": 4 + "service_types": { + "type": "array", + "items": { + "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 } } } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } }, "default": { "description": "An unexpected error response.", @@ -7368,14 +7245,14 @@ } } }, - "/v1/inventory/Services/CustomLabels/Add": { + "/v1/inventory/Services/Remove": { "post": { - "description": "Adds or replaces (if the key exists) custom labels for a Service.", + "description": "Removes Service.", "tags": [ "ServicesService" ], - "summary": "Add/replace custom labels", - "operationId": "AddCustomLabels", + "summary": "Remove Service", + "operationId": "RemoveService", "parameters": [ { "name": "body", @@ -7385,16 +7262,13 @@ "type": "object", "properties": { "service_id": { - "description": "Unique Service ID.", + "description": "Unique randomly generated instance identifier. Required.", "type": "string", "x-order": 0 }, - "custom_labels": { - "description": "Custom user-assigned labels to be added.", - "type": "object", - "additionalProperties": { - "type": "string" - }, + "force": { + "description": "Remove service with all dependencies.", + "type": "boolean", "x-order": 1 } } @@ -7442,1307 +7316,948 @@ } } }, - "/v1/inventory/Services/CustomLabels/Remove": { - "post": { - "description": "Removes custom labels from a Service by key.", + "/v1/inventory/agents": { + "get": { + "description": "Returns a list of all Agents.", "tags": [ - "ServicesService" + "AgentsService" ], - "summary": "Remove custom labels", - "operationId": "RemoveCustomLabels", + "summary": "List Agents", + "operationId": "ListAgents", "parameters": [ { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "service_id": { - "description": "Unique Service ID.", - "type": "string", - "x-order": 0 - }, - "custom_label_keys": { - "description": "Custom user-assigned label keys to be removed.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - } - } - } + "type": "string", + "description": "Return only Agents started by this pmm-agent.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id.", + "name": "pmm_agent_id", + "in": "query" + }, + { + "type": "string", + "description": "Return only Agents that provide insights for that Node.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id.", + "name": "node_id", + "in": "query" + }, + { + "type": "string", + "description": "Return only Agents that provide insights for that Service.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id.", + "name": "service_id", + "in": "query" + }, + { + "enum": [ + "AGENT_TYPE_UNSPECIFIED", + "AGENT_TYPE_PMM_AGENT", + "AGENT_TYPE_VM_AGENT", + "AGENT_TYPE_NODE_EXPORTER", + "AGENT_TYPE_MYSQLD_EXPORTER", + "AGENT_TYPE_MONGODB_EXPORTER", + "AGENT_TYPE_POSTGRES_EXPORTER", + "AGENT_TYPE_PROXYSQL_EXPORTER", + "AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT", + "AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT", + "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT", + "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT", + "AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT", + "AGENT_TYPE_EXTERNAL_EXPORTER", + "AGENT_TYPE_RDS_EXPORTER", + "AGENT_TYPE_AZURE_DATABASE_EXPORTER" + ], + "type": "string", + "default": "AGENT_TYPE_UNSPECIFIED", + "description": "Return only agents of a particular type.", + "name": "agent_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", + "pmm_agent": { + "type": "array", + "items": { + "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": 0 }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { + "vm_agent": { "type": "array", "items": { + "description": "VMAgent runs on Generic or Container Node alongside pmm-agent.\nIt scrapes other exporter Agents that are configured with push_metrics_enabled\nand uses Prometheus remote write protocol to push metrics to PMM Server.", "type": "object", "properties": { - "@type": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "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": 2 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 3 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 4 } - }, - "additionalProperties": false + } }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/inventory/Services/Get": { - "post": { - "description": "Returns a single Service by ID.", - "tags": [ - "ServicesService" - ], - "summary": "Get a Service", - "operationId": "GetService", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "mysql": { - "description": "MySQLService represents a generic MySQL instance.", - "type": "object", - "properties": { - "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 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 2 - }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 3 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 4 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 5 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "version": { - "description": "MySQL version.", - "type": "string", - "x-order": 10 - } - }, - "x-order": 0 + "x-order": 1 }, - "mongodb": { - "description": "MongoDBService represents a generic MongoDB instance.", - "type": "object", - "properties": { - "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 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 2 - }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 3 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 4 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 5 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" + "node_exporter": { + "type": "array", + "items": { + "description": "NodeExporter runs on Generic or Container Node and exposes its metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "x-order": 9 - }, - "version": { - "description": "MongoDB version.", - "type": "string", - "x-order": 10 + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 3 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 4 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 5 + }, + "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 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 7 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 8 + }, + "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": 9 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 10 + } } }, - "x-order": 1 + "x-order": 2 }, - "postgresql": { - "description": "PostgreSQLService represents a generic PostgreSQL instance.", - "type": "object", - "properties": { - "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 - }, - "database_name": { - "description": "Database name.", - "type": "string", - "x-order": 2 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 3 - }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 4 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 6 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 7 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 8 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 9 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 10 - }, - "version": { - "description": "PostgreSQL version.", - "type": "string", - "x-order": 11 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 12 - } - }, - "x-order": 2 - }, - "proxysql": { - "description": "ProxySQLService represents a generic ProxySQL instance.", - "type": "object", - "properties": { - "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 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 2 - }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 3 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 4 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 5 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "version": { - "description": "ProxySQL version.", - "type": "string", - "x-order": 10 - } - }, - "x-order": 3 - }, - "haproxy": { - "description": "HAProxyService represents a generic HAProxy service instance.", - "type": "object", - "properties": { - "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 - }, - "node_id": { - "description": "Node identifier where this service instance runs.", - "type": "string", - "x-order": 2 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 3 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 4 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - } - }, - "x-order": 4 - }, - "external": { - "description": "ExternalService represents a generic External service instance.", - "type": "object", - "properties": { - "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 - }, - "node_id": { - "description": "Node identifier where this service instance runs.", - "type": "string", - "x-order": 2 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 3 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 4 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - }, - "group": { - "description": "Group name of external service.", - "type": "string", - "x-order": 7 - } - }, - "x-order": 5 - } - } - } - }, - "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": { + "mysqld_exporter": { "type": "array", "items": { + "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", "type": "object", "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/inventory/Services/List": { - "post": { - "description": "Returns a list of Services filtered by type.", - "tags": [ - "ServicesService" - ], - "summary": "List Services", - "operationId": "ListServices", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "node_id": { - "description": "Return only Services running on that Node.", - "type": "string", - "x-order": 0 - }, - "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": 1 - }, - "external_group": { - "description": "Return only services in this external group.", - "type": "string", - "x-order": 2 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "mysql": { - "type": "array", - "items": { - "description": "MySQLService represents a generic MySQL instance.", - "type": "object", - "properties": { - "service_id": { - "description": "Unique randomly generated instance identifier.", + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "service_name": { - "description": "Unique across all Services user-defined name.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", "x-order": 1 }, - "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 }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "service_id": { + "description": "Service identifier.", "type": "string", "x-order": 3 }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", + "username": { + "description": "MySQL username for scraping metrics.", + "type": "string", "x-order": 4 }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", "x-order": 5 }, - "environment": { - "description": "Environment name.", - "type": "string", + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", "x-order": 6 }, - "cluster": { - "description": "Cluster name.", + "tls_ca": { + "description": "Certificate Authority certificate chain.", "type": "string", "x-order": 7 }, - "replication_set": { - "description": "Replication set name.", + "tls_cert": { + "description": "Client certificate.", "type": "string", "x-order": 8 }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 9 + }, + "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 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 9 + "x-order": 11 }, - "version": { - "description": "MySQL version.", - "type": "string", - "x-order": 10 - } - } - }, - "x-order": 0 - }, - "mongodb": { - "type": "array", - "items": { - "description": "MongoDBService represents a generic MongoDB instance.", - "type": "object", - "properties": { - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 12 }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 1 + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 13 }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 2 + "table_count": { + "description": "Actual table count at the moment of adding.", + "type": "integer", + "format": "int32", + "x-order": 14 }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "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": 3 + "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": 15 }, - "port": { - "description": "Access port.\nPort is required when the address present.", + "listen_port": { + "description": "Listen port for scraping metrics.", "type": "integer", "format": "int64", - "x-order": 4 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 5 + "x-order": 16 }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 + "tablestats_group_disabled": { + "description": "True if tablestats group collectors are currently disabled.", + "type": "boolean", + "x-order": 17 }, - "cluster": { - "description": "Cluster name.", + "process_exec_path": { + "description": "Path to exec process.", "type": "string", - "x-order": 7 + "x-order": 18 }, - "replication_set": { - "description": "Replication set name.", + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 + "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": 19 }, - "version": { - "description": "MongoDB version.", - "type": "string", - "x-order": 10 + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 20 } } }, - "x-order": 1 + "x-order": 3 }, - "postgresql": { + "mongodb_exporter": { "type": "array", "items": { - "description": "PostgreSQLService represents a generic PostgreSQL instance.", + "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", "type": "object", "properties": { - "service_id": { + "agent_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "service_name": { - "description": "Unique across all Services user-defined name.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", "x-order": 1 }, - "database_name": { - "description": "Database name.", - "type": "string", + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", "x-order": 2 }, - "node_id": { - "description": "Node identifier where this instance runs.", + "service_id": { + "description": "Service identifier.", "type": "string", "x-order": 3 }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "username": { + "description": "MongoDB username for scraping metrics.", "type": "string", "x-order": 4 }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", "x-order": 5 }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", "x-order": 6 }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 7 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 8 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 9 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 10 + "x-order": 7 }, - "version": { - "description": "PostgreSQL version.", + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 8 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "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 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", "x-order": 11 }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", + "stats_collections": { + "type": "array", + "title": "List of colletions to get stats from. Can use *", + "items": { + "type": "string" + }, + "x-order": 12 + }, + "collections_limit": { "type": "integer", "format": "int32", - "x-order": 12 + "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", + "x-order": 13 + }, + "enable_all_collectors": { + "description": "Enable All collectors.", + "type": "boolean", + "x-order": 14 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 15 + }, + "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 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 17 } } }, - "x-order": 2 + "x-order": 4 }, - "proxysql": { + "postgres_exporter": { "type": "array", "items": { - "description": "ProxySQLService represents a generic ProxySQL instance.", + "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", "type": "object", "properties": { - "service_id": { + "agent_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "service_name": { - "description": "Unique across all Services user-defined name.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", "x-order": 1 }, - "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 }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "service_id": { + "description": "Service identifier.", "type": "string", "x-order": 3 }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", + "username": { + "description": "PostgreSQL username for scraping metrics.", + "type": "string", "x-order": 4 }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", "x-order": 5 }, - "environment": { - "description": "Environment name.", - "type": "string", + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "type": "boolean", "x-order": 6 }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, + "x-order": 7 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 8 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, "x-order": 9 }, - "version": { - "description": "ProxySQL version.", + "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 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 12 + }, + "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 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 14 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 15 + }, + "max_exporter_connections": { + "description": "Maximum number of connections that exporter can open to the database instance.", + "type": "integer", + "format": "int32", + "x-order": 16 } } }, - "x-order": 3 + "x-order": 5 }, - "haproxy": { + "proxysql_exporter": { "type": "array", "items": { - "description": "HAProxyService represents a generic HAProxy service instance.", + "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", "type": "object", "properties": { - "service_id": { + "agent_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "service_name": { - "description": "Unique across all Services user-defined name.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", "x-order": 1 }, - "node_id": { - "description": "Node identifier where this service instance runs.", - "type": "string", + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", "x-order": 2 }, - "environment": { - "description": "Environment name.", + "service_id": { + "description": "Service identifier.", "type": "string", "x-order": 3 }, - "cluster": { - "description": "Cluster name.", + "username": { + "description": "ProxySQL username for scraping metrics.", "type": "string", "x-order": 4 }, - "replication_set": { - "description": "Replication set name.", - "type": "string", + "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 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 6 - } - } - }, - "x-order": 4 - }, - "external": { - "type": "array", + "x-order": 7 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 8 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "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 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 12 + }, + "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 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 14 + } + } + }, + "x-order": 6 + }, + "qan_mysql_perfschema_agent": { + "type": "array", "items": { - "description": "ExternalService represents a generic External service instance.", + "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", "type": "object", "properties": { - "service_id": { + "agent_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "service_name": { - "description": "Unique across all Services user-defined name.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", "x-order": 1 }, - "node_id": { - "description": "Node identifier where this service instance runs.", - "type": "string", + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", "x-order": 2 }, - "environment": { - "description": "Environment name.", + "service_id": { + "description": "Service identifier.", "type": "string", "x-order": 3 }, - "cluster": { - "description": "Cluster name.", + "username": { + "description": "MySQL username for getting performance data.", "type": "string", "x-order": 4 }, - "replication_set": { - "description": "Replication set name.", - "type": "string", + "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 + }, + "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 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 10 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 11 + }, + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 12 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 6 + "x-order": 13 }, - "group": { - "description": "Group name of external service.", + "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": 7 + "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 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 15 + }, + "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 } } }, - "x-order": 5 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 + "x-order": 7 }, - "details": { + "qan_mysql_slowlog_agent": { "type": "array", "items": { + "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", "type": "object", "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/inventory/Services/ListTypes": { - "post": { - "description": "Returns a list of active Service types.", - "tags": [ - "ServicesService" - ], - "summary": "List Active Service Types", - "operationId": "ListActiveServiceTypes", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "service_types": { - "type": "array", - "items": { - "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 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/inventory/Services/Remove": { - "post": { - "description": "Removes Service.", - "tags": [ - "ServicesService" - ], - "summary": "Remove Service", - "operationId": "RemoveService", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "service_id": { - "description": "Unique randomly generated instance identifier. Required.", - "type": "string", - "x-order": 0 - }, - "force": { - "description": "Remove service with all dependencies.", - "type": "boolean", - "x-order": 1 - } - } - } - } - ], - "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/inventory/agents": { - "get": { - "description": "Returns a list of all Agents.", - "tags": [ - "AgentsService" - ], - "summary": "List Agents", - "operationId": "ListAgents", - "parameters": [ - { - "type": "string", - "description": "Return only Agents started by this pmm-agent.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id.", - "name": "pmm_agent_id", - "in": "query" - }, - { - "type": "string", - "description": "Return only Agents that provide insights for that Node.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id.", - "name": "node_id", - "in": "query" - }, - { - "type": "string", - "description": "Return only Agents that provide insights for that Service.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id.", - "name": "service_id", - "in": "query" - }, - { - "enum": [ - "AGENT_TYPE_UNSPECIFIED", - "AGENT_TYPE_PMM_AGENT", - "AGENT_TYPE_VM_AGENT", - "AGENT_TYPE_NODE_EXPORTER", - "AGENT_TYPE_MYSQLD_EXPORTER", - "AGENT_TYPE_MONGODB_EXPORTER", - "AGENT_TYPE_POSTGRES_EXPORTER", - "AGENT_TYPE_PROXYSQL_EXPORTER", - "AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT", - "AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT", - "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT", - "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT", - "AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT", - "AGENT_TYPE_EXTERNAL_EXPORTER", - "AGENT_TYPE_RDS_EXPORTER", - "AGENT_TYPE_AZURE_DATABASE_EXPORTER" - ], - "type": "string", - "default": "AGENT_TYPE_UNSPECIFIED", - "description": "Return only agents of a particular type.", - "name": "agent_type", - "in": "query" - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "pmm_agent": { - "type": "array", - "items": { - "description": "PMMAgent runs on Generic or Container Node.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", "x-order": 1 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", "x-order": 2 }, - "connected": { - "description": "True if Agent is running and connected to pmm-managed.", - "type": "boolean", + "service_id": { + "description": "Service identifier.", + "type": "string", "x-order": 3 }, - "process_exec_path": { - "description": "Path to exec process.", + "username": { + "description": "MySQL username for getting performance data.", "type": "string", "x-order": 4 - } - } - }, - "x-order": 0 - }, - "vm_agent": { - "type": "array", - "items": { - "description": "VMAgent runs on Generic or Container Node alongside pmm-agent.\nIt scrapes other exporter Agents that are configured with push_metrics_enabled\nand uses Prometheus remote write protocol to push metrics to PMM Server.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "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 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", "type": "string", - "x-order": 1 + "x-order": 7 }, - "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.", + "tls_cert": { + "description": "Client certificate.", "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": 2 + "x-order": 8 }, - "process_exec_path": { - "description": "Path to exec process.", + "tls_key": { + "description": "Password for decrypting tls_cert.", "type": "string", - "x-order": 3 + "x-order": 9 }, - "listen_port": { - "description": "Listen port for scraping metrics.", + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 10 + }, + "max_query_length": { "type": "integer", - "format": "int64", - "x-order": 4 - } - } - }, - "x-order": 1 - }, - "node_exporter": { - "type": "array", - "items": { - "description": "NodeExporter runs on Generic or Container Node and exposes its metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 + "format": "int32", + "title": "Limit query length in QAN (default: server-defined; -1: no limit)", + "x-order": 11 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "query_examples_disabled": { + "description": "True if query examples are disabled.", "type": "boolean", - "x-order": 2 + "x-order": 12 + }, + "max_slowlog_file_size": { + "description": "Slowlog file is rotated at this size if \u003e 0.", + "type": "string", + "format": "int64", + "x-order": 13 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -8750,20 +8265,7 @@ "additionalProperties": { "type": "string" }, - "x-order": 3 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 4 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 5 + "x-order": 14 }, "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.", @@ -8778,18 +8280,12 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 6 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 7 + "x-order": 15 }, "process_exec_path": { - "description": "Path to exec process.", "type": "string", - "x-order": 8 + "title": "mod tidy", + "x-order": 16 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -8804,21 +8300,16 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 9 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 10 + "x-order": 17 } } }, - "x-order": 2 + "x-order": 8 }, - "mysqld_exporter": { + "qan_mongodb_profiler_agent": { "type": "array", "items": { - "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", + "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -8842,7 +8333,7 @@ "x-order": 3 }, "username": { - "description": "MySQL username for scraping metrics.", + "description": "MongoDB username for getting profiler data.", "type": "string", "x-order": 4 }, @@ -8856,26 +8347,11 @@ "type": "boolean", "x-order": 6 }, - "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 - }, - "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.", + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 10 + "x-order": 7 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -8883,26 +8359,7 @@ "additionalProperties": { "type": "string" }, - "x-order": 11 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 12 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 13 - }, - "table_count": { - "description": "Actual table count at the moment of adding.", - "type": "integer", - "format": "int32", - "x-order": 14 + "x-order": 8 }, "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.", @@ -8917,23 +8374,12 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 15 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 16 - }, - "tablestats_group_disabled": { - "description": "True if tablestats group collectors are currently disabled.", - "type": "boolean", - "x-order": 17 + "x-order": 9 }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 18 + "x-order": 10 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -8948,21 +8394,16 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 19 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 20 + "x-order": 11 } } }, - "x-order": 3 + "x-order": 9 }, - "mongodb_exporter": { + "qan_postgresql_pgstatements_agent": { "type": "array", "items": { - "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", + "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -8986,19 +8427,30 @@ "x-order": 3 }, "username": { - "description": "MongoDB username for scraping metrics.", + "description": "PostgreSQL username for getting pg stat statements data.", "type": "string", "x-order": 4 }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 5 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 6 + }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 5 + "x-order": 7 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 6 + "x-order": 8 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -9006,19 +8458,6 @@ "additionalProperties": { "type": "string" }, - "x-order": 7 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 8 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, "x-order": 9 }, "status": { @@ -9036,35 +8475,10 @@ ], "x-order": 10 }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 - }, - "stats_collections": { - "type": "array", - "title": "List of colletions to get stats from. Can use *", - "items": { - "type": "string" - }, - "x-order": 12 - }, - "collections_limit": { - "type": "integer", - "format": "int32", - "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", - "x-order": 13 - }, - "enable_all_collectors": { - "description": "Enable All collectors.", - "type": "boolean", - "x-order": 14 - }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 15 + "x-order": 11 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -9079,21 +8493,16 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 16 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 17 + "x-order": 12 } } }, - "x-order": 4 + "x-order": 10 }, - "postgres_exporter": { + "qan_postgresql_pgstatmonitor_agent": { "type": "array", "items": { - "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", + "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -9117,7 +8526,7 @@ "x-order": 3 }, "username": { - "description": "PostgreSQL username for scraping metrics.", + "description": "PostgreSQL username for getting pg stat monitor data.", "type": "string", "x-order": 4 }, @@ -9127,30 +8536,33 @@ "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 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", "x-order": 7 }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", "x-order": 8 }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 9 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { "type": "string" }, - "x-order": 9 + "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.", @@ -9165,13 +8577,7 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 10 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 + "x-order": 11 }, "process_exec_path": { "description": "Path to exec process.", @@ -9192,32 +8598,15 @@ "LOG_LEVEL_DEBUG" ], "x-order": 13 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 14 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 15 - }, - "max_exporter_connections": { - "description": "Maximum number of connections that exporter can open to the database instance.", - "type": "integer", - "format": "int32", - "x-order": 16 } } }, - "x-order": 5 + "x-order": 11 }, - "proxysql_exporter": { + "external_exporter": { "type": "array", "items": { - "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", + "description": "ExternalExporter runs on any Node type, including Remote Node.", "type": "object", "properties": { "agent_id": { @@ -9225,13 +8614,13 @@ "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", "type": "string", "x-order": 1 }, "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "description": "If disabled, metrics from this exporter will not be collected.", "type": "boolean", "x-order": 2 }, @@ -9241,18 +8630,18 @@ "x-order": 3 }, "username": { - "description": "ProxySQL username for scraping metrics.", + "description": "HTTP basic auth username for collecting metrics.", "type": "string", "x-order": 4 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", + "scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints.", + "type": "string", "x-order": 5 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI.", + "type": "string", "x-order": 6 }, "custom_labels": { @@ -9263,18 +8652,64 @@ }, "x-order": 7 }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 8 + }, "push_metrics_enabled": { "description": "True if exporter uses push metrics mode.", "type": "boolean", - "x-order": 8 + "x-order": 9 }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + } + } + }, + "x-order": 12 + }, + "rds_exporter": { + "type": "array", + "items": { + "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "node_id": { + "description": "Node identifier.", + "type": "string", + "x-order": 3 + }, + "aws_access_key": { + "description": "AWS Access Key.", + "type": "string", + "x-order": 4 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { "type": "string" }, - "x-order": 9 + "x-order": 5 }, "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.", @@ -9289,18 +8724,33 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 10 + "x-order": 6 }, "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 + }, + "basic_metrics_disabled": { + "description": "Basic metrics are disabled.", + "type": "boolean", + "x-order": 8 + }, + "enhanced_metrics_disabled": { + "description": "Enhanced metrics are disabled.", + "type": "boolean", + "x-order": 9 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 10 }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 12 + "x-order": 11 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -9315,21 +8765,22 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 13 + "x-order": 12 }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 14 + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 13 } } }, - "x-order": 6 + "x-order": 13 }, - "qan_mysql_perfschema_agent": { + "azure_database_exporter": { "type": "array", "items": { - "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics.", "type": "object", "properties": { "agent_id": { @@ -9347,56 +8798,20 @@ "type": "boolean", "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "node_id": { + "description": "Node identifier.", "type": "string", "x-order": 3 }, - "username": { - "description": "MySQL username for getting performance data.", + "azure_database_subscription_id": { + "description": "Azure database subscription ID.", "type": "string", "x-order": 4 }, - "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 - }, - "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.", + "azure_database_resource_type": { "type": "string", - "x-order": 9 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 10 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 11 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 12 + "title": "Azure database resource type (mysql, maria, postgres)", + "x-order": 5 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -9404,7 +8819,7 @@ "additionalProperties": { "type": "string" }, - "x-order": 13 + "x-order": 6 }, "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.", @@ -9419,12 +8834,23 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 14 + "x-order": 7 + }, + "listen_port": { + "description": "Listen port for scraping metrics (the same for several configurations).", + "type": "integer", + "format": "int64", + "x-order": 8 + }, + "push_metrics_enabled": { + "description": "True if the exporter operates in push metrics mode.", + "type": "boolean", + "x-order": 9 }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 15 + "x-order": 10 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -9439,760 +8865,1271 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 16 + "x-order": 11 } } }, - "x-order": 7 + "x-order": 14 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 }, - "qan_mysql_slowlog_agent": { + "message": { + "type": "string", + "x-order": 1 + }, + "details": { "type": "array", "items": { - "description": "QANMySQLSlowlogAgent 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": { "type": "string", "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "MySQL username for getting performance data.", - "type": "string", - "x-order": 4 - }, - "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 - }, - "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 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 10 - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "title": "Limit query length in QAN (default: server-defined; -1: no limit)", - "x-order": 11 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 12 - }, - "max_slowlog_file_size": { - "description": "Slowlog file is rotated at this size if \u003e 0.", - "type": "string", - "format": "int64", - "x-order": 13 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 14 - }, - "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": 15 - }, - "process_exec_path": { - "type": "string", - "title": "mod tidy", - "x-order": 16 - }, - "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": 17 } - } + }, + "additionalProperties": false }, - "x-order": 8 - }, - "qan_mongodb_profiler_agent": { - "type": "array", - "items": { - "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "MongoDB username for getting profiler data.", - "type": "string", - "x-order": 4 - }, - "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 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 7 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 8 - }, - "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": 9 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 10 + "x-order": 2 + } + } + } + } + } + }, + "post": { + "description": "Adds an Agent to Inventory. Only one agent at a time can be passed.", + "tags": [ + "AgentsService" + ], + "summary": "Add an Agent to Inventory", + "operationId": "AddAgent", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "pmm_agent": { + "type": "object", + "properties": { + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 0 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" }, - "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": 11 - } + "x-order": 1 } }, - "x-order": 9 + "x-order": 0 }, - "qan_postgresql_pgstatements_agent": { - "type": "array", - "items": { - "description": "QANPostgreSQLPgStatementsAgent 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 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 + "node_exporter": { + "type": "object", + "properties": { + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "PostgreSQL username for getting pg stat statements data.", - "type": "string", - "x-order": 4 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 5 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 6 - }, - "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 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "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 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 11 + "x-order": 1 + }, + "push_metrics": { + "description": "Enables push metrics mode for exporter.", + "type": "boolean", + "x-order": 2 + }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" }, - "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 - } + "x-order": 3 + }, + "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": 4 + }, + "expose_exporter": { + "type": "boolean", + "title": "Expose the node_exporter process on all public interfaces", + "x-order": 5 } }, - "x-order": 10 + "x-order": 1 }, - "qan_postgresql_pgstatmonitor_agent": { - "type": "array", - "items": { - "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 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "PostgreSQL username for getting pg stat monitor data.", - "type": "string", - "x-order": 4 - }, - "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 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 7 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 8 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 9 + "mysqld_exporter": { + "type": "object", + "properties": { + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "username": { + "description": "MySQL username for scraping metrics.", + "type": "string", + "x-order": 2 + }, + "password": { + "description": "MySQL password for scraping metrics.", + "type": "string", + "x-order": 3 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 6 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 7 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 8 + }, + "tablestats_group_table_limit": { + "description": "Tablestats group collectors will be 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": 9 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 10 + "x-order": 10 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 11 + }, + "push_metrics": { + "description": "Enables push metrics mode for exporter.", + "type": "boolean", + "x-order": 12 + }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" }, - "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 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 12 - }, - "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 - } + "x-order": 13 + }, + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 14 + }, + "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": 15 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 16 } }, - "x-order": 11 + "x-order": 2 }, - "external_exporter": { - "type": "array", - "items": { - "description": "ExternalExporter runs on any Node type, including Remote 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 - }, - "disabled": { - "description": "If disabled, metrics from this exporter will not be collected.", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "HTTP basic auth username for collecting metrics.", - "type": "string", - "x-order": 4 - }, - "scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints.", - "type": "string", - "x-order": 5 - }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI.", - "type": "string", - "x-order": 6 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 7 + "mongodb_exporter": { + "type": "object", + "properties": { + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "username": { + "description": "MongoDB username for scraping metrics.", + "type": "string", + "x-order": 2 + }, + "password": { + "description": "MongoDB password for scraping metrics.", + "type": "string", + "x-order": 3 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "tls_certificate_key": { + "description": "Client certificate and key.", + "type": "string", + "x-order": 6 + }, + "tls_certificate_key_file_password": { + "description": "Password for decrypting tls_certificate_key.", + "type": "string", + "x-order": 7 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 8 + "x-order": 9 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 10 + }, + "push_metrics": { + "description": "Enables push metrics mode for exporter.", + "type": "boolean", + "x-order": 11 + }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 9 + "x-order": 12 + }, + "authentication_mechanism": { + "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", + "type": "string", + "x-order": 13 + }, + "authentication_database": { + "description": "Authentication database.", + "type": "string", + "x-order": 14 + }, + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 15 + }, + "stats_collections": { + "type": "array", + "title": "List of colletions to get stats from. Can use *", + "items": { + "type": "string" }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 10 - } + "x-order": 16 + }, + "collections_limit": { + "type": "integer", + "format": "int32", + "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", + "x-order": 17 + }, + "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": 18 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 19 } }, - "x-order": 12 + "x-order": 3 }, - "rds_exporter": { - "type": "array", - "items": { - "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "node_id": { - "description": "Node identifier.", - "type": "string", - "x-order": 3 - }, - "aws_access_key": { - "description": "AWS Access Key.", - "type": "string", - "x-order": 4 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 5 - }, - "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 - }, - "listen_port": { - "description": "Listen port for scraping metrics (the same for several configurations).", - "type": "integer", - "format": "int64", - "x-order": 7 - }, - "basic_metrics_disabled": { - "description": "Basic metrics are disabled.", - "type": "boolean", - "x-order": 8 + "postgres_exporter": { + "type": "object", + "properties": { + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "username": { + "description": "PostgreSQL username for scraping metrics.", + "type": "string", + "x-order": 2 + }, + "password": { + "description": "PostgreSQL password for scraping metrics.", + "type": "string", + "x-order": 3 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "type": "boolean", + "x-order": 5 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" }, - "enhanced_metrics_disabled": { - "description": "Enhanced metrics are disabled.", - "type": "boolean", - "x-order": 9 + "x-order": 6 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 7 + }, + "push_metrics": { + "description": "Enables push metrics mode for exporter.", + "type": "boolean", + "x-order": 8 + }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 10 + "x-order": 9 + }, + "tls_ca": { + "description": "TLS CA certificate.", + "type": "string", + "x-order": 10 + }, + "tls_cert": { + "description": "TLS Certifcate.", + "type": "string", + "x-order": 11 + }, + "tls_key": { + "description": "TLS Certificate Key.", + "type": "string", + "x-order": 12 + }, + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 13 + }, + "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": 14 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 15 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 16 + }, + "max_exporter_connections": { + "description": "Maximum number of connections that exporter can open to the database instance.", + "type": "integer", + "format": "int32", + "x-order": 17 + } + }, + "x-order": 4 + }, + "proxysql_exporter": { + "type": "object", + "properties": { + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "username": { + "description": "ProxySQL username for scraping metrics.", + "type": "string", + "x-order": 2 + }, + "password": { + "description": "ProxySQL password for scraping metrics.", + "type": "string", + "x-order": 3 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 11 + "x-order": 6 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 7 + }, + "push_metrics": { + "description": "Enables push metrics mode for exporter.", + "type": "boolean", + "x-order": 8 + }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" }, - "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 + "x-order": 9 + }, + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 10 + }, + "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": 11 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 12 + } + }, + "x-order": 5 + }, + "external_exporter": { + "type": "object", + "properties": { + "runs_on_node_id": { + "description": "The node identifier where this instance is run.", + "type": "string", + "x-order": 0 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "username": { + "description": "HTTP basic auth username for collecting metrics.", + "type": "string", + "x-order": 2 + }, + "password": { + "description": "HTTP basic auth password for collecting metrics.", + "type": "string", + "x-order": 3 + }, + "scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints(default: http).", + "type": "string", + "x-order": 4 + }, + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI(default: /metrics).", + "type": "string", + "x-order": 5 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 6 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "push_metrics": { + "description": "Enables push metrics mode for exporter.", + "type": "boolean", + "x-order": 8 + } + }, + "x-order": 6 + }, + "rds_exporter": { + "type": "object", + "properties": { + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "node_id": { + "description": "Node identifier.", + "type": "string", + "x-order": 1 + }, + "aws_access_key": { + "description": "AWS Access Key.", + "type": "string", + "x-order": 2 + }, + "aws_secret_key": { + "description": "AWS Secret Key.", + "type": "string", + "x-order": 3 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 4 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 5 + }, + "disable_basic_metrics": { + "description": "Disable basic metrics.", + "type": "boolean", + "x-order": 6 + }, + "disable_enhanced_metrics": { + "description": "Disable enhanced metrics.", + "type": "boolean", + "x-order": 7 + }, + "push_metrics": { + "description": "Enables push metrics mode for exporter.", + "type": "boolean", + "x-order": 8 + }, + "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": 9 + } + }, + "x-order": 7 + }, + "azure_database_exporter": { + "type": "object", + "properties": { + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "node_id": { + "description": "Node identifier.", + "type": "string", + "x-order": 1 + }, + "azure_client_id": { + "type": "string", + "title": "Azure client ID", + "x-order": 2 + }, + "azure_client_secret": { + "type": "string", + "title": "Azure client secret", + "x-order": 3 + }, + "azure_tenant_id": { + "type": "string", + "title": "Azure tanant ID", + "x-order": 4 + }, + "azure_subscription_id": { + "type": "string", + "title": "Azure subscription ID", + "x-order": 5 + }, + "azure_resource_group": { + "description": "Azure resource group.", + "type": "string", + "x-order": 6 + }, + "azure_database_resource_type": { + "type": "string", + "title": "Azure resource type (mysql, maria, postgres)", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 9 + }, + "push_metrics": { + "description": "Enables push metrics mode for exporter.", + "type": "boolean", + "x-order": 10 + }, + "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": 11 + } + }, + "x-order": 8 + }, + "qan_mysql_perfschema_agent": { + "type": "object", + "properties": { + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "username": { + "description": "MySQL username for getting performance data.", + "type": "string", + "x-order": 2 + }, + "password": { + "description": "MySQL password for getting performance data.", + "type": "string", + "x-order": 3 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 6 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 7 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 8 + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "title": "Limit query length in QAN (default: server-defined; -1: no limit)", + "x-order": 9 + }, + "disable_query_examples": { + "description": "Disable query examples.", + "type": "boolean", + "x-order": 10 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 13 - } + "x-order": 11 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 12 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 13 + }, + "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": 14 } }, - "x-order": 13 + "x-order": 9 }, - "azure_database_exporter": { - "type": "array", - "items": { - "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "node_id": { - "description": "Node identifier.", - "type": "string", - "x-order": 3 - }, - "azure_database_subscription_id": { - "description": "Azure database subscription ID.", - "type": "string", - "x-order": 4 - }, - "azure_database_resource_type": { - "type": "string", - "title": "Azure database resource type (mysql, maria, postgres)", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - }, - "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": 7 - }, - "listen_port": { - "description": "Listen port for scraping metrics (the same for several configurations).", - "type": "integer", - "format": "int64", - "x-order": 8 - }, - "push_metrics_enabled": { - "description": "True if the exporter operates in push metrics mode.", - "type": "boolean", - "x-order": 9 + "qan_mysql_slowlog_agent": { + "type": "object", + "properties": { + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "username": { + "description": "MySQL username for getting slowlog data.", + "type": "string", + "x-order": 2 + }, + "password": { + "description": "MySQL password for getting slowlog data.", + "type": "string", + "x-order": 3 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 6 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 7 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 8 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 9 + }, + "disable_query_examples": { + "description": "Disable query examples.", + "type": "boolean", + "x-order": 10 + }, + "max_slowlog_file_size": { + "description": "Rotate slowlog file at this size if \u003e 0.\nUse zero or negative value to disable rotation.", + "type": "string", + "format": "int64", + "x-order": 11 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 10 + "x-order": 12 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 13 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 14 + }, + "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": 15 + } + }, + "x-order": 10 + }, + "qan_mongodb_profiler_agent": { + "type": "object", + "properties": { + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "username": { + "description": "MongoDB username for getting profile data.", + "type": "string", + "x-order": 2 + }, + "password": { + "description": "MongoDB password for getting profile data.", + "type": "string", + "x-order": 3 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "tls_certificate_key": { + "description": "Client certificate and key.", + "type": "string", + "x-order": 6 + }, + "tls_certificate_key_file_password": { + "description": "Password for decrypting tls_certificate_key.", + "type": "string", + "x-order": 7 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 8 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 9 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" }, - "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": 11 - } + "x-order": 10 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 11 + }, + "authentication_mechanism": { + "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", + "type": "string", + "x-order": 12 + }, + "authentication_database": { + "description": "Authentication database.", + "type": "string", + "x-order": 13 + }, + "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": 14 } }, - "x-order": 14 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 + "x-order": 11 }, - "message": { - "type": "string", - "x-order": 1 + "qan_postgresql_pgstatements_agent": { + "type": "object", + "properties": { + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "username": { + "description": "PostgreSQL username for getting pg stat statements data.", + "type": "string", + "x-order": 2 + }, + "password": { + "description": "PostgreSQL password for getting pg stat statements data.", + "type": "string", + "x-order": 3 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 7 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 8 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 9 + }, + "tls_ca": { + "description": "TLS CA certificate.", + "type": "string", + "x-order": 10 + }, + "tls_cert": { + "description": "TLS Certifcate.", + "type": "string", + "x-order": 11 + }, + "tls_key": { + "description": "TLS Certificate Key.", + "type": "string", + "x-order": 12 + }, + "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 + } + }, + "x-order": 12 }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } + "qan_postgresql_pgstatmonitor_agent": { + "type": "object", + "properties": { + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "username": { + "description": "PostgreSQL username for getting pg stat monitor data.", + "type": "string", + "x-order": 2 + }, + "password": { + "description": "PostgreSQL password for getting pg stat monitor data.", + "type": "string", + "x-order": 3 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 6 + }, + "disable_query_examples": { + "description": "Disable query examples.", + "type": "boolean", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 9 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 10 + }, + "tls_ca": { + "description": "TLS CA certificate.", + "type": "string", + "x-order": 11 + }, + "tls_cert": { + "description": "TLS Certifcate.", + "type": "string", + "x-order": 12 }, - "additionalProperties": false + "tls_key": { + "description": "TLS Certificate Key.", + "type": "string", + "x-order": 13 + }, + "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": 14 + } }, - "x-order": 2 + "x-order": 13 } } } } - } - }, - "post": { - "description": "Adds an Agent to Inventory. Only one agent at a time can be passed.", - "tags": [ - "AgentsService" ], - "summary": "Add an Agent to Inventory", - "operationId": "AddAgent", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, + "responses": { + "200": { + "description": "A successful response.", "schema": { "type": "object", "properties": { "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": 0 + "x-order": 1 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -10200,18 +10137,39 @@ "additionalProperties": { "type": "string" }, - "x-order": 1 + "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": 0 }, "node_exporter": { + "description": "NodeExporter runs on Generic or Container Node and exposes its metrics.", "type": "object", "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 0 + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -10219,20 +10177,46 @@ "additionalProperties": { "type": "string" }, - "x-order": 1 + "x-order": 3 }, - "push_metrics": { - "description": "Enables push metrics mode for exporter.", + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", "type": "boolean", - "x-order": 2 + "x-order": 4 }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", + "disabled_collectors": { + "description": "List of disabled collector names.", "type": "array", "items": { "type": "string" }, - "x-order": 3 + "x-order": 5 + }, + "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 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 7 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 8 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -10247,69 +10231,75 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 4 + "x-order": 9 }, "expose_exporter": { "type": "boolean", - "title": "Expose the node_exporter process on all public interfaces", - "x-order": 5 + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 10 } }, "x-order": 1 }, "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 + }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 0 + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 }, "service_id": { "description": "Service identifier.", "type": "string", - "x-order": 1 + "x-order": 3 }, "username": { "description": "MySQL username for scraping metrics.", "type": "string", - "x-order": 2 - }, - "password": { - "description": "MySQL password for scraping metrics.", - "type": "string", - "x-order": 3 + "x-order": 4 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 4 + "x-order": 5 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 5 + "x-order": 6 }, "tls_ca": { "description": "Certificate Authority certificate chain.", "type": "string", - "x-order": 6 + "x-order": 7 }, "tls_cert": { "description": "Client certificate.", "type": "string", - "x-order": 7 + "x-order": 8 }, "tls_key": { "description": "Password for decrypting tls_cert.", "type": "string", - "x-order": 8 + "x-order": 9 }, "tablestats_group_table_limit": { - "description": "Tablestats group collectors will be 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.", + "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": 9 + "x-order": 10 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -10317,31 +10307,58 @@ "additionalProperties": { "type": "string" }, - "x-order": 10 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", "x-order": 11 }, - "push_metrics": { - "description": "Enables push metrics mode for exporter.", + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", "type": "boolean", "x-order": 12 }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", + "disabled_collectors": { + "description": "List of disabled collector names.", "type": "array", "items": { "type": "string" }, "x-order": 13 }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", + "table_count": { + "description": "Actual table count at the moment of adding.", + "type": "integer", + "format": "int32", "x-order": 14 }, + "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": 15 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 16 + }, + "tablestats_group_disabled": { + "description": "True if tablestats group collectors are currently disabled.", + "type": "boolean", + "x-order": 17 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 18 + }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", @@ -10355,63 +10372,54 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 15 + "x-order": 19 }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 16 + "x-order": 20 } }, "x-order": 2 }, "mongodb_exporter": { + "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", "type": "object", "properties": { - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "service_id": { - "description": "Service identifier.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", "x-order": 1 }, - "username": { - "description": "MongoDB username for scraping metrics.", - "type": "string", + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", "x-order": 2 }, - "password": { - "description": "MongoDB password for scraping metrics.", + "service_id": { + "description": "Service identifier.", "type": "string", "x-order": 3 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 4 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 5 - }, - "tls_certificate_key": { - "description": "Client certificate and key.", - "type": "string", - "x-order": 6 - }, - "tls_certificate_key_file_password": { - "description": "Password for decrypting tls_certificate_key.", - "type": "string", - "x-order": 7 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", + "username": { + "description": "MongoDB username for scraping metrics.", "type": "string", - "x-order": 8 + "x-order": 4 + }, + "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 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -10419,40 +10427,41 @@ "additionalProperties": { "type": "string" }, - "x-order": 9 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 10 + "x-order": 7 }, - "push_metrics": { - "description": "Enables push metrics mode for exporter.", + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", "type": "boolean", - "x-order": 11 + "x-order": 8 }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", + "disabled_collectors": { + "description": "List of disabled collector names.", "type": "array", "items": { "type": "string" }, - "x-order": 12 - }, - "authentication_mechanism": { - "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", - "type": "string", - "x-order": 13 + "x-order": 9 }, - "authentication_database": { - "description": "Authentication database.", + "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": 14 + "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 }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 15 + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 }, "stats_collections": { "type": "array", @@ -10460,13 +10469,23 @@ "items": { "type": "string" }, - "x-order": 16 + "x-order": 12 }, "collections_limit": { "type": "integer", "format": "int32", "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", - "x-order": 17 + "x-order": 13 + }, + "enable_all_collectors": { + "description": "Enable All collectors.", + "type": "boolean", + "x-order": 14 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 15 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -10481,48 +10500,54 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 18 + "x-order": 16 }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 19 + "x-order": 17 } }, "x-order": 3 }, "postgres_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 + }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 0 + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 }, "service_id": { "description": "Service identifier.", "type": "string", - "x-order": 1 + "x-order": 3 }, "username": { "description": "PostgreSQL username for scraping metrics.", "type": "string", - "x-order": 2 - }, - "password": { - "description": "PostgreSQL password for scraping metrics.", - "type": "string", - "x-order": 3 + "x-order": 4 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 4 + "x-order": 5 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", "type": "boolean", - "x-order": 5 + "x-order": 6 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -10530,46 +10555,47 @@ "additionalProperties": { "type": "string" }, - "x-order": 6 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", "x-order": 7 }, - "push_metrics": { - "description": "Enables push metrics mode for exporter.", + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", "type": "boolean", "x-order": 8 }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", + "disabled_collectors": { + "description": "List of disabled collector names.", "type": "array", "items": { "type": "string" }, "x-order": 9 }, - "tls_ca": { - "description": "TLS CA certificate.", + "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_cert": { - "description": "TLS Certifcate.", - "type": "string", + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", "x-order": 11 }, - "tls_key": { - "description": "TLS Certificate Key.", + "process_exec_path": { + "description": "Path to exec process.", "type": "string", "x-order": 12 }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 13 - }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", @@ -10583,60 +10609,66 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 14 + "x-order": 13 }, "auto_discovery_limit": { "description": "Limit of databases for auto-discovery.", "type": "integer", "format": "int32", - "x-order": 15 + "x-order": 14 }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 16 + "x-order": 15 }, "max_exporter_connections": { "description": "Maximum number of connections that exporter can open to the database instance.", "type": "integer", "format": "int32", - "x-order": 17 + "x-order": 16 } }, "x-order": 4 }, "proxysql_exporter": { + "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", "type": "object", "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 0 + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 }, "service_id": { "description": "Service identifier.", "type": "string", - "x-order": 1 + "x-order": 3 }, "username": { "description": "ProxySQL username for scraping metrics.", "type": "string", - "x-order": 2 - }, - "password": { - "description": "ProxySQL password for scraping metrics.", - "type": "string", - "x-order": 3 + "x-order": 4 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 4 + "x-order": 5 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 5 + "x-order": 6 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -10644,31 +10676,47 @@ "additionalProperties": { "type": "string" }, - "x-order": 6 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", "x-order": 7 }, - "push_metrics": { - "description": "Enables push metrics mode for exporter.", + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", "type": "boolean", "x-order": 8 }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", + "disabled_collectors": { + "description": "List of disabled collector names.", "type": "array", "items": { "type": "string" }, "x-order": 9 }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", + "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 }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 12 + }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", @@ -10682,53 +10730,53 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 11 + "x-order": 13 }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 12 + "x-order": 14 } }, "x-order": 5 }, "external_exporter": { + "description": "ExternalExporter runs on any Node type, including Remote Node.", "type": "object", "properties": { - "runs_on_node_id": { - "description": "The node identifier where this instance is run.", + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "service_id": { - "description": "Service identifier.", + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", "type": "string", "x-order": 1 }, - "username": { - "description": "HTTP basic auth username for collecting metrics.", - "type": "string", + "disabled": { + "description": "If disabled, metrics from this exporter will not be collected.", + "type": "boolean", "x-order": 2 }, - "password": { - "description": "HTTP basic auth password for collecting metrics.", + "service_id": { + "description": "Service identifier.", "type": "string", "x-order": 3 }, - "scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints(default: http).", + "username": { + "description": "HTTP basic auth username for collecting metrics.", "type": "string", "x-order": 4 }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI(default: /metrics).", + "scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints.", "type": "string", "x-order": 5 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", + }, + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI.", + "type": "string", "x-order": 6 }, "custom_labels": { @@ -10739,36 +10787,53 @@ }, "x-order": 7 }, - "push_metrics": { - "description": "Enables push metrics mode for exporter.", - "type": "boolean", + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", "x-order": 8 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 } }, "x-order": 6 }, "rds_exporter": { + "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", "type": "object", "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 0 + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 }, "node_id": { "description": "Node identifier.", "type": "string", - "x-order": 1 + "x-order": 3 }, "aws_access_key": { "description": "AWS Access Key.", "type": "string", - "x-order": 2 - }, - "aws_secret_key": { - "description": "AWS Secret Key.", - "type": "string", - "x-order": 3 + "x-order": 4 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -10776,28 +10841,49 @@ "additionalProperties": { "type": "string" }, - "x-order": 4 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", "x-order": 5 }, - "disable_basic_metrics": { - "description": "Disable basic metrics.", - "type": "boolean", + "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 }, - "disable_enhanced_metrics": { - "description": "Disable enhanced metrics.", - "type": "boolean", + "listen_port": { + "description": "Listen port for scraping metrics (the same for several configurations).", + "type": "integer", + "format": "int64", "x-order": 7 }, - "push_metrics": { - "description": "Enables push metrics mode for exporter.", + "basic_metrics_disabled": { + "description": "Basic metrics are disabled.", "type": "boolean", "x-order": 8 }, + "enhanced_metrics_disabled": { + "description": "Enhanced metrics are disabled.", + "type": "boolean", + "x-order": 9 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 10 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 11 + }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", @@ -10811,53 +10897,50 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 9 + "x-order": 12 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 13 } }, "x-order": 7 }, "azure_database_exporter": { + "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics.", "type": "object", "properties": { - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "node_id": { - "description": "Node identifier.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", "x-order": 1 }, - "azure_client_id": { - "type": "string", - "title": "Azure client ID", + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", "x-order": 2 }, - "azure_client_secret": { + "node_id": { + "description": "Node identifier.", "type": "string", - "title": "Azure client secret", "x-order": 3 }, - "azure_tenant_id": { + "azure_database_subscription_id": { + "description": "Azure database subscription ID.", "type": "string", - "title": "Azure tanant ID", "x-order": 4 }, - "azure_subscription_id": { - "type": "string", - "title": "Azure subscription ID", - "x-order": 5 - }, - "azure_resource_group": { - "description": "Azure resource group.", - "type": "string", - "x-order": 6 - }, "azure_database_resource_type": { "type": "string", - "title": "Azure resource type (mysql, maria, postgres)", - "x-order": 7 + "title": "Azure database resource type (mysql, maria, postgres)", + "x-order": 5 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -10865,16 +10948,37 @@ "additionalProperties": { "type": "string" }, + "x-order": 6 + }, + "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": 7 + }, + "listen_port": { + "description": "Listen port for scraping metrics (the same for several configurations).", + "type": "integer", + "format": "int64", "x-order": 8 }, - "skip_connection_check": { - "description": "Skip connection check.", + "push_metrics_enabled": { + "description": "True if the exporter operates in push metrics mode.", "type": "boolean", "x-order": 9 }, - "push_metrics": { - "description": "Enables push metrics mode for exporter.", - "type": "boolean", + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", "x-order": 10 }, "log_level": { @@ -10896,63 +11000,74 @@ "x-order": 8 }, "qan_mysql_perfschema_agent": { + "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 + }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 0 + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 }, "service_id": { "description": "Service identifier.", "type": "string", - "x-order": 1 + "x-order": 3 }, "username": { "description": "MySQL username for getting performance data.", "type": "string", - "x-order": 2 - }, - "password": { - "description": "MySQL password for getting performance data.", - "type": "string", - "x-order": 3 + "x-order": 4 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 4 + "x-order": 5 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 5 + "x-order": 6 }, "tls_ca": { "description": "Certificate Authority certificate chain.", "type": "string", - "x-order": 6 + "x-order": 7 }, "tls_cert": { "description": "Client certificate.", "type": "string", - "x-order": 7 + "x-order": 8 }, "tls_key": { "description": "Password for decrypting tls_cert.", "type": "string", - "x-order": 8 + "x-order": 9 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 10 }, "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "title": "Limit query length in QAN (default: server-defined; -1: no limit)", - "x-order": 9 + "x-order": 11 }, - "disable_query_examples": { - "description": "Disable query examples.", + "query_examples_disabled": { + "description": "True if query examples are disabled.", "type": "boolean", - "x-order": 10 + "x-order": 12 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -10960,17 +11075,27 @@ "additionalProperties": { "type": "string" }, - "x-order": 11 + "x-order": 13 }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 12 + "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 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 13 + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 15 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -10985,75 +11110,86 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 14 + "x-order": 16 } }, "x-order": 9 }, "qan_mysql_slowlog_agent": { + "description": "QANMySQLSlowlogAgent 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 + }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 0 + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 }, "service_id": { "description": "Service identifier.", "type": "string", - "x-order": 1 + "x-order": 3 }, "username": { - "description": "MySQL username for getting slowlog data.", - "type": "string", - "x-order": 2 - }, - "password": { - "description": "MySQL password for getting slowlog data.", + "description": "MySQL username for getting performance data.", "type": "string", - "x-order": 3 + "x-order": 4 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 4 + "x-order": 5 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 5 + "x-order": 6 }, "tls_ca": { "description": "Certificate Authority certificate chain.", "type": "string", - "x-order": 6 + "x-order": 7 }, "tls_cert": { "description": "Client certificate.", "type": "string", - "x-order": 7 + "x-order": 8 }, "tls_key": { "description": "Password for decrypting tls_cert.", "type": "string", - "x-order": 8 + "x-order": 9 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 10 }, "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 9 + "title": "Limit query length in QAN (default: server-defined; -1: no limit)", + "x-order": 11 }, - "disable_query_examples": { - "description": "Disable query examples.", + "query_examples_disabled": { + "description": "True if query examples are disabled.", "type": "boolean", - "x-order": 10 + "x-order": 12 }, "max_slowlog_file_size": { - "description": "Rotate slowlog file at this size if \u003e 0.\nUse zero or negative value to disable rotation.", + "description": "Slowlog file is rotated at this size if \u003e 0.", "type": "string", "format": "int64", - "x-order": 11 + "x-order": 13 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -11061,17 +11197,27 @@ "additionalProperties": { "type": "string" }, - "x-order": 12 + "x-order": 14 }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 13 + "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": 15 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 14 + "process_exec_path": { + "type": "string", + "title": "mod tidy", + "x-order": 16 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -11086,64 +11232,55 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 15 + "x-order": 17 } }, "x-order": 10 }, "qan_mongodb_profiler_agent": { + "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", "type": "object", "properties": { - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "service_id": { - "description": "Service identifier.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", "x-order": 1 }, - "username": { - "description": "MongoDB username for getting profile data.", - "type": "string", + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", "x-order": 2 }, - "password": { - "description": "MongoDB password for getting profile data.", + "service_id": { + "description": "Service identifier.", "type": "string", "x-order": 3 }, + "username": { + "description": "MongoDB username for getting profiler data.", + "type": "string", + "x-order": 4 + }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 4 + "x-order": 5 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 5 - }, - "tls_certificate_key": { - "description": "Client certificate and key.", - "type": "string", "x-order": 6 }, - "tls_certificate_key_file_password": { - "description": "Password for decrypting tls_certificate_key.", - "type": "string", - "x-order": 7 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 8 - }, "max_query_length": { "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 9 + "x-order": 7 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -11151,22 +11288,27 @@ "additionalProperties": { "type": "string" }, - "x-order": 10 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 11 + "x-order": 8 }, - "authentication_mechanism": { - "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", + "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": 12 + "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": 9 }, - "authentication_database": { - "description": "Authentication database.", + "process_exec_path": { + "description": "Path to exec process.", "type": "string", - "x-order": 13 + "x-order": 10 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -11181,43 +11323,60 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 14 + "x-order": 11 } }, "x-order": 11 }, "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": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 0 + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 }, "service_id": { "description": "Service identifier.", "type": "string", - "x-order": 1 + "x-order": 3 }, "username": { "description": "PostgreSQL username for getting pg stat statements data.", "type": "string", - "x-order": 2 + "x-order": 4 }, - "password": { - "description": "PostgreSQL password for getting pg stat statements data.", - "type": "string", - "x-order": 3 + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 5 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 6 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 4 + "x-order": 7 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 5 + "x-order": 8 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -11225,39 +11384,28 @@ "additionalProperties": { "type": "string" }, - "x-order": 6 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 7 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 8 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", "x-order": 9 }, - "tls_ca": { - "description": "TLS CA certificate.", + "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_cert": { - "description": "TLS Certifcate.", + "process_exec_path": { + "description": "Path to exec process.", "type": "string", "x-order": 11 }, - "tls_key": { - "description": "TLS Certificate Key.", - "type": "string", - "x-order": 12 - }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", @@ -11271,54 +11419,65 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 13 + "x-order": 12 } }, "x-order": 12 }, "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 + }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 0 + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 }, "service_id": { "description": "Service identifier.", "type": "string", - "x-order": 1 + "x-order": 3 }, "username": { "description": "PostgreSQL username for getting pg stat monitor data.", "type": "string", - "x-order": 2 - }, - "password": { - "description": "PostgreSQL password for getting pg stat monitor data.", - "type": "string", - "x-order": 3 + "x-order": 4 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 4 + "x-order": 5 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 5 + "x-order": 6 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 7 }, "max_query_length": { "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 6 + "x-order": 8 }, - "disable_query_examples": { - "description": "Disable query examples.", + "query_examples_disabled": { + "description": "True if query examples are disabled.", "type": "boolean", - "x-order": 7 + "x-order": 9 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -11326,33 +11485,28 @@ "additionalProperties": { "type": "string" }, - "x-order": 8 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 9 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", "x-order": 10 }, - "tls_ca": { - "description": "TLS CA certificate.", + "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_cert": { - "description": "TLS Certifcate.", + "process_exec_path": { + "description": "Path to exec process.", "type": "string", "x-order": 12 }, - "tls_key": { - "description": "TLS Certificate Key.", - "type": "string", - "x-order": 13 - }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", @@ -11366,13 +11520,63 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 14 + "x-order": 13 } }, "x-order": 13 } } } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/inventory/agents/{agent_id}": { + "get": { + "description": "Returns a single Agent by ID.", + "tags": [ + "AgentsService" + ], + "summary": "Get Agent", + "operationId": "GetAgent", + "parameters": [ + { + "type": "string", + "description": "Unique randomly generated instance identifier.", + "name": "agent_id", + "in": "path", + "required": true } ], "responses": { @@ -11416,6 +11620,49 @@ }, "x-order": 0 }, + "vmagent": { + "description": "VMAgent runs on Generic or Container Node alongside pmm-agent.\nIt scrapes other exporter Agents that are configured with push_metrics_enabled\nand uses Prometheus remote write protocol to push metrics to PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "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": 2 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 3 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 4 + } + }, + "x-order": 1 + }, "node_exporter": { "description": "NodeExporter runs on Generic or Container Node and exposes its metrics.", "type": "object", @@ -11503,7 +11750,7 @@ "x-order": 10 } }, - "x-order": 1 + "x-order": 2 }, "mysqld_exporter": { "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", @@ -11644,7 +11891,7 @@ "x-order": 20 } }, - "x-order": 2 + "x-order": 3 }, "mongodb_exporter": { "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", @@ -11772,10 +12019,131 @@ "x-order": 17 } }, - "x-order": 3 + "x-order": 4 + }, + "postgres_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 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "PostgreSQL username for scraping metrics.", + "type": "string", + "x-order": 4 + }, + "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 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 8 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "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 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 12 + }, + "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 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 14 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 15 + }, + "max_exporter_connections": { + "description": "Maximum number of connections that exporter can open to the database instance.", + "type": "integer", + "format": "int32", + "x-order": 16 + } + }, + "x-order": 5 }, - "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": { @@ -11799,7 +12167,7 @@ "x-order": 3 }, "username": { - "description": "PostgreSQL username for scraping metrics.", + "description": "ProxySQL username for scraping metrics.", "type": "string", "x-order": 4 }, @@ -11809,7 +12177,7 @@ "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 }, @@ -11875,28 +12243,16 @@ ], "x-order": 13 }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 14 - }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 15 - }, - "max_exporter_connections": { - "description": "Maximum number of connections that exporter can open to the database instance.", - "type": "integer", - "format": "int32", - "x-order": 16 + "x-order": 14 } }, - "x-order": 4 + "x-order": 6 }, - "proxysql_exporter": { - "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", + "qan_mysql_perfschema_agent": { + "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -11920,7 +12276,7 @@ "x-order": 3 }, "username": { - "description": "ProxySQL username for scraping metrics.", + "description": "MySQL username for getting performance data.", "type": "string", "x-order": 4 }, @@ -11934,26 +12290,44 @@ "type": "boolean", "x-order": 6 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", "x-order": 7 }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", + "tls_cert": { + "description": "Client certificate.", + "type": "string", "x-order": 8 }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 9 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 10 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 11 + }, + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 12 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { "type": "string" }, - "x-order": 9 + "x-order": 13 }, "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.", @@ -11968,18 +12342,12 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 10 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 + "x-order": 14 }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 12 + "x-order": 15 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -11994,18 +12362,13 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 13 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 14 + "x-order": 16 } }, - "x-order": 5 + "x-order": 7 }, - "external_exporter": { - "description": "ExternalExporter runs on any Node type, including Remote Node.", + "qan_mysql_slowlog_agent": { + "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -12013,13 +12376,13 @@ "type": "string", "x-order": 0 }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", "x-order": 1 }, "disabled": { - "description": "If disabled, metrics from this exporter will not be collected.", + "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", "x-order": 2 }, @@ -12029,49 +12392,105 @@ "x-order": 3 }, "username": { - "description": "HTTP basic auth username for collecting metrics.", + "description": "MySQL username for getting performance data.", "type": "string", "x-order": 4 }, - "scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints.", - "type": "string", + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", "x-order": 5 }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI.", - "type": "string", + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", "x-order": 6 }, + "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 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 10 + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "title": "Limit query length in QAN (default: server-defined; -1: no limit)", + "x-order": 11 + }, + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 12 + }, + "max_slowlog_file_size": { + "description": "Slowlog file is rotated at this size if \u003e 0.", + "type": "string", + "format": "int64", + "x-order": 13 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 7 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 8 + "x-order": 14 }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 9 + "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": 15 }, "process_exec_path": { - "description": "Path to exec process.", "type": "string", - "x-order": 10 + "title": "mod tidy", + "x-order": 16 + }, + "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": 17 } }, - "x-order": 6 + "x-order": 8 }, - "rds_exporter": { - "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", + "qan_mongodb_profiler_agent": { + "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -12089,23 +12508,39 @@ "type": "boolean", "x-order": 2 }, - "node_id": { - "description": "Node identifier.", + "service_id": { + "description": "Service identifier.", "type": "string", "x-order": 3 }, - "aws_access_key": { - "description": "AWS Access Key.", + "username": { + "description": "MongoDB username for getting profiler data.", "type": "string", "x-order": 4 }, + "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 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 5 + "x-order": 8 }, "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.", @@ -12120,33 +12555,12 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 6 - }, - "listen_port": { - "description": "Listen port for scraping metrics (the same for several configurations).", - "type": "integer", - "format": "int64", - "x-order": 7 - }, - "basic_metrics_disabled": { - "description": "Basic metrics are disabled.", - "type": "boolean", - "x-order": 8 - }, - "enhanced_metrics_disabled": { - "description": "Enhanced metrics are disabled.", - "type": "boolean", "x-order": 9 }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 10 - }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 11 + "x-order": 10 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -12161,19 +12575,13 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 12 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 13 + "x-order": 11 } }, - "x-order": 7 + "x-order": 9 }, - "azure_database_exporter": { - "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics.", + "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": { @@ -12191,28 +12599,44 @@ "type": "boolean", "x-order": 2 }, - "node_id": { - "description": "Node identifier.", + "service_id": { + "description": "Service identifier.", "type": "string", "x-order": 3 }, - "azure_database_subscription_id": { - "description": "Azure database subscription ID.", + "username": { + "description": "PostgreSQL username for getting pg stat statements data.", "type": "string", "x-order": 4 }, - "azure_database_resource_type": { - "type": "string", - "title": "Azure database resource type (mysql, maria, postgres)", + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", "x-order": 5 }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 6 + }, + "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 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 6 + "x-order": 9 }, "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.", @@ -12227,23 +12651,12 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 7 - }, - "listen_port": { - "description": "Listen port for scraping metrics (the same for several configurations).", - "type": "integer", - "format": "int64", - "x-order": 8 - }, - "push_metrics_enabled": { - "description": "True if the exporter operates in push metrics mode.", - "type": "boolean", - "x-order": 9 + "x-order": 10 }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 10 + "x-order": 11 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -12258,13 +12671,13 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 11 + "x-order": 12 } }, - "x-order": 8 + "x-order": 10 }, - "qan_mysql_perfschema_agent": { - "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "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": { @@ -12288,7 +12701,7 @@ "x-order": 3 }, "username": { - "description": "MySQL username for getting performance data.", + "description": "PostgreSQL username for getting pg stat monitor data.", "type": "string", "x-order": 4 }, @@ -12302,36 +12715,21 @@ "type": "boolean", "x-order": 6 }, - "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 - }, "disable_comments_parsing": { "description": "Disable parsing comments from queries and showing them in QAN.", "type": "boolean", - "x-order": 10 + "x-order": 7 }, "max_query_length": { "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 11 + "x-order": 8 }, "query_examples_disabled": { "description": "True if query examples are disabled.", "type": "boolean", - "x-order": 12 + "x-order": 9 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -12339,7 +12737,7 @@ "additionalProperties": { "type": "string" }, - "x-order": 13 + "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.", @@ -12354,12 +12752,12 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 14 + "x-order": 11 }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 15 + "x-order": 12 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -12374,13 +12772,13 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 16 + "x-order": 13 } }, - "x-order": 9 + "x-order": 11 }, - "qan_mysql_slowlog_agent": { - "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "external_exporter": { + "description": "ExternalExporter runs on any Node type, including Remote Node.", "type": "object", "properties": { "agent_id": { @@ -12388,13 +12786,13 @@ "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", "type": "string", "x-order": 1 }, "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "description": "If disabled, metrics from this exporter will not be collected.", "type": "boolean", "x-order": 2 }, @@ -12404,56 +12802,182 @@ "x-order": 3 }, "username": { - "description": "MySQL username for getting performance data.", + "description": "HTTP basic auth username for collecting metrics.", "type": "string", "x-order": 4 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", + "scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints.", + "type": "string", "x-order": 5 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI.", + "type": "string", "x-order": 6 }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 8 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + } + }, + "x-order": 12 + }, + "rds_exporter": { + "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "node_id": { + "description": "Node identifier.", + "type": "string", + "x-order": 3 + }, + "aws_access_key": { + "description": "AWS Access Key.", + "type": "string", + "x-order": 4 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 5 + }, + "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 + }, + "listen_port": { + "description": "Listen port for scraping metrics (the same for several configurations).", + "type": "integer", + "format": "int64", "x-order": 7 }, - "tls_cert": { - "description": "Client certificate.", + "basic_metrics_disabled": { + "description": "Basic metrics are disabled.", + "type": "boolean", + "x-order": 8 + }, + "enhanced_metrics_disabled": { + "description": "Enhanced metrics are disabled.", + "type": "boolean", + "x-order": 9 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 10 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 11 + }, + "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 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 13 + } + }, + "x-order": 13 + }, + "azure_database_exporter": { + "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 8 + "x-order": 0 }, - "tls_key": { - "description": "Password for decrypting tls_cert.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", - "x-order": 9 + "x-order": 1 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", - "x-order": 10 + "x-order": 2 }, - "max_query_length": { - "type": "integer", - "format": "int32", - "title": "Limit query length in QAN (default: server-defined; -1: no limit)", - "x-order": 11 + "node_id": { + "description": "Node identifier.", + "type": "string", + "x-order": 3 }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 12 + "azure_database_subscription_id": { + "description": "Azure database subscription ID.", + "type": "string", + "x-order": 4 }, - "max_slowlog_file_size": { - "description": "Slowlog file is rotated at this size if \u003e 0.", + "azure_database_resource_type": { "type": "string", - "format": "int64", - "x-order": 13 + "title": "Azure database resource type (mysql, maria, postgres)", + "x-order": 5 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -12461,7 +12985,7 @@ "additionalProperties": { "type": "string" }, - "x-order": 14 + "x-order": 6 }, "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.", @@ -12476,12 +13000,23 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 15 + "x-order": 7 + }, + "listen_port": { + "description": "Listen port for scraping metrics (the same for several configurations).", + "type": "integer", + "format": "int64", + "x-order": 8 + }, + "push_metrics_enabled": { + "description": "True if the exporter operates in push metrics mode.", + "type": "boolean", + "x-order": 9 }, "process_exec_path": { + "description": "Path to exec process.", "type": "string", - "title": "mod tidy", - "x-order": 16 + "x-order": 10 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -12496,437 +13031,507 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 17 + "x-order": 11 + } + }, + "x-order": 14 + } + } + } + }, + "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 + } + } + } + } + } + }, + "put": { + "description": "Updates an Agent in Inventory. Only one agent at a time can be passed.", + "tags": [ + "AgentsService" + ], + "summary": "Update an Agent in Inventory", + "operationId": "ChangeAgent", + "parameters": [ + { + "type": "string", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "node_exporter": { + "type": "object", + "properties": { + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", + "type": "boolean", + "x-nullable": true, + "x-order": 0 + }, + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, + "x-order": 1 + }, + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", + "type": "boolean", + "x-nullable": true, + "x-order": 2 + } + }, + "x-order": 0 + }, + "mysqld_exporter": { + "type": "object", + "properties": { + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", + "type": "boolean", + "x-nullable": true, + "x-order": 0 + }, + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, + "x-order": 1 + }, + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", + "type": "boolean", + "x-nullable": true, + "x-order": 2 + } + }, + "x-order": 1 + }, + "mongodb_exporter": { + "type": "object", + "properties": { + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", + "type": "boolean", + "x-nullable": true, + "x-order": 0 + }, + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, + "x-order": 1 + }, + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", + "type": "boolean", + "x-nullable": true, + "x-order": 2 + } + }, + "x-order": 2 + }, + "postgres_exporter": { + "type": "object", + "properties": { + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", + "type": "boolean", + "x-nullable": true, + "x-order": 0 + }, + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, + "x-order": 1 + }, + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", + "type": "boolean", + "x-nullable": true, + "x-order": 2 } }, - "x-order": 10 + "x-order": 3 }, - "qan_mongodb_profiler_agent": { - "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "proxysql_exporter": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", + "type": "boolean", + "x-nullable": true, "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", "type": "boolean", + "x-nullable": true, "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "MongoDB username for getting profiler data.", - "type": "string", - "x-order": 4 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", + } + }, + "x-order": 4 + }, + "external_exporter": { + "type": "object", + "properties": { + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", "type": "boolean", - "x-order": 6 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 7 + "x-nullable": true, + "x-order": 0 }, "custom_labels": { - "description": "Custom user-assigned labels.", + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", "type": "object", - "additionalProperties": { - "type": "string" + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } }, - "x-order": 8 - }, - "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": 9 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 10 + "x-nullable": true, + "x-order": 1 }, - "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": 11 + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", + "type": "boolean", + "x-nullable": true, + "x-order": 2 } }, - "x-order": 11 + "x-order": 5 }, - "qan_postgresql_pgstatements_agent": { - "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "rds_exporter": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", + "type": "boolean", + "x-nullable": true, "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", "type": "boolean", + "x-nullable": true, "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "PostgreSQL username for getting pg stat statements data.", - "type": "string", - "x-order": 4 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 5 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 6 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 7 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", + } + }, + "x-order": 6 + }, + "azure_database_exporter": { + "type": "object", + "properties": { + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", "type": "boolean", - "x-order": 8 + "x-nullable": true, + "x-order": 0 }, "custom_labels": { - "description": "Custom user-assigned labels.", + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", "type": "object", - "additionalProperties": { - "type": "string" + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } }, - "x-order": 9 - }, - "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 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 11 + "x-nullable": true, + "x-order": 1 }, - "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 + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", + "type": "boolean", + "x-nullable": true, + "x-order": 2 } }, - "x-order": 12 - }, - "qan_postgresql_pgstatmonitor_agent": { - "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "x-order": 7 + }, + "qan_mysql_perfschema_agent": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", + "type": "boolean", + "x-nullable": true, "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", "type": "boolean", + "x-nullable": true, "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "PostgreSQL username for getting pg stat monitor data.", - "type": "string", - "x-order": 4 - }, - "tls": { - "description": "Use TLS for database connections.", + } + }, + "x-order": 8 + }, + "qan_mysql_slowlog_agent": { + "type": "object", + "properties": { + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", "type": "boolean", - "x-order": 5 + "x-nullable": true, + "x-order": 0 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, + "x-order": 1 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", "type": "boolean", - "x-order": 7 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 8 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", + "x-nullable": true, + "x-order": 2 + } + }, + "x-order": 9 + }, + "qan_mongodb_profiler_agent": { + "type": "object", + "properties": { + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", "type": "boolean", - "x-order": 9 + "x-nullable": true, + "x-order": 0 }, "custom_labels": { - "description": "Custom user-assigned labels.", + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", "type": "object", - "additionalProperties": { - "type": "string" + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } }, - "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": 11 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 12 + "x-nullable": true, + "x-order": 1 }, - "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 + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", + "type": "boolean", + "x-nullable": true, + "x-order": 2 } }, - "x-order": 13 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 + "x-order": 10 }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/inventory/agents/{agent_id}": { - "get": { - "description": "Returns a single Agent by ID.", - "tags": [ - "AgentsService" - ], - "summary": "Get Agent", - "operationId": "GetAgent", - "parameters": [ - { - "type": "string", - "description": "Unique randomly generated instance identifier.", - "name": "agent_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "pmm_agent": { - "description": "PMMAgent runs on Generic or Container Node.", + "qan_postgresql_pgstatements_agent": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", + "type": "boolean", + "x-nullable": true, "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.", + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", "type": "object", - "additionalProperties": { - "type": "string" + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } }, - "x-order": 2 - }, - "connected": { - "description": "True if Agent is running and connected to pmm-managed.", - "type": "boolean", - "x-order": 3 + "x-nullable": true, + "x-order": 1 }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 4 + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", + "type": "boolean", + "x-nullable": true, + "x-order": 2 } }, - "x-order": 0 + "x-order": 11 }, - "vmagent": { - "description": "VMAgent runs on Generic or Container Node alongside pmm-agent.\nIt scrapes other exporter Agents that are configured with push_metrics_enabled\nand uses Prometheus remote write protocol to push metrics to PMM Server.", + "qan_postgresql_pgstatmonitor_agent": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", + "type": "boolean", + "x-nullable": true, "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, "x-order": 1 }, - "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" - ], + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", + "type": "boolean", + "x-nullable": true, "x-order": 2 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 3 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 4 } }, - "x-order": 1 - }, + "x-order": 12 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { "node_exporter": { "description": "NodeExporter runs on Generic or Container Node and exposes its metrics.", "type": "object", @@ -13014,7 +13619,7 @@ "x-order": 10 } }, - "x-order": 2 + "x-order": 0 }, "mysqld_exporter": { "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", @@ -13155,7 +13760,7 @@ "x-order": 20 } }, - "x-order": 3 + "x-order": 1 }, "mongodb_exporter": { "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", @@ -13283,7 +13888,7 @@ "x-order": 17 } }, - "x-order": 4 + "x-order": 2 }, "postgres_exporter": { "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", @@ -13404,7 +14009,7 @@ "x-order": 16 } }, - "x-order": 5 + "x-order": 3 }, "proxysql_exporter": { "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", @@ -13425,46 +14030,198 @@ "type": "boolean", "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "ProxySQL username for scraping metrics.", + "type": "string", + "x-order": 4 + }, + "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 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 8 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "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 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 12 + }, + "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 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 14 + } + }, + "x-order": 4 + }, + "external_exporter": { + "description": "ExternalExporter runs on any Node type, including Remote 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 + }, + "disabled": { + "description": "If disabled, metrics from this exporter will not be collected.", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "HTTP basic auth username for collecting metrics.", + "type": "string", + "x-order": 4 + }, + "scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints.", + "type": "string", + "x-order": 5 + }, + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI.", + "type": "string", + "x-order": 6 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 8 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + } + }, + "x-order": 5 + }, + "rds_exporter": { + "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "node_id": { + "description": "Node identifier.", "type": "string", "x-order": 3 }, - "username": { - "description": "ProxySQL username for scraping metrics.", + "aws_access_key": { + "description": "AWS Access Key.", "type": "string", "x-order": 4 }, - "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 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 7 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 8 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 9 + "x-order": 5 }, "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.", @@ -13479,18 +14236,33 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 10 + "x-order": 6 }, "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 + }, + "basic_metrics_disabled": { + "description": "Basic metrics are disabled.", + "type": "boolean", + "x-order": 8 + }, + "enhanced_metrics_disabled": { + "description": "Enhanced metrics are disabled.", + "type": "boolean", + "x-order": 9 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 10 }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 12 + "x-order": 11 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -13505,18 +14277,19 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 13 + "x-order": 12 }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 14 + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 13 } }, "x-order": 6 }, - "qan_mysql_perfschema_agent": { - "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "azure_database_exporter": { + "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics.", "type": "object", "properties": { "agent_id": { @@ -13534,56 +14307,20 @@ "type": "boolean", "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "node_id": { + "description": "Node identifier.", "type": "string", "x-order": 3 }, - "username": { - "description": "MySQL username for getting performance data.", + "azure_database_subscription_id": { + "description": "Azure database subscription ID.", "type": "string", "x-order": 4 }, - "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 - }, - "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.", + "azure_database_resource_type": { "type": "string", - "x-order": 9 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 10 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 11 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 12 + "title": "Azure database resource type (mysql, maria, postgres)", + "x-order": 5 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -13591,7 +14328,7 @@ "additionalProperties": { "type": "string" }, - "x-order": 13 + "x-order": 6 }, "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.", @@ -13606,12 +14343,23 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 14 + "x-order": 7 + }, + "listen_port": { + "description": "Listen port for scraping metrics (the same for several configurations).", + "type": "integer", + "format": "int64", + "x-order": 8 + }, + "push_metrics_enabled": { + "description": "True if the exporter operates in push metrics mode.", + "type": "boolean", + "x-order": 9 }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 15 + "x-order": 10 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -13626,13 +14374,13 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 16 + "x-order": 11 } }, "x-order": 7 }, - "qan_mysql_slowlog_agent": { - "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "qan_mysql_perfschema_agent": { + "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -13691,9 +14439,9 @@ "x-order": 10 }, "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "title": "Limit query length in QAN (default: server-defined; -1: no limit)", "x-order": 11 }, "query_examples_disabled": { @@ -13701,19 +14449,13 @@ "type": "boolean", "x-order": 12 }, - "max_slowlog_file_size": { - "description": "Slowlog file is rotated at this size if \u003e 0.", - "type": "string", - "format": "int64", - "x-order": 13 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 14 + "x-order": 13 }, "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.", @@ -13728,12 +14470,12 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 15 + "x-order": 14 }, "process_exec_path": { + "description": "Path to exec process.", "type": "string", - "title": "mod tidy", - "x-order": 16 + "x-order": 15 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -13748,13 +14490,13 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 17 + "x-order": 16 } }, "x-order": 8 }, - "qan_mongodb_profiler_agent": { - "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "qan_mysql_slowlog_agent": { + "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -13778,7 +14520,7 @@ "x-order": 3 }, "username": { - "description": "MongoDB username for getting profiler data.", + "description": "MySQL username for getting performance data.", "type": "string", "x-order": 4 }, @@ -13792,107 +14534,42 @@ "type": "boolean", "x-order": 6 }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", "x-order": 7 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", "x-order": 8 }, - "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.", + "tls_key": { + "description": "Password for decrypting tls_cert.", "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": 9 }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 10 - }, - "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": 11 - } - }, - "x-order": 9 - }, - "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": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "PostgreSQL username for getting pg stat statements data.", - "type": "string", - "x-order": 4 - }, "disable_comments_parsing": { "description": "Disable parsing comments from queries and showing them in QAN.", "type": "boolean", - "x-order": 5 + "x-order": 10 }, "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 6 + "title": "Limit query length in QAN (default: server-defined; -1: no limit)", + "x-order": 11 }, - "tls": { - "description": "Use TLS for database connections.", + "query_examples_disabled": { + "description": "True if query examples are disabled.", "type": "boolean", - "x-order": 7 + "x-order": 12 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 8 + "max_slowlog_file_size": { + "description": "Slowlog file is rotated at this size if \u003e 0.", + "type": "string", + "format": "int64", + "x-order": 13 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -13900,7 +14577,7 @@ "additionalProperties": { "type": "string" }, - "x-order": 9 + "x-order": 14 }, "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.", @@ -13915,12 +14592,12 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 10 + "x-order": 15 }, "process_exec_path": { - "description": "Path to exec process.", "type": "string", - "x-order": 11 + "title": "mod tidy", + "x-order": 16 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -13935,13 +14612,13 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 12 + "x-order": 17 } }, - "x-order": 10 + "x-order": 9 }, - "qan_postgresql_pgstatmonitor_agent": { - "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "qan_mongodb_profiler_agent": { + "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -13965,7 +14642,7 @@ "x-order": 3 }, "username": { - "description": "PostgreSQL username for getting pg stat monitor data.", + "description": "MongoDB username for getting profiler data.", "type": "string", "x-order": 4 }, @@ -13979,21 +14656,11 @@ "type": "boolean", "x-order": 6 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 7 - }, "max_query_length": { "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 8 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 9 + "x-order": 7 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -14001,7 +14668,7 @@ "additionalProperties": { "type": "string" }, - "x-order": 10 + "x-order": 8 }, "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.", @@ -14016,12 +14683,12 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 11 + "x-order": 9 }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 12 + "x-order": 10 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -14036,13 +14703,13 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 13 + "x-order": 11 } }, - "x-order": 11 + "x-order": 10 }, - "external_exporter": { - "description": "ExternalExporter runs on any Node type, including Remote 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": { @@ -14050,13 +14717,13 @@ "type": "string", "x-order": 0 }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", "x-order": 1 }, "disabled": { - "description": "If disabled, metrics from this exporter will not be collected.", + "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", "x-order": 2 }, @@ -14066,75 +14733,30 @@ "x-order": 3 }, "username": { - "description": "HTTP basic auth username for collecting metrics.", + "description": "PostgreSQL username for getting pg stat statements data.", "type": "string", "x-order": 4 }, - "scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints.", - "type": "string", + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", "x-order": 5 }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI.", - "type": "string", - "x-order": 6 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 7 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", - "format": "int64", - "x-order": 8 + "format": "int32", + "x-order": 6 }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", + "tls": { + "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 9 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 10 - } - }, - "x-order": 12 - }, - "rds_exporter": { - "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 + "x-order": 7 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 2 - }, - "node_id": { - "description": "Node identifier.", - "type": "string", - "x-order": 3 - }, - "aws_access_key": { - "description": "AWS Access Key.", - "type": "string", - "x-order": 4 + "x-order": 8 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -14142,7 +14764,7 @@ "additionalProperties": { "type": "string" }, - "x-order": 5 + "x-order": 9 }, "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.", @@ -14157,27 +14779,6 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 6 - }, - "listen_port": { - "description": "Listen port for scraping metrics (the same for several configurations).", - "type": "integer", - "format": "int64", - "x-order": 7 - }, - "basic_metrics_disabled": { - "description": "Basic metrics are disabled.", - "type": "boolean", - "x-order": 8 - }, - "enhanced_metrics_disabled": { - "description": "Enhanced metrics are disabled.", - "type": "boolean", - "x-order": 9 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", "x-order": 10 }, "process_exec_path": { @@ -14199,18 +14800,12 @@ "LOG_LEVEL_DEBUG" ], "x-order": 12 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 13 } }, - "x-order": 13 + "x-order": 11 }, - "azure_database_exporter": { - "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics.", + "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": { @@ -14228,28 +14823,49 @@ "type": "boolean", "x-order": 2 }, - "node_id": { - "description": "Node identifier.", + "service_id": { + "description": "Service identifier.", "type": "string", "x-order": 3 }, - "azure_database_subscription_id": { - "description": "Azure database subscription ID.", + "username": { + "description": "PostgreSQL username for getting pg stat monitor data.", "type": "string", "x-order": 4 }, - "azure_database_resource_type": { - "type": "string", - "title": "Azure database resource type (mysql, maria, postgres)", + "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 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 7 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 8 + }, + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 9 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 6 + "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.", @@ -14264,23 +14880,12 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 7 - }, - "listen_port": { - "description": "Listen port for scraping metrics (the same for several configurations).", - "type": "integer", - "format": "int64", - "x-order": 8 - }, - "push_metrics_enabled": { - "description": "True if the exporter operates in push metrics mode.", - "type": "boolean", - "x-order": 9 + "x-order": 11 }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 10 + "x-order": 12 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -14295,13 +14900,74 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 11 + "x-order": 13 } }, - "x-order": 14 + "x-order": 12 + } + } + } + }, + "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 } } } + } + } + }, + "delete": { + "description": "Removes an Agent from Inventory.", + "tags": [ + "AgentsService" + ], + "summary": "Remove an Agent from Inventory", + "operationId": "RemoveAgent", + "parameters": [ + { + "type": "string", + "name": "agent_id", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "Remove agent with all dependencies.", + "name": "force", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } }, "default": { "description": "An unexpected error response.", @@ -14335,615 +15001,471 @@ } } } - }, - "put": { - "description": "Updates an Agent in Inventory. Only one agent at a time can be passed.", + } + }, + "/v1/inventory/agents/{agent_id}/logs": { + "get": { + "description": "Returns Agent logs by ID.", "tags": [ "AgentsService" ], - "summary": "Update an Agent in Inventory", - "operationId": "ChangeAgent", + "summary": "Get Agent logs", + "operationId": "GetAgentLogs", "parameters": [ { "type": "string", + "description": "Unique randomly generated instance identifier.", "name": "agent_id", "in": "path", "required": true }, { - "name": "body", - "in": "body", - "required": true, + "type": "integer", + "format": "int64", + "description": "Limit the number of log lines to this value. Pass 0 for no limit.", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", "schema": { "type": "object", "properties": { - "node_exporter": { - "type": "object", - "properties": { - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } - }, - "x-nullable": true, - "x-order": 1 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 - } + "logs": { + "type": "array", + "items": { + "type": "string" }, "x-order": 0 }, - "mysqld_exporter": { - "type": "object", - "properties": { - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } - }, - "x-nullable": true, - "x-order": 1 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 - } - }, + "agent_config_log_lines_count": { + "type": "integer", + "format": "int64", "x-order": 1 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 }, - "mongodb_exporter": { - "type": "object", - "properties": { - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } - }, - "x-nullable": true, - "x-order": 1 + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 - } + "additionalProperties": false }, "x-order": 2 - }, - "postgres_exporter": { - "type": "object", - "properties": { - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } + } + } + } + } + } + } + }, + "/v1/inventory/nodes": { + "get": { + "description": "Returns a list of all Nodes.", + "tags": [ + "NodesService" + ], + "summary": "List Nodes", + "operationId": "ListNodes", + "parameters": [ + { + "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" + ], + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "description": "Return only Nodes with matching Node type.", + "name": "node_type", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "generic": { + "type": "array", + "items": { + "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 }, - "x-nullable": true, - "x-order": 1 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 - } - }, - "x-order": 3 - }, - "proxysql_exporter": { - "type": "object", - "properties": { - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 4 }, - "x-nullable": true, - "x-order": 1 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 - } - }, - "x-order": 4 - }, - "external_exporter": { - "type": "object", - "properties": { - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 5 }, - "x-nullable": true, - "x-order": 1 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 - } - }, - "x-order": 5 - }, - "rds_exporter": { - "type": "object", - "properties": { - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } + "region": { + "description": "Node region.", + "type": "string", + "x-order": 6 }, - "x-nullable": true, - "x-order": 1 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 - } - }, - "x-order": 6 - }, - "azure_database_exporter": { - "type": "object", - "properties": { - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 7 }, - "x-nullable": true, - "x-order": 1 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + } } }, - "x-order": 7 + "x-order": 0 }, - "qan_mysql_perfschema_agent": { - "type": "object", - "properties": { - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } + "container": { + "type": "array", + "items": { + "description": "ContainerNode represents a Docker container.", + "type": "object", + "properties": { + "node_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "x-nullable": true, - "x-order": 1 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 - } - }, - "x-order": 8 - }, - "qan_mysql_slowlog_agent": { - "type": "object", - "properties": { - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "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 }, - "x-nullable": true, - "x-order": 1 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 + "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": 9 + "x-order": 1 }, - "qan_mongodb_profiler_agent": { - "type": "object", - "properties": { - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } + "remote": { + "type": "array", + "items": { + "description": "RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes.", + "type": "object", + "properties": { + "node_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "x-nullable": true, - "x-order": 1 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "address": { + "description": "Node address (DNS name or IP).", + "type": "string", + "x-order": 2 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 3 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 4 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 5 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 + } } }, - "x-order": 10 + "x-order": 2 }, - "qan_postgresql_pgstatements_agent": { - "type": "object", - "properties": { - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } + "remote_rds": { + "type": "array", + "items": { + "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", + "type": "object", + "properties": { + "node_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "x-nullable": true, - "x-order": 1 - }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "address": { + "description": "DB instance identifier.", + "type": "string", + "x-order": 2 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 3 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 4 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 5 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 + } } }, - "x-order": 11 + "x-order": 3 }, - "qan_postgresql_pgstatmonitor_agent": { - "type": "object", - "properties": { - "enable": { - "description": "Enable this Agent. Agents are enabled by default when they get added.", - "type": "boolean", - "x-nullable": true, - "x-order": 0 - }, - "custom_labels": { - "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 0 - } + "remote_azure_database": { + "type": "array", + "items": { + "description": "RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes.", + "type": "object", + "properties": { + "node_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "x-nullable": true, - "x-order": 1 + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "address": { + "description": "DB instance identifier.", + "type": "string", + "x-order": 2 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 3 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 4 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 5 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 + } + } + }, + "x-order": 4 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } }, - "enable_push_metrics": { - "description": "Enables push metrics with vmagent.", - "type": "boolean", - "x-nullable": true, - "x-order": 2 - } + "additionalProperties": false }, - "x-order": 12 + "x-order": 2 } } } } + } + }, + "post": { + "description": "Adds a Node.", + "tags": [ + "NodesService" ], - "responses": { - "200": { - "description": "A successful response.", + "summary": "Add a Node", + "operationId": "AddNode", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, "schema": { "type": "object", "properties": { - "node_exporter": { - "description": "NodeExporter runs on Generic or Container Node and exposes its metrics.", + "generic": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "address": { + "description": "Node address (DNS name or IP).", "type": "string", "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 3 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 4 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 5 - }, - "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 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 7 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 8 - }, - "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": 9 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 10 - } - }, - "x-order": 0 - }, - "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 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "machine_id": { + "description": "Linux machine-id.", "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "distro": { + "description": "Linux distribution name and version.", "type": "string", "x-order": 3 }, - "username": { - "description": "MySQL username for scraping metrics.", + "node_model": { + "description": "Node model.", "type": "string", "x-order": 4 }, - "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 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 7 - }, - "tls_cert": { - "description": "Client certificate.", + "region": { + "description": "Node region.", "type": "string", - "x-order": 8 + "x-order": 5 }, - "tls_key": { - "description": "Password for decrypting tls_cert.", + "az": { + "description": "Node availability zone.", "type": "string", - "x-order": 9 - }, - "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 + "x-order": 6 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -14951,639 +15473,339 @@ "additionalProperties": { "type": "string" }, - "x-order": 11 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 12 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 13 - }, - "table_count": { - "description": "Actual table count at the moment of adding.", - "type": "integer", - "format": "int32", - "x-order": 14 - }, - "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": 15 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 16 - }, - "tablestats_group_disabled": { - "description": "True if tablestats group collectors are currently disabled.", - "type": "boolean", - "x-order": 17 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 18 - }, - "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": 19 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 20 + "x-order": 7 } }, - "x-order": 1 + "x-order": 0 }, - "mongodb_exporter": { - "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", + "container": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "address": { + "description": "Node address (DNS name or IP).", "type": "string", "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "machine_id": { + "description": "Linux machine-id of the Generic Node where this Container Node runs.", + "type": "string", "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", "type": "string", "x-order": 3 }, - "username": { - "description": "MongoDB username for scraping metrics.", + "container_name": { + "description": "Container name.", "type": "string", "x-order": 4 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", + "node_model": { + "description": "Node model.", + "type": "string", "x-order": 5 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", + "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": 7 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", "x-order": 8 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 9 - }, - "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.", + } + }, + "x-order": 1 + }, + "remote": { + "type": "object", + "properties": { + "node_name": { + "description": "Unique across all Nodes 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 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 - }, - "stats_collections": { - "type": "array", - "title": "List of colletions to get stats from. Can use *", - "items": { - "type": "string" - }, - "x-order": 12 + "x-order": 0 }, - "collections_limit": { - "type": "integer", - "format": "int32", - "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", - "x-order": 13 + "address": { + "description": "Node address (DNS name or IP).", + "type": "string", + "x-order": 1 }, - "enable_all_collectors": { - "description": "Enable All collectors.", - "type": "boolean", - "x-order": 14 + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 2 }, - "process_exec_path": { - "description": "Path to exec process.", + "region": { + "description": "Node region.", "type": "string", - "x-order": 15 + "x-order": 3 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "az": { + "description": "Node availability zone.", "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 + "x-order": 4 }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 17 + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 5 } }, "x-order": 2 }, - "postgres_exporter": { - "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", + "remote_rds": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "address": { + "description": "DB instance identifier.", "type": "string", "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "node_model": { + "description": "Node model.", + "type": "string", "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "region": { + "description": "Node region.", "type": "string", "x-order": 3 }, - "username": { - "description": "PostgreSQL username for scraping metrics.", + "az": { + "description": "Node availability zone.", "type": "string", "x-order": 4 }, - "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 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 7 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 8 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 9 - }, - "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 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 12 - }, - "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 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 14 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 15 - }, - "max_exporter_connections": { - "description": "Maximum number of connections that exporter can open to the database instance.", - "type": "integer", - "format": "int32", - "x-order": 16 + "x-order": 5 } }, "x-order": 3 }, - "proxysql_exporter": { - "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", + "remote_azure": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "address": { + "description": "DB instance identifier.", "type": "string", "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "node_model": { + "description": "Node model.", + "type": "string", "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "region": { + "description": "Node region.", "type": "string", "x-order": 3 }, - "username": { - "description": "ProxySQL username for scraping metrics.", + "az": { + "description": "Node availability zone.", "type": "string", "x-order": 4 }, - "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 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 7 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 8 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 9 - }, - "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 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 12 - }, - "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 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 14 + "x-order": 5 } }, "x-order": 4 - }, - "external_exporter": { - "description": "ExternalExporter runs on any Node type, including Remote Node.", + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "generic": { + "description": "GenericNode represents a bare metal server or virtual machine.", "type": "object", "properties": { - "agent_id": { + "node_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", "x-order": 1 }, - "disabled": { - "description": "If disabled, metrics from this exporter will not be collected.", - "type": "boolean", + "address": { + "description": "Node address (DNS name or IP).", + "type": "string", "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "machine_id": { + "description": "Linux machine-id.", "type": "string", "x-order": 3 }, - "username": { - "description": "HTTP basic auth username for collecting metrics.", + "distro": { + "description": "Linux distribution name and version.", "type": "string", "x-order": 4 }, - "scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints.", + "node_model": { + "description": "Node model.", "type": "string", "x-order": 5 }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI.", + "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": 7 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", "x-order": 8 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 9 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 10 } }, - "x-order": 5 + "x-order": 0 }, - "rds_exporter": { - "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", + "container": { + "description": "ContainerNode represents a Docker container.", "type": "object", "properties": { - "agent_id": { + "node_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "address": { + "description": "Node address (DNS name or IP).", + "type": "string", "x-order": 2 }, - "node_id": { - "description": "Node identifier.", + "machine_id": { + "description": "Linux machine-id of the Generic Node where this Container Node runs.", "type": "string", "x-order": 3 }, - "aws_access_key": { - "description": "AWS Access Key.", + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", "type": "string", "x-order": 4 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, + "container_name": { + "description": "Container name.", + "type": "string", "x-order": 5 }, - "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_model": { + "description": "Node model.", "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 }, - "listen_port": { - "description": "Listen port for scraping metrics (the same for several configurations).", - "type": "integer", - "format": "int64", - "x-order": 7 - }, - "basic_metrics_disabled": { - "description": "Basic metrics are disabled.", - "type": "boolean", - "x-order": 8 - }, - "enhanced_metrics_disabled": { - "description": "Enhanced metrics are disabled.", - "type": "boolean", - "x-order": 9 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 10 - }, - "process_exec_path": { - "description": "Path to exec process.", + "region": { + "description": "Node region.", "type": "string", - "x-order": 11 + "x-order": 7 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "az": { + "description": "Node availability zone.", "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 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 13 + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 } }, - "x-order": 6 + "x-order": 1 }, - "azure_database_exporter": { - "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics.", + "remote": { + "description": "RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes.", "type": "object", "properties": { - "agent_id": { + "node_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "address": { + "description": "Node address (DNS name or IP).", + "type": "string", "x-order": 2 }, - "node_id": { - "description": "Node identifier.", + "node_model": { + "description": "Node model.", "type": "string", "x-order": 3 }, - "azure_database_subscription_id": { - "description": "Azure database subscription ID.", + "region": { + "description": "Node region.", "type": "string", "x-order": 4 }, - "azure_database_resource_type": { + "az": { + "description": "Node availability zone.", "type": "string", - "title": "Azure database resource type (mysql, maria, postgres)", "x-order": 5 }, "custom_labels": { @@ -15593,125 +15815,203 @@ "type": "string" }, "x-order": 6 + } + }, + "x-order": 2 + }, + "remote_rds": { + "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", + "type": "object", + "properties": { + "node_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "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_name": { + "description": "Unique across all Nodes 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": 7 + "x-order": 1 }, - "listen_port": { - "description": "Listen port for scraping metrics (the same for several configurations).", - "type": "integer", - "format": "int64", - "x-order": 8 + "address": { + "description": "DB instance identifier.", + "type": "string", + "x-order": 2 }, - "push_metrics_enabled": { - "description": "True if the exporter operates in push metrics mode.", - "type": "boolean", - "x-order": 9 + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 3 }, - "process_exec_path": { - "description": "Path to exec process.", + "region": { + "description": "Node region.", "type": "string", - "x-order": 10 + "x-order": 4 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "az": { + "description": "Node availability zone.", "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": 11 + "x-order": 5 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 } }, - "x-order": 7 + "x-order": 3 }, - "qan_mysql_perfschema_agent": { - "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "remote_azure_database": { + "description": "RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes.", "type": "object", "properties": { - "agent_id": { + "node_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "address": { + "description": "DB instance identifier.", + "type": "string", "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "node_model": { + "description": "Node model.", "type": "string", "x-order": 3 }, - "username": { - "description": "MySQL username for getting performance data.", + "region": { + "description": "Node region.", "type": "string", "x-order": 4 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", + "az": { + "description": "Node availability zone.", + "type": "string", "x-order": 5 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, "x-order": 6 + } + }, + "x-order": 4 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/inventory/nodes/{node_id}": { + "get": { + "description": "Returns a single Node by ID.", + "tags": [ + "NodesService" + ], + "summary": "Get a Node", + "operationId": "GetNode", + "parameters": [ + { + "type": "string", + "description": "Unique randomly generated instance identifier.", + "name": "node_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "generic": { + "description": "GenericNode represents a bare metal server or virtual machine.", + "type": "object", + "properties": { + "node_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 7 + "x-order": 0 }, - "tls_cert": { - "description": "Client certificate.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", - "x-order": 8 + "x-order": 1 }, - "tls_key": { - "description": "Password for decrypting tls_cert.", + "address": { + "description": "Node address (DNS name or IP).", "type": "string", - "x-order": 9 + "x-order": 2 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 10 + "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 }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 11 + "region": { + "description": "Node region.", + "type": "string", + "x-order": 6 }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 12 + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 7 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -15719,455 +16019,205 @@ "additionalProperties": { "type": "string" }, - "x-order": 13 - }, - "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 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 15 - }, - "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 + "x-order": 8 } }, - "x-order": 8 + "x-order": 0 }, - "qan_mysql_slowlog_agent": { - "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "container": { + "description": "ContainerNode represents a Docker container.", "type": "object", "properties": { - "agent_id": { + "node_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "address": { + "description": "Node address (DNS name or IP).", + "type": "string", "x-order": 2 }, - "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 }, - "username": { - "description": "MySQL username for getting performance data.", + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", "type": "string", "x-order": 4 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", + "container_name": { + "description": "Container name.", + "type": "string", "x-order": 5 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", + "node_model": { + "description": "Node model.", + "type": "string", "x-order": 6 }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", + "region": { + "description": "Node region.", "type": "string", "x-order": 7 }, - "tls_cert": { - "description": "Client certificate.", + "az": { + "description": "Node availability zone.", "type": "string", "x-order": 8 }, - "tls_key": { - "description": "Password for decrypting tls_cert.", - "type": "string", - "x-order": 9 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 10 - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "title": "Limit query length in QAN (default: server-defined; -1: no limit)", - "x-order": 11 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 12 - }, - "max_slowlog_file_size": { - "description": "Slowlog file is rotated at this size if \u003e 0.", - "type": "string", - "format": "int64", - "x-order": 13 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 14 - }, - "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": 15 - }, - "process_exec_path": { - "type": "string", - "title": "mod tidy", - "x-order": 16 - }, - "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": 17 + "x-order": 9 } }, - "x-order": 9 + "x-order": 1 }, - "qan_mongodb_profiler_agent": { - "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "remote": { + "description": "RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes.", "type": "object", "properties": { - "agent_id": { + "node_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "address": { + "description": "Node address (DNS name or IP).", + "type": "string", "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "node_model": { + "description": "Node model.", "type": "string", "x-order": 3 }, - "username": { - "description": "MongoDB username for getting profiler data.", + "region": { + "description": "Node region.", "type": "string", "x-order": 4 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", + "az": { + "description": "Node availability zone.", + "type": "string", "x-order": 5 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 7 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 8 - }, - "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": 9 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 10 - }, - "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": 11 + "x-order": 6 } }, - "x-order": 10 + "x-order": 2 }, - "qan_postgresql_pgstatements_agent": { - "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "remote_rds": { + "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", "type": "object", "properties": { - "agent_id": { + "node_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "address": { + "description": "DB instance identifier.", + "type": "string", "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "node_model": { + "description": "Node model.", "type": "string", "x-order": 3 }, - "username": { - "description": "PostgreSQL username for getting pg stat statements data.", + "region": { + "description": "Node region.", "type": "string", "x-order": 4 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", + "az": { + "description": "Node availability zone.", + "type": "string", "x-order": 5 }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 6 - }, - "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 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 9 - }, - "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 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 11 - }, - "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 + "x-order": 6 } }, - "x-order": 11 + "x-order": 3 }, - "qan_postgresql_pgstatmonitor_agent": { - "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "remote_azure_database": { + "description": "RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes.", "type": "object", "properties": { - "agent_id": { + "node_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "address": { + "description": "DB instance identifier.", + "type": "string", "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "node_model": { + "description": "Node model.", "type": "string", "x-order": 3 }, - "username": { - "description": "PostgreSQL username for getting pg stat monitor data.", + "region": { + "description": "Node region.", "type": "string", "x-order": 4 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", + "az": { + "description": "Node availability zone.", + "type": "string", "x-order": 5 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 7 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 8 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 9 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "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": 11 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 12 - }, - "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 + "x-order": 6 } }, - "x-order": 12 + "x-order": 4 } } } @@ -16206,22 +16256,23 @@ } }, "delete": { - "description": "Removes an Agent from Inventory.", + "description": "Removes a Node.", "tags": [ - "AgentsService" + "NodesService" ], - "summary": "Remove an Agent from Inventory", - "operationId": "RemoveAgent", + "summary": "Remove a Node", + "operationId": "RemoveNode", "parameters": [ { "type": "string", - "name": "agent_id", + "description": "Unique randomly generated instance identifier.", + "name": "node_id", "in": "path", "required": true }, { "type": "boolean", - "description": "Remove agent with all dependencies.", + "description": "Remove node with all dependencies.", "name": "force", "in": "query" } @@ -16267,85 +16318,6 @@ } } }, - "/v1/inventory/agents/{agent_id}/logs": { - "get": { - "description": "Returns Agent logs by ID.", - "tags": [ - "AgentsService" - ], - "summary": "Get Agent logs", - "operationId": "GetAgentLogs", - "parameters": [ - { - "type": "string", - "description": "Unique randomly generated instance identifier.", - "name": "agent_id", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "Limit the number of log lines to this value. Pass 0 for no limit.", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "logs": { - "type": "array", - "items": { - "type": "string" - }, - "x-order": 0 - }, - "agent_config_log_lines_count": { - "type": "integer", - "format": "int64", - "x-order": 1 - } - } - } - }, - "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/Agent/List": { "post": { "description": "Returns a filtered list of Agents.", diff --git a/managed/services/inventory/nodes.go b/managed/services/inventory/nodes.go index 87504d9733..d236a3195f 100644 --- a/managed/services/inventory/nodes.go +++ b/managed/services/inventory/nodes.go @@ -72,7 +72,8 @@ func (s *NodesService) Get(ctx context.Context, req *inventoryv1.GetNodeRequest) modelNode := &models.Node{} e := s.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error { var err error - modelNode, err = models.FindNodeByID(tx.Querier, req.NodeId) + nodeID := models.NormalizeNodeID(req.NodeId) + modelNode, err = models.FindNodeByID(tx.Querier, nodeID) if err != nil { return err }