diff --git a/admin/commands/inventory/add_agent_rta_mysql.go b/admin/commands/inventory/add_agent_rta_mysql.go new file mode 100644 index 00000000000..3c3e3391048 --- /dev/null +++ b/admin/commands/inventory/add_agent_rta_mysql.go @@ -0,0 +1,122 @@ +// Copyright (C) 2023 Percona LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package inventory + +import ( + "time" + + "github.com/percona/pmm/admin/commands" + "github.com/percona/pmm/admin/pkg/flags" + "github.com/percona/pmm/api/inventory/v1/json/client" + agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" +) + +var addAgentRTAMySQLAgentResultT = commands.ParseTemplate(` +Real-Time Analytics MySQL agent added. +Agent ID : {{ .Agent.AgentID }} +PMM-Agent ID : {{ .Agent.PMMAgentID }} +Service ID : {{ .Agent.ServiceID }} +Username : {{ .Agent.Username }} +TLS enabled : {{ .Agent.TLS }} +Skip TLS verification : {{ .Agent.TLSSkipVerify }} + +Disabled : {{ .Agent.Disabled }} +Custom labels : {{ formatCustomLabels .Agent.CustomLabels }} +Collect interval : {{ .Agent.RtaOptions.CollectInterval }} +Log level : {{ formatLogLevel .Agent.LogLevel }} +`) + +type addAgentRTAMySQLAgentResult struct { + Agent *agents.AddAgentOKBodyRtaMysqlAgent `json:"rta_mysql_agent"` +} + +func (res *addAgentRTAMySQLAgentResult) Result() {} + +func (res *addAgentRTAMySQLAgentResult) String() string { + return commands.RenderTemplate(addAgentRTAMySQLAgentResultT, res) +} + +// AddAgentRTAMySQLAgentCommand is used by Kong for CLI flags and commands. +type AddAgentRTAMySQLAgentCommand struct { + PMMAgentID string `arg:"" help:"The pmm-agent identifier which runs this instance"` + ServiceID string `arg:"" help:"Service identifier"` + Username string `arg:"" optional:"" help:"MySQL username for getting queries data"` + Password string `help:"MySQL password for getting queries data"` + CustomLabels map[string]string `mapsep:"," help:"Custom user-assigned labels"` + SkipConnectionCheck bool `help:"Skip connection check"` + TLS bool `help:"Use TLS to connect to the database"` + TLSSkipVerify bool `help:"Skip TLS certificate verification"` + TLSCaFile string `help:"Path to certificate authority file"` + TLSCertFile string `help:"Path to client certificate file"` + TLSKeyFile string `help:"Path to client key file"` + CollectInterval *time.Duration `placeholder:"DURATION" help:"Query collect interval (default: server-defined 2s)"` + + flags.LogLevelFatalFlags +} + +// RunCmd executes the AddAgentRTAMySQLAgentCommand and returns the result. +func (cmd *AddAgentRTAMySQLAgentCommand) RunCmd() (commands.Result, error) { + customLabels := commands.ParseKeyValuePair(&cmd.CustomLabels) + + tlsCa, err := commands.ReadFile(cmd.TLSCaFile) + if err != nil { + return nil, err + } + + tlsCert, err := commands.ReadFile(cmd.TLSCertFile) + if err != nil { + return nil, err + } + + tlsKey, err := commands.ReadFile(cmd.TLSKeyFile) + if err != nil { + return nil, err + } + + params := &agents.AddAgentParams{ + Body: agents.AddAgentBody{ + RtaMysqlAgent: &agents.AddAgentParamsBodyRtaMysqlAgent{ + PMMAgentID: cmd.PMMAgentID, + ServiceID: cmd.ServiceID, + Username: cmd.Username, + Password: cmd.Password, + CustomLabels: *customLabels, + SkipConnectionCheck: cmd.SkipConnectionCheck, + TLS: cmd.TLS, + TLSSkipVerify: cmd.TLSSkipVerify, + TLSCa: tlsCa, + TLSCert: tlsCert, + TLSKey: tlsKey, + LogLevel: cmd.LogLevel.EnumValue(), + }, + }, + Context: commands.Ctx, + } + + if cmd.CollectInterval != nil { + params.Body.RtaMysqlAgent.RtaOptions = &agents.AddAgentParamsBodyRtaMysqlAgentRtaOptions{ + CollectInterval: cmd.CollectInterval.String(), + } + } + + resp, err := client.Default.AgentsService.AddAgent(params) + if err != nil { + return nil, err + } + + return &addAgentRTAMySQLAgentResult{ + Agent: resp.Payload.RtaMysqlAgent, + }, nil +} diff --git a/admin/commands/inventory/change_agent_rta_mysql.go b/admin/commands/inventory/change_agent_rta_mysql.go new file mode 100644 index 00000000000..b437b7adff5 --- /dev/null +++ b/admin/commands/inventory/change_agent_rta_mysql.go @@ -0,0 +1,218 @@ +// Copyright (C) 2023 Percona LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package inventory + +import ( + "fmt" + "time" + + "github.com/percona/pmm/admin/commands" + "github.com/percona/pmm/admin/pkg/flags" + "github.com/percona/pmm/api/inventory/v1/json/client" + agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" +) + +var changeAgentRTAMySQLAgentResultT = commands.ParseTemplate(` +Real-Time Analytics MySQL agent configuration updated. +Agent ID : {{ .Agent.AgentID }} +PMM-Agent ID : {{ .Agent.PMMAgentID }} +Service ID : {{ .Agent.ServiceID }} +Username : {{ .Agent.Username }} +TLS enabled : {{ .Agent.TLS }} +Skip TLS verification : {{ .Agent.TLSSkipVerify }} + +Disabled : {{ .Agent.Disabled }} +Custom labels : {{ formatCustomLabels .Agent.CustomLabels }} +Collect interval : {{ .Agent.RtaOptions.CollectInterval }} +Log level : {{ formatLogLevel .Agent.LogLevel }} + +{{- if .Changes}} +Configuration changes applied: +{{- range .Changes}} + - {{ . }} +{{- end}} +{{- end}} +`) + +type changeAgentRTAMySQLAgentResult struct { + Agent *agents.ChangeAgentOKBodyRtaMysqlAgent `json:"rta_mysql_agent"` + Changes []string `json:"changes,omitempty"` +} + +func (res *changeAgentRTAMySQLAgentResult) Result() {} + +func (res *changeAgentRTAMySQLAgentResult) String() string { + return commands.RenderTemplate(changeAgentRTAMySQLAgentResultT, res) +} + +// ChangeAgentRTAMySQLAgentCommand is used by Kong for CLI flags and commands. +type ChangeAgentRTAMySQLAgentCommand struct { + // Embedded flags + flags.LogLevelFatalChangeFlags + + AgentID string `arg:"" help:"Real-Time Analytics MySQL Agent ID"` + + // NOTE: Only provided flags will be changed, others will remain unchanged + + // Basic options + Enable *bool `help:"Enable or disable the agent"` + Username *string `help:"MySQL username for getting queries data"` + Password *string `help:"MySQL password for getting queries data"` + + // TLS options + TLS *bool `help:"Use TLS to connect to the database"` + TLSSkipVerify *bool `help:"Skip TLS certificate verification"` + TLSCaFile *string `help:"Path to certificate authority file"` + TLSCertFile *string `help:"Path to client certificate file"` + TLSKeyFile *string `help:"Path to client key file"` + + // RTA specific options + CollectInterval *time.Duration `placeholder:"DURATION" help:"Query collect interval (default: server-defined 2s)"` + + // Custom labels + CustomLabels *map[string]string `mapsep:"," help:"Custom user-assigned labels"` +} + +// RunCmd executes the ChangeAgentRTAMySQLAgentCommand and returns the result. +func (cmd *ChangeAgentRTAMySQLAgentCommand) RunCmd() (commands.Result, error) { + var changes []string + + // Parse custom labels if provided + customLabels := commands.ParseKeyValuePair(cmd.CustomLabels) + + // Read TLS files if provided + var tlsCa, tlsCert, tlsKey *string + + if cmd.TLSCaFile != nil { + content, err := commands.ReadFile(*cmd.TLSCaFile) + if err != nil { + return nil, fmt.Errorf("failed to read TLS CA file: %w", err) + } + + tlsCa = &content + } + + if cmd.TLSCertFile != nil { + content, err := commands.ReadFile(*cmd.TLSCertFile) + if err != nil { + return nil, fmt.Errorf("failed to read TLS certificate file: %w", err) + } + + tlsCert = &content + } + + if cmd.TLSKeyFile != nil { + content, err := commands.ReadFile(*cmd.TLSKeyFile) + if err != nil { + return nil, fmt.Errorf("failed to read TLS key file: %w", err) + } + + tlsKey = &content + } + + body := &agents.ChangeAgentParamsBodyRtaMysqlAgent{ + Enable: cmd.Enable, + Username: cmd.Username, + Password: cmd.Password, + TLS: cmd.TLS, + TLSSkipVerify: cmd.TLSSkipVerify, + TLSCa: tlsCa, + TLSCert: tlsCert, + TLSKey: tlsKey, + LogLevel: convertLogLevelPtr(cmd.LogLevel), + } + + if customLabels != nil { + body.CustomLabels = &agents.ChangeAgentParamsBodyRtaMysqlAgentCustomLabels{ + Values: *customLabels, + } + } + + if cmd.CollectInterval != nil { + body.RtaOptions = &agents.ChangeAgentParamsBodyRtaMysqlAgentRtaOptions{ + CollectInterval: cmd.CollectInterval.String(), + } + } + + params := &agents.ChangeAgentParams{ + AgentID: cmd.AgentID, + Body: agents.ChangeAgentBody{ + RtaMysqlAgent: body, + }, + Context: commands.Ctx, + } + + resp, err := client.Default.AgentsService.ChangeAgent(params) + if err != nil { + return nil, err + } + + // Track changes + if cmd.Enable != nil { + if *cmd.Enable { + changes = append(changes, "enabled agent") + } else { + changes = append(changes, "disabled agent") + } + } + if cmd.Username != nil { + changes = append(changes, "updated username") + } + if cmd.Password != nil { + changes = append(changes, "updated password") + } + if cmd.TLS != nil { + if *cmd.TLS { + changes = append(changes, "enabled TLS") + } else { + changes = append(changes, "disabled TLS") + } + } + if cmd.TLSSkipVerify != nil { + if *cmd.TLSSkipVerify { + changes = append(changes, "enabled TLS skip verification") + } else { + changes = append(changes, "disabled TLS skip verification") + } + } + if cmd.TLSCaFile != nil { + changes = append(changes, "updated TLS CA certificate") + } + if cmd.TLSCertFile != nil { + changes = append(changes, "updated TLS certificate") + } + if cmd.TLSKeyFile != nil { + changes = append(changes, "updated TLS key") + } + if cmd.LogLevel != nil { + changes = append(changes, fmt.Sprintf("changed log level to %s", *cmd.LogLevel)) + } + if customLabels != nil { + if len(*customLabels) != 0 { + changes = append(changes, "updated custom labels") + } else { + changes = append(changes, "custom labels are removed") + } + } + + if cmd.CollectInterval != nil { + changes = append(changes, fmt.Sprintf("changed collect interval to %s", *cmd.CollectInterval)) + } + + return &changeAgentRTAMySQLAgentResult{ + Agent: resp.Payload.RtaMysqlAgent, + Changes: changes, + }, nil +} diff --git a/admin/commands/inventory/inventory.go b/admin/commands/inventory/inventory.go index 850607aa279..ad8a219019f 100644 --- a/admin/commands/inventory/inventory.go +++ b/admin/commands/inventory/inventory.go @@ -64,6 +64,7 @@ type AddAgentCommand struct { RDSExporter AddAgentRDSExporterCommand `cmd:"" help:"Add rds_exporter to inventory"` RTAMongoDBAgent AddAgentRTAMongoDBAgentCommand `cmd:"" name:"rta-mongodb-agent" help:"Add Real-Time Analytics MongoDB agent to inventory"` + RTAMySQLAgent AddAgentRTAMySQLAgentCommand `cmd:"" name:"rta-mysql-agent" help:"Add Real-Time Analytics MySQL agent to inventory"` } // AddNodeCommand is used by Kong for CLI flags and commands. @@ -119,6 +120,7 @@ type ChangeAgentCommand struct { QANPostgreSQLPgStatementsAgent ChangeAgentQANPostgreSQLPgStatementsAgentCommand `cmd:"" name:"qan-postgresql-pgstatements-agent" help:"Change QAN PostgreSQL pgstatements agent configuration (only passed flags will be changed)"` QANPostgreSQLPgStatMonitorAgent ChangeAgentQANPostgreSQLPgStatMonitorAgentCommand `cmd:"" name:"qan-postgresql-pgstatmonitor-agent" help:"Change QAN PostgreSQL pgstatmonitor agent configuration (only passed flags will be changed)"` RTAMongoDBAgent ChangeAgentRTAMongoDBAgentCommand `cmd:"" name:"rta-mongodb-agent" help:"Change Real-Time Analytics MongoDB agent configuration (only passed flags will be changed)"` + RTAMySQLAgent ChangeAgentRTAMySQLAgentCommand `cmd:"" name:"rta-mysql-agent" help:"Change Real-Time Analytics MySQL agent configuration (only passed flags will be changed)"` } // formatTypeValue checks acceptable type value and variations contains input and returns type value. diff --git a/admin/commands/inventory/list_agents.go b/admin/commands/inventory/list_agents.go index 3c87e32b005..37f8a652437 100644 --- a/admin/commands/inventory/list_agents.go +++ b/admin/commands/inventory/list_agents.go @@ -53,6 +53,7 @@ var acceptableAgentTypes = map[string][]string{ types.AgentTypeQANPostgreSQLPgStatMonitorAgent: {types.AgentTypeName(types.AgentTypeQANPostgreSQLPgStatMonitorAgent), "qan-postgresql-pgstatmonitor-agent"}, types.AgentTypeRDSExporter: {types.AgentTypeName(types.AgentTypeRDSExporter), "rds-exporter"}, types.AgentTypeRTAMongoDBAgent: {types.AgentTypeName(types.AgentTypeRTAMongoDBAgent), "rta-mongodb-agent"}, + types.AgentTypeRTAMySQLAgent: {types.AgentTypeName(types.AgentTypeRTAMySQLAgent), "rta-mysql-agent"}, } type listResultAgent struct { @@ -141,7 +142,8 @@ func (cmd *ListAgentsCommand) RunCmd() (commands.Result, error) { len(agentsRes.Payload.QANPostgresqlPgstatementsAgent)+ len(agentsRes.Payload.QANPostgresqlPgstatmonitorAgent)+ len(agentsRes.Payload.ExternalExporter)+ - len(agentsRes.Payload.RtaMongodbAgent), + len(agentsRes.Payload.RtaMongodbAgent)+ + len(agentsRes.Payload.RtaMysqlAgent), ) for _, a := range agentsRes.Payload.PMMAgent { status := "disconnected" @@ -309,6 +311,16 @@ func (cmd *ListAgentsCommand) RunCmd() (commands.Result, error) { Disabled: a.Disabled, }) } + for _, a := range agentsRes.Payload.RtaMysqlAgent { + agentsList = append(agentsList, listResultAgent{ + AgentType: types.AgentTypeRTAMySQLAgent, + AgentID: a.AgentID, + PMMAgentID: a.PMMAgentID, + ServiceID: a.ServiceID, + Status: getAgentStatus(a.Status), + Disabled: a.Disabled, + }) + } return &listAgentsResult{ Agents: agentsList, diff --git a/agent/agents/mysql/realtimeanalytics/connection.go b/agent/agents/mysql/realtimeanalytics/connection.go new file mode 100644 index 00000000000..55ae32727c0 --- /dev/null +++ b/agent/agents/mysql/realtimeanalytics/connection.go @@ -0,0 +1,67 @@ +// Copyright (C) 2023 Percona LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package realtimeanalytics + +import ( + "context" + "database/sql" + "time" + + "github.com/go-sql-driver/mysql" + + "github.com/percona/pmm/agent/tlshelpers" +) + +const ( + // Timeout for MySQL queries and connection. + mysqlQueryTimeout = 5 * time.Second +) + +// createConnection opens a connection to MySQL and verifies it with a ping. +// It returns the *sql.DB, the instance address(host:port) parsed from the DSN +// and an error if connection can't be established. +func createConnection(ctx context.Context, dsn string, files map[string]string, tlsSkipVerify bool) (*sql.DB, string, error) { + if files != nil { + if err := tlshelpers.RegisterMySQLCerts(files, tlsSkipVerify); err != nil { + return nil, "", err + } + } + + cfg, err := mysql.ParseDSN(dsn) + if err != nil { + return nil, "", err + } + + db, err := sql.Open("mysql", dsn) + if err != nil { + return nil, "", err + } + + // The collector runs one query per interval, so a single long-lived connection + // is kept open and reused across collection cycles (no maximum lifetime). + db.SetMaxIdleConns(1) + db.SetMaxOpenConns(1) + db.SetConnMaxLifetime(0) + + pingCtx, cancel := context.WithTimeout(ctx, mysqlQueryTimeout) + defer cancel() + + if err = db.PingContext(pingCtx); err != nil { + _ = db.Close() + return nil, "", err + } + + return db, cfg.Addr, nil +} diff --git a/agent/agents/mysql/realtimeanalytics/mysql.go b/agent/agents/mysql/realtimeanalytics/mysql.go new file mode 100644 index 00000000000..74c5d68f435 --- /dev/null +++ b/agent/agents/mysql/realtimeanalytics/mysql.go @@ -0,0 +1,440 @@ +// Copyright (C) 2023 Percona LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package realtimeanalytics runs built-in Real-Time Analytics Agent for MySQL. +package realtimeanalytics + +import ( + "context" + "database/sql" + "encoding/json" + "errors" + "fmt" + "strconv" + "strings" + "sync" + "time" + + "github.com/prometheus/client_golang/prometheus" + "github.com/sirupsen/logrus" + "google.golang.org/protobuf/types/known/durationpb" + "google.golang.org/protobuf/types/known/timestamppb" + + "github.com/percona/pmm/agent/agents" + mysqlversion "github.com/percona/pmm/agent/utils/version" + agentv1 "github.com/percona/pmm/api/agent/v1" + inventoryv1 "github.com/percona/pmm/api/inventory/v1" + rtav1 "github.com/percona/pmm/api/realtimeanalytics/v1" +) + +const ( + changesBufferSize = 10 + // picosecondsPerNanosecond is used to convert MySQL picosecond latencies into Go durations. + picosecondsPerNanosecond = 1000 +) + +// currentQueriesSQL fetches currently running queries from the sys schema. +// sys.x$processlist is the machine-readable (raw) version of sys.processlist +// (https://dev.mysql.com/doc/refman/8.4/en/sys-processlist.html); it exposes +// the same columns but with unformatted numeric latencies. +// We select all columns so the complete row is preserved in the raw payload +// (mirroring how the MongoDB RTA agent dumps the whole currentOp document), and +// exclude background threads, idle ("Sleep") connections, the RTA agent's own +// connection and rows without a current statement. +const currentQueriesSQL = ` +SELECT * +FROM sys.x$processlist +WHERE conn_id IS NOT NULL + AND conn_id <> CONNECTION_ID() + AND current_statement IS NOT NULL + AND command NOT IN ('Sleep', 'Daemon')` + +// MySQLRTA extracts Real-Time Analytics data (currently running DB queries) from MySQL. +type MySQLRTA struct { + agentID string + serviceID string + serviceName string + l *logrus.Entry + + // Channel to obtain data from this agent. + changes chan agents.Change + + // dsn to connect to MySQL. + dsn string + // files holds TLS certificates to register for the MySQL connection. + files map[string]string + // tlsSkipVerify controls TLS certificate validation. + tlsSkipVerify bool + // collectInterval is how often to collect data from MySQL. + collectInterval time.Duration + + // db is the open connection to MySQL, kept between collection cycles. + db *sql.DB + // dbInstanceAddress is the monitored instance address parsed from the DSN. + dbInstanceAddress string +} + +// Params represent Agent parameters. +type Params struct { + AgentID string + DSN string // DSN to connect to MySQL. + ServiceID string // ServiceID shall be set in RTA queries to link them to the service. + ServiceName string // ServiceName shall be set in RTA queries to link them to the service. + CollectInterval time.Duration // CollectInterval is how often to collect data from MySQL. + TextFiles *agentv1.TextFiles // TLS certificate files (optional). + TLSSkipVerify bool // Skip TLS certificate validation. +} + +// New creates new MySQLRTA service. +// The DSN is expected to be already rendered by the caller (the supervisor renders +// TLS file templates before constructing the agent). +func New(params *Params, l *logrus.Entry) (*MySQLRTA, error) { + var files map[string]string + if params.TextFiles != nil { + files = params.TextFiles.Files + } + + return &MySQLRTA{ + agentID: params.AgentID, + serviceID: params.ServiceID, + serviceName: params.ServiceName, + dsn: params.DSN, + files: files, + tlsSkipVerify: params.TLSSkipVerify, + collectInterval: params.CollectInterval, + l: l, + changes: make(chan agents.Change, changesBufferSize), + }, nil +} + +// Run extracts currently running DB queries from MySQL +// and sends it to the channel until ctx is canceled. +func (m *MySQLRTA) Run(ctx context.Context) { + m.l.Info("Starting MySQL RTA agent") + + m.changes <- agents.Change{Status: inventoryv1.AgentStatus_AGENT_STATUS_STARTING} + + // collectors tracks in-flight collection goroutines so we can wait for them + // before closing m.changes, avoiding a "send on closed channel" race on shutdown. + var collectors sync.WaitGroup + + // terminalStatus is reported just before the changes channel is closed. It stays + // DONE for a normal stop and becomes INITIALIZATION_ERROR when the agent cannot + // start (connection failure or unmet prerequisites), so the session surfaces a + // clear error instead of sitting in RUNNING with no data. + terminalStatus := inventoryv1.AgentStatus_AGENT_STATUS_DONE + defer func() { + collectors.Wait() + + m.changes <- agents.Change{Status: terminalStatus} + + close(m.changes) + }() + + db, addr, err := createConnection(ctx, m.dsn, m.files, m.tlsSkipVerify) + if err != nil { + m.l.Errorf("Can't run Real-Time Analytics agent, reason: %v", err) + terminalStatus = inventoryv1.AgentStatus_AGENT_STATUS_INITIALIZATION_ERROR + return + } + + defer func() { + _ = db.Close() + }() + + m.db = db + m.dbInstanceAddress = addr + + // Verify the instance can actually serve RTA (not MariaDB, performance_schema on, + // sys.x$processlist readable) before reporting RUNNING. + if err := m.checkPrerequisites(ctx); err != nil { + m.l.Errorf("Real-Time Analytics is not supported for this instance: %v", err) + terminalStatus = inventoryv1.AgentStatus_AGENT_STATUS_INITIALIZATION_ERROR + return + } + + m.changes <- agents.Change{Status: inventoryv1.AgentStatus_AGENT_STATUS_RUNNING} + + ticker := time.NewTicker(m.collectInterval) + defer ticker.Stop() + + for { + select { + case <-ctx.Done(): + m.l.Info("Stopping MySQL RTA agent") + + m.changes <- agents.Change{Status: inventoryv1.AgentStatus_AGENT_STATUS_STOPPING} + // m.changes channel will be closed in defer, so we don't need to close it here, just exit the function. + return + case <-ticker.C: + // Run collection in a separate goroutine to avoid blocking the main loop + // and allow timely execution of next ticks in case collection takes longer + // than the collect interval. + collectors.Add(1) + go func(curCtx context.Context) { + defer collectors.Done() + + rtaQueryBucket, err := m.collectProcessList(curCtx) + if err != nil { + m.l.Warnf("processlist collection failed: %v", err) + return + } + + select { + case <-curCtx.Done(): + return + default: + if len(rtaQueryBucket) != 0 { + m.changes <- agents.Change{RTAQueriesBucket: rtaQueryBucket} + } + } + }(ctx) + } + } +} + +// checkPrerequisites verifies that the target instance can serve Real-Time Analytics: +// - it must be Oracle MySQL or Percona Server. MariaDB's performance_schema/sys schema +// differ (no sys.x$processlist with these columns) and are not supported. +// - performance_schema must be enabled (sys.x$processlist is backed by it). +// - sys.x$processlist must be readable by the monitoring user (the view is +// SQL SECURITY INVOKER, so it requires SELECT on the underlying performance_schema tables). +// +// It returns a descriptive error otherwise, so the session reports a clear status +// instead of silently collecting nothing every cycle. +func (m *MySQLRTA) checkPrerequisites(ctx context.Context) error { + checkCtx, cancel := context.WithTimeout(ctx, mysqlQueryTimeout) + defer cancel() + + _, vendor, err := mysqlversion.GetMySQLVersion(checkCtx, m.db) + if err != nil { + return fmt.Errorf("failed to detect MySQL version: %w", err) + } + if vendor == mysqlversion.MariaDBVendor { + return errors.New("MariaDB is not supported by MySQL Real-Time Analytics") + } + + var performanceSchema sql.NullInt64 + if err := m.db.QueryRowContext(checkCtx, "SELECT @@performance_schema").Scan(&performanceSchema); err != nil { + return fmt.Errorf("failed to read @@performance_schema: %w", err) + } + if performanceSchema.Int64 != 1 { + return errors.New("performance_schema is disabled; it is required for Real-Time Analytics") + } + + // Probe the view that the collector uses so missing schema or privileges fail fast. + rows, err := m.db.QueryContext(checkCtx, "SELECT 1 FROM sys.x$processlist LIMIT 1") + if err != nil { + return fmt.Errorf("sys.x$processlist is not accessible: %w", err) + } + _ = rows.Close() + + return nil +} + +// collectProcessList queries sys.x$processlist and parses the result into a slice of *QueryData. +func (m *MySQLRTA) collectProcessList(ctx context.Context) ([]*rtav1.QueryData, error) { + queryCtx, cancel := context.WithTimeout(ctx, mysqlQueryTimeout) + defer cancel() + + // An empty processlist is not an error: QueryContext does not return sql.ErrNoRows, + // it simply yields no rows below, so we only get here on a real query failure. + rows, err := m.db.QueryContext(queryCtx, currentQueriesSQL) + if err != nil { + return nil, fmt.Errorf("failed to query sys.x$processlist: %w", err) + } + defer func() { + _ = rows.Close() + }() + + columns, err := rows.Columns() + if err != nil { + return nil, fmt.Errorf("failed to read processlist columns: %w", err) + } + + collectTime := timestamppb.New(time.Now()) + + var results []*rtav1.QueryData + for rows.Next() { + select { + case <-ctx.Done(): + return nil, ctx.Err() + default: + } + + row, err := scanRow(rows, columns) + if err != nil { + m.l.Warnf("Failed to scan processlist row: %v", err) + continue + } + + queryData := m.buildQueryData(row) + queryData.QueryCollectTime = collectTime + + results = append(results, queryData) + } + + if err := rows.Err(); err != nil { + m.l.Warnf("Failed to iterate processlist rows: %v", err) + return nil, err + } + + return results, nil +} + +// scanRow scans a single result row into a map keyed by column name. Values are +// coerced to int64/float64 when numeric and to nil for SQL NULLs, so the raw +// payload is human-readable JSON with native types. +func scanRow(rows *sql.Rows, columns []string) (map[string]any, error) { + rawValues := make([]sql.RawBytes, len(columns)) + scanArgs := make([]any, len(columns)) + for i := range rawValues { + scanArgs[i] = &rawValues[i] + } + + if err := rows.Scan(scanArgs...); err != nil { + return nil, err + } + + row := make(map[string]any, len(columns)) + for i, col := range columns { + row[col] = coerceValue(rawValues[i]) + } + + return row, nil +} + +// coerceValue converts a raw column value into nil (NULL), int64, float64 or string +// so the raw payload renders as human-readable JSON with native types. +// +// It is tuned for the sys.x$processlist columns, whose numeric columns are plain +// integers/decimals. It will reinterpret any numeric-looking string as a number, so +// it is not a general-purpose converter: zero-padded identifiers or values wider than +// int64 would lose their original textual form. None of the processlist columns have +// that shape, but keep this in mind before reusing the helper elsewhere. +func coerceValue(b sql.RawBytes) any { + if b == nil { + return nil + } + + s := string(b) + if i, err := strconv.ParseInt(s, 10, 64); err == nil { + return i + } + if f, err := strconv.ParseFloat(s, 64); err == nil { + return f + } + + return s +} + +// buildQueryData converts a single sys.x$processlist row into a *QueryData. +// The complete row is preserved in QueryRawJson; a curated subset is exposed +// via the MySQL payload for the details view. +func (m *MySQLRTA) buildQueryData(row map[string]any) *rtav1.QueryData { + execDuration := durationpb.New(time.Duration(mapFloat(row, "statement_latency")/picosecondsPerNanosecond) * time.Nanosecond) + + mysqlPayload := &rtav1.QueryMySQLData{ + DbInstanceAddress: m.dbInstanceAddress, + ProgramName: mapString(row, "program_name"), + DatabaseName: mapString(row, "db"), + Command: mapString(row, "command"), + State: mapString(row, "state"), + Username: mapString(row, "user"), + RowsExamined: mapInt(row, "rows_examined"), + RowsSent: mapInt(row, "rows_sent"), + FullScan: strings.EqualFold(mapString(row, "full_scan"), "YES"), + } + + rawJSON, err := json.MarshalIndent(row, "", " ") + if err != nil { + m.l.Warnf("Failed to marshal raw query data: %v", err) + } + + return &rtav1.QueryData{ + ServiceId: m.serviceID, + ServiceName: m.serviceName, + QueryId: mapString(row, "conn_id"), + QueryText: mapString(row, "current_statement"), + QueryRawJson: string(rawJSON), + QueryExecutionDuration: execDuration, + Payload: &rtav1.QueryData_MySqlPayload{ + MySqlPayload: mysqlPayload, + }, + } +} + +// mapString reads a column from the row as a string regardless of its scanned type. +func mapString(row map[string]any, key string) string { + switch v := row[key].(type) { + case string: + return v + case int64: + return strconv.FormatInt(v, 10) + case float64: + return strconv.FormatFloat(v, 'f', -1, 64) + default: + return "" + } +} + +// mapInt reads a column from the row as an int64. +func mapInt(row map[string]any, key string) int64 { + switch v := row[key].(type) { + case int64: + return v + case float64: + return int64(v) + case string: + i, _ := strconv.ParseInt(v, 10, 64) + return i + default: + return 0 + } +} + +// mapFloat reads a column from the row as a float64. +func mapFloat(row map[string]any, key string) float64 { + switch v := row[key].(type) { + case float64: + return v + case int64: + return float64(v) + case string: + f, _ := strconv.ParseFloat(v, 64) + return f + default: + return 0 + } +} + +// Changes returns channel that should be read until it is closed. +func (m *MySQLRTA) Changes() <-chan agents.Change { + return m.changes +} + +// Describe implements prometheus.Collector. +func (m *MySQLRTA) Describe(_ chan<- *prometheus.Desc) { + // This method is needed to satisfy interface. +} + +// Collect implement prometheus.Collector. +func (m *MySQLRTA) Collect(_ chan<- prometheus.Metric) { + // This method is needed to satisfy interface. +} + +// check interfaces. +var ( + _ prometheus.Collector = (*MySQLRTA)(nil) +) diff --git a/agent/agents/mysql/realtimeanalytics/mysql_test.go b/agent/agents/mysql/realtimeanalytics/mysql_test.go new file mode 100644 index 00000000000..6517a5b91c9 --- /dev/null +++ b/agent/agents/mysql/realtimeanalytics/mysql_test.go @@ -0,0 +1,140 @@ +// Copyright (C) 2023 Percona LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package realtimeanalytics + +import ( + "database/sql" + "encoding/json" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestCoerceValue(t *testing.T) { + t.Parallel() + + assert.Nil(t, coerceValue(nil), "NULL must become nil") + assert.Equal(t, int64(123), coerceValue(sql.RawBytes("123"))) + assert.Equal(t, int64(-5), coerceValue(sql.RawBytes("-5"))) + assert.Equal(t, int64(2648724198000), coerceValue(sql.RawBytes("2648724198000"))) + assert.Equal(t, 1.5, coerceValue(sql.RawBytes("1.5"))) + assert.Equal(t, "COMMIT", coerceValue(sql.RawBytes("COMMIT"))) + assert.Equal(t, "ACTIVE", coerceValue(sql.RawBytes("ACTIVE"))) + // non-nil empty value stays an empty string (not nil) + assert.Equal(t, "", coerceValue(sql.RawBytes(""))) +} + +func TestMapHelpers(t *testing.T) { + t.Parallel() + + row := map[string]any{ + "i": int64(7), + "f": 2.5, + "s": "text", + "numStr": "9", + "floatStr": "3.5", + "null": nil, + } + + assert.Equal(t, "7", mapString(row, "i")) + assert.Equal(t, "text", mapString(row, "s")) + assert.Equal(t, "", mapString(row, "missing")) + assert.Equal(t, "", mapString(row, "null")) + + assert.Equal(t, int64(7), mapInt(row, "i")) + assert.Equal(t, int64(2), mapInt(row, "f")) // truncates + assert.Equal(t, int64(9), mapInt(row, "numStr")) + assert.Equal(t, int64(0), mapInt(row, "missing")) + + assert.InDelta(t, 2.5, mapFloat(row, "f"), 0) + assert.InDelta(t, float64(7), mapFloat(row, "i"), 0) + assert.InDelta(t, 3.5, mapFloat(row, "floatStr"), 0) + assert.InDelta(t, float64(0), mapFloat(row, "missing"), 0) +} + +func TestBuildQueryData(t *testing.T) { + t.Parallel() + + m := &MySQLRTA{ + serviceID: "svc-1", + serviceName: "rta-mysql", + dbInstanceAddress: "127.0.0.1:3306", + } + + row := map[string]any{ + "conn_id": int64(42), + "user": "sbtest@localhost", + "db": "sbtest", + "command": "Query", + "state": "executing", + "statement_latency": int64(2_000_000_000), // 2ms expressed in picoseconds + "current_statement": "SELECT 1", + "rows_examined": int64(200), + "rows_sent": int64(100), + "full_scan": "YES", + "program_name": "mysql", + "trx_state": "ACTIVE", + "pid": nil, + } + + qd := m.buildQueryData(row) + require.NotNil(t, qd) + + assert.Equal(t, "svc-1", qd.ServiceId) + assert.Equal(t, "rta-mysql", qd.ServiceName) + assert.Equal(t, "42", qd.QueryId) + assert.Equal(t, "SELECT 1", qd.QueryText) + // 2_000_000_000 ps / 1000 = 2_000_000 ns = 2ms + assert.Equal(t, 2*time.Millisecond, qd.QueryExecutionDuration.AsDuration()) + + p := qd.GetMySqlPayload() + require.NotNil(t, p) + assert.Equal(t, "127.0.0.1:3306", p.DbInstanceAddress) + assert.Equal(t, "sbtest", p.DatabaseName) + assert.Equal(t, "Query", p.Command) + assert.Equal(t, "executing", p.State) + assert.Equal(t, "sbtest@localhost", p.Username) + assert.Equal(t, int64(200), p.RowsExamined) + assert.Equal(t, int64(100), p.RowsSent) + assert.True(t, p.FullScan) + assert.Equal(t, "mysql", p.ProgramName) + + // Raw payload is pretty-printed (multi-line) and preserves the whole row, NULLs included. + assert.Contains(t, qd.QueryRawJson, "\n") + var parsed map[string]any + require.NoError(t, json.Unmarshal([]byte(qd.QueryRawJson), &parsed)) + assert.Contains(t, parsed, "current_statement") + assert.Contains(t, parsed, "statement_latency") + assert.Contains(t, parsed, "trx_state") + assert.Nil(t, parsed["pid"], "NULL columns are preserved as JSON null") +} + +func TestBuildQueryDataFullScanAndMissing(t *testing.T) { + t.Parallel() + + m := &MySQLRTA{serviceID: "svc", serviceName: "svc"} + + // full_scan "NO" -> false, and a missing statement_latency -> zero duration. + qd := m.buildQueryData(map[string]any{ + "conn_id": int64(1), + "current_statement": "SELECT 2", + "full_scan": "NO", + }) + require.NotNil(t, qd) + assert.False(t, qd.GetMySqlPayload().FullScan) + assert.Equal(t, time.Duration(0), qd.QueryExecutionDuration.AsDuration()) +} diff --git a/agent/agents/supervisor/supervisor.go b/agent/agents/supervisor/supervisor.go index edf86839a1c..ccda3bcdd9a 100644 --- a/agent/agents/supervisor/supervisor.go +++ b/agent/agents/supervisor/supervisor.go @@ -37,6 +37,7 @@ import ( mongoprofiler "github.com/percona/pmm/agent/agents/mongodb/profiler" mongorta "github.com/percona/pmm/agent/agents/mongodb/realtimeanalytics" "github.com/percona/pmm/agent/agents/mysql/perfschema" + mysqlrta "github.com/percona/pmm/agent/agents/mysql/realtimeanalytics" "github.com/percona/pmm/agent/agents/mysql/slowlog" "github.com/percona/pmm/agent/agents/noop" "github.com/percona/pmm/agent/agents/postgres/pgstatmonitor" @@ -673,6 +674,18 @@ func (s *Supervisor) startBuiltin(agentID string, builtinAgent *agentv1.SetState } agent, err = mongorta.New(params, l) + case inventoryv1.AgentType_AGENT_TYPE_RTA_MYSQL_AGENT: + params := &mysqlrta.Params{ + DSN: dsn, + AgentID: agentID, + ServiceID: builtinAgent.ServiceId, + ServiceName: builtinAgent.ServiceName, + CollectInterval: builtinAgent.RtaOptions.GetCollectInterval().AsDuration(), + TextFiles: builtinAgent.GetTextFiles(), + TLSSkipVerify: builtinAgent.TlsSkipVerify, + } + agent, err = mysqlrta.New(params, l) + case type_TEST_NOOP: agent = noop.New() diff --git a/api-tests/helpers.go b/api-tests/helpers.go index feeba73f7a8..c89cd1cd435 100644 --- a/api-tests/helpers.go +++ b/api-tests/helpers.go @@ -330,6 +330,9 @@ func AddAgent(t *testing.T, body agents.AddAgentBody) *agents.AddAgentOKBody { case body.RtaMongodbAgent != nil: require.NotNil(t, res.Payload.RtaMongodbAgent) agentID = res.Payload.RtaMongodbAgent.AgentID + case body.RtaMysqlAgent != nil: + require.NotNil(t, res.Payload.RtaMysqlAgent) + agentID = res.Payload.RtaMysqlAgent.AgentID case body.QANMongodbMongologAgent != nil: require.NotNil(t, res.Payload.QANMongodbMongologAgent) agentID = res.Payload.QANMongodbMongologAgent.AgentID diff --git a/api-tests/inventory/agents_rta_mysql_test.go b/api-tests/inventory/agents_rta_mysql_test.go new file mode 100644 index 00000000000..de78d961c1a --- /dev/null +++ b/api-tests/inventory/agents_rta_mysql_test.go @@ -0,0 +1,365 @@ +// Copyright (C) 2023 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package inventory + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + + pmmapitests "github.com/percona/pmm/api-tests" + "github.com/percona/pmm/api/inventory/v1/json/client" + agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" + services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" +) + +func TestRTAMySQLAgent(t *testing.T) { + t.Parallel() + + t.Run("Basic", func(t *testing.T) { + t.Parallel() + + genericNodeID := pmmapitests.AddGenericNode(t, pmmapitests.TestString(t, "Test Generic Node for RTA MySQL Agent")).NodeID + + service := pmmapitests.AddService(t, services.AddServiceBody{ + Mysql: &services.AddServiceParamsBodyMysql{ + NodeID: genericNodeID, + Address: pmmapitests.TestString(t, "localhost"), + Port: 3306, + ServiceName: pmmapitests.TestString(t, "MySQL Service for RTA Agent test"), + }, + }) + serviceID := service.Mysql.ServiceID + t.Cleanup(func() { + pmmapitests.RemoveServices(t, serviceID) + }) + + pmmAgentID := pmmapitests.AddPMMAgent(t, genericNodeID).AgentID + + t.Cleanup(func() { + pmmapitests.RemoveAgents(t, pmmAgentID) + }) + + res := pmmapitests.AddAgent(t, agents.AddAgentBody{ + RtaMysqlAgent: &agents.AddAgentParamsBodyRtaMysqlAgent{ + ServiceID: serviceID, + Username: "username", + Password: "password", + PMMAgentID: pmmAgentID, + CustomLabels: map[string]string{ + "new_label": "RTAMysqlAgent", + }, + RtaOptions: &agents.AddAgentParamsBodyRtaMysqlAgentRtaOptions{ + CollectInterval: "5s", + }, + + SkipConnectionCheck: true, + }, + }) + agentID := res.RtaMysqlAgent.AgentID + + getAgentRes, err := client.Default.AgentsService.GetAgent(&agents.GetAgentParams{ + AgentID: agentID, + Context: pmmapitests.Context, + }) + require.NoError(t, err) + assert.Equal(t, &agents.GetAgentOK{ + Payload: &agents.GetAgentOKBody{ + RtaMysqlAgent: &agents.GetAgentOKBodyRtaMysqlAgent{ + AgentID: agentID, + ServiceID: serviceID, + Username: "username", + PMMAgentID: pmmAgentID, + CustomLabels: map[string]string{ + "new_label": "RTAMysqlAgent", + }, + RtaOptions: &agents.GetAgentOKBodyRtaMysqlAgentRtaOptions{ + CollectInterval: "5s", + }, + Status: &AgentStatusUnknown, + LogLevel: new("LOG_LEVEL_UNSPECIFIED"), + }, + }, + }, getAgentRes) + + // Test change API: disable, then re-enable with new labels and interval. + changeRTAMySQLAgentOK, err := client.Default.AgentsService.ChangeAgent( + &agents.ChangeAgentParams{ + AgentID: agentID, + Body: agents.ChangeAgentBody{ + RtaMysqlAgent: &agents.ChangeAgentParamsBodyRtaMysqlAgent{ + Enable: new(false), + CustomLabels: &agents.ChangeAgentParamsBodyRtaMysqlAgentCustomLabels{}, + }, + }, + Context: pmmapitests.Context, + }, + ) + require.NoError(t, err) + assert.Equal(t, &agents.ChangeAgentOK{ + Payload: &agents.ChangeAgentOKBody{ + RtaMysqlAgent: &agents.ChangeAgentOKBodyRtaMysqlAgent{ + AgentID: agentID, + ServiceID: serviceID, + Username: "username", + PMMAgentID: pmmAgentID, + Disabled: true, + Status: &AgentStatusDone, + CustomLabels: map[string]string{}, + RtaOptions: &agents.ChangeAgentOKBodyRtaMysqlAgentRtaOptions{ + CollectInterval: "5s", + }, + LogLevel: new("LOG_LEVEL_UNSPECIFIED"), + }, + }, + }, changeRTAMySQLAgentOK) + + changeRTAMySQLAgentOK, err = client.Default.AgentsService.ChangeAgent( + &agents.ChangeAgentParams{ + AgentID: agentID, + Body: agents.ChangeAgentBody{ + RtaMysqlAgent: &agents.ChangeAgentParamsBodyRtaMysqlAgent{ + Enable: new(true), + CustomLabels: &agents.ChangeAgentParamsBodyRtaMysqlAgentCustomLabels{ + Values: map[string]string{ + "new_label": "RTAMysqlAgent", + }, + }, + RtaOptions: &agents.ChangeAgentParamsBodyRtaMysqlAgentRtaOptions{ + CollectInterval: "10s", + }, + }, + }, + Context: pmmapitests.Context, + }, + ) + require.NoError(t, err) + assert.Equal(t, &agents.ChangeAgentOK{ + Payload: &agents.ChangeAgentOKBody{ + RtaMysqlAgent: &agents.ChangeAgentOKBodyRtaMysqlAgent{ + AgentID: agentID, + ServiceID: serviceID, + Username: "username", + PMMAgentID: pmmAgentID, + Disabled: false, + CustomLabels: map[string]string{ + "new_label": "RTAMysqlAgent", + }, + RtaOptions: &agents.ChangeAgentOKBodyRtaMysqlAgentRtaOptions{ + CollectInterval: "10s", + }, + Status: &AgentStatusDone, + LogLevel: new("LOG_LEVEL_UNSPECIFIED"), + }, + }, + }, changeRTAMySQLAgentOK) + }) + + t.Run("ChangeOnlySpecifiedFields_KeepOthersUnchanged", func(t *testing.T) { + t.Parallel() + + genericNodeID := pmmapitests.AddGenericNode(t, pmmapitests.TestString(t, "Test Generic Node for RTA MySQL partial update")).NodeID + + service := pmmapitests.AddService(t, services.AddServiceBody{ + Mysql: &services.AddServiceParamsBodyMysql{ + NodeID: genericNodeID, + Address: pmmapitests.TestString(t, "localhost"), + Port: 3306, + ServiceName: pmmapitests.TestString(t, "MySQL Service for RTA partial update test"), + }, + }) + serviceID := service.Mysql.ServiceID + pmmAgentID := pmmapitests.AddPMMAgent(t, genericNodeID).AgentID + + res := pmmapitests.AddAgent(t, agents.AddAgentBody{ + RtaMysqlAgent: &agents.AddAgentParamsBodyRtaMysqlAgent{ + ServiceID: serviceID, + Username: "initial-rta-user", + Password: "initial-rta-password", + PMMAgentID: pmmAgentID, + TLS: true, + TLSSkipVerify: false, + CustomLabels: map[string]string{ + "environment": "test", + "team": "dev", + }, + RtaOptions: &agents.AddAgentParamsBodyRtaMysqlAgentRtaOptions{ + CollectInterval: "6s", + }, + LogLevel: new("LOG_LEVEL_DEBUG"), + SkipConnectionCheck: true, + }, + }) + agentID := res.RtaMysqlAgent.AgentID + + // Change only username; everything else must remain unchanged. + _, err := client.Default.AgentsService.ChangeAgent(&agents.ChangeAgentParams{ + AgentID: agentID, + Body: agents.ChangeAgentBody{ + RtaMysqlAgent: &agents.ChangeAgentParamsBodyRtaMysqlAgent{ + Username: new("updated-user"), + }, + }, + Context: pmmapitests.Context, + }) + require.NoError(t, err) + + getAgentRes, err := client.Default.AgentsService.GetAgent(&agents.GetAgentParams{ + AgentID: agentID, + Context: pmmapitests.Context, + }) + require.NoError(t, err) + + agent := getAgentRes.Payload.RtaMysqlAgent + assert.Equal(t, "updated-user", agent.Username) // Changed + assert.True(t, agent.TLS) // Unchanged + assert.False(t, agent.TLSSkipVerify) // Unchanged + assert.Equal(t, map[string]string{ + "environment": "test", + "team": "dev", + }, agent.CustomLabels) // Unchanged + assert.Equal(t, "6s", agent.RtaOptions.CollectInterval) // Unchanged + assert.Equal(t, new("LOG_LEVEL_DEBUG"), agent.LogLevel) // Unchanged + assert.False(t, agent.Disabled) // Unchanged + }) + + t.Run("AddServiceIDEmpty", func(t *testing.T) { + t.Parallel() + + genericNodeID := pmmapitests.AddGenericNode(t, pmmapitests.TestString(t, "Test Generic Node for RTA MySQL Agent")).NodeID + pmmAgentID := pmmapitests.AddPMMAgent(t, genericNodeID).AgentID + + res, err := client.Default.AgentsService.AddAgent( + &agents.AddAgentParams{ + Body: agents.AddAgentBody{ + RtaMysqlAgent: &agents.AddAgentParamsBodyRtaMysqlAgent{ + ServiceID: "", + PMMAgentID: pmmAgentID, + Username: "username", + Password: "password", + + SkipConnectionCheck: true, + }, + }, + Context: pmmapitests.Context, + }, + ) + pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid AddRTAMySQLAgentParams.ServiceId: value length must be at least 1 runes") + + if !assert.Nil(t, res) { + pmmapitests.RemoveAgents(t, res.Payload.RtaMysqlAgent.AgentID) + } + }) + + t.Run("AddPMMAgentIDEmpty", func(t *testing.T) { + t.Parallel() + + genericNodeID := pmmapitests.AddGenericNode(t, pmmapitests.TestString(t, "Test Generic Node for RTA MySQL Agent")).NodeID + + service := pmmapitests.AddService(t, services.AddServiceBody{ + Mysql: &services.AddServiceParamsBodyMysql{ + NodeID: genericNodeID, + Address: pmmapitests.TestString(t, "localhost"), + Port: 3306, + ServiceName: pmmapitests.TestString(t, "MySQL Service for RTA agent"), + }, + }) + serviceID := service.Mysql.ServiceID + + res, err := client.Default.AgentsService.AddAgent( + &agents.AddAgentParams{ + Body: agents.AddAgentBody{ + RtaMysqlAgent: &agents.AddAgentParamsBodyRtaMysqlAgent{ + ServiceID: serviceID, + PMMAgentID: "", + Username: "username", + Password: "password", + + SkipConnectionCheck: true, + }, + }, + Context: pmmapitests.Context, + }, + ) + pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid AddRTAMySQLAgentParams.PmmAgentId: value length must be at least 1 runes") + if !assert.Nil(t, res) { + pmmapitests.RemoveAgents(t, res.Payload.RtaMysqlAgent.AgentID) + } + }) + + t.Run("NotExistServiceID", func(t *testing.T) { + t.Parallel() + + genericNodeID := pmmapitests.AddGenericNode(t, pmmapitests.TestString(t, "Test Generic Node for RTA MySQL Agent")).NodeID + pmmAgentID := pmmapitests.AddPMMAgent(t, genericNodeID).AgentID + + res, err := client.Default.AgentsService.AddAgent( + &agents.AddAgentParams{ + Body: agents.AddAgentBody{ + RtaMysqlAgent: &agents.AddAgentParamsBodyRtaMysqlAgent{ + ServiceID: "pmm-service-id", + PMMAgentID: pmmAgentID, + Username: "username", + Password: "password", + }, + }, + Context: pmmapitests.Context, + }, + ) + pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, "Service with ID \"pmm-service-id\" not found.") + + if !assert.Nil(t, res) { + pmmapitests.RemoveAgents(t, res.Payload.RtaMysqlAgent.AgentID) + } + }) + + t.Run("NotExistPMMAgentID", func(t *testing.T) { + t.Parallel() + + genericNodeID := pmmapitests.AddGenericNode(t, pmmapitests.TestString(t, "Test Generic Node for RTA MySQL Agent")).NodeID + + service := pmmapitests.AddService(t, services.AddServiceBody{ + Mysql: &services.AddServiceParamsBodyMysql{ + NodeID: genericNodeID, + Address: pmmapitests.TestString(t, "localhost"), + Port: 3306, + ServiceName: pmmapitests.TestString(t, "MySQL Service for not exists node ID"), + }, + }) + serviceID := service.Mysql.ServiceID + + res, err := client.Default.AgentsService.AddAgent( + &agents.AddAgentParams{ + Body: agents.AddAgentBody{ + RtaMysqlAgent: &agents.AddAgentParamsBodyRtaMysqlAgent{ + ServiceID: serviceID, + PMMAgentID: "pmm-not-exist-server", + Username: "username", + Password: "password", + }, + }, + Context: pmmapitests.Context, + }, + ) + pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, "Agent with ID pmm-not-exist-server not found.") + + if !assert.Nil(t, res) { + pmmapitests.RemoveAgents(t, res.Payload.RtaMysqlAgent.AgentID) + } + }) +} diff --git a/api/inventory/v1/agents.go b/api/inventory/v1/agents.go index d601b1784c7..d3e5fabee6d 100644 --- a/api/inventory/v1/agents.go +++ b/api/inventory/v1/agents.go @@ -44,3 +44,4 @@ func (*ExternalExporter) sealedAgent() {} func (*AzureDatabaseExporter) sealedAgent() {} func (*ValkeyExporter) sealedAgent() {} func (*RTAMongoDBAgent) sealedAgent() {} +func (*RTAMySQLAgent) sealedAgent() {} diff --git a/api/inventory/v1/agents.pb.go b/api/inventory/v1/agents.pb.go index 3784fc8b7fc..0268f8525bc 100644 --- a/api/inventory/v1/agents.pb.go +++ b/api/inventory/v1/agents.pb.go @@ -7,19 +7,17 @@ package inventoryv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + common "github.com/percona/pmm/api/common" + _ "github.com/percona/pmm/api/extensions/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" - - common "github.com/percona/pmm/api/common" - _ "github.com/percona/pmm/api/extensions/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -53,6 +51,7 @@ const ( AgentType_AGENT_TYPE_AZURE_DATABASE_EXPORTER AgentType = 15 AgentType_AGENT_TYPE_NOMAD_AGENT AgentType = 16 AgentType_AGENT_TYPE_RTA_MONGODB_AGENT AgentType = 19 + AgentType_AGENT_TYPE_RTA_MYSQL_AGENT AgentType = 20 ) // Enum value maps for AgentType. @@ -78,6 +77,7 @@ var ( 15: "AGENT_TYPE_AZURE_DATABASE_EXPORTER", 16: "AGENT_TYPE_NOMAD_AGENT", 19: "AGENT_TYPE_RTA_MONGODB_AGENT", + 20: "AGENT_TYPE_RTA_MYSQL_AGENT", } AgentType_value = map[string]int32{ "AGENT_TYPE_UNSPECIFIED": 0, @@ -100,6 +100,7 @@ var ( "AGENT_TYPE_AZURE_DATABASE_EXPORTER": 15, "AGENT_TYPE_NOMAD_AGENT": 16, "AGENT_TYPE_RTA_MONGODB_AGENT": 19, + "AGENT_TYPE_RTA_MYSQL_AGENT": 20, } ) @@ -2471,6 +2472,142 @@ func (x *RTAMongoDBAgent) GetLogLevel() LogLevel { return LogLevel_LOG_LEVEL_UNSPECIFIED } +// RTAMySQLAgent runs within pmm-agent and sends MySQL Real-Time Query Analytics data to the PMM Server. +type RTAMySQLAgent struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Unique agent identifier. + AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` + // The pmm-agent identifier which runs this instance. + PmmAgentId string `protobuf:"bytes,2,opt,name=pmm_agent_id,json=pmmAgentId,proto3" json:"pmm_agent_id,omitempty"` + // Desired Agent status: enabled (false) or disabled (true). + Disabled bool `protobuf:"varint,3,opt,name=disabled,proto3" json:"disabled,omitempty"` + // Service identifier. + ServiceId string `protobuf:"bytes,4,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + // MySQL username for getting the currently running queries. + Username string `protobuf:"bytes,5,opt,name=username,proto3" json:"username,omitempty"` + // Use TLS for database connections. + Tls bool `protobuf:"varint,6,opt,name=tls,proto3" json:"tls,omitempty"` + // Skip TLS certificate and hostname validation. + TlsSkipVerify bool `protobuf:"varint,7,opt,name=tls_skip_verify,json=tlsSkipVerify,proto3" json:"tls_skip_verify,omitempty"` + // Custom user-assigned labels. + CustomLabels map[string]string `protobuf:"bytes,8,rep,name=custom_labels,json=customLabels,proto3" json:"custom_labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Real-Time Analytics options. + RtaOptions *RTAOptions `protobuf:"bytes,9,opt,name=rta_options,json=rtaOptions,proto3" json:"rta_options,omitempty"` + // Actual Agent status. + Status AgentStatus `protobuf:"varint,10,opt,name=status,proto3,enum=inventory.v1.AgentStatus" json:"status,omitempty"` + // Log level for exporter. + LogLevel LogLevel `protobuf:"varint,11,opt,name=log_level,json=logLevel,proto3,enum=inventory.v1.LogLevel" json:"log_level,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RTAMySQLAgent) Reset() { + *x = RTAMySQLAgent{} + mi := &file_inventory_v1_agents_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RTAMySQLAgent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RTAMySQLAgent) ProtoMessage() {} + +func (x *RTAMySQLAgent) ProtoReflect() protoreflect.Message { + mi := &file_inventory_v1_agents_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RTAMySQLAgent.ProtoReflect.Descriptor instead. +func (*RTAMySQLAgent) Descriptor() ([]byte, []int) { + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{15} +} + +func (x *RTAMySQLAgent) GetAgentId() string { + if x != nil { + return x.AgentId + } + return "" +} + +func (x *RTAMySQLAgent) GetPmmAgentId() string { + if x != nil { + return x.PmmAgentId + } + return "" +} + +func (x *RTAMySQLAgent) GetDisabled() bool { + if x != nil { + return x.Disabled + } + return false +} + +func (x *RTAMySQLAgent) GetServiceId() string { + if x != nil { + return x.ServiceId + } + return "" +} + +func (x *RTAMySQLAgent) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *RTAMySQLAgent) GetTls() bool { + if x != nil { + return x.Tls + } + return false +} + +func (x *RTAMySQLAgent) GetTlsSkipVerify() bool { + if x != nil { + return x.TlsSkipVerify + } + return false +} + +func (x *RTAMySQLAgent) GetCustomLabels() map[string]string { + if x != nil { + return x.CustomLabels + } + return nil +} + +func (x *RTAMySQLAgent) GetRtaOptions() *RTAOptions { + if x != nil { + return x.RtaOptions + } + return nil +} + +func (x *RTAMySQLAgent) GetStatus() AgentStatus { + if x != nil { + return x.Status + } + return AgentStatus_AGENT_STATUS_UNSPECIFIED +} + +func (x *RTAMySQLAgent) GetLogLevel() LogLevel { + if x != nil { + return x.LogLevel + } + return LogLevel_LOG_LEVEL_UNSPECIFIED +} + // QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server. type QANPostgreSQLPgStatementsAgent struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -2506,7 +2643,7 @@ type QANPostgreSQLPgStatementsAgent struct { func (x *QANPostgreSQLPgStatementsAgent) Reset() { *x = QANPostgreSQLPgStatementsAgent{} - mi := &file_inventory_v1_agents_proto_msgTypes[15] + mi := &file_inventory_v1_agents_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2518,7 +2655,7 @@ func (x *QANPostgreSQLPgStatementsAgent) String() string { func (*QANPostgreSQLPgStatementsAgent) ProtoMessage() {} func (x *QANPostgreSQLPgStatementsAgent) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[15] + mi := &file_inventory_v1_agents_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2531,7 +2668,7 @@ func (x *QANPostgreSQLPgStatementsAgent) ProtoReflect() protoreflect.Message { // Deprecated: Use QANPostgreSQLPgStatementsAgent.ProtoReflect.Descriptor instead. func (*QANPostgreSQLPgStatementsAgent) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{15} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{16} } func (x *QANPostgreSQLPgStatementsAgent) GetAgentId() string { @@ -2662,7 +2799,7 @@ type QANPostgreSQLPgStatMonitorAgent struct { func (x *QANPostgreSQLPgStatMonitorAgent) Reset() { *x = QANPostgreSQLPgStatMonitorAgent{} - mi := &file_inventory_v1_agents_proto_msgTypes[16] + mi := &file_inventory_v1_agents_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2674,7 +2811,7 @@ func (x *QANPostgreSQLPgStatMonitorAgent) String() string { func (*QANPostgreSQLPgStatMonitorAgent) ProtoMessage() {} func (x *QANPostgreSQLPgStatMonitorAgent) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[16] + mi := &file_inventory_v1_agents_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2687,7 +2824,7 @@ func (x *QANPostgreSQLPgStatMonitorAgent) ProtoReflect() protoreflect.Message { // Deprecated: Use QANPostgreSQLPgStatMonitorAgent.ProtoReflect.Descriptor instead. func (*QANPostgreSQLPgStatMonitorAgent) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{16} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{17} } func (x *QANPostgreSQLPgStatMonitorAgent) GetAgentId() string { @@ -2827,7 +2964,7 @@ type RDSExporter struct { func (x *RDSExporter) Reset() { *x = RDSExporter{} - mi := &file_inventory_v1_agents_proto_msgTypes[17] + mi := &file_inventory_v1_agents_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2839,7 +2976,7 @@ func (x *RDSExporter) String() string { func (*RDSExporter) ProtoMessage() {} func (x *RDSExporter) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[17] + mi := &file_inventory_v1_agents_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2852,7 +2989,7 @@ func (x *RDSExporter) ProtoReflect() protoreflect.Message { // Deprecated: Use RDSExporter.ProtoReflect.Descriptor instead. func (*RDSExporter) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{17} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{18} } func (x *RDSExporter) GetAgentId() string { @@ -2997,7 +3134,7 @@ type ExternalExporter struct { func (x *ExternalExporter) Reset() { *x = ExternalExporter{} - mi := &file_inventory_v1_agents_proto_msgTypes[18] + mi := &file_inventory_v1_agents_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3009,7 +3146,7 @@ func (x *ExternalExporter) String() string { func (*ExternalExporter) ProtoMessage() {} func (x *ExternalExporter) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[18] + mi := &file_inventory_v1_agents_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3022,7 +3159,7 @@ func (x *ExternalExporter) ProtoReflect() protoreflect.Message { // Deprecated: Use ExternalExporter.ProtoReflect.Descriptor instead. func (*ExternalExporter) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{18} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{19} } func (x *ExternalExporter) GetAgentId() string { @@ -3158,7 +3295,7 @@ type AzureDatabaseExporter struct { func (x *AzureDatabaseExporter) Reset() { *x = AzureDatabaseExporter{} - mi := &file_inventory_v1_agents_proto_msgTypes[19] + mi := &file_inventory_v1_agents_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3170,7 +3307,7 @@ func (x *AzureDatabaseExporter) String() string { func (*AzureDatabaseExporter) ProtoMessage() {} func (x *AzureDatabaseExporter) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[19] + mi := &file_inventory_v1_agents_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3183,7 +3320,7 @@ func (x *AzureDatabaseExporter) ProtoReflect() protoreflect.Message { // Deprecated: Use AzureDatabaseExporter.ProtoReflect.Descriptor instead. func (*AzureDatabaseExporter) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{19} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{20} } func (x *AzureDatabaseExporter) GetAgentId() string { @@ -3294,7 +3431,7 @@ type ChangeCommonAgentParams struct { func (x *ChangeCommonAgentParams) Reset() { *x = ChangeCommonAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[20] + mi := &file_inventory_v1_agents_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3306,7 +3443,7 @@ func (x *ChangeCommonAgentParams) String() string { func (*ChangeCommonAgentParams) ProtoMessage() {} func (x *ChangeCommonAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[20] + mi := &file_inventory_v1_agents_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3319,7 +3456,7 @@ func (x *ChangeCommonAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeCommonAgentParams.ProtoReflect.Descriptor instead. func (*ChangeCommonAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{20} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{21} } func (x *ChangeCommonAgentParams) GetEnable() bool { @@ -3369,7 +3506,7 @@ type ListAgentsRequest struct { func (x *ListAgentsRequest) Reset() { *x = ListAgentsRequest{} - mi := &file_inventory_v1_agents_proto_msgTypes[21] + mi := &file_inventory_v1_agents_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3381,7 +3518,7 @@ func (x *ListAgentsRequest) String() string { func (*ListAgentsRequest) ProtoMessage() {} func (x *ListAgentsRequest) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[21] + mi := &file_inventory_v1_agents_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3394,7 +3531,7 @@ func (x *ListAgentsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAgentsRequest.ProtoReflect.Descriptor instead. func (*ListAgentsRequest) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{21} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{22} } func (x *ListAgentsRequest) GetPmmAgentId() string { @@ -3446,13 +3583,14 @@ type ListAgentsResponse struct { NomadAgent []*NomadAgent `protobuf:"bytes,16,rep,name=nomad_agent,json=nomadAgent,proto3" json:"nomad_agent,omitempty"` ValkeyExporter []*ValkeyExporter `protobuf:"bytes,17,rep,name=valkey_exporter,json=valkeyExporter,proto3" json:"valkey_exporter,omitempty"` RtaMongodbAgent []*RTAMongoDBAgent `protobuf:"bytes,19,rep,name=rta_mongodb_agent,json=rtaMongodbAgent,proto3" json:"rta_mongodb_agent,omitempty"` + RtaMysqlAgent []*RTAMySQLAgent `protobuf:"bytes,20,rep,name=rta_mysql_agent,json=rtaMysqlAgent,proto3" json:"rta_mysql_agent,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ListAgentsResponse) Reset() { *x = ListAgentsResponse{} - mi := &file_inventory_v1_agents_proto_msgTypes[22] + mi := &file_inventory_v1_agents_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3464,7 +3602,7 @@ func (x *ListAgentsResponse) String() string { func (*ListAgentsResponse) ProtoMessage() {} func (x *ListAgentsResponse) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[22] + mi := &file_inventory_v1_agents_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3477,7 +3615,7 @@ func (x *ListAgentsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAgentsResponse.ProtoReflect.Descriptor instead. func (*ListAgentsResponse) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{22} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{23} } func (x *ListAgentsResponse) GetPmmAgent() []*PMMAgent { @@ -3613,6 +3751,13 @@ func (x *ListAgentsResponse) GetRtaMongodbAgent() []*RTAMongoDBAgent { return nil } +func (x *ListAgentsResponse) GetRtaMysqlAgent() []*RTAMySQLAgent { + if x != nil { + return x.RtaMysqlAgent + } + return nil +} + type GetAgentRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // Unique randomly generated instance identifier. @@ -3623,7 +3768,7 @@ type GetAgentRequest struct { func (x *GetAgentRequest) Reset() { *x = GetAgentRequest{} - mi := &file_inventory_v1_agents_proto_msgTypes[23] + mi := &file_inventory_v1_agents_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3635,7 +3780,7 @@ func (x *GetAgentRequest) String() string { func (*GetAgentRequest) ProtoMessage() {} func (x *GetAgentRequest) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[23] + mi := &file_inventory_v1_agents_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3648,7 +3793,7 @@ func (x *GetAgentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAgentRequest.ProtoReflect.Descriptor instead. func (*GetAgentRequest) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{23} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{24} } func (x *GetAgentRequest) GetAgentId() string { @@ -3681,6 +3826,7 @@ type GetAgentResponse struct { // *GetAgentResponse_NomadAgent // *GetAgentResponse_ValkeyExporter // *GetAgentResponse_RtaMongodbAgent + // *GetAgentResponse_RtaMysqlAgent Agent isGetAgentResponse_Agent `protobuf_oneof:"agent"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -3688,7 +3834,7 @@ type GetAgentResponse struct { func (x *GetAgentResponse) Reset() { *x = GetAgentResponse{} - mi := &file_inventory_v1_agents_proto_msgTypes[24] + mi := &file_inventory_v1_agents_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3700,7 +3846,7 @@ func (x *GetAgentResponse) String() string { func (*GetAgentResponse) ProtoMessage() {} func (x *GetAgentResponse) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[24] + mi := &file_inventory_v1_agents_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3713,7 +3859,7 @@ func (x *GetAgentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAgentResponse.ProtoReflect.Descriptor instead. func (*GetAgentResponse) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{24} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{25} } func (x *GetAgentResponse) GetAgent() isGetAgentResponse_Agent { @@ -3894,6 +4040,15 @@ func (x *GetAgentResponse) GetRtaMongodbAgent() *RTAMongoDBAgent { return nil } +func (x *GetAgentResponse) GetRtaMysqlAgent() *RTAMySQLAgent { + if x != nil { + if x, ok := x.Agent.(*GetAgentResponse_RtaMysqlAgent); ok { + return x.RtaMysqlAgent + } + } + return nil +} + type isGetAgentResponse_Agent interface { isGetAgentResponse_Agent() } @@ -3974,6 +4129,10 @@ type GetAgentResponse_RtaMongodbAgent struct { RtaMongodbAgent *RTAMongoDBAgent `protobuf:"bytes,19,opt,name=rta_mongodb_agent,json=rtaMongodbAgent,proto3,oneof"` } +type GetAgentResponse_RtaMysqlAgent struct { + RtaMysqlAgent *RTAMySQLAgent `protobuf:"bytes,20,opt,name=rta_mysql_agent,json=rtaMysqlAgent,proto3,oneof"` +} + func (*GetAgentResponse_PmmAgent) isGetAgentResponse_Agent() {} func (*GetAgentResponse_Vmagent) isGetAgentResponse_Agent() {} @@ -4012,6 +4171,8 @@ func (*GetAgentResponse_ValkeyExporter) isGetAgentResponse_Agent() {} func (*GetAgentResponse_RtaMongodbAgent) isGetAgentResponse_Agent() {} +func (*GetAgentResponse_RtaMysqlAgent) isGetAgentResponse_Agent() {} + type GetAgentLogsRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // Unique randomly generated instance identifier. @@ -4024,7 +4185,7 @@ type GetAgentLogsRequest struct { func (x *GetAgentLogsRequest) Reset() { *x = GetAgentLogsRequest{} - mi := &file_inventory_v1_agents_proto_msgTypes[25] + mi := &file_inventory_v1_agents_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4036,7 +4197,7 @@ func (x *GetAgentLogsRequest) String() string { func (*GetAgentLogsRequest) ProtoMessage() {} func (x *GetAgentLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[25] + mi := &file_inventory_v1_agents_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4049,7 +4210,7 @@ func (x *GetAgentLogsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAgentLogsRequest.ProtoReflect.Descriptor instead. func (*GetAgentLogsRequest) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{25} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{26} } func (x *GetAgentLogsRequest) GetAgentId() string { @@ -4076,7 +4237,7 @@ type GetAgentLogsResponse struct { func (x *GetAgentLogsResponse) Reset() { *x = GetAgentLogsResponse{} - mi := &file_inventory_v1_agents_proto_msgTypes[26] + mi := &file_inventory_v1_agents_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4088,7 +4249,7 @@ func (x *GetAgentLogsResponse) String() string { func (*GetAgentLogsResponse) ProtoMessage() {} func (x *GetAgentLogsResponse) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[26] + mi := &file_inventory_v1_agents_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4101,7 +4262,7 @@ func (x *GetAgentLogsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAgentLogsResponse.ProtoReflect.Descriptor instead. func (*GetAgentLogsResponse) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{26} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{27} } func (x *GetAgentLogsResponse) GetLogs() []string { @@ -4139,6 +4300,7 @@ type AddAgentRequest struct { // *AddAgentRequest_QanPostgresqlPgstatmonitorAgent // *AddAgentRequest_ValkeyExporter // *AddAgentRequest_RtaMongodbAgent + // *AddAgentRequest_RtaMysqlAgent Agent isAddAgentRequest_Agent `protobuf_oneof:"agent"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -4146,7 +4308,7 @@ type AddAgentRequest struct { func (x *AddAgentRequest) Reset() { *x = AddAgentRequest{} - mi := &file_inventory_v1_agents_proto_msgTypes[27] + mi := &file_inventory_v1_agents_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4158,7 +4320,7 @@ func (x *AddAgentRequest) String() string { func (*AddAgentRequest) ProtoMessage() {} func (x *AddAgentRequest) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[27] + mi := &file_inventory_v1_agents_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4171,7 +4333,7 @@ func (x *AddAgentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddAgentRequest.ProtoReflect.Descriptor instead. func (*AddAgentRequest) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{27} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{28} } func (x *AddAgentRequest) GetAgent() isAddAgentRequest_Agent { @@ -4334,6 +4496,15 @@ func (x *AddAgentRequest) GetRtaMongodbAgent() *AddRTAMongoDBAgentParams { return nil } +func (x *AddAgentRequest) GetRtaMysqlAgent() *AddRTAMySQLAgentParams { + if x != nil { + if x, ok := x.Agent.(*AddAgentRequest_RtaMysqlAgent); ok { + return x.RtaMysqlAgent + } + } + return nil +} + type isAddAgentRequest_Agent interface { isAddAgentRequest_Agent() } @@ -4406,6 +4577,10 @@ type AddAgentRequest_RtaMongodbAgent struct { RtaMongodbAgent *AddRTAMongoDBAgentParams `protobuf:"bytes,17,opt,name=rta_mongodb_agent,json=rtaMongodbAgent,proto3,oneof"` } +type AddAgentRequest_RtaMysqlAgent struct { + RtaMysqlAgent *AddRTAMySQLAgentParams `protobuf:"bytes,18,opt,name=rta_mysql_agent,json=rtaMysqlAgent,proto3,oneof"` +} + func (*AddAgentRequest_PmmAgent) isAddAgentRequest_Agent() {} func (*AddAgentRequest_NodeExporter) isAddAgentRequest_Agent() {} @@ -4440,6 +4615,8 @@ func (*AddAgentRequest_ValkeyExporter) isAddAgentRequest_Agent() {} func (*AddAgentRequest_RtaMongodbAgent) isAddAgentRequest_Agent() {} +func (*AddAgentRequest_RtaMysqlAgent) isAddAgentRequest_Agent() {} + type AddAgentResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Agent: @@ -4461,6 +4638,7 @@ type AddAgentResponse struct { // *AddAgentResponse_QanPostgresqlPgstatmonitorAgent // *AddAgentResponse_ValkeyExporter // *AddAgentResponse_RtaMongodbAgent + // *AddAgentResponse_RtaMysqlAgent Agent isAddAgentResponse_Agent `protobuf_oneof:"agent"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -4468,7 +4646,7 @@ type AddAgentResponse struct { func (x *AddAgentResponse) Reset() { *x = AddAgentResponse{} - mi := &file_inventory_v1_agents_proto_msgTypes[28] + mi := &file_inventory_v1_agents_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4480,7 +4658,7 @@ func (x *AddAgentResponse) String() string { func (*AddAgentResponse) ProtoMessage() {} func (x *AddAgentResponse) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[28] + mi := &file_inventory_v1_agents_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4493,7 +4671,7 @@ func (x *AddAgentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AddAgentResponse.ProtoReflect.Descriptor instead. func (*AddAgentResponse) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{28} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{29} } func (x *AddAgentResponse) GetAgent() isAddAgentResponse_Agent { @@ -4656,6 +4834,15 @@ func (x *AddAgentResponse) GetRtaMongodbAgent() *RTAMongoDBAgent { return nil } +func (x *AddAgentResponse) GetRtaMysqlAgent() *RTAMySQLAgent { + if x != nil { + if x, ok := x.Agent.(*AddAgentResponse_RtaMysqlAgent); ok { + return x.RtaMysqlAgent + } + } + return nil +} + type isAddAgentResponse_Agent interface { isAddAgentResponse_Agent() } @@ -4728,6 +4915,10 @@ type AddAgentResponse_RtaMongodbAgent struct { RtaMongodbAgent *RTAMongoDBAgent `protobuf:"bytes,17,opt,name=rta_mongodb_agent,json=rtaMongodbAgent,proto3,oneof"` } +type AddAgentResponse_RtaMysqlAgent struct { + RtaMysqlAgent *RTAMySQLAgent `protobuf:"bytes,18,opt,name=rta_mysql_agent,json=rtaMysqlAgent,proto3,oneof"` +} + func (*AddAgentResponse_PmmAgent) isAddAgentResponse_Agent() {} func (*AddAgentResponse_NodeExporter) isAddAgentResponse_Agent() {} @@ -4762,6 +4953,8 @@ func (*AddAgentResponse_ValkeyExporter) isAddAgentResponse_Agent() {} func (*AddAgentResponse_RtaMongodbAgent) isAddAgentResponse_Agent() {} +func (*AddAgentResponse_RtaMysqlAgent) isAddAgentResponse_Agent() {} + type ChangeAgentRequest struct { state protoimpl.MessageState `protogen:"open.v1"` AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` @@ -4784,6 +4977,7 @@ type ChangeAgentRequest struct { // *ChangeAgentRequest_NomadAgent // *ChangeAgentRequest_ValkeyExporter // *ChangeAgentRequest_RtaMongodbAgent + // *ChangeAgentRequest_RtaMysqlAgent Agent isChangeAgentRequest_Agent `protobuf_oneof:"agent"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -4791,7 +4985,7 @@ type ChangeAgentRequest struct { func (x *ChangeAgentRequest) Reset() { *x = ChangeAgentRequest{} - mi := &file_inventory_v1_agents_proto_msgTypes[29] + mi := &file_inventory_v1_agents_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4803,7 +4997,7 @@ func (x *ChangeAgentRequest) String() string { func (*ChangeAgentRequest) ProtoMessage() {} func (x *ChangeAgentRequest) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[29] + mi := &file_inventory_v1_agents_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4816,7 +5010,7 @@ func (x *ChangeAgentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeAgentRequest.ProtoReflect.Descriptor instead. func (*ChangeAgentRequest) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{29} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{30} } func (x *ChangeAgentRequest) GetAgentId() string { @@ -4986,6 +5180,15 @@ func (x *ChangeAgentRequest) GetRtaMongodbAgent() *ChangeRTAMongoDBAgentParams { return nil } +func (x *ChangeAgentRequest) GetRtaMysqlAgent() *ChangeRTAMySQLAgentParams { + if x != nil { + if x, ok := x.Agent.(*ChangeAgentRequest_RtaMysqlAgent); ok { + return x.RtaMysqlAgent + } + } + return nil +} + type isChangeAgentRequest_Agent interface { isChangeAgentRequest_Agent() } @@ -5058,7 +5261,11 @@ type ChangeAgentRequest_RtaMongodbAgent struct { RtaMongodbAgent *ChangeRTAMongoDBAgentParams `protobuf:"bytes,18,opt,name=rta_mongodb_agent,json=rtaMongodbAgent,proto3,oneof"` } -func (*ChangeAgentRequest_NodeExporter) isChangeAgentRequest_Agent() {} +type ChangeAgentRequest_RtaMysqlAgent struct { + RtaMysqlAgent *ChangeRTAMySQLAgentParams `protobuf:"bytes,19,opt,name=rta_mysql_agent,json=rtaMysqlAgent,proto3,oneof"` +} + +func (*ChangeAgentRequest_NodeExporter) isChangeAgentRequest_Agent() {} func (*ChangeAgentRequest_MysqldExporter) isChangeAgentRequest_Agent() {} @@ -5092,6 +5299,8 @@ func (*ChangeAgentRequest_ValkeyExporter) isChangeAgentRequest_Agent() {} func (*ChangeAgentRequest_RtaMongodbAgent) isChangeAgentRequest_Agent() {} +func (*ChangeAgentRequest_RtaMysqlAgent) isChangeAgentRequest_Agent() {} + type ChangeAgentResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Agent: @@ -5113,6 +5322,7 @@ type ChangeAgentResponse struct { // *ChangeAgentResponse_NomadAgent // *ChangeAgentResponse_ValkeyExporter // *ChangeAgentResponse_RtaMongodbAgent + // *ChangeAgentResponse_RtaMysqlAgent Agent isChangeAgentResponse_Agent `protobuf_oneof:"agent"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -5120,7 +5330,7 @@ type ChangeAgentResponse struct { func (x *ChangeAgentResponse) Reset() { *x = ChangeAgentResponse{} - mi := &file_inventory_v1_agents_proto_msgTypes[30] + mi := &file_inventory_v1_agents_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5132,7 +5342,7 @@ func (x *ChangeAgentResponse) String() string { func (*ChangeAgentResponse) ProtoMessage() {} func (x *ChangeAgentResponse) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[30] + mi := &file_inventory_v1_agents_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5145,7 +5355,7 @@ func (x *ChangeAgentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeAgentResponse.ProtoReflect.Descriptor instead. func (*ChangeAgentResponse) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{30} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{31} } func (x *ChangeAgentResponse) GetAgent() isChangeAgentResponse_Agent { @@ -5308,6 +5518,15 @@ func (x *ChangeAgentResponse) GetRtaMongodbAgent() *RTAMongoDBAgent { return nil } +func (x *ChangeAgentResponse) GetRtaMysqlAgent() *RTAMySQLAgent { + if x != nil { + if x, ok := x.Agent.(*ChangeAgentResponse_RtaMysqlAgent); ok { + return x.RtaMysqlAgent + } + } + return nil +} + type isChangeAgentResponse_Agent interface { isChangeAgentResponse_Agent() } @@ -5380,6 +5599,10 @@ type ChangeAgentResponse_RtaMongodbAgent struct { RtaMongodbAgent *RTAMongoDBAgent `protobuf:"bytes,18,opt,name=rta_mongodb_agent,json=rtaMongodbAgent,proto3,oneof"` } +type ChangeAgentResponse_RtaMysqlAgent struct { + RtaMysqlAgent *RTAMySQLAgent `protobuf:"bytes,19,opt,name=rta_mysql_agent,json=rtaMysqlAgent,proto3,oneof"` +} + func (*ChangeAgentResponse_NodeExporter) isChangeAgentResponse_Agent() {} func (*ChangeAgentResponse_MysqldExporter) isChangeAgentResponse_Agent() {} @@ -5414,6 +5637,8 @@ func (*ChangeAgentResponse_ValkeyExporter) isChangeAgentResponse_Agent() {} func (*ChangeAgentResponse_RtaMongodbAgent) isChangeAgentResponse_Agent() {} +func (*ChangeAgentResponse_RtaMysqlAgent) isChangeAgentResponse_Agent() {} + type AddPMMAgentParams struct { state protoimpl.MessageState `protogen:"open.v1"` // Node identifier where this instance runs. @@ -5426,7 +5651,7 @@ type AddPMMAgentParams struct { func (x *AddPMMAgentParams) Reset() { *x = AddPMMAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[31] + mi := &file_inventory_v1_agents_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5438,7 +5663,7 @@ func (x *AddPMMAgentParams) String() string { func (*AddPMMAgentParams) ProtoMessage() {} func (x *AddPMMAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[31] + mi := &file_inventory_v1_agents_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5451,7 +5676,7 @@ func (x *AddPMMAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddPMMAgentParams.ProtoReflect.Descriptor instead. func (*AddPMMAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{31} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{32} } func (x *AddPMMAgentParams) GetRunsOnNodeId() string { @@ -5488,7 +5713,7 @@ type AddNodeExporterParams struct { func (x *AddNodeExporterParams) Reset() { *x = AddNodeExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[32] + mi := &file_inventory_v1_agents_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5500,7 +5725,7 @@ func (x *AddNodeExporterParams) String() string { func (*AddNodeExporterParams) ProtoMessage() {} func (x *AddNodeExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[32] + mi := &file_inventory_v1_agents_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5513,7 +5738,7 @@ func (x *AddNodeExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddNodeExporterParams.ProtoReflect.Descriptor instead. func (*AddNodeExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{32} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{33} } func (x *AddNodeExporterParams) GetPmmAgentId() string { @@ -5580,7 +5805,7 @@ type ChangeNodeExporterParams struct { func (x *ChangeNodeExporterParams) Reset() { *x = ChangeNodeExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[33] + mi := &file_inventory_v1_agents_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5592,7 +5817,7 @@ func (x *ChangeNodeExporterParams) String() string { func (*ChangeNodeExporterParams) ProtoMessage() {} func (x *ChangeNodeExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[33] + mi := &file_inventory_v1_agents_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5605,7 +5830,7 @@ func (x *ChangeNodeExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeNodeExporterParams.ProtoReflect.Descriptor instead. func (*ChangeNodeExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{33} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{34} } func (x *ChangeNodeExporterParams) GetEnable() bool { @@ -5705,7 +5930,7 @@ type AddMySQLdExporterParams struct { func (x *AddMySQLdExporterParams) Reset() { *x = AddMySQLdExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[34] + mi := &file_inventory_v1_agents_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5717,7 +5942,7 @@ func (x *AddMySQLdExporterParams) String() string { func (*AddMySQLdExporterParams) ProtoMessage() {} func (x *AddMySQLdExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[34] + mi := &file_inventory_v1_agents_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5730,7 +5955,7 @@ func (x *AddMySQLdExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddMySQLdExporterParams.ProtoReflect.Descriptor instead. func (*AddMySQLdExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{34} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{35} } func (x *AddMySQLdExporterParams) GetPmmAgentId() string { @@ -5910,7 +6135,7 @@ type ChangeMySQLdExporterParams struct { func (x *ChangeMySQLdExporterParams) Reset() { *x = ChangeMySQLdExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[35] + mi := &file_inventory_v1_agents_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5922,7 +6147,7 @@ func (x *ChangeMySQLdExporterParams) String() string { func (*ChangeMySQLdExporterParams) ProtoMessage() {} func (x *ChangeMySQLdExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[35] + mi := &file_inventory_v1_agents_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5935,7 +6160,7 @@ func (x *ChangeMySQLdExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeMySQLdExporterParams.ProtoReflect.Descriptor instead. func (*ChangeMySQLdExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{35} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{36} } func (x *ChangeMySQLdExporterParams) GetEnable() bool { @@ -6122,7 +6347,7 @@ type AddMongoDBExporterParams struct { func (x *AddMongoDBExporterParams) Reset() { *x = AddMongoDBExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[36] + mi := &file_inventory_v1_agents_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6134,7 +6359,7 @@ func (x *AddMongoDBExporterParams) String() string { func (*AddMongoDBExporterParams) ProtoMessage() {} func (x *AddMongoDBExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[36] + mi := &file_inventory_v1_agents_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6147,7 +6372,7 @@ func (x *AddMongoDBExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddMongoDBExporterParams.ProtoReflect.Descriptor instead. func (*AddMongoDBExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{36} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{37} } func (x *AddMongoDBExporterParams) GetPmmAgentId() string { @@ -6363,7 +6588,7 @@ type ChangeMongoDBExporterParams struct { func (x *ChangeMongoDBExporterParams) Reset() { *x = ChangeMongoDBExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[37] + mi := &file_inventory_v1_agents_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6375,7 +6600,7 @@ func (x *ChangeMongoDBExporterParams) String() string { func (*ChangeMongoDBExporterParams) ProtoMessage() {} func (x *ChangeMongoDBExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[37] + mi := &file_inventory_v1_agents_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6388,7 +6613,7 @@ func (x *ChangeMongoDBExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeMongoDBExporterParams.ProtoReflect.Descriptor instead. func (*ChangeMongoDBExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{37} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{38} } func (x *ChangeMongoDBExporterParams) GetEnable() bool { @@ -6591,7 +6816,7 @@ type AddPostgresExporterParams struct { func (x *AddPostgresExporterParams) Reset() { *x = AddPostgresExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[38] + mi := &file_inventory_v1_agents_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6603,7 +6828,7 @@ func (x *AddPostgresExporterParams) String() string { func (*AddPostgresExporterParams) ProtoMessage() {} func (x *AddPostgresExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[38] + mi := &file_inventory_v1_agents_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6616,7 +6841,7 @@ func (x *AddPostgresExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddPostgresExporterParams.ProtoReflect.Descriptor instead. func (*AddPostgresExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{38} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{39} } func (x *AddPostgresExporterParams) GetPmmAgentId() string { @@ -6798,7 +7023,7 @@ type ChangePostgresExporterParams struct { func (x *ChangePostgresExporterParams) Reset() { *x = ChangePostgresExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[39] + mi := &file_inventory_v1_agents_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6810,7 +7035,7 @@ func (x *ChangePostgresExporterParams) String() string { func (*ChangePostgresExporterParams) ProtoMessage() {} func (x *ChangePostgresExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[39] + mi := &file_inventory_v1_agents_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6823,7 +7048,7 @@ func (x *ChangePostgresExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangePostgresExporterParams.ProtoReflect.Descriptor instead. func (*ChangePostgresExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{39} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{40} } func (x *ChangePostgresExporterParams) GetEnable() bool { @@ -6995,7 +7220,7 @@ type AddProxySQLExporterParams struct { func (x *AddProxySQLExporterParams) Reset() { *x = AddProxySQLExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[40] + mi := &file_inventory_v1_agents_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7007,7 +7232,7 @@ func (x *AddProxySQLExporterParams) String() string { func (*AddProxySQLExporterParams) ProtoMessage() {} func (x *AddProxySQLExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[40] + mi := &file_inventory_v1_agents_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7020,7 +7245,7 @@ func (x *AddProxySQLExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddProxySQLExporterParams.ProtoReflect.Descriptor instead. func (*AddProxySQLExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{40} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{41} } func (x *AddProxySQLExporterParams) GetPmmAgentId() string { @@ -7155,7 +7380,7 @@ type ChangeProxySQLExporterParams struct { func (x *ChangeProxySQLExporterParams) Reset() { *x = ChangeProxySQLExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[41] + mi := &file_inventory_v1_agents_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7167,7 +7392,7 @@ func (x *ChangeProxySQLExporterParams) String() string { func (*ChangeProxySQLExporterParams) ProtoMessage() {} func (x *ChangeProxySQLExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[41] + mi := &file_inventory_v1_agents_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7180,7 +7405,7 @@ func (x *ChangeProxySQLExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeProxySQLExporterParams.ProtoReflect.Descriptor instead. func (*ChangeProxySQLExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{41} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{42} } func (x *ChangeProxySQLExporterParams) GetEnable() bool { @@ -7314,7 +7539,7 @@ type AddQANMySQLPerfSchemaAgentParams struct { func (x *AddQANMySQLPerfSchemaAgentParams) Reset() { *x = AddQANMySQLPerfSchemaAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[42] + mi := &file_inventory_v1_agents_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7326,7 +7551,7 @@ func (x *AddQANMySQLPerfSchemaAgentParams) String() string { func (*AddQANMySQLPerfSchemaAgentParams) ProtoMessage() {} func (x *AddQANMySQLPerfSchemaAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[42] + mi := &file_inventory_v1_agents_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7339,7 +7564,7 @@ func (x *AddQANMySQLPerfSchemaAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddQANMySQLPerfSchemaAgentParams.ProtoReflect.Descriptor instead. func (*AddQANMySQLPerfSchemaAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{42} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{43} } func (x *AddQANMySQLPerfSchemaAgentParams) GetPmmAgentId() string { @@ -7494,7 +7719,7 @@ type ChangeQANMySQLPerfSchemaAgentParams struct { func (x *ChangeQANMySQLPerfSchemaAgentParams) Reset() { *x = ChangeQANMySQLPerfSchemaAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[43] + mi := &file_inventory_v1_agents_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7506,7 +7731,7 @@ func (x *ChangeQANMySQLPerfSchemaAgentParams) String() string { func (*ChangeQANMySQLPerfSchemaAgentParams) ProtoMessage() {} func (x *ChangeQANMySQLPerfSchemaAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[43] + mi := &file_inventory_v1_agents_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7519,7 +7744,7 @@ func (x *ChangeQANMySQLPerfSchemaAgentParams) ProtoReflect() protoreflect.Messag // Deprecated: Use ChangeQANMySQLPerfSchemaAgentParams.ProtoReflect.Descriptor instead. func (*ChangeQANMySQLPerfSchemaAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{43} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{44} } func (x *ChangeQANMySQLPerfSchemaAgentParams) GetEnable() bool { @@ -7677,7 +7902,7 @@ type AddQANMySQLSlowlogAgentParams struct { func (x *AddQANMySQLSlowlogAgentParams) Reset() { *x = AddQANMySQLSlowlogAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[44] + mi := &file_inventory_v1_agents_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7689,7 +7914,7 @@ func (x *AddQANMySQLSlowlogAgentParams) String() string { func (*AddQANMySQLSlowlogAgentParams) ProtoMessage() {} func (x *AddQANMySQLSlowlogAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[44] + mi := &file_inventory_v1_agents_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7702,7 +7927,7 @@ func (x *AddQANMySQLSlowlogAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddQANMySQLSlowlogAgentParams.ProtoReflect.Descriptor instead. func (*AddQANMySQLSlowlogAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{44} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{45} } func (x *AddQANMySQLSlowlogAgentParams) GetPmmAgentId() string { @@ -7866,7 +8091,7 @@ type ChangeQANMySQLSlowlogAgentParams struct { func (x *ChangeQANMySQLSlowlogAgentParams) Reset() { *x = ChangeQANMySQLSlowlogAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[45] + mi := &file_inventory_v1_agents_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7878,7 +8103,7 @@ func (x *ChangeQANMySQLSlowlogAgentParams) String() string { func (*ChangeQANMySQLSlowlogAgentParams) ProtoMessage() {} func (x *ChangeQANMySQLSlowlogAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[45] + mi := &file_inventory_v1_agents_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7891,7 +8116,7 @@ func (x *ChangeQANMySQLSlowlogAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeQANMySQLSlowlogAgentParams.ProtoReflect.Descriptor instead. func (*ChangeQANMySQLSlowlogAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{45} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{46} } func (x *ChangeQANMySQLSlowlogAgentParams) GetEnable() bool { @@ -8053,7 +8278,7 @@ type AddQANMongoDBProfilerAgentParams struct { func (x *AddQANMongoDBProfilerAgentParams) Reset() { *x = AddQANMongoDBProfilerAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[46] + mi := &file_inventory_v1_agents_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8065,7 +8290,7 @@ func (x *AddQANMongoDBProfilerAgentParams) String() string { func (*AddQANMongoDBProfilerAgentParams) ProtoMessage() {} func (x *AddQANMongoDBProfilerAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[46] + mi := &file_inventory_v1_agents_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8078,7 +8303,7 @@ func (x *AddQANMongoDBProfilerAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddQANMongoDBProfilerAgentParams.ProtoReflect.Descriptor instead. func (*AddQANMongoDBProfilerAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{46} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{47} } func (x *AddQANMongoDBProfilerAgentParams) GetPmmAgentId() string { @@ -8224,7 +8449,7 @@ type ChangeQANMongoDBProfilerAgentParams struct { func (x *ChangeQANMongoDBProfilerAgentParams) Reset() { *x = ChangeQANMongoDBProfilerAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[47] + mi := &file_inventory_v1_agents_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8236,7 +8461,7 @@ func (x *ChangeQANMongoDBProfilerAgentParams) String() string { func (*ChangeQANMongoDBProfilerAgentParams) ProtoMessage() {} func (x *ChangeQANMongoDBProfilerAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[47] + mi := &file_inventory_v1_agents_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8249,7 +8474,7 @@ func (x *ChangeQANMongoDBProfilerAgentParams) ProtoReflect() protoreflect.Messag // Deprecated: Use ChangeQANMongoDBProfilerAgentParams.ProtoReflect.Descriptor instead. func (*ChangeQANMongoDBProfilerAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{47} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{48} } func (x *ChangeQANMongoDBProfilerAgentParams) GetEnable() bool { @@ -8397,7 +8622,7 @@ type AddQANMongoDBMongologAgentParams struct { func (x *AddQANMongoDBMongologAgentParams) Reset() { *x = AddQANMongoDBMongologAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[48] + mi := &file_inventory_v1_agents_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8409,7 +8634,7 @@ func (x *AddQANMongoDBMongologAgentParams) String() string { func (*AddQANMongoDBMongologAgentParams) ProtoMessage() {} func (x *AddQANMongoDBMongologAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[48] + mi := &file_inventory_v1_agents_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8422,7 +8647,7 @@ func (x *AddQANMongoDBMongologAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddQANMongoDBMongologAgentParams.ProtoReflect.Descriptor instead. func (*AddQANMongoDBMongologAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{48} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{49} } func (x *AddQANMongoDBMongologAgentParams) GetPmmAgentId() string { @@ -8568,7 +8793,7 @@ type ChangeQANMongoDBMongologAgentParams struct { func (x *ChangeQANMongoDBMongologAgentParams) Reset() { *x = ChangeQANMongoDBMongologAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[49] + mi := &file_inventory_v1_agents_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8580,7 +8805,7 @@ func (x *ChangeQANMongoDBMongologAgentParams) String() string { func (*ChangeQANMongoDBMongologAgentParams) ProtoMessage() {} func (x *ChangeQANMongoDBMongologAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[49] + mi := &file_inventory_v1_agents_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8593,7 +8818,7 @@ func (x *ChangeQANMongoDBMongologAgentParams) ProtoReflect() protoreflect.Messag // Deprecated: Use ChangeQANMongoDBMongologAgentParams.ProtoReflect.Descriptor instead. func (*ChangeQANMongoDBMongologAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{49} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{50} } func (x *ChangeQANMongoDBMongologAgentParams) GetEnable() bool { @@ -8737,7 +8962,7 @@ type AddQANPostgreSQLPgStatementsAgentParams struct { func (x *AddQANPostgreSQLPgStatementsAgentParams) Reset() { *x = AddQANPostgreSQLPgStatementsAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[50] + mi := &file_inventory_v1_agents_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8749,7 +8974,7 @@ func (x *AddQANPostgreSQLPgStatementsAgentParams) String() string { func (*AddQANPostgreSQLPgStatementsAgentParams) ProtoMessage() {} func (x *AddQANPostgreSQLPgStatementsAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[50] + mi := &file_inventory_v1_agents_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8762,7 +8987,7 @@ func (x *AddQANPostgreSQLPgStatementsAgentParams) ProtoReflect() protoreflect.Me // Deprecated: Use AddQANPostgreSQLPgStatementsAgentParams.ProtoReflect.Descriptor instead. func (*AddQANPostgreSQLPgStatementsAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{50} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{51} } func (x *AddQANPostgreSQLPgStatementsAgentParams) GetPmmAgentId() string { @@ -8899,7 +9124,7 @@ type ChangeQANPostgreSQLPgStatementsAgentParams struct { func (x *ChangeQANPostgreSQLPgStatementsAgentParams) Reset() { *x = ChangeQANPostgreSQLPgStatementsAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[51] + mi := &file_inventory_v1_agents_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8911,7 +9136,7 @@ func (x *ChangeQANPostgreSQLPgStatementsAgentParams) String() string { func (*ChangeQANPostgreSQLPgStatementsAgentParams) ProtoMessage() {} func (x *ChangeQANPostgreSQLPgStatementsAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[51] + mi := &file_inventory_v1_agents_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8924,7 +9149,7 @@ func (x *ChangeQANPostgreSQLPgStatementsAgentParams) ProtoReflect() protoreflect // Deprecated: Use ChangeQANPostgreSQLPgStatementsAgentParams.ProtoReflect.Descriptor instead. func (*ChangeQANPostgreSQLPgStatementsAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{51} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{52} } func (x *ChangeQANPostgreSQLPgStatementsAgentParams) GetEnable() bool { @@ -9063,7 +9288,7 @@ type AddQANPostgreSQLPgStatMonitorAgentParams struct { func (x *AddQANPostgreSQLPgStatMonitorAgentParams) Reset() { *x = AddQANPostgreSQLPgStatMonitorAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[52] + mi := &file_inventory_v1_agents_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9075,7 +9300,7 @@ func (x *AddQANPostgreSQLPgStatMonitorAgentParams) String() string { func (*AddQANPostgreSQLPgStatMonitorAgentParams) ProtoMessage() {} func (x *AddQANPostgreSQLPgStatMonitorAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[52] + mi := &file_inventory_v1_agents_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9088,7 +9313,7 @@ func (x *AddQANPostgreSQLPgStatMonitorAgentParams) ProtoReflect() protoreflect.M // Deprecated: Use AddQANPostgreSQLPgStatMonitorAgentParams.ProtoReflect.Descriptor instead. func (*AddQANPostgreSQLPgStatMonitorAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{52} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{53} } func (x *AddQANPostgreSQLPgStatMonitorAgentParams) GetPmmAgentId() string { @@ -9234,7 +9459,7 @@ type ChangeQANPostgreSQLPgStatMonitorAgentParams struct { func (x *ChangeQANPostgreSQLPgStatMonitorAgentParams) Reset() { *x = ChangeQANPostgreSQLPgStatMonitorAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[53] + mi := &file_inventory_v1_agents_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9246,7 +9471,7 @@ func (x *ChangeQANPostgreSQLPgStatMonitorAgentParams) String() string { func (*ChangeQANPostgreSQLPgStatMonitorAgentParams) ProtoMessage() {} func (x *ChangeQANPostgreSQLPgStatMonitorAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[53] + mi := &file_inventory_v1_agents_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9259,7 +9484,7 @@ func (x *ChangeQANPostgreSQLPgStatMonitorAgentParams) ProtoReflect() protoreflec // Deprecated: Use ChangeQANPostgreSQLPgStatMonitorAgentParams.ProtoReflect.Descriptor instead. func (*ChangeQANPostgreSQLPgStatMonitorAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{53} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{54} } func (x *ChangeQANPostgreSQLPgStatMonitorAgentParams) GetEnable() bool { @@ -9395,7 +9620,7 @@ type AddRDSExporterParams struct { func (x *AddRDSExporterParams) Reset() { *x = AddRDSExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[54] + mi := &file_inventory_v1_agents_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9407,7 +9632,7 @@ func (x *AddRDSExporterParams) String() string { func (*AddRDSExporterParams) ProtoMessage() {} func (x *AddRDSExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[54] + mi := &file_inventory_v1_agents_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9420,7 +9645,7 @@ func (x *AddRDSExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddRDSExporterParams.ProtoReflect.Descriptor instead. func (*AddRDSExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{54} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{55} } func (x *AddRDSExporterParams) GetPmmAgentId() string { @@ -9519,7 +9744,7 @@ type ChangeRDSExporterParams struct { func (x *ChangeRDSExporterParams) Reset() { *x = ChangeRDSExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[55] + mi := &file_inventory_v1_agents_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9531,7 +9756,7 @@ func (x *ChangeRDSExporterParams) String() string { func (*ChangeRDSExporterParams) ProtoMessage() {} func (x *ChangeRDSExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[55] + mi := &file_inventory_v1_agents_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9544,7 +9769,7 @@ func (x *ChangeRDSExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeRDSExporterParams.ProtoReflect.Descriptor instead. func (*ChangeRDSExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{55} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{56} } func (x *ChangeRDSExporterParams) GetEnable() bool { @@ -9638,7 +9863,7 @@ type AddExternalExporterParams struct { func (x *AddExternalExporterParams) Reset() { *x = AddExternalExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[56] + mi := &file_inventory_v1_agents_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9650,7 +9875,7 @@ func (x *AddExternalExporterParams) String() string { func (*AddExternalExporterParams) ProtoMessage() {} func (x *AddExternalExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[56] + mi := &file_inventory_v1_agents_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9663,7 +9888,7 @@ func (x *AddExternalExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddExternalExporterParams.ProtoReflect.Descriptor instead. func (*AddExternalExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{56} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{57} } func (x *AddExternalExporterParams) GetRunsOnNodeId() string { @@ -9760,7 +9985,7 @@ type ChangeExternalExporterParams struct { func (x *ChangeExternalExporterParams) Reset() { *x = ChangeExternalExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[57] + mi := &file_inventory_v1_agents_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9772,7 +9997,7 @@ func (x *ChangeExternalExporterParams) String() string { func (*ChangeExternalExporterParams) ProtoMessage() {} func (x *ChangeExternalExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[57] + mi := &file_inventory_v1_agents_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9785,7 +10010,7 @@ func (x *ChangeExternalExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeExternalExporterParams.ProtoReflect.Descriptor instead. func (*ChangeExternalExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{57} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{58} } func (x *ChangeExternalExporterParams) GetEnable() bool { @@ -9876,7 +10101,7 @@ type AddAzureDatabaseExporterParams struct { func (x *AddAzureDatabaseExporterParams) Reset() { *x = AddAzureDatabaseExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[58] + mi := &file_inventory_v1_agents_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9888,7 +10113,7 @@ func (x *AddAzureDatabaseExporterParams) String() string { func (*AddAzureDatabaseExporterParams) ProtoMessage() {} func (x *AddAzureDatabaseExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[58] + mi := &file_inventory_v1_agents_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9901,7 +10126,7 @@ func (x *AddAzureDatabaseExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddAzureDatabaseExporterParams.ProtoReflect.Descriptor instead. func (*AddAzureDatabaseExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{58} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{59} } func (x *AddAzureDatabaseExporterParams) GetPmmAgentId() string { @@ -10016,7 +10241,7 @@ type ChangeAzureDatabaseExporterParams struct { func (x *ChangeAzureDatabaseExporterParams) Reset() { *x = ChangeAzureDatabaseExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[59] + mi := &file_inventory_v1_agents_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10028,7 +10253,7 @@ func (x *ChangeAzureDatabaseExporterParams) String() string { func (*ChangeAzureDatabaseExporterParams) ProtoMessage() {} func (x *ChangeAzureDatabaseExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[59] + mi := &file_inventory_v1_agents_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10041,7 +10266,7 @@ func (x *ChangeAzureDatabaseExporterParams) ProtoReflect() protoreflect.Message // Deprecated: Use ChangeAzureDatabaseExporterParams.ProtoReflect.Descriptor instead. func (*ChangeAzureDatabaseExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{59} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{60} } func (x *ChangeAzureDatabaseExporterParams) GetEnable() bool { @@ -10124,7 +10349,7 @@ type ChangeNomadAgentParams struct { func (x *ChangeNomadAgentParams) Reset() { *x = ChangeNomadAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[60] + mi := &file_inventory_v1_agents_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10136,7 +10361,7 @@ func (x *ChangeNomadAgentParams) String() string { func (*ChangeNomadAgentParams) ProtoMessage() {} func (x *ChangeNomadAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[60] + mi := &file_inventory_v1_agents_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10149,7 +10374,7 @@ func (x *ChangeNomadAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeNomadAgentParams.ProtoReflect.Descriptor instead. func (*ChangeNomadAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{60} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{61} } func (x *ChangeNomadAgentParams) GetEnable() bool { @@ -10201,7 +10426,7 @@ type AddValkeyExporterParams struct { func (x *AddValkeyExporterParams) Reset() { *x = AddValkeyExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[61] + mi := &file_inventory_v1_agents_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10213,7 +10438,7 @@ func (x *AddValkeyExporterParams) String() string { func (*AddValkeyExporterParams) ProtoMessage() {} func (x *AddValkeyExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[61] + mi := &file_inventory_v1_agents_proto_msgTypes[62] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10226,7 +10451,7 @@ func (x *AddValkeyExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddValkeyExporterParams.ProtoReflect.Descriptor instead. func (*AddValkeyExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{61} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{62} } func (x *AddValkeyExporterParams) GetPmmAgentId() string { @@ -10388,7 +10613,7 @@ type ChangeValkeyExporterParams struct { func (x *ChangeValkeyExporterParams) Reset() { *x = ChangeValkeyExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[62] + mi := &file_inventory_v1_agents_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10400,7 +10625,7 @@ func (x *ChangeValkeyExporterParams) String() string { func (*ChangeValkeyExporterParams) ProtoMessage() {} func (x *ChangeValkeyExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[62] + mi := &file_inventory_v1_agents_proto_msgTypes[63] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10413,7 +10638,7 @@ func (x *ChangeValkeyExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeValkeyExporterParams.ProtoReflect.Descriptor instead. func (*ChangeValkeyExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{62} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{63} } func (x *ChangeValkeyExporterParams) GetEnable() bool { @@ -10567,7 +10792,7 @@ type AddRTAMongoDBAgentParams struct { func (x *AddRTAMongoDBAgentParams) Reset() { *x = AddRTAMongoDBAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[63] + mi := &file_inventory_v1_agents_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10579,7 +10804,7 @@ func (x *AddRTAMongoDBAgentParams) String() string { func (*AddRTAMongoDBAgentParams) ProtoMessage() {} func (x *AddRTAMongoDBAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[63] + mi := &file_inventory_v1_agents_proto_msgTypes[64] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10592,7 +10817,7 @@ func (x *AddRTAMongoDBAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddRTAMongoDBAgentParams.ProtoReflect.Descriptor instead. func (*AddRTAMongoDBAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{63} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{64} } func (x *AddRTAMongoDBAgentParams) GetPmmAgentId() string { @@ -10725,7 +10950,7 @@ type ChangeRTAMongoDBAgentParams struct { func (x *ChangeRTAMongoDBAgentParams) Reset() { *x = ChangeRTAMongoDBAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[64] + mi := &file_inventory_v1_agents_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10737,7 +10962,7 @@ func (x *ChangeRTAMongoDBAgentParams) String() string { func (*ChangeRTAMongoDBAgentParams) ProtoMessage() {} func (x *ChangeRTAMongoDBAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[64] + mi := &file_inventory_v1_agents_proto_msgTypes[65] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10750,7 +10975,7 @@ func (x *ChangeRTAMongoDBAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeRTAMongoDBAgentParams.ProtoReflect.Descriptor instead. func (*ChangeRTAMongoDBAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{64} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{65} } func (x *ChangeRTAMongoDBAgentParams) GetEnable() bool { @@ -10837,30 +11062,319 @@ func (x *ChangeRTAMongoDBAgentParams) GetRtaOptions() *RTAOptions { return nil } -type RemoveAgentRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` - // Remove agent with all dependencies. - Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` +type AddRTAMySQLAgentParams struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The pmm-agent identifier which runs this instance. + PmmAgentId string `protobuf:"bytes,1,opt,name=pmm_agent_id,json=pmmAgentId,proto3" json:"pmm_agent_id,omitempty"` + // Service identifier. + ServiceId string `protobuf:"bytes,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + // MySQL username for getting queries data. + Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` + // MySQL password for getting queries data. + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` + // Custom user-assigned labels. + CustomLabels map[string]string `protobuf:"bytes,5,rep,name=custom_labels,json=customLabels,proto3" json:"custom_labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Log level for agent. + LogLevel LogLevel `protobuf:"varint,6,opt,name=log_level,json=logLevel,proto3,enum=inventory.v1.LogLevel" json:"log_level,omitempty"` + // MySQL specific options. + // Use TLS for database connections. + Tls bool `protobuf:"varint,7,opt,name=tls,proto3" json:"tls,omitempty"` + // Skip TLS certificate and hostname validation. + TlsSkipVerify bool `protobuf:"varint,8,opt,name=tls_skip_verify,json=tlsSkipVerify,proto3" json:"tls_skip_verify,omitempty"` + // Certificate Authority certificate chain. + TlsCa string `protobuf:"bytes,9,opt,name=tls_ca,json=tlsCa,proto3" json:"tls_ca,omitempty"` + // Client certificate. + TlsCert string `protobuf:"bytes,10,opt,name=tls_cert,json=tlsCert,proto3" json:"tls_cert,omitempty"` + // Password for decrypting tls_cert. + TlsKey string `protobuf:"bytes,11,opt,name=tls_key,json=tlsKey,proto3" json:"tls_key,omitempty"` + // Skip connection check. + SkipConnectionCheck bool `protobuf:"varint,12,opt,name=skip_connection_check,json=skipConnectionCheck,proto3" json:"skip_connection_check,omitempty"` + // Real-Time Analytics options. + RtaOptions *RTAOptions `protobuf:"bytes,13,opt,name=rta_options,json=rtaOptions,proto3" json:"rta_options,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *RemoveAgentRequest) Reset() { - *x = RemoveAgentRequest{} - mi := &file_inventory_v1_agents_proto_msgTypes[65] +func (x *AddRTAMySQLAgentParams) Reset() { + *x = AddRTAMySQLAgentParams{} + mi := &file_inventory_v1_agents_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *RemoveAgentRequest) String() string { +func (x *AddRTAMySQLAgentParams) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RemoveAgentRequest) ProtoMessage() {} +func (*AddRTAMySQLAgentParams) ProtoMessage() {} + +func (x *AddRTAMySQLAgentParams) ProtoReflect() protoreflect.Message { + mi := &file_inventory_v1_agents_proto_msgTypes[66] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddRTAMySQLAgentParams.ProtoReflect.Descriptor instead. +func (*AddRTAMySQLAgentParams) Descriptor() ([]byte, []int) { + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{66} +} + +func (x *AddRTAMySQLAgentParams) GetPmmAgentId() string { + if x != nil { + return x.PmmAgentId + } + return "" +} + +func (x *AddRTAMySQLAgentParams) GetServiceId() string { + if x != nil { + return x.ServiceId + } + return "" +} + +func (x *AddRTAMySQLAgentParams) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *AddRTAMySQLAgentParams) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *AddRTAMySQLAgentParams) GetCustomLabels() map[string]string { + if x != nil { + return x.CustomLabels + } + return nil +} + +func (x *AddRTAMySQLAgentParams) GetLogLevel() LogLevel { + if x != nil { + return x.LogLevel + } + return LogLevel_LOG_LEVEL_UNSPECIFIED +} + +func (x *AddRTAMySQLAgentParams) GetTls() bool { + if x != nil { + return x.Tls + } + return false +} + +func (x *AddRTAMySQLAgentParams) GetTlsSkipVerify() bool { + if x != nil { + return x.TlsSkipVerify + } + return false +} + +func (x *AddRTAMySQLAgentParams) GetTlsCa() string { + if x != nil { + return x.TlsCa + } + return "" +} + +func (x *AddRTAMySQLAgentParams) GetTlsCert() string { + if x != nil { + return x.TlsCert + } + return "" +} + +func (x *AddRTAMySQLAgentParams) GetTlsKey() string { + if x != nil { + return x.TlsKey + } + return "" +} + +func (x *AddRTAMySQLAgentParams) GetSkipConnectionCheck() bool { + if x != nil { + return x.SkipConnectionCheck + } + return false +} + +func (x *AddRTAMySQLAgentParams) GetRtaOptions() *RTAOptions { + if x != nil { + return x.RtaOptions + } + return nil +} + +type ChangeRTAMySQLAgentParams struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Enable this Agent. Agents are enabled by default when they get added. + Enable *bool `protobuf:"varint,1,opt,name=enable,proto3,oneof" json:"enable,omitempty"` + // Replace all custom user-assigned labels. + CustomLabels *common.StringMap `protobuf:"bytes,2,opt,name=custom_labels,json=customLabels,proto3,oneof" json:"custom_labels,omitempty"` + // Log level for exporter. + LogLevel *LogLevel `protobuf:"varint,3,opt,name=log_level,json=logLevel,proto3,enum=inventory.v1.LogLevel,oneof" json:"log_level,omitempty"` + // MySQL username for getting queries data. + Username *string `protobuf:"bytes,4,opt,name=username,proto3,oneof" json:"username,omitempty"` + // MySQL password for getting queries data. + Password *string `protobuf:"bytes,5,opt,name=password,proto3,oneof" json:"password,omitempty"` + // Use TLS for database connections. + Tls *bool `protobuf:"varint,6,opt,name=tls,proto3,oneof" json:"tls,omitempty"` + // Skip TLS certificate and hostname validation. + TlsSkipVerify *bool `protobuf:"varint,7,opt,name=tls_skip_verify,json=tlsSkipVerify,proto3,oneof" json:"tls_skip_verify,omitempty"` + // Certificate Authority certificate chain. + TlsCa *string `protobuf:"bytes,8,opt,name=tls_ca,json=tlsCa,proto3,oneof" json:"tls_ca,omitempty"` + // Client certificate. + TlsCert *string `protobuf:"bytes,9,opt,name=tls_cert,json=tlsCert,proto3,oneof" json:"tls_cert,omitempty"` + // Password for decrypting tls_cert. + TlsKey *string `protobuf:"bytes,10,opt,name=tls_key,json=tlsKey,proto3,oneof" json:"tls_key,omitempty"` + // Real-Time Analytics options. + RtaOptions *RTAOptions `protobuf:"bytes,11,opt,name=rta_options,json=rtaOptions,proto3,oneof" json:"rta_options,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChangeRTAMySQLAgentParams) Reset() { + *x = ChangeRTAMySQLAgentParams{} + mi := &file_inventory_v1_agents_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChangeRTAMySQLAgentParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeRTAMySQLAgentParams) ProtoMessage() {} + +func (x *ChangeRTAMySQLAgentParams) ProtoReflect() protoreflect.Message { + mi := &file_inventory_v1_agents_proto_msgTypes[67] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeRTAMySQLAgentParams.ProtoReflect.Descriptor instead. +func (*ChangeRTAMySQLAgentParams) Descriptor() ([]byte, []int) { + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{67} +} + +func (x *ChangeRTAMySQLAgentParams) GetEnable() bool { + if x != nil && x.Enable != nil { + return *x.Enable + } + return false +} + +func (x *ChangeRTAMySQLAgentParams) GetCustomLabels() *common.StringMap { + if x != nil { + return x.CustomLabels + } + return nil +} + +func (x *ChangeRTAMySQLAgentParams) GetLogLevel() LogLevel { + if x != nil && x.LogLevel != nil { + return *x.LogLevel + } + return LogLevel_LOG_LEVEL_UNSPECIFIED +} + +func (x *ChangeRTAMySQLAgentParams) GetUsername() string { + if x != nil && x.Username != nil { + return *x.Username + } + return "" +} + +func (x *ChangeRTAMySQLAgentParams) GetPassword() string { + if x != nil && x.Password != nil { + return *x.Password + } + return "" +} + +func (x *ChangeRTAMySQLAgentParams) GetTls() bool { + if x != nil && x.Tls != nil { + return *x.Tls + } + return false +} + +func (x *ChangeRTAMySQLAgentParams) GetTlsSkipVerify() bool { + if x != nil && x.TlsSkipVerify != nil { + return *x.TlsSkipVerify + } + return false +} + +func (x *ChangeRTAMySQLAgentParams) GetTlsCa() string { + if x != nil && x.TlsCa != nil { + return *x.TlsCa + } + return "" +} + +func (x *ChangeRTAMySQLAgentParams) GetTlsCert() string { + if x != nil && x.TlsCert != nil { + return *x.TlsCert + } + return "" +} + +func (x *ChangeRTAMySQLAgentParams) GetTlsKey() string { + if x != nil && x.TlsKey != nil { + return *x.TlsKey + } + return "" +} + +func (x *ChangeRTAMySQLAgentParams) GetRtaOptions() *RTAOptions { + if x != nil { + return x.RtaOptions + } + return nil +} + +type RemoveAgentRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` + // Remove agent with all dependencies. + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemoveAgentRequest) Reset() { + *x = RemoveAgentRequest{} + mi := &file_inventory_v1_agents_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemoveAgentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveAgentRequest) ProtoMessage() {} func (x *RemoveAgentRequest) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[65] + mi := &file_inventory_v1_agents_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10873,7 +11387,7 @@ func (x *RemoveAgentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveAgentRequest.ProtoReflect.Descriptor instead. func (*RemoveAgentRequest) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{65} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{68} } func (x *RemoveAgentRequest) GetAgentId() string { @@ -10898,7 +11412,7 @@ type RemoveAgentResponse struct { func (x *RemoveAgentResponse) Reset() { *x = RemoveAgentResponse{} - mi := &file_inventory_v1_agents_proto_msgTypes[66] + mi := &file_inventory_v1_agents_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10910,7 +11424,7 @@ func (x *RemoveAgentResponse) String() string { func (*RemoveAgentResponse) ProtoMessage() {} func (x *RemoveAgentResponse) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[66] + mi := &file_inventory_v1_agents_proto_msgTypes[69] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10923,7 +11437,7 @@ func (x *RemoveAgentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveAgentResponse.ProtoReflect.Descriptor instead. func (*RemoveAgentResponse) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{66} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{69} } var File_inventory_v1_agents_proto protoreflect.FileDescriptor @@ -11238,6 +11752,25 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\tlog_level\x18\v \x01(\x0e2\x16.inventory.v1.LogLevelR\blogLevel\x1a?\n" + "\x11CustomLabelsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x9b\x04\n" + + "\rRTAMySQLAgent\x12\x19\n" + + "\bagent_id\x18\x01 \x01(\tR\aagentId\x12 \n" + + "\fpmm_agent_id\x18\x02 \x01(\tR\n" + + "pmmAgentId\x12\x1a\n" + + "\bdisabled\x18\x03 \x01(\bR\bdisabled\x12\x1d\n" + + "\n" + + "service_id\x18\x04 \x01(\tR\tserviceId\x12 \n" + + "\busername\x18\x05 \x01(\tB\x04\x88\xb5\x18\x01R\busername\x12\x10\n" + + "\x03tls\x18\x06 \x01(\bR\x03tls\x12&\n" + + "\x0ftls_skip_verify\x18\a \x01(\bR\rtlsSkipVerify\x12R\n" + + "\rcustom_labels\x18\b \x03(\v2-.inventory.v1.RTAMySQLAgent.CustomLabelsEntryR\fcustomLabels\x129\n" + + "\vrta_options\x18\t \x01(\v2\x18.inventory.v1.RTAOptionsR\n" + + "rtaOptions\x121\n" + + "\x06status\x18\n" + + " \x01(\x0e2\x19.inventory.v1.AgentStatusR\x06status\x123\n" + + "\tlog_level\x18\v \x01(\x0e2\x16.inventory.v1.LogLevelR\blogLevel\x1a?\n" + + "\x11CustomLabelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x92\x05\n" + "\x1eQANPostgreSQLPgStatementsAgent\x12\x19\n" + "\bagent_id\x18\x01 \x01(\tR\aagentId\x12 \n" + @@ -11358,7 +11891,7 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\n" + "service_id\x18\x03 \x01(\tR\tserviceId\x126\n" + "\n" + - "agent_type\x18\x04 \x01(\x0e2\x17.inventory.v1.AgentTypeR\tagentType\"\x98\f\n" + + "agent_type\x18\x04 \x01(\x0e2\x17.inventory.v1.AgentTypeR\tagentType\"\xdd\f\n" + "\x12ListAgentsResponse\x123\n" + "\tpmm_agent\x18\x01 \x03(\v2\x16.inventory.v1.PMMAgentR\bpmmAgent\x120\n" + "\bvm_agent\x18\x02 \x03(\v2\x15.inventory.v1.VMAgentR\avmAgent\x12?\n" + @@ -11380,9 +11913,10 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\vnomad_agent\x18\x10 \x03(\v2\x18.inventory.v1.NomadAgentR\n" + "nomadAgent\x12E\n" + "\x0fvalkey_exporter\x18\x11 \x03(\v2\x1c.inventory.v1.ValkeyExporterR\x0evalkeyExporter\x12I\n" + - "\x11rta_mongodb_agent\x18\x13 \x03(\v2\x1d.inventory.v1.RTAMongoDBAgentR\x0frtaMongodbAgent\"5\n" + + "\x11rta_mongodb_agent\x18\x13 \x03(\v2\x1d.inventory.v1.RTAMongoDBAgentR\x0frtaMongodbAgent\x12C\n" + + "\x0frta_mysql_agent\x18\x14 \x03(\v2\x1b.inventory.v1.RTAMySQLAgentR\rrtaMysqlAgent\"5\n" + "\x0fGetAgentRequest\x12\"\n" + - "\bagent_id\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10$R\aagentId\"\xc4\f\n" + + "\bagent_id\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10$R\aagentId\"\x8b\r\n" + "\x10GetAgentResponse\x125\n" + "\tpmm_agent\x18\x01 \x01(\v2\x16.inventory.v1.PMMAgentH\x00R\bpmmAgent\x121\n" + "\avmagent\x18\x02 \x01(\v2\x15.inventory.v1.VMAgentH\x00R\avmagent\x12A\n" + @@ -11404,14 +11938,15 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\vnomad_agent\x18\x10 \x01(\v2\x18.inventory.v1.NomadAgentH\x00R\n" + "nomadAgent\x12G\n" + "\x0fvalkey_exporter\x18\x11 \x01(\v2\x1c.inventory.v1.ValkeyExporterH\x00R\x0evalkeyExporter\x12K\n" + - "\x11rta_mongodb_agent\x18\x13 \x01(\v2\x1d.inventory.v1.RTAMongoDBAgentH\x00R\x0frtaMongodbAgentB\a\n" + + "\x11rta_mongodb_agent\x18\x13 \x01(\v2\x1d.inventory.v1.RTAMongoDBAgentH\x00R\x0frtaMongodbAgent\x12E\n" + + "\x0frta_mysql_agent\x18\x14 \x01(\v2\x1b.inventory.v1.RTAMySQLAgentH\x00R\rrtaMysqlAgentB\a\n" + "\x05agent\"O\n" + "\x13GetAgentLogsRequest\x12\"\n" + "\bagent_id\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10$R\aagentId\x12\x14\n" + "\x05limit\x18\x02 \x01(\rR\x05limit\"j\n" + "\x14GetAgentLogsResponse\x12\x12\n" + "\x04logs\x18\x01 \x03(\tR\x04logs\x12>\n" + - "\x1cagent_config_log_lines_count\x18\x02 \x01(\rR\x18agentConfigLogLinesCount\"\xee\f\n" + + "\x1cagent_config_log_lines_count\x18\x02 \x01(\rR\x18agentConfigLogLinesCount\"\xbe\r\n" + "\x0fAddAgentRequest\x12>\n" + "\tpmm_agent\x18\x01 \x01(\v2\x1f.inventory.v1.AddPMMAgentParamsH\x00R\bpmmAgent\x12J\n" + "\rnode_exporter\x18\x02 \x01(\v2#.inventory.v1.AddNodeExporterParamsH\x00R\fnodeExporter\x12P\n" + @@ -11430,8 +11965,9 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "!qan_postgresql_pgstatements_agent\x18\r \x01(\v25.inventory.v1.AddQANPostgreSQLPgStatementsAgentParamsH\x00R\x1eqanPostgresqlPgstatementsAgent\x12\x85\x01\n" + "\"qan_postgresql_pgstatmonitor_agent\x18\x0e \x01(\v26.inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParamsH\x00R\x1fqanPostgresqlPgstatmonitorAgent\x12P\n" + "\x0fvalkey_exporter\x18\x0f \x01(\v2%.inventory.v1.AddValkeyExporterParamsH\x00R\x0evalkeyExporter\x12T\n" + - "\x11rta_mongodb_agent\x18\x11 \x01(\v2&.inventory.v1.AddRTAMongoDBAgentParamsH\x00R\x0frtaMongodbAgentB\a\n" + - "\x05agent\"\xd4\v\n" + + "\x11rta_mongodb_agent\x18\x11 \x01(\v2&.inventory.v1.AddRTAMongoDBAgentParamsH\x00R\x0frtaMongodbAgent\x12N\n" + + "\x0frta_mysql_agent\x18\x12 \x01(\v2$.inventory.v1.AddRTAMySQLAgentParamsH\x00R\rrtaMysqlAgentB\a\n" + + "\x05agent\"\x9b\f\n" + "\x10AddAgentResponse\x125\n" + "\tpmm_agent\x18\x01 \x01(\v2\x16.inventory.v1.PMMAgentH\x00R\bpmmAgent\x12A\n" + "\rnode_exporter\x18\x02 \x01(\v2\x1a.inventory.v1.NodeExporterH\x00R\fnodeExporter\x12G\n" + @@ -11450,8 +11986,9 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "!qan_postgresql_pgstatements_agent\x18\r \x01(\v2,.inventory.v1.QANPostgreSQLPgStatementsAgentH\x00R\x1eqanPostgresqlPgstatementsAgent\x12|\n" + "\"qan_postgresql_pgstatmonitor_agent\x18\x0e \x01(\v2-.inventory.v1.QANPostgreSQLPgStatMonitorAgentH\x00R\x1fqanPostgresqlPgstatmonitorAgent\x12G\n" + "\x0fvalkey_exporter\x18\x0f \x01(\v2\x1c.inventory.v1.ValkeyExporterH\x00R\x0evalkeyExporter\x12K\n" + - "\x11rta_mongodb_agent\x18\x11 \x01(\v2\x1d.inventory.v1.RTAMongoDBAgentH\x00R\x0frtaMongodbAgentB\a\n" + - "\x05agent\"\xce\r\n" + + "\x11rta_mongodb_agent\x18\x11 \x01(\v2\x1d.inventory.v1.RTAMongoDBAgentH\x00R\x0frtaMongodbAgent\x12E\n" + + "\x0frta_mysql_agent\x18\x12 \x01(\v2\x1b.inventory.v1.RTAMySQLAgentH\x00R\rrtaMysqlAgentB\a\n" + + "\x05agent\"\xa1\x0e\n" + "\x12ChangeAgentRequest\x12\"\n" + "\bagent_id\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\aagentId\x12M\n" + "\rnode_exporter\x18\x02 \x01(\v2&.inventory.v1.ChangeNodeExporterParamsH\x00R\fnodeExporter\x12S\n" + @@ -11472,8 +12009,9 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\vnomad_agent\x18\x0f \x01(\v2$.inventory.v1.ChangeNomadAgentParamsH\x00R\n" + "nomadAgent\x12S\n" + "\x0fvalkey_exporter\x18\x10 \x01(\v2(.inventory.v1.ChangeValkeyExporterParamsH\x00R\x0evalkeyExporter\x12W\n" + - "\x11rta_mongodb_agent\x18\x12 \x01(\v2).inventory.v1.ChangeRTAMongoDBAgentParamsH\x00R\x0frtaMongodbAgentB\a\n" + - "\x05agent\"\xdd\v\n" + + "\x11rta_mongodb_agent\x18\x12 \x01(\v2).inventory.v1.ChangeRTAMongoDBAgentParamsH\x00R\x0frtaMongodbAgent\x12Q\n" + + "\x0frta_mysql_agent\x18\x13 \x01(\v2'.inventory.v1.ChangeRTAMySQLAgentParamsH\x00R\rrtaMysqlAgentB\a\n" + + "\x05agent\"\xa4\f\n" + "\x13ChangeAgentResponse\x12A\n" + "\rnode_exporter\x18\x02 \x01(\v2\x1a.inventory.v1.NodeExporterH\x00R\fnodeExporter\x12G\n" + "\x0fmysqld_exporter\x18\x03 \x01(\v2\x1c.inventory.v1.MySQLdExporterH\x00R\x0emysqldExporter\x12J\n" + @@ -11493,7 +12031,8 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\vnomad_agent\x18\x0f \x01(\v2\x18.inventory.v1.NomadAgentH\x00R\n" + "nomadAgent\x12G\n" + "\x0fvalkey_exporter\x18\x10 \x01(\v2\x1c.inventory.v1.ValkeyExporterH\x00R\x0evalkeyExporter\x12K\n" + - "\x11rta_mongodb_agent\x18\x12 \x01(\v2\x1d.inventory.v1.RTAMongoDBAgentH\x00R\x0frtaMongodbAgentB\a\n" + + "\x11rta_mongodb_agent\x18\x12 \x01(\v2\x1d.inventory.v1.RTAMongoDBAgentH\x00R\x0frtaMongodbAgent\x12E\n" + + "\x0frta_mysql_agent\x18\x13 \x01(\v2\x1b.inventory.v1.RTAMySQLAgentH\x00R\rrtaMysqlAgentB\a\n" + "\x05agent\"\xdc\x01\n" + "\x11AddPMMAgentParams\x12.\n" + "\x0fruns_on_node_id\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\frunsOnNodeId\x12V\n" + @@ -12345,11 +12884,60 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\"_tls_certificate_key_file_passwordB\t\n" + "\a_tls_caB\x1b\n" + "\x19_authentication_mechanismB\x0e\n" + + "\f_rta_options\"\x82\x05\n" + + "\x16AddRTAMySQLAgentParams\x12)\n" + + "\fpmm_agent_id\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\n" + + "pmmAgentId\x12&\n" + + "\n" + + "service_id\x18\x02 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\tserviceId\x12 \n" + + "\busername\x18\x03 \x01(\tB\x04\x88\xb5\x18\x01R\busername\x12 \n" + + "\bpassword\x18\x04 \x01(\tB\x04\x88\xb5\x18\x01R\bpassword\x12[\n" + + "\rcustom_labels\x18\x05 \x03(\v26.inventory.v1.AddRTAMySQLAgentParams.CustomLabelsEntryR\fcustomLabels\x123\n" + + "\tlog_level\x18\x06 \x01(\x0e2\x16.inventory.v1.LogLevelR\blogLevel\x12\x10\n" + + "\x03tls\x18\a \x01(\bR\x03tls\x12&\n" + + "\x0ftls_skip_verify\x18\b \x01(\bR\rtlsSkipVerify\x12\x15\n" + + "\x06tls_ca\x18\t \x01(\tR\x05tlsCa\x12\x1f\n" + + "\btls_cert\x18\n" + + " \x01(\tB\x04\x88\xb5\x18\x01R\atlsCert\x12\x1d\n" + + "\atls_key\x18\v \x01(\tB\x04\x88\xb5\x18\x01R\x06tlsKey\x122\n" + + "\x15skip_connection_check\x18\f \x01(\bR\x13skipConnectionCheck\x129\n" + + "\vrta_options\x18\r \x01(\v2\x18.inventory.v1.RTAOptionsR\n" + + "rtaOptions\x1a?\n" + + "\x11CustomLabelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xfc\x04\n" + + "\x19ChangeRTAMySQLAgentParams\x12\x1b\n" + + "\x06enable\x18\x01 \x01(\bH\x00R\x06enable\x88\x01\x01\x12;\n" + + "\rcustom_labels\x18\x02 \x01(\v2\x11.common.StringMapH\x01R\fcustomLabels\x88\x01\x01\x128\n" + + "\tlog_level\x18\x03 \x01(\x0e2\x16.inventory.v1.LogLevelH\x02R\blogLevel\x88\x01\x01\x12%\n" + + "\busername\x18\x04 \x01(\tB\x04\x88\xb5\x18\x01H\x03R\busername\x88\x01\x01\x12%\n" + + "\bpassword\x18\x05 \x01(\tB\x04\x88\xb5\x18\x01H\x04R\bpassword\x88\x01\x01\x12\x15\n" + + "\x03tls\x18\x06 \x01(\bH\x05R\x03tls\x88\x01\x01\x12+\n" + + "\x0ftls_skip_verify\x18\a \x01(\bH\x06R\rtlsSkipVerify\x88\x01\x01\x12\x1a\n" + + "\x06tls_ca\x18\b \x01(\tH\aR\x05tlsCa\x88\x01\x01\x12$\n" + + "\btls_cert\x18\t \x01(\tB\x04\x88\xb5\x18\x01H\bR\atlsCert\x88\x01\x01\x12\"\n" + + "\atls_key\x18\n" + + " \x01(\tB\x04\x88\xb5\x18\x01H\tR\x06tlsKey\x88\x01\x01\x12>\n" + + "\vrta_options\x18\v \x01(\v2\x18.inventory.v1.RTAOptionsH\n" + + "R\n" + + "rtaOptions\x88\x01\x01B\t\n" + + "\a_enableB\x10\n" + + "\x0e_custom_labelsB\f\n" + + "\n" + + "_log_levelB\v\n" + + "\t_usernameB\v\n" + + "\t_passwordB\x06\n" + + "\x04_tlsB\x12\n" + + "\x10_tls_skip_verifyB\t\n" + + "\a_tls_caB\v\n" + + "\t_tls_certB\n" + + "\n" + + "\b_tls_keyB\x0e\n" + "\f_rta_options\"N\n" + "\x12RemoveAgentRequest\x12\"\n" + "\bagent_id\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\aagentId\x12\x14\n" + "\x05force\x18\x02 \x01(\bR\x05force\"\x15\n" + - "\x13RemoveAgentResponse*\xd0\x05\n" + + "\x13RemoveAgentResponse*\xf0\x05\n" + "\tAgentType\x12\x1a\n" + "\x16AGENT_TYPE_UNSPECIFIED\x10\x00\x12\x18\n" + "\x14AGENT_TYPE_PMM_AGENT\x10\x01\x12\x17\n" + @@ -12371,7 +12959,8 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\x17AGENT_TYPE_RDS_EXPORTER\x10\v\x12&\n" + "\"AGENT_TYPE_AZURE_DATABASE_EXPORTER\x10\x0f\x12\x1a\n" + "\x16AGENT_TYPE_NOMAD_AGENT\x10\x10\x12 \n" + - "\x1cAGENT_TYPE_RTA_MONGODB_AGENT\x10\x132\x83\t\n" + + "\x1cAGENT_TYPE_RTA_MONGODB_AGENT\x10\x13\x12\x1e\n" + + "\x1aAGENT_TYPE_RTA_MYSQL_AGENT\x10\x142\x83\t\n" + "\rAgentsService\x12\x9c\x01\n" + "\n" + "ListAgents\x12\x1f.inventory.v1.ListAgentsRequest\x1a .inventory.v1.ListAgentsResponse\"K\x92A,\x12\vList Agents\x1a\x1dReturns a list of all Agents.\x82\xd3\xe4\x93\x02\x16\x12\x14/v1/inventory/agents\x12\x9f\x01\n" + @@ -12394,414 +12983,432 @@ func file_inventory_v1_agents_proto_rawDescGZIP() []byte { return file_inventory_v1_agents_proto_rawDescData } -var ( - file_inventory_v1_agents_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_inventory_v1_agents_proto_msgTypes = make([]protoimpl.MessageInfo, 107) - file_inventory_v1_agents_proto_goTypes = []any{ - AgentType(0), // 0: inventory.v1.AgentType - (*PMMAgent)(nil), // 1: inventory.v1.PMMAgent - (*VMAgent)(nil), // 2: inventory.v1.VMAgent - (*NomadAgent)(nil), // 3: inventory.v1.NomadAgent - (*NodeExporter)(nil), // 4: inventory.v1.NodeExporter - (*MySQLdExporter)(nil), // 5: inventory.v1.MySQLdExporter - (*MongoDBExporter)(nil), // 6: inventory.v1.MongoDBExporter - (*PostgresExporter)(nil), // 7: inventory.v1.PostgresExporter - (*ProxySQLExporter)(nil), // 8: inventory.v1.ProxySQLExporter - (*ValkeyExporter)(nil), // 9: inventory.v1.ValkeyExporter - (*QANMySQLPerfSchemaAgent)(nil), // 10: inventory.v1.QANMySQLPerfSchemaAgent - (*QANMySQLSlowlogAgent)(nil), // 11: inventory.v1.QANMySQLSlowlogAgent - (*QANMongoDBProfilerAgent)(nil), // 12: inventory.v1.QANMongoDBProfilerAgent - (*QANMongoDBMongologAgent)(nil), // 13: inventory.v1.QANMongoDBMongologAgent - (*RTAOptions)(nil), // 14: inventory.v1.RTAOptions - (*RTAMongoDBAgent)(nil), // 15: inventory.v1.RTAMongoDBAgent - (*QANPostgreSQLPgStatementsAgent)(nil), // 16: inventory.v1.QANPostgreSQLPgStatementsAgent - (*QANPostgreSQLPgStatMonitorAgent)(nil), // 17: inventory.v1.QANPostgreSQLPgStatMonitorAgent - (*RDSExporter)(nil), // 18: inventory.v1.RDSExporter - (*ExternalExporter)(nil), // 19: inventory.v1.ExternalExporter - (*AzureDatabaseExporter)(nil), // 20: inventory.v1.AzureDatabaseExporter - (*ChangeCommonAgentParams)(nil), // 21: inventory.v1.ChangeCommonAgentParams - (*ListAgentsRequest)(nil), // 22: inventory.v1.ListAgentsRequest - (*ListAgentsResponse)(nil), // 23: inventory.v1.ListAgentsResponse - (*GetAgentRequest)(nil), // 24: inventory.v1.GetAgentRequest - (*GetAgentResponse)(nil), // 25: inventory.v1.GetAgentResponse - (*GetAgentLogsRequest)(nil), // 26: inventory.v1.GetAgentLogsRequest - (*GetAgentLogsResponse)(nil), // 27: inventory.v1.GetAgentLogsResponse - (*AddAgentRequest)(nil), // 28: inventory.v1.AddAgentRequest - (*AddAgentResponse)(nil), // 29: inventory.v1.AddAgentResponse - (*ChangeAgentRequest)(nil), // 30: inventory.v1.ChangeAgentRequest - (*ChangeAgentResponse)(nil), // 31: inventory.v1.ChangeAgentResponse - (*AddPMMAgentParams)(nil), // 32: inventory.v1.AddPMMAgentParams - (*AddNodeExporterParams)(nil), // 33: inventory.v1.AddNodeExporterParams - (*ChangeNodeExporterParams)(nil), // 34: inventory.v1.ChangeNodeExporterParams - (*AddMySQLdExporterParams)(nil), // 35: inventory.v1.AddMySQLdExporterParams - (*ChangeMySQLdExporterParams)(nil), // 36: inventory.v1.ChangeMySQLdExporterParams - (*AddMongoDBExporterParams)(nil), // 37: inventory.v1.AddMongoDBExporterParams - (*ChangeMongoDBExporterParams)(nil), // 38: inventory.v1.ChangeMongoDBExporterParams - (*AddPostgresExporterParams)(nil), // 39: inventory.v1.AddPostgresExporterParams - (*ChangePostgresExporterParams)(nil), // 40: inventory.v1.ChangePostgresExporterParams - (*AddProxySQLExporterParams)(nil), // 41: inventory.v1.AddProxySQLExporterParams - (*ChangeProxySQLExporterParams)(nil), // 42: inventory.v1.ChangeProxySQLExporterParams - (*AddQANMySQLPerfSchemaAgentParams)(nil), // 43: inventory.v1.AddQANMySQLPerfSchemaAgentParams - (*ChangeQANMySQLPerfSchemaAgentParams)(nil), // 44: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams - (*AddQANMySQLSlowlogAgentParams)(nil), // 45: inventory.v1.AddQANMySQLSlowlogAgentParams - (*ChangeQANMySQLSlowlogAgentParams)(nil), // 46: inventory.v1.ChangeQANMySQLSlowlogAgentParams - (*AddQANMongoDBProfilerAgentParams)(nil), // 47: inventory.v1.AddQANMongoDBProfilerAgentParams - (*ChangeQANMongoDBProfilerAgentParams)(nil), // 48: inventory.v1.ChangeQANMongoDBProfilerAgentParams - (*AddQANMongoDBMongologAgentParams)(nil), // 49: inventory.v1.AddQANMongoDBMongologAgentParams - (*ChangeQANMongoDBMongologAgentParams)(nil), // 50: inventory.v1.ChangeQANMongoDBMongologAgentParams - (*AddQANPostgreSQLPgStatementsAgentParams)(nil), // 51: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams - (*ChangeQANPostgreSQLPgStatementsAgentParams)(nil), // 52: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams - (*AddQANPostgreSQLPgStatMonitorAgentParams)(nil), // 53: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams - (*ChangeQANPostgreSQLPgStatMonitorAgentParams)(nil), // 54: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams - (*AddRDSExporterParams)(nil), // 55: inventory.v1.AddRDSExporterParams - (*ChangeRDSExporterParams)(nil), // 56: inventory.v1.ChangeRDSExporterParams - (*AddExternalExporterParams)(nil), // 57: inventory.v1.AddExternalExporterParams - (*ChangeExternalExporterParams)(nil), // 58: inventory.v1.ChangeExternalExporterParams - (*AddAzureDatabaseExporterParams)(nil), // 59: inventory.v1.AddAzureDatabaseExporterParams - (*ChangeAzureDatabaseExporterParams)(nil), // 60: inventory.v1.ChangeAzureDatabaseExporterParams - (*ChangeNomadAgentParams)(nil), // 61: inventory.v1.ChangeNomadAgentParams - (*AddValkeyExporterParams)(nil), // 62: inventory.v1.AddValkeyExporterParams - (*ChangeValkeyExporterParams)(nil), // 63: inventory.v1.ChangeValkeyExporterParams - (*AddRTAMongoDBAgentParams)(nil), // 64: inventory.v1.AddRTAMongoDBAgentParams - (*ChangeRTAMongoDBAgentParams)(nil), // 65: inventory.v1.ChangeRTAMongoDBAgentParams - (*RemoveAgentRequest)(nil), // 66: inventory.v1.RemoveAgentRequest - (*RemoveAgentResponse)(nil), // 67: inventory.v1.RemoveAgentResponse - nil, // 68: inventory.v1.PMMAgent.CustomLabelsEntry - nil, // 69: inventory.v1.NodeExporter.CustomLabelsEntry - nil, // 70: inventory.v1.MySQLdExporter.CustomLabelsEntry - nil, // 71: inventory.v1.MySQLdExporter.ExtraDsnParamsEntry - nil, // 72: inventory.v1.MongoDBExporter.CustomLabelsEntry - nil, // 73: inventory.v1.PostgresExporter.CustomLabelsEntry - nil, // 74: inventory.v1.ProxySQLExporter.CustomLabelsEntry - nil, // 75: inventory.v1.ValkeyExporter.CustomLabelsEntry - nil, // 76: inventory.v1.QANMySQLPerfSchemaAgent.CustomLabelsEntry - nil, // 77: inventory.v1.QANMySQLPerfSchemaAgent.ExtraDsnParamsEntry - nil, // 78: inventory.v1.QANMySQLSlowlogAgent.CustomLabelsEntry - nil, // 79: inventory.v1.QANMySQLSlowlogAgent.ExtraDsnParamsEntry - nil, // 80: inventory.v1.QANMongoDBProfilerAgent.CustomLabelsEntry - nil, // 81: inventory.v1.QANMongoDBMongologAgent.CustomLabelsEntry - nil, // 82: inventory.v1.RTAMongoDBAgent.CustomLabelsEntry - nil, // 83: inventory.v1.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry - nil, // 84: inventory.v1.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry - nil, // 85: inventory.v1.RDSExporter.CustomLabelsEntry - nil, // 86: inventory.v1.ExternalExporter.CustomLabelsEntry - nil, // 87: inventory.v1.AzureDatabaseExporter.CustomLabelsEntry - nil, // 88: inventory.v1.AddPMMAgentParams.CustomLabelsEntry - nil, // 89: inventory.v1.AddNodeExporterParams.CustomLabelsEntry - nil, // 90: inventory.v1.AddMySQLdExporterParams.CustomLabelsEntry - nil, // 91: inventory.v1.AddMySQLdExporterParams.ExtraDsnParamsEntry - nil, // 92: inventory.v1.AddMongoDBExporterParams.CustomLabelsEntry - nil, // 93: inventory.v1.AddPostgresExporterParams.CustomLabelsEntry - nil, // 94: inventory.v1.AddProxySQLExporterParams.CustomLabelsEntry - nil, // 95: inventory.v1.AddQANMySQLPerfSchemaAgentParams.CustomLabelsEntry - nil, // 96: inventory.v1.AddQANMySQLPerfSchemaAgentParams.ExtraDsnParamsEntry - nil, // 97: inventory.v1.AddQANMySQLSlowlogAgentParams.CustomLabelsEntry - nil, // 98: inventory.v1.AddQANMySQLSlowlogAgentParams.ExtraDsnParamsEntry - nil, // 99: inventory.v1.AddQANMongoDBProfilerAgentParams.CustomLabelsEntry - nil, // 100: inventory.v1.AddQANMongoDBMongologAgentParams.CustomLabelsEntry - nil, // 101: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.CustomLabelsEntry - nil, // 102: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.CustomLabelsEntry - nil, // 103: inventory.v1.AddRDSExporterParams.CustomLabelsEntry - nil, // 104: inventory.v1.AddExternalExporterParams.CustomLabelsEntry - nil, // 105: inventory.v1.AddAzureDatabaseExporterParams.CustomLabelsEntry - nil, // 106: inventory.v1.AddValkeyExporterParams.CustomLabelsEntry - nil, // 107: inventory.v1.AddRTAMongoDBAgentParams.CustomLabelsEntry - AgentStatus(0), // 108: inventory.v1.AgentStatus - LogLevel(0), // 109: inventory.v1.LogLevel - (*common.MetricsResolutions)(nil), // 110: common.MetricsResolutions - (*durationpb.Duration)(nil), // 111: google.protobuf.Duration - (*common.StringMap)(nil), // 112: common.StringMap - } -) - +var file_inventory_v1_agents_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_inventory_v1_agents_proto_msgTypes = make([]protoimpl.MessageInfo, 112) +var file_inventory_v1_agents_proto_goTypes = []any{ + (AgentType)(0), // 0: inventory.v1.AgentType + (*PMMAgent)(nil), // 1: inventory.v1.PMMAgent + (*VMAgent)(nil), // 2: inventory.v1.VMAgent + (*NomadAgent)(nil), // 3: inventory.v1.NomadAgent + (*NodeExporter)(nil), // 4: inventory.v1.NodeExporter + (*MySQLdExporter)(nil), // 5: inventory.v1.MySQLdExporter + (*MongoDBExporter)(nil), // 6: inventory.v1.MongoDBExporter + (*PostgresExporter)(nil), // 7: inventory.v1.PostgresExporter + (*ProxySQLExporter)(nil), // 8: inventory.v1.ProxySQLExporter + (*ValkeyExporter)(nil), // 9: inventory.v1.ValkeyExporter + (*QANMySQLPerfSchemaAgent)(nil), // 10: inventory.v1.QANMySQLPerfSchemaAgent + (*QANMySQLSlowlogAgent)(nil), // 11: inventory.v1.QANMySQLSlowlogAgent + (*QANMongoDBProfilerAgent)(nil), // 12: inventory.v1.QANMongoDBProfilerAgent + (*QANMongoDBMongologAgent)(nil), // 13: inventory.v1.QANMongoDBMongologAgent + (*RTAOptions)(nil), // 14: inventory.v1.RTAOptions + (*RTAMongoDBAgent)(nil), // 15: inventory.v1.RTAMongoDBAgent + (*RTAMySQLAgent)(nil), // 16: inventory.v1.RTAMySQLAgent + (*QANPostgreSQLPgStatementsAgent)(nil), // 17: inventory.v1.QANPostgreSQLPgStatementsAgent + (*QANPostgreSQLPgStatMonitorAgent)(nil), // 18: inventory.v1.QANPostgreSQLPgStatMonitorAgent + (*RDSExporter)(nil), // 19: inventory.v1.RDSExporter + (*ExternalExporter)(nil), // 20: inventory.v1.ExternalExporter + (*AzureDatabaseExporter)(nil), // 21: inventory.v1.AzureDatabaseExporter + (*ChangeCommonAgentParams)(nil), // 22: inventory.v1.ChangeCommonAgentParams + (*ListAgentsRequest)(nil), // 23: inventory.v1.ListAgentsRequest + (*ListAgentsResponse)(nil), // 24: inventory.v1.ListAgentsResponse + (*GetAgentRequest)(nil), // 25: inventory.v1.GetAgentRequest + (*GetAgentResponse)(nil), // 26: inventory.v1.GetAgentResponse + (*GetAgentLogsRequest)(nil), // 27: inventory.v1.GetAgentLogsRequest + (*GetAgentLogsResponse)(nil), // 28: inventory.v1.GetAgentLogsResponse + (*AddAgentRequest)(nil), // 29: inventory.v1.AddAgentRequest + (*AddAgentResponse)(nil), // 30: inventory.v1.AddAgentResponse + (*ChangeAgentRequest)(nil), // 31: inventory.v1.ChangeAgentRequest + (*ChangeAgentResponse)(nil), // 32: inventory.v1.ChangeAgentResponse + (*AddPMMAgentParams)(nil), // 33: inventory.v1.AddPMMAgentParams + (*AddNodeExporterParams)(nil), // 34: inventory.v1.AddNodeExporterParams + (*ChangeNodeExporterParams)(nil), // 35: inventory.v1.ChangeNodeExporterParams + (*AddMySQLdExporterParams)(nil), // 36: inventory.v1.AddMySQLdExporterParams + (*ChangeMySQLdExporterParams)(nil), // 37: inventory.v1.ChangeMySQLdExporterParams + (*AddMongoDBExporterParams)(nil), // 38: inventory.v1.AddMongoDBExporterParams + (*ChangeMongoDBExporterParams)(nil), // 39: inventory.v1.ChangeMongoDBExporterParams + (*AddPostgresExporterParams)(nil), // 40: inventory.v1.AddPostgresExporterParams + (*ChangePostgresExporterParams)(nil), // 41: inventory.v1.ChangePostgresExporterParams + (*AddProxySQLExporterParams)(nil), // 42: inventory.v1.AddProxySQLExporterParams + (*ChangeProxySQLExporterParams)(nil), // 43: inventory.v1.ChangeProxySQLExporterParams + (*AddQANMySQLPerfSchemaAgentParams)(nil), // 44: inventory.v1.AddQANMySQLPerfSchemaAgentParams + (*ChangeQANMySQLPerfSchemaAgentParams)(nil), // 45: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams + (*AddQANMySQLSlowlogAgentParams)(nil), // 46: inventory.v1.AddQANMySQLSlowlogAgentParams + (*ChangeQANMySQLSlowlogAgentParams)(nil), // 47: inventory.v1.ChangeQANMySQLSlowlogAgentParams + (*AddQANMongoDBProfilerAgentParams)(nil), // 48: inventory.v1.AddQANMongoDBProfilerAgentParams + (*ChangeQANMongoDBProfilerAgentParams)(nil), // 49: inventory.v1.ChangeQANMongoDBProfilerAgentParams + (*AddQANMongoDBMongologAgentParams)(nil), // 50: inventory.v1.AddQANMongoDBMongologAgentParams + (*ChangeQANMongoDBMongologAgentParams)(nil), // 51: inventory.v1.ChangeQANMongoDBMongologAgentParams + (*AddQANPostgreSQLPgStatementsAgentParams)(nil), // 52: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams + (*ChangeQANPostgreSQLPgStatementsAgentParams)(nil), // 53: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams + (*AddQANPostgreSQLPgStatMonitorAgentParams)(nil), // 54: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams + (*ChangeQANPostgreSQLPgStatMonitorAgentParams)(nil), // 55: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams + (*AddRDSExporterParams)(nil), // 56: inventory.v1.AddRDSExporterParams + (*ChangeRDSExporterParams)(nil), // 57: inventory.v1.ChangeRDSExporterParams + (*AddExternalExporterParams)(nil), // 58: inventory.v1.AddExternalExporterParams + (*ChangeExternalExporterParams)(nil), // 59: inventory.v1.ChangeExternalExporterParams + (*AddAzureDatabaseExporterParams)(nil), // 60: inventory.v1.AddAzureDatabaseExporterParams + (*ChangeAzureDatabaseExporterParams)(nil), // 61: inventory.v1.ChangeAzureDatabaseExporterParams + (*ChangeNomadAgentParams)(nil), // 62: inventory.v1.ChangeNomadAgentParams + (*AddValkeyExporterParams)(nil), // 63: inventory.v1.AddValkeyExporterParams + (*ChangeValkeyExporterParams)(nil), // 64: inventory.v1.ChangeValkeyExporterParams + (*AddRTAMongoDBAgentParams)(nil), // 65: inventory.v1.AddRTAMongoDBAgentParams + (*ChangeRTAMongoDBAgentParams)(nil), // 66: inventory.v1.ChangeRTAMongoDBAgentParams + (*AddRTAMySQLAgentParams)(nil), // 67: inventory.v1.AddRTAMySQLAgentParams + (*ChangeRTAMySQLAgentParams)(nil), // 68: inventory.v1.ChangeRTAMySQLAgentParams + (*RemoveAgentRequest)(nil), // 69: inventory.v1.RemoveAgentRequest + (*RemoveAgentResponse)(nil), // 70: inventory.v1.RemoveAgentResponse + nil, // 71: inventory.v1.PMMAgent.CustomLabelsEntry + nil, // 72: inventory.v1.NodeExporter.CustomLabelsEntry + nil, // 73: inventory.v1.MySQLdExporter.CustomLabelsEntry + nil, // 74: inventory.v1.MySQLdExporter.ExtraDsnParamsEntry + nil, // 75: inventory.v1.MongoDBExporter.CustomLabelsEntry + nil, // 76: inventory.v1.PostgresExporter.CustomLabelsEntry + nil, // 77: inventory.v1.ProxySQLExporter.CustomLabelsEntry + nil, // 78: inventory.v1.ValkeyExporter.CustomLabelsEntry + nil, // 79: inventory.v1.QANMySQLPerfSchemaAgent.CustomLabelsEntry + nil, // 80: inventory.v1.QANMySQLPerfSchemaAgent.ExtraDsnParamsEntry + nil, // 81: inventory.v1.QANMySQLSlowlogAgent.CustomLabelsEntry + nil, // 82: inventory.v1.QANMySQLSlowlogAgent.ExtraDsnParamsEntry + nil, // 83: inventory.v1.QANMongoDBProfilerAgent.CustomLabelsEntry + nil, // 84: inventory.v1.QANMongoDBMongologAgent.CustomLabelsEntry + nil, // 85: inventory.v1.RTAMongoDBAgent.CustomLabelsEntry + nil, // 86: inventory.v1.RTAMySQLAgent.CustomLabelsEntry + nil, // 87: inventory.v1.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry + nil, // 88: inventory.v1.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry + nil, // 89: inventory.v1.RDSExporter.CustomLabelsEntry + nil, // 90: inventory.v1.ExternalExporter.CustomLabelsEntry + nil, // 91: inventory.v1.AzureDatabaseExporter.CustomLabelsEntry + nil, // 92: inventory.v1.AddPMMAgentParams.CustomLabelsEntry + nil, // 93: inventory.v1.AddNodeExporterParams.CustomLabelsEntry + nil, // 94: inventory.v1.AddMySQLdExporterParams.CustomLabelsEntry + nil, // 95: inventory.v1.AddMySQLdExporterParams.ExtraDsnParamsEntry + nil, // 96: inventory.v1.AddMongoDBExporterParams.CustomLabelsEntry + nil, // 97: inventory.v1.AddPostgresExporterParams.CustomLabelsEntry + nil, // 98: inventory.v1.AddProxySQLExporterParams.CustomLabelsEntry + nil, // 99: inventory.v1.AddQANMySQLPerfSchemaAgentParams.CustomLabelsEntry + nil, // 100: inventory.v1.AddQANMySQLPerfSchemaAgentParams.ExtraDsnParamsEntry + nil, // 101: inventory.v1.AddQANMySQLSlowlogAgentParams.CustomLabelsEntry + nil, // 102: inventory.v1.AddQANMySQLSlowlogAgentParams.ExtraDsnParamsEntry + nil, // 103: inventory.v1.AddQANMongoDBProfilerAgentParams.CustomLabelsEntry + nil, // 104: inventory.v1.AddQANMongoDBMongologAgentParams.CustomLabelsEntry + nil, // 105: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.CustomLabelsEntry + nil, // 106: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.CustomLabelsEntry + nil, // 107: inventory.v1.AddRDSExporterParams.CustomLabelsEntry + nil, // 108: inventory.v1.AddExternalExporterParams.CustomLabelsEntry + nil, // 109: inventory.v1.AddAzureDatabaseExporterParams.CustomLabelsEntry + nil, // 110: inventory.v1.AddValkeyExporterParams.CustomLabelsEntry + nil, // 111: inventory.v1.AddRTAMongoDBAgentParams.CustomLabelsEntry + nil, // 112: inventory.v1.AddRTAMySQLAgentParams.CustomLabelsEntry + (AgentStatus)(0), // 113: inventory.v1.AgentStatus + (LogLevel)(0), // 114: inventory.v1.LogLevel + (*common.MetricsResolutions)(nil), // 115: common.MetricsResolutions + (*durationpb.Duration)(nil), // 116: google.protobuf.Duration + (*common.StringMap)(nil), // 117: common.StringMap +} var file_inventory_v1_agents_proto_depIdxs = []int32{ - 68, // 0: inventory.v1.PMMAgent.custom_labels:type_name -> inventory.v1.PMMAgent.CustomLabelsEntry - 108, // 1: inventory.v1.VMAgent.status:type_name -> inventory.v1.AgentStatus - 108, // 2: inventory.v1.NomadAgent.status:type_name -> inventory.v1.AgentStatus - 69, // 3: inventory.v1.NodeExporter.custom_labels:type_name -> inventory.v1.NodeExporter.CustomLabelsEntry - 108, // 4: inventory.v1.NodeExporter.status:type_name -> inventory.v1.AgentStatus - 109, // 5: inventory.v1.NodeExporter.log_level:type_name -> inventory.v1.LogLevel - 110, // 6: inventory.v1.NodeExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 70, // 7: inventory.v1.MySQLdExporter.custom_labels:type_name -> inventory.v1.MySQLdExporter.CustomLabelsEntry - 108, // 8: inventory.v1.MySQLdExporter.status:type_name -> inventory.v1.AgentStatus - 109, // 9: inventory.v1.MySQLdExporter.log_level:type_name -> inventory.v1.LogLevel - 110, // 10: inventory.v1.MySQLdExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 71, // 11: inventory.v1.MySQLdExporter.extra_dsn_params:type_name -> inventory.v1.MySQLdExporter.ExtraDsnParamsEntry - 111, // 12: inventory.v1.MySQLdExporter.connection_timeout:type_name -> google.protobuf.Duration - 72, // 13: inventory.v1.MongoDBExporter.custom_labels:type_name -> inventory.v1.MongoDBExporter.CustomLabelsEntry - 108, // 14: inventory.v1.MongoDBExporter.status:type_name -> inventory.v1.AgentStatus - 109, // 15: inventory.v1.MongoDBExporter.log_level:type_name -> inventory.v1.LogLevel - 110, // 16: inventory.v1.MongoDBExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 111, // 17: inventory.v1.MongoDBExporter.connection_timeout:type_name -> google.protobuf.Duration - 73, // 18: inventory.v1.PostgresExporter.custom_labels:type_name -> inventory.v1.PostgresExporter.CustomLabelsEntry - 108, // 19: inventory.v1.PostgresExporter.status:type_name -> inventory.v1.AgentStatus - 109, // 20: inventory.v1.PostgresExporter.log_level:type_name -> inventory.v1.LogLevel - 110, // 21: inventory.v1.PostgresExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 111, // 22: inventory.v1.PostgresExporter.connection_timeout:type_name -> google.protobuf.Duration - 74, // 23: inventory.v1.ProxySQLExporter.custom_labels:type_name -> inventory.v1.ProxySQLExporter.CustomLabelsEntry - 108, // 24: inventory.v1.ProxySQLExporter.status:type_name -> inventory.v1.AgentStatus - 109, // 25: inventory.v1.ProxySQLExporter.log_level:type_name -> inventory.v1.LogLevel - 110, // 26: inventory.v1.ProxySQLExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 111, // 27: inventory.v1.ProxySQLExporter.connection_timeout:type_name -> google.protobuf.Duration - 75, // 28: inventory.v1.ValkeyExporter.custom_labels:type_name -> inventory.v1.ValkeyExporter.CustomLabelsEntry - 108, // 29: inventory.v1.ValkeyExporter.status:type_name -> inventory.v1.AgentStatus - 110, // 30: inventory.v1.ValkeyExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 111, // 31: inventory.v1.ValkeyExporter.connection_timeout:type_name -> google.protobuf.Duration - 76, // 32: inventory.v1.QANMySQLPerfSchemaAgent.custom_labels:type_name -> inventory.v1.QANMySQLPerfSchemaAgent.CustomLabelsEntry - 108, // 33: inventory.v1.QANMySQLPerfSchemaAgent.status:type_name -> inventory.v1.AgentStatus - 109, // 34: inventory.v1.QANMySQLPerfSchemaAgent.log_level:type_name -> inventory.v1.LogLevel - 77, // 35: inventory.v1.QANMySQLPerfSchemaAgent.extra_dsn_params:type_name -> inventory.v1.QANMySQLPerfSchemaAgent.ExtraDsnParamsEntry - 78, // 36: inventory.v1.QANMySQLSlowlogAgent.custom_labels:type_name -> inventory.v1.QANMySQLSlowlogAgent.CustomLabelsEntry - 108, // 37: inventory.v1.QANMySQLSlowlogAgent.status:type_name -> inventory.v1.AgentStatus - 109, // 38: inventory.v1.QANMySQLSlowlogAgent.log_level:type_name -> inventory.v1.LogLevel - 79, // 39: inventory.v1.QANMySQLSlowlogAgent.extra_dsn_params:type_name -> inventory.v1.QANMySQLSlowlogAgent.ExtraDsnParamsEntry - 80, // 40: inventory.v1.QANMongoDBProfilerAgent.custom_labels:type_name -> inventory.v1.QANMongoDBProfilerAgent.CustomLabelsEntry - 108, // 41: inventory.v1.QANMongoDBProfilerAgent.status:type_name -> inventory.v1.AgentStatus - 109, // 42: inventory.v1.QANMongoDBProfilerAgent.log_level:type_name -> inventory.v1.LogLevel - 81, // 43: inventory.v1.QANMongoDBMongologAgent.custom_labels:type_name -> inventory.v1.QANMongoDBMongologAgent.CustomLabelsEntry - 108, // 44: inventory.v1.QANMongoDBMongologAgent.status:type_name -> inventory.v1.AgentStatus - 109, // 45: inventory.v1.QANMongoDBMongologAgent.log_level:type_name -> inventory.v1.LogLevel - 111, // 46: inventory.v1.RTAOptions.collect_interval:type_name -> google.protobuf.Duration - 82, // 47: inventory.v1.RTAMongoDBAgent.custom_labels:type_name -> inventory.v1.RTAMongoDBAgent.CustomLabelsEntry + 71, // 0: inventory.v1.PMMAgent.custom_labels:type_name -> inventory.v1.PMMAgent.CustomLabelsEntry + 113, // 1: inventory.v1.VMAgent.status:type_name -> inventory.v1.AgentStatus + 113, // 2: inventory.v1.NomadAgent.status:type_name -> inventory.v1.AgentStatus + 72, // 3: inventory.v1.NodeExporter.custom_labels:type_name -> inventory.v1.NodeExporter.CustomLabelsEntry + 113, // 4: inventory.v1.NodeExporter.status:type_name -> inventory.v1.AgentStatus + 114, // 5: inventory.v1.NodeExporter.log_level:type_name -> inventory.v1.LogLevel + 115, // 6: inventory.v1.NodeExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 73, // 7: inventory.v1.MySQLdExporter.custom_labels:type_name -> inventory.v1.MySQLdExporter.CustomLabelsEntry + 113, // 8: inventory.v1.MySQLdExporter.status:type_name -> inventory.v1.AgentStatus + 114, // 9: inventory.v1.MySQLdExporter.log_level:type_name -> inventory.v1.LogLevel + 115, // 10: inventory.v1.MySQLdExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 74, // 11: inventory.v1.MySQLdExporter.extra_dsn_params:type_name -> inventory.v1.MySQLdExporter.ExtraDsnParamsEntry + 116, // 12: inventory.v1.MySQLdExporter.connection_timeout:type_name -> google.protobuf.Duration + 75, // 13: inventory.v1.MongoDBExporter.custom_labels:type_name -> inventory.v1.MongoDBExporter.CustomLabelsEntry + 113, // 14: inventory.v1.MongoDBExporter.status:type_name -> inventory.v1.AgentStatus + 114, // 15: inventory.v1.MongoDBExporter.log_level:type_name -> inventory.v1.LogLevel + 115, // 16: inventory.v1.MongoDBExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 116, // 17: inventory.v1.MongoDBExporter.connection_timeout:type_name -> google.protobuf.Duration + 76, // 18: inventory.v1.PostgresExporter.custom_labels:type_name -> inventory.v1.PostgresExporter.CustomLabelsEntry + 113, // 19: inventory.v1.PostgresExporter.status:type_name -> inventory.v1.AgentStatus + 114, // 20: inventory.v1.PostgresExporter.log_level:type_name -> inventory.v1.LogLevel + 115, // 21: inventory.v1.PostgresExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 116, // 22: inventory.v1.PostgresExporter.connection_timeout:type_name -> google.protobuf.Duration + 77, // 23: inventory.v1.ProxySQLExporter.custom_labels:type_name -> inventory.v1.ProxySQLExporter.CustomLabelsEntry + 113, // 24: inventory.v1.ProxySQLExporter.status:type_name -> inventory.v1.AgentStatus + 114, // 25: inventory.v1.ProxySQLExporter.log_level:type_name -> inventory.v1.LogLevel + 115, // 26: inventory.v1.ProxySQLExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 116, // 27: inventory.v1.ProxySQLExporter.connection_timeout:type_name -> google.protobuf.Duration + 78, // 28: inventory.v1.ValkeyExporter.custom_labels:type_name -> inventory.v1.ValkeyExporter.CustomLabelsEntry + 113, // 29: inventory.v1.ValkeyExporter.status:type_name -> inventory.v1.AgentStatus + 115, // 30: inventory.v1.ValkeyExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 116, // 31: inventory.v1.ValkeyExporter.connection_timeout:type_name -> google.protobuf.Duration + 79, // 32: inventory.v1.QANMySQLPerfSchemaAgent.custom_labels:type_name -> inventory.v1.QANMySQLPerfSchemaAgent.CustomLabelsEntry + 113, // 33: inventory.v1.QANMySQLPerfSchemaAgent.status:type_name -> inventory.v1.AgentStatus + 114, // 34: inventory.v1.QANMySQLPerfSchemaAgent.log_level:type_name -> inventory.v1.LogLevel + 80, // 35: inventory.v1.QANMySQLPerfSchemaAgent.extra_dsn_params:type_name -> inventory.v1.QANMySQLPerfSchemaAgent.ExtraDsnParamsEntry + 81, // 36: inventory.v1.QANMySQLSlowlogAgent.custom_labels:type_name -> inventory.v1.QANMySQLSlowlogAgent.CustomLabelsEntry + 113, // 37: inventory.v1.QANMySQLSlowlogAgent.status:type_name -> inventory.v1.AgentStatus + 114, // 38: inventory.v1.QANMySQLSlowlogAgent.log_level:type_name -> inventory.v1.LogLevel + 82, // 39: inventory.v1.QANMySQLSlowlogAgent.extra_dsn_params:type_name -> inventory.v1.QANMySQLSlowlogAgent.ExtraDsnParamsEntry + 83, // 40: inventory.v1.QANMongoDBProfilerAgent.custom_labels:type_name -> inventory.v1.QANMongoDBProfilerAgent.CustomLabelsEntry + 113, // 41: inventory.v1.QANMongoDBProfilerAgent.status:type_name -> inventory.v1.AgentStatus + 114, // 42: inventory.v1.QANMongoDBProfilerAgent.log_level:type_name -> inventory.v1.LogLevel + 84, // 43: inventory.v1.QANMongoDBMongologAgent.custom_labels:type_name -> inventory.v1.QANMongoDBMongologAgent.CustomLabelsEntry + 113, // 44: inventory.v1.QANMongoDBMongologAgent.status:type_name -> inventory.v1.AgentStatus + 114, // 45: inventory.v1.QANMongoDBMongologAgent.log_level:type_name -> inventory.v1.LogLevel + 116, // 46: inventory.v1.RTAOptions.collect_interval:type_name -> google.protobuf.Duration + 85, // 47: inventory.v1.RTAMongoDBAgent.custom_labels:type_name -> inventory.v1.RTAMongoDBAgent.CustomLabelsEntry 14, // 48: inventory.v1.RTAMongoDBAgent.rta_options:type_name -> inventory.v1.RTAOptions - 108, // 49: inventory.v1.RTAMongoDBAgent.status:type_name -> inventory.v1.AgentStatus - 109, // 50: inventory.v1.RTAMongoDBAgent.log_level:type_name -> inventory.v1.LogLevel - 83, // 51: inventory.v1.QANPostgreSQLPgStatementsAgent.custom_labels:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry - 108, // 52: inventory.v1.QANPostgreSQLPgStatementsAgent.status:type_name -> inventory.v1.AgentStatus - 109, // 53: inventory.v1.QANPostgreSQLPgStatementsAgent.log_level:type_name -> inventory.v1.LogLevel - 84, // 54: inventory.v1.QANPostgreSQLPgStatMonitorAgent.custom_labels:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry - 108, // 55: inventory.v1.QANPostgreSQLPgStatMonitorAgent.status:type_name -> inventory.v1.AgentStatus - 109, // 56: inventory.v1.QANPostgreSQLPgStatMonitorAgent.log_level:type_name -> inventory.v1.LogLevel - 85, // 57: inventory.v1.RDSExporter.custom_labels:type_name -> inventory.v1.RDSExporter.CustomLabelsEntry - 108, // 58: inventory.v1.RDSExporter.status:type_name -> inventory.v1.AgentStatus - 109, // 59: inventory.v1.RDSExporter.log_level:type_name -> inventory.v1.LogLevel - 110, // 60: inventory.v1.RDSExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 86, // 61: inventory.v1.ExternalExporter.custom_labels:type_name -> inventory.v1.ExternalExporter.CustomLabelsEntry - 110, // 62: inventory.v1.ExternalExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 108, // 63: inventory.v1.ExternalExporter.status:type_name -> inventory.v1.AgentStatus - 87, // 64: inventory.v1.AzureDatabaseExporter.custom_labels:type_name -> inventory.v1.AzureDatabaseExporter.CustomLabelsEntry - 108, // 65: inventory.v1.AzureDatabaseExporter.status:type_name -> inventory.v1.AgentStatus - 109, // 66: inventory.v1.AzureDatabaseExporter.log_level:type_name -> inventory.v1.LogLevel - 110, // 67: inventory.v1.AzureDatabaseExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 112, // 68: inventory.v1.ChangeCommonAgentParams.custom_labels:type_name -> common.StringMap - 110, // 69: inventory.v1.ChangeCommonAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 0, // 70: inventory.v1.ListAgentsRequest.agent_type:type_name -> inventory.v1.AgentType - 1, // 71: inventory.v1.ListAgentsResponse.pmm_agent:type_name -> inventory.v1.PMMAgent - 2, // 72: inventory.v1.ListAgentsResponse.vm_agent:type_name -> inventory.v1.VMAgent - 4, // 73: inventory.v1.ListAgentsResponse.node_exporter:type_name -> inventory.v1.NodeExporter - 5, // 74: inventory.v1.ListAgentsResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter - 6, // 75: inventory.v1.ListAgentsResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter - 7, // 76: inventory.v1.ListAgentsResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter - 8, // 77: inventory.v1.ListAgentsResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter - 10, // 78: inventory.v1.ListAgentsResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent - 11, // 79: inventory.v1.ListAgentsResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent - 12, // 80: inventory.v1.ListAgentsResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent - 13, // 81: inventory.v1.ListAgentsResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent - 16, // 82: inventory.v1.ListAgentsResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent - 17, // 83: inventory.v1.ListAgentsResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent - 19, // 84: inventory.v1.ListAgentsResponse.external_exporter:type_name -> inventory.v1.ExternalExporter - 18, // 85: inventory.v1.ListAgentsResponse.rds_exporter:type_name -> inventory.v1.RDSExporter - 20, // 86: inventory.v1.ListAgentsResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter - 3, // 87: inventory.v1.ListAgentsResponse.nomad_agent:type_name -> inventory.v1.NomadAgent - 9, // 88: inventory.v1.ListAgentsResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter - 15, // 89: inventory.v1.ListAgentsResponse.rta_mongodb_agent:type_name -> inventory.v1.RTAMongoDBAgent - 1, // 90: inventory.v1.GetAgentResponse.pmm_agent:type_name -> inventory.v1.PMMAgent - 2, // 91: inventory.v1.GetAgentResponse.vmagent:type_name -> inventory.v1.VMAgent - 4, // 92: inventory.v1.GetAgentResponse.node_exporter:type_name -> inventory.v1.NodeExporter - 5, // 93: inventory.v1.GetAgentResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter - 6, // 94: inventory.v1.GetAgentResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter - 7, // 95: inventory.v1.GetAgentResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter - 8, // 96: inventory.v1.GetAgentResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter - 10, // 97: inventory.v1.GetAgentResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent - 11, // 98: inventory.v1.GetAgentResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent - 12, // 99: inventory.v1.GetAgentResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent - 13, // 100: inventory.v1.GetAgentResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent - 16, // 101: inventory.v1.GetAgentResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent - 17, // 102: inventory.v1.GetAgentResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent - 19, // 103: inventory.v1.GetAgentResponse.external_exporter:type_name -> inventory.v1.ExternalExporter - 18, // 104: inventory.v1.GetAgentResponse.rds_exporter:type_name -> inventory.v1.RDSExporter - 20, // 105: inventory.v1.GetAgentResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter - 3, // 106: inventory.v1.GetAgentResponse.nomad_agent:type_name -> inventory.v1.NomadAgent - 9, // 107: inventory.v1.GetAgentResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter - 15, // 108: inventory.v1.GetAgentResponse.rta_mongodb_agent:type_name -> inventory.v1.RTAMongoDBAgent - 32, // 109: inventory.v1.AddAgentRequest.pmm_agent:type_name -> inventory.v1.AddPMMAgentParams - 33, // 110: inventory.v1.AddAgentRequest.node_exporter:type_name -> inventory.v1.AddNodeExporterParams - 35, // 111: inventory.v1.AddAgentRequest.mysqld_exporter:type_name -> inventory.v1.AddMySQLdExporterParams - 37, // 112: inventory.v1.AddAgentRequest.mongodb_exporter:type_name -> inventory.v1.AddMongoDBExporterParams - 39, // 113: inventory.v1.AddAgentRequest.postgres_exporter:type_name -> inventory.v1.AddPostgresExporterParams - 41, // 114: inventory.v1.AddAgentRequest.proxysql_exporter:type_name -> inventory.v1.AddProxySQLExporterParams - 57, // 115: inventory.v1.AddAgentRequest.external_exporter:type_name -> inventory.v1.AddExternalExporterParams - 55, // 116: inventory.v1.AddAgentRequest.rds_exporter:type_name -> inventory.v1.AddRDSExporterParams - 59, // 117: inventory.v1.AddAgentRequest.azure_database_exporter:type_name -> inventory.v1.AddAzureDatabaseExporterParams - 43, // 118: inventory.v1.AddAgentRequest.qan_mysql_perfschema_agent:type_name -> inventory.v1.AddQANMySQLPerfSchemaAgentParams - 45, // 119: inventory.v1.AddAgentRequest.qan_mysql_slowlog_agent:type_name -> inventory.v1.AddQANMySQLSlowlogAgentParams - 47, // 120: inventory.v1.AddAgentRequest.qan_mongodb_profiler_agent:type_name -> inventory.v1.AddQANMongoDBProfilerAgentParams - 49, // 121: inventory.v1.AddAgentRequest.qan_mongodb_mongolog_agent:type_name -> inventory.v1.AddQANMongoDBMongologAgentParams - 51, // 122: inventory.v1.AddAgentRequest.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.AddQANPostgreSQLPgStatementsAgentParams - 53, // 123: inventory.v1.AddAgentRequest.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams - 62, // 124: inventory.v1.AddAgentRequest.valkey_exporter:type_name -> inventory.v1.AddValkeyExporterParams - 64, // 125: inventory.v1.AddAgentRequest.rta_mongodb_agent:type_name -> inventory.v1.AddRTAMongoDBAgentParams - 1, // 126: inventory.v1.AddAgentResponse.pmm_agent:type_name -> inventory.v1.PMMAgent - 4, // 127: inventory.v1.AddAgentResponse.node_exporter:type_name -> inventory.v1.NodeExporter - 5, // 128: inventory.v1.AddAgentResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter - 6, // 129: inventory.v1.AddAgentResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter - 7, // 130: inventory.v1.AddAgentResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter - 8, // 131: inventory.v1.AddAgentResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter - 19, // 132: inventory.v1.AddAgentResponse.external_exporter:type_name -> inventory.v1.ExternalExporter - 18, // 133: inventory.v1.AddAgentResponse.rds_exporter:type_name -> inventory.v1.RDSExporter - 20, // 134: inventory.v1.AddAgentResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter - 10, // 135: inventory.v1.AddAgentResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent - 11, // 136: inventory.v1.AddAgentResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent - 12, // 137: inventory.v1.AddAgentResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent - 13, // 138: inventory.v1.AddAgentResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent - 16, // 139: inventory.v1.AddAgentResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent - 17, // 140: inventory.v1.AddAgentResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent - 9, // 141: inventory.v1.AddAgentResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter - 15, // 142: inventory.v1.AddAgentResponse.rta_mongodb_agent:type_name -> inventory.v1.RTAMongoDBAgent - 34, // 143: inventory.v1.ChangeAgentRequest.node_exporter:type_name -> inventory.v1.ChangeNodeExporterParams - 36, // 144: inventory.v1.ChangeAgentRequest.mysqld_exporter:type_name -> inventory.v1.ChangeMySQLdExporterParams - 38, // 145: inventory.v1.ChangeAgentRequest.mongodb_exporter:type_name -> inventory.v1.ChangeMongoDBExporterParams - 40, // 146: inventory.v1.ChangeAgentRequest.postgres_exporter:type_name -> inventory.v1.ChangePostgresExporterParams - 42, // 147: inventory.v1.ChangeAgentRequest.proxysql_exporter:type_name -> inventory.v1.ChangeProxySQLExporterParams - 58, // 148: inventory.v1.ChangeAgentRequest.external_exporter:type_name -> inventory.v1.ChangeExternalExporterParams - 56, // 149: inventory.v1.ChangeAgentRequest.rds_exporter:type_name -> inventory.v1.ChangeRDSExporterParams - 60, // 150: inventory.v1.ChangeAgentRequest.azure_database_exporter:type_name -> inventory.v1.ChangeAzureDatabaseExporterParams - 44, // 151: inventory.v1.ChangeAgentRequest.qan_mysql_perfschema_agent:type_name -> inventory.v1.ChangeQANMySQLPerfSchemaAgentParams - 46, // 152: inventory.v1.ChangeAgentRequest.qan_mysql_slowlog_agent:type_name -> inventory.v1.ChangeQANMySQLSlowlogAgentParams - 48, // 153: inventory.v1.ChangeAgentRequest.qan_mongodb_profiler_agent:type_name -> inventory.v1.ChangeQANMongoDBProfilerAgentParams - 50, // 154: inventory.v1.ChangeAgentRequest.qan_mongodb_mongolog_agent:type_name -> inventory.v1.ChangeQANMongoDBMongologAgentParams - 52, // 155: inventory.v1.ChangeAgentRequest.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams - 54, // 156: inventory.v1.ChangeAgentRequest.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams - 61, // 157: inventory.v1.ChangeAgentRequest.nomad_agent:type_name -> inventory.v1.ChangeNomadAgentParams - 63, // 158: inventory.v1.ChangeAgentRequest.valkey_exporter:type_name -> inventory.v1.ChangeValkeyExporterParams - 65, // 159: inventory.v1.ChangeAgentRequest.rta_mongodb_agent:type_name -> inventory.v1.ChangeRTAMongoDBAgentParams - 4, // 160: inventory.v1.ChangeAgentResponse.node_exporter:type_name -> inventory.v1.NodeExporter - 5, // 161: inventory.v1.ChangeAgentResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter - 6, // 162: inventory.v1.ChangeAgentResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter - 7, // 163: inventory.v1.ChangeAgentResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter - 8, // 164: inventory.v1.ChangeAgentResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter - 19, // 165: inventory.v1.ChangeAgentResponse.external_exporter:type_name -> inventory.v1.ExternalExporter - 18, // 166: inventory.v1.ChangeAgentResponse.rds_exporter:type_name -> inventory.v1.RDSExporter - 20, // 167: inventory.v1.ChangeAgentResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter - 10, // 168: inventory.v1.ChangeAgentResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent - 11, // 169: inventory.v1.ChangeAgentResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent - 12, // 170: inventory.v1.ChangeAgentResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent - 13, // 171: inventory.v1.ChangeAgentResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent - 16, // 172: inventory.v1.ChangeAgentResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent - 17, // 173: inventory.v1.ChangeAgentResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent - 3, // 174: inventory.v1.ChangeAgentResponse.nomad_agent:type_name -> inventory.v1.NomadAgent - 9, // 175: inventory.v1.ChangeAgentResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter - 15, // 176: inventory.v1.ChangeAgentResponse.rta_mongodb_agent:type_name -> inventory.v1.RTAMongoDBAgent - 88, // 177: inventory.v1.AddPMMAgentParams.custom_labels:type_name -> inventory.v1.AddPMMAgentParams.CustomLabelsEntry - 89, // 178: inventory.v1.AddNodeExporterParams.custom_labels:type_name -> inventory.v1.AddNodeExporterParams.CustomLabelsEntry - 109, // 179: inventory.v1.AddNodeExporterParams.log_level:type_name -> inventory.v1.LogLevel - 112, // 180: inventory.v1.ChangeNodeExporterParams.custom_labels:type_name -> common.StringMap - 110, // 181: inventory.v1.ChangeNodeExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 182: inventory.v1.ChangeNodeExporterParams.log_level:type_name -> inventory.v1.LogLevel - 90, // 183: inventory.v1.AddMySQLdExporterParams.custom_labels:type_name -> inventory.v1.AddMySQLdExporterParams.CustomLabelsEntry - 109, // 184: inventory.v1.AddMySQLdExporterParams.log_level:type_name -> inventory.v1.LogLevel - 91, // 185: inventory.v1.AddMySQLdExporterParams.extra_dsn_params:type_name -> inventory.v1.AddMySQLdExporterParams.ExtraDsnParamsEntry - 111, // 186: inventory.v1.AddMySQLdExporterParams.connection_timeout:type_name -> google.protobuf.Duration - 112, // 187: inventory.v1.ChangeMySQLdExporterParams.custom_labels:type_name -> common.StringMap - 110, // 188: inventory.v1.ChangeMySQLdExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 189: inventory.v1.ChangeMySQLdExporterParams.log_level:type_name -> inventory.v1.LogLevel - 111, // 190: inventory.v1.ChangeMySQLdExporterParams.connection_timeout:type_name -> google.protobuf.Duration - 92, // 191: inventory.v1.AddMongoDBExporterParams.custom_labels:type_name -> inventory.v1.AddMongoDBExporterParams.CustomLabelsEntry - 109, // 192: inventory.v1.AddMongoDBExporterParams.log_level:type_name -> inventory.v1.LogLevel - 111, // 193: inventory.v1.AddMongoDBExporterParams.connection_timeout:type_name -> google.protobuf.Duration - 112, // 194: inventory.v1.ChangeMongoDBExporterParams.custom_labels:type_name -> common.StringMap - 110, // 195: inventory.v1.ChangeMongoDBExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 196: inventory.v1.ChangeMongoDBExporterParams.log_level:type_name -> inventory.v1.LogLevel - 111, // 197: inventory.v1.ChangeMongoDBExporterParams.connection_timeout:type_name -> google.protobuf.Duration - 93, // 198: inventory.v1.AddPostgresExporterParams.custom_labels:type_name -> inventory.v1.AddPostgresExporterParams.CustomLabelsEntry - 109, // 199: inventory.v1.AddPostgresExporterParams.log_level:type_name -> inventory.v1.LogLevel - 111, // 200: inventory.v1.AddPostgresExporterParams.connection_timeout:type_name -> google.protobuf.Duration - 112, // 201: inventory.v1.ChangePostgresExporterParams.custom_labels:type_name -> common.StringMap - 110, // 202: inventory.v1.ChangePostgresExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 203: inventory.v1.ChangePostgresExporterParams.log_level:type_name -> inventory.v1.LogLevel - 111, // 204: inventory.v1.ChangePostgresExporterParams.connection_timeout:type_name -> google.protobuf.Duration - 94, // 205: inventory.v1.AddProxySQLExporterParams.custom_labels:type_name -> inventory.v1.AddProxySQLExporterParams.CustomLabelsEntry - 109, // 206: inventory.v1.AddProxySQLExporterParams.log_level:type_name -> inventory.v1.LogLevel - 111, // 207: inventory.v1.AddProxySQLExporterParams.connection_timeout:type_name -> google.protobuf.Duration - 112, // 208: inventory.v1.ChangeProxySQLExporterParams.custom_labels:type_name -> common.StringMap - 110, // 209: inventory.v1.ChangeProxySQLExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 210: inventory.v1.ChangeProxySQLExporterParams.log_level:type_name -> inventory.v1.LogLevel - 111, // 211: inventory.v1.ChangeProxySQLExporterParams.connection_timeout:type_name -> google.protobuf.Duration - 95, // 212: inventory.v1.AddQANMySQLPerfSchemaAgentParams.custom_labels:type_name -> inventory.v1.AddQANMySQLPerfSchemaAgentParams.CustomLabelsEntry - 109, // 213: inventory.v1.AddQANMySQLPerfSchemaAgentParams.log_level:type_name -> inventory.v1.LogLevel - 96, // 214: inventory.v1.AddQANMySQLPerfSchemaAgentParams.extra_dsn_params:type_name -> inventory.v1.AddQANMySQLPerfSchemaAgentParams.ExtraDsnParamsEntry - 112, // 215: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams.custom_labels:type_name -> common.StringMap - 110, // 216: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 217: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams.log_level:type_name -> inventory.v1.LogLevel - 97, // 218: inventory.v1.AddQANMySQLSlowlogAgentParams.custom_labels:type_name -> inventory.v1.AddQANMySQLSlowlogAgentParams.CustomLabelsEntry - 109, // 219: inventory.v1.AddQANMySQLSlowlogAgentParams.log_level:type_name -> inventory.v1.LogLevel - 98, // 220: inventory.v1.AddQANMySQLSlowlogAgentParams.extra_dsn_params:type_name -> inventory.v1.AddQANMySQLSlowlogAgentParams.ExtraDsnParamsEntry - 112, // 221: inventory.v1.ChangeQANMySQLSlowlogAgentParams.custom_labels:type_name -> common.StringMap - 110, // 222: inventory.v1.ChangeQANMySQLSlowlogAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 223: inventory.v1.ChangeQANMySQLSlowlogAgentParams.log_level:type_name -> inventory.v1.LogLevel - 99, // 224: inventory.v1.AddQANMongoDBProfilerAgentParams.custom_labels:type_name -> inventory.v1.AddQANMongoDBProfilerAgentParams.CustomLabelsEntry - 109, // 225: inventory.v1.AddQANMongoDBProfilerAgentParams.log_level:type_name -> inventory.v1.LogLevel - 112, // 226: inventory.v1.ChangeQANMongoDBProfilerAgentParams.custom_labels:type_name -> common.StringMap - 110, // 227: inventory.v1.ChangeQANMongoDBProfilerAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 228: inventory.v1.ChangeQANMongoDBProfilerAgentParams.log_level:type_name -> inventory.v1.LogLevel - 100, // 229: inventory.v1.AddQANMongoDBMongologAgentParams.custom_labels:type_name -> inventory.v1.AddQANMongoDBMongologAgentParams.CustomLabelsEntry - 109, // 230: inventory.v1.AddQANMongoDBMongologAgentParams.log_level:type_name -> inventory.v1.LogLevel - 112, // 231: inventory.v1.ChangeQANMongoDBMongologAgentParams.custom_labels:type_name -> common.StringMap - 110, // 232: inventory.v1.ChangeQANMongoDBMongologAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 233: inventory.v1.ChangeQANMongoDBMongologAgentParams.log_level:type_name -> inventory.v1.LogLevel - 101, // 234: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.custom_labels:type_name -> inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.CustomLabelsEntry - 109, // 235: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.log_level:type_name -> inventory.v1.LogLevel - 112, // 236: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams.custom_labels:type_name -> common.StringMap - 110, // 237: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 238: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams.log_level:type_name -> inventory.v1.LogLevel - 102, // 239: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.custom_labels:type_name -> inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.CustomLabelsEntry - 109, // 240: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.log_level:type_name -> inventory.v1.LogLevel - 112, // 241: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams.custom_labels:type_name -> common.StringMap - 110, // 242: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 243: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams.log_level:type_name -> inventory.v1.LogLevel - 103, // 244: inventory.v1.AddRDSExporterParams.custom_labels:type_name -> inventory.v1.AddRDSExporterParams.CustomLabelsEntry - 109, // 245: inventory.v1.AddRDSExporterParams.log_level:type_name -> inventory.v1.LogLevel - 112, // 246: inventory.v1.ChangeRDSExporterParams.custom_labels:type_name -> common.StringMap - 110, // 247: inventory.v1.ChangeRDSExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 248: inventory.v1.ChangeRDSExporterParams.log_level:type_name -> inventory.v1.LogLevel - 104, // 249: inventory.v1.AddExternalExporterParams.custom_labels:type_name -> inventory.v1.AddExternalExporterParams.CustomLabelsEntry - 112, // 250: inventory.v1.ChangeExternalExporterParams.custom_labels:type_name -> common.StringMap - 110, // 251: inventory.v1.ChangeExternalExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 105, // 252: inventory.v1.AddAzureDatabaseExporterParams.custom_labels:type_name -> inventory.v1.AddAzureDatabaseExporterParams.CustomLabelsEntry - 109, // 253: inventory.v1.AddAzureDatabaseExporterParams.log_level:type_name -> inventory.v1.LogLevel - 112, // 254: inventory.v1.ChangeAzureDatabaseExporterParams.custom_labels:type_name -> common.StringMap - 110, // 255: inventory.v1.ChangeAzureDatabaseExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 256: inventory.v1.ChangeAzureDatabaseExporterParams.log_level:type_name -> inventory.v1.LogLevel - 106, // 257: inventory.v1.AddValkeyExporterParams.custom_labels:type_name -> inventory.v1.AddValkeyExporterParams.CustomLabelsEntry - 109, // 258: inventory.v1.AddValkeyExporterParams.log_level:type_name -> inventory.v1.LogLevel - 111, // 259: inventory.v1.AddValkeyExporterParams.connection_timeout:type_name -> google.protobuf.Duration - 112, // 260: inventory.v1.ChangeValkeyExporterParams.custom_labels:type_name -> common.StringMap - 110, // 261: inventory.v1.ChangeValkeyExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 262: inventory.v1.ChangeValkeyExporterParams.log_level:type_name -> inventory.v1.LogLevel - 111, // 263: inventory.v1.ChangeValkeyExporterParams.connection_timeout:type_name -> google.protobuf.Duration - 107, // 264: inventory.v1.AddRTAMongoDBAgentParams.custom_labels:type_name -> inventory.v1.AddRTAMongoDBAgentParams.CustomLabelsEntry - 109, // 265: inventory.v1.AddRTAMongoDBAgentParams.log_level:type_name -> inventory.v1.LogLevel - 14, // 266: inventory.v1.AddRTAMongoDBAgentParams.rta_options:type_name -> inventory.v1.RTAOptions - 112, // 267: inventory.v1.ChangeRTAMongoDBAgentParams.custom_labels:type_name -> common.StringMap - 109, // 268: inventory.v1.ChangeRTAMongoDBAgentParams.log_level:type_name -> inventory.v1.LogLevel - 14, // 269: inventory.v1.ChangeRTAMongoDBAgentParams.rta_options:type_name -> inventory.v1.RTAOptions - 22, // 270: inventory.v1.AgentsService.ListAgents:input_type -> inventory.v1.ListAgentsRequest - 24, // 271: inventory.v1.AgentsService.GetAgent:input_type -> inventory.v1.GetAgentRequest - 26, // 272: inventory.v1.AgentsService.GetAgentLogs:input_type -> inventory.v1.GetAgentLogsRequest - 28, // 273: inventory.v1.AgentsService.AddAgent:input_type -> inventory.v1.AddAgentRequest - 30, // 274: inventory.v1.AgentsService.ChangeAgent:input_type -> inventory.v1.ChangeAgentRequest - 66, // 275: inventory.v1.AgentsService.RemoveAgent:input_type -> inventory.v1.RemoveAgentRequest - 23, // 276: inventory.v1.AgentsService.ListAgents:output_type -> inventory.v1.ListAgentsResponse - 25, // 277: inventory.v1.AgentsService.GetAgent:output_type -> inventory.v1.GetAgentResponse - 27, // 278: inventory.v1.AgentsService.GetAgentLogs:output_type -> inventory.v1.GetAgentLogsResponse - 29, // 279: inventory.v1.AgentsService.AddAgent:output_type -> inventory.v1.AddAgentResponse - 31, // 280: inventory.v1.AgentsService.ChangeAgent:output_type -> inventory.v1.ChangeAgentResponse - 67, // 281: inventory.v1.AgentsService.RemoveAgent:output_type -> inventory.v1.RemoveAgentResponse - 276, // [276:282] is the sub-list for method output_type - 270, // [270:276] is the sub-list for method input_type - 270, // [270:270] is the sub-list for extension type_name - 270, // [270:270] is the sub-list for extension extendee - 0, // [0:270] is the sub-list for field type_name + 113, // 49: inventory.v1.RTAMongoDBAgent.status:type_name -> inventory.v1.AgentStatus + 114, // 50: inventory.v1.RTAMongoDBAgent.log_level:type_name -> inventory.v1.LogLevel + 86, // 51: inventory.v1.RTAMySQLAgent.custom_labels:type_name -> inventory.v1.RTAMySQLAgent.CustomLabelsEntry + 14, // 52: inventory.v1.RTAMySQLAgent.rta_options:type_name -> inventory.v1.RTAOptions + 113, // 53: inventory.v1.RTAMySQLAgent.status:type_name -> inventory.v1.AgentStatus + 114, // 54: inventory.v1.RTAMySQLAgent.log_level:type_name -> inventory.v1.LogLevel + 87, // 55: inventory.v1.QANPostgreSQLPgStatementsAgent.custom_labels:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry + 113, // 56: inventory.v1.QANPostgreSQLPgStatementsAgent.status:type_name -> inventory.v1.AgentStatus + 114, // 57: inventory.v1.QANPostgreSQLPgStatementsAgent.log_level:type_name -> inventory.v1.LogLevel + 88, // 58: inventory.v1.QANPostgreSQLPgStatMonitorAgent.custom_labels:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry + 113, // 59: inventory.v1.QANPostgreSQLPgStatMonitorAgent.status:type_name -> inventory.v1.AgentStatus + 114, // 60: inventory.v1.QANPostgreSQLPgStatMonitorAgent.log_level:type_name -> inventory.v1.LogLevel + 89, // 61: inventory.v1.RDSExporter.custom_labels:type_name -> inventory.v1.RDSExporter.CustomLabelsEntry + 113, // 62: inventory.v1.RDSExporter.status:type_name -> inventory.v1.AgentStatus + 114, // 63: inventory.v1.RDSExporter.log_level:type_name -> inventory.v1.LogLevel + 115, // 64: inventory.v1.RDSExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 90, // 65: inventory.v1.ExternalExporter.custom_labels:type_name -> inventory.v1.ExternalExporter.CustomLabelsEntry + 115, // 66: inventory.v1.ExternalExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 113, // 67: inventory.v1.ExternalExporter.status:type_name -> inventory.v1.AgentStatus + 91, // 68: inventory.v1.AzureDatabaseExporter.custom_labels:type_name -> inventory.v1.AzureDatabaseExporter.CustomLabelsEntry + 113, // 69: inventory.v1.AzureDatabaseExporter.status:type_name -> inventory.v1.AgentStatus + 114, // 70: inventory.v1.AzureDatabaseExporter.log_level:type_name -> inventory.v1.LogLevel + 115, // 71: inventory.v1.AzureDatabaseExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 117, // 72: inventory.v1.ChangeCommonAgentParams.custom_labels:type_name -> common.StringMap + 115, // 73: inventory.v1.ChangeCommonAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 0, // 74: inventory.v1.ListAgentsRequest.agent_type:type_name -> inventory.v1.AgentType + 1, // 75: inventory.v1.ListAgentsResponse.pmm_agent:type_name -> inventory.v1.PMMAgent + 2, // 76: inventory.v1.ListAgentsResponse.vm_agent:type_name -> inventory.v1.VMAgent + 4, // 77: inventory.v1.ListAgentsResponse.node_exporter:type_name -> inventory.v1.NodeExporter + 5, // 78: inventory.v1.ListAgentsResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter + 6, // 79: inventory.v1.ListAgentsResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter + 7, // 80: inventory.v1.ListAgentsResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter + 8, // 81: inventory.v1.ListAgentsResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter + 10, // 82: inventory.v1.ListAgentsResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent + 11, // 83: inventory.v1.ListAgentsResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent + 12, // 84: inventory.v1.ListAgentsResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent + 13, // 85: inventory.v1.ListAgentsResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent + 17, // 86: inventory.v1.ListAgentsResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent + 18, // 87: inventory.v1.ListAgentsResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent + 20, // 88: inventory.v1.ListAgentsResponse.external_exporter:type_name -> inventory.v1.ExternalExporter + 19, // 89: inventory.v1.ListAgentsResponse.rds_exporter:type_name -> inventory.v1.RDSExporter + 21, // 90: inventory.v1.ListAgentsResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter + 3, // 91: inventory.v1.ListAgentsResponse.nomad_agent:type_name -> inventory.v1.NomadAgent + 9, // 92: inventory.v1.ListAgentsResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter + 15, // 93: inventory.v1.ListAgentsResponse.rta_mongodb_agent:type_name -> inventory.v1.RTAMongoDBAgent + 16, // 94: inventory.v1.ListAgentsResponse.rta_mysql_agent:type_name -> inventory.v1.RTAMySQLAgent + 1, // 95: inventory.v1.GetAgentResponse.pmm_agent:type_name -> inventory.v1.PMMAgent + 2, // 96: inventory.v1.GetAgentResponse.vmagent:type_name -> inventory.v1.VMAgent + 4, // 97: inventory.v1.GetAgentResponse.node_exporter:type_name -> inventory.v1.NodeExporter + 5, // 98: inventory.v1.GetAgentResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter + 6, // 99: inventory.v1.GetAgentResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter + 7, // 100: inventory.v1.GetAgentResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter + 8, // 101: inventory.v1.GetAgentResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter + 10, // 102: inventory.v1.GetAgentResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent + 11, // 103: inventory.v1.GetAgentResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent + 12, // 104: inventory.v1.GetAgentResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent + 13, // 105: inventory.v1.GetAgentResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent + 17, // 106: inventory.v1.GetAgentResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent + 18, // 107: inventory.v1.GetAgentResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent + 20, // 108: inventory.v1.GetAgentResponse.external_exporter:type_name -> inventory.v1.ExternalExporter + 19, // 109: inventory.v1.GetAgentResponse.rds_exporter:type_name -> inventory.v1.RDSExporter + 21, // 110: inventory.v1.GetAgentResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter + 3, // 111: inventory.v1.GetAgentResponse.nomad_agent:type_name -> inventory.v1.NomadAgent + 9, // 112: inventory.v1.GetAgentResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter + 15, // 113: inventory.v1.GetAgentResponse.rta_mongodb_agent:type_name -> inventory.v1.RTAMongoDBAgent + 16, // 114: inventory.v1.GetAgentResponse.rta_mysql_agent:type_name -> inventory.v1.RTAMySQLAgent + 33, // 115: inventory.v1.AddAgentRequest.pmm_agent:type_name -> inventory.v1.AddPMMAgentParams + 34, // 116: inventory.v1.AddAgentRequest.node_exporter:type_name -> inventory.v1.AddNodeExporterParams + 36, // 117: inventory.v1.AddAgentRequest.mysqld_exporter:type_name -> inventory.v1.AddMySQLdExporterParams + 38, // 118: inventory.v1.AddAgentRequest.mongodb_exporter:type_name -> inventory.v1.AddMongoDBExporterParams + 40, // 119: inventory.v1.AddAgentRequest.postgres_exporter:type_name -> inventory.v1.AddPostgresExporterParams + 42, // 120: inventory.v1.AddAgentRequest.proxysql_exporter:type_name -> inventory.v1.AddProxySQLExporterParams + 58, // 121: inventory.v1.AddAgentRequest.external_exporter:type_name -> inventory.v1.AddExternalExporterParams + 56, // 122: inventory.v1.AddAgentRequest.rds_exporter:type_name -> inventory.v1.AddRDSExporterParams + 60, // 123: inventory.v1.AddAgentRequest.azure_database_exporter:type_name -> inventory.v1.AddAzureDatabaseExporterParams + 44, // 124: inventory.v1.AddAgentRequest.qan_mysql_perfschema_agent:type_name -> inventory.v1.AddQANMySQLPerfSchemaAgentParams + 46, // 125: inventory.v1.AddAgentRequest.qan_mysql_slowlog_agent:type_name -> inventory.v1.AddQANMySQLSlowlogAgentParams + 48, // 126: inventory.v1.AddAgentRequest.qan_mongodb_profiler_agent:type_name -> inventory.v1.AddQANMongoDBProfilerAgentParams + 50, // 127: inventory.v1.AddAgentRequest.qan_mongodb_mongolog_agent:type_name -> inventory.v1.AddQANMongoDBMongologAgentParams + 52, // 128: inventory.v1.AddAgentRequest.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.AddQANPostgreSQLPgStatementsAgentParams + 54, // 129: inventory.v1.AddAgentRequest.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams + 63, // 130: inventory.v1.AddAgentRequest.valkey_exporter:type_name -> inventory.v1.AddValkeyExporterParams + 65, // 131: inventory.v1.AddAgentRequest.rta_mongodb_agent:type_name -> inventory.v1.AddRTAMongoDBAgentParams + 67, // 132: inventory.v1.AddAgentRequest.rta_mysql_agent:type_name -> inventory.v1.AddRTAMySQLAgentParams + 1, // 133: inventory.v1.AddAgentResponse.pmm_agent:type_name -> inventory.v1.PMMAgent + 4, // 134: inventory.v1.AddAgentResponse.node_exporter:type_name -> inventory.v1.NodeExporter + 5, // 135: inventory.v1.AddAgentResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter + 6, // 136: inventory.v1.AddAgentResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter + 7, // 137: inventory.v1.AddAgentResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter + 8, // 138: inventory.v1.AddAgentResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter + 20, // 139: inventory.v1.AddAgentResponse.external_exporter:type_name -> inventory.v1.ExternalExporter + 19, // 140: inventory.v1.AddAgentResponse.rds_exporter:type_name -> inventory.v1.RDSExporter + 21, // 141: inventory.v1.AddAgentResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter + 10, // 142: inventory.v1.AddAgentResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent + 11, // 143: inventory.v1.AddAgentResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent + 12, // 144: inventory.v1.AddAgentResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent + 13, // 145: inventory.v1.AddAgentResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent + 17, // 146: inventory.v1.AddAgentResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent + 18, // 147: inventory.v1.AddAgentResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent + 9, // 148: inventory.v1.AddAgentResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter + 15, // 149: inventory.v1.AddAgentResponse.rta_mongodb_agent:type_name -> inventory.v1.RTAMongoDBAgent + 16, // 150: inventory.v1.AddAgentResponse.rta_mysql_agent:type_name -> inventory.v1.RTAMySQLAgent + 35, // 151: inventory.v1.ChangeAgentRequest.node_exporter:type_name -> inventory.v1.ChangeNodeExporterParams + 37, // 152: inventory.v1.ChangeAgentRequest.mysqld_exporter:type_name -> inventory.v1.ChangeMySQLdExporterParams + 39, // 153: inventory.v1.ChangeAgentRequest.mongodb_exporter:type_name -> inventory.v1.ChangeMongoDBExporterParams + 41, // 154: inventory.v1.ChangeAgentRequest.postgres_exporter:type_name -> inventory.v1.ChangePostgresExporterParams + 43, // 155: inventory.v1.ChangeAgentRequest.proxysql_exporter:type_name -> inventory.v1.ChangeProxySQLExporterParams + 59, // 156: inventory.v1.ChangeAgentRequest.external_exporter:type_name -> inventory.v1.ChangeExternalExporterParams + 57, // 157: inventory.v1.ChangeAgentRequest.rds_exporter:type_name -> inventory.v1.ChangeRDSExporterParams + 61, // 158: inventory.v1.ChangeAgentRequest.azure_database_exporter:type_name -> inventory.v1.ChangeAzureDatabaseExporterParams + 45, // 159: inventory.v1.ChangeAgentRequest.qan_mysql_perfschema_agent:type_name -> inventory.v1.ChangeQANMySQLPerfSchemaAgentParams + 47, // 160: inventory.v1.ChangeAgentRequest.qan_mysql_slowlog_agent:type_name -> inventory.v1.ChangeQANMySQLSlowlogAgentParams + 49, // 161: inventory.v1.ChangeAgentRequest.qan_mongodb_profiler_agent:type_name -> inventory.v1.ChangeQANMongoDBProfilerAgentParams + 51, // 162: inventory.v1.ChangeAgentRequest.qan_mongodb_mongolog_agent:type_name -> inventory.v1.ChangeQANMongoDBMongologAgentParams + 53, // 163: inventory.v1.ChangeAgentRequest.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams + 55, // 164: inventory.v1.ChangeAgentRequest.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams + 62, // 165: inventory.v1.ChangeAgentRequest.nomad_agent:type_name -> inventory.v1.ChangeNomadAgentParams + 64, // 166: inventory.v1.ChangeAgentRequest.valkey_exporter:type_name -> inventory.v1.ChangeValkeyExporterParams + 66, // 167: inventory.v1.ChangeAgentRequest.rta_mongodb_agent:type_name -> inventory.v1.ChangeRTAMongoDBAgentParams + 68, // 168: inventory.v1.ChangeAgentRequest.rta_mysql_agent:type_name -> inventory.v1.ChangeRTAMySQLAgentParams + 4, // 169: inventory.v1.ChangeAgentResponse.node_exporter:type_name -> inventory.v1.NodeExporter + 5, // 170: inventory.v1.ChangeAgentResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter + 6, // 171: inventory.v1.ChangeAgentResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter + 7, // 172: inventory.v1.ChangeAgentResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter + 8, // 173: inventory.v1.ChangeAgentResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter + 20, // 174: inventory.v1.ChangeAgentResponse.external_exporter:type_name -> inventory.v1.ExternalExporter + 19, // 175: inventory.v1.ChangeAgentResponse.rds_exporter:type_name -> inventory.v1.RDSExporter + 21, // 176: inventory.v1.ChangeAgentResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter + 10, // 177: inventory.v1.ChangeAgentResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent + 11, // 178: inventory.v1.ChangeAgentResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent + 12, // 179: inventory.v1.ChangeAgentResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent + 13, // 180: inventory.v1.ChangeAgentResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent + 17, // 181: inventory.v1.ChangeAgentResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent + 18, // 182: inventory.v1.ChangeAgentResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent + 3, // 183: inventory.v1.ChangeAgentResponse.nomad_agent:type_name -> inventory.v1.NomadAgent + 9, // 184: inventory.v1.ChangeAgentResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter + 15, // 185: inventory.v1.ChangeAgentResponse.rta_mongodb_agent:type_name -> inventory.v1.RTAMongoDBAgent + 16, // 186: inventory.v1.ChangeAgentResponse.rta_mysql_agent:type_name -> inventory.v1.RTAMySQLAgent + 92, // 187: inventory.v1.AddPMMAgentParams.custom_labels:type_name -> inventory.v1.AddPMMAgentParams.CustomLabelsEntry + 93, // 188: inventory.v1.AddNodeExporterParams.custom_labels:type_name -> inventory.v1.AddNodeExporterParams.CustomLabelsEntry + 114, // 189: inventory.v1.AddNodeExporterParams.log_level:type_name -> inventory.v1.LogLevel + 117, // 190: inventory.v1.ChangeNodeExporterParams.custom_labels:type_name -> common.StringMap + 115, // 191: inventory.v1.ChangeNodeExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 114, // 192: inventory.v1.ChangeNodeExporterParams.log_level:type_name -> inventory.v1.LogLevel + 94, // 193: inventory.v1.AddMySQLdExporterParams.custom_labels:type_name -> inventory.v1.AddMySQLdExporterParams.CustomLabelsEntry + 114, // 194: inventory.v1.AddMySQLdExporterParams.log_level:type_name -> inventory.v1.LogLevel + 95, // 195: inventory.v1.AddMySQLdExporterParams.extra_dsn_params:type_name -> inventory.v1.AddMySQLdExporterParams.ExtraDsnParamsEntry + 116, // 196: inventory.v1.AddMySQLdExporterParams.connection_timeout:type_name -> google.protobuf.Duration + 117, // 197: inventory.v1.ChangeMySQLdExporterParams.custom_labels:type_name -> common.StringMap + 115, // 198: inventory.v1.ChangeMySQLdExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 114, // 199: inventory.v1.ChangeMySQLdExporterParams.log_level:type_name -> inventory.v1.LogLevel + 116, // 200: inventory.v1.ChangeMySQLdExporterParams.connection_timeout:type_name -> google.protobuf.Duration + 96, // 201: inventory.v1.AddMongoDBExporterParams.custom_labels:type_name -> inventory.v1.AddMongoDBExporterParams.CustomLabelsEntry + 114, // 202: inventory.v1.AddMongoDBExporterParams.log_level:type_name -> inventory.v1.LogLevel + 116, // 203: inventory.v1.AddMongoDBExporterParams.connection_timeout:type_name -> google.protobuf.Duration + 117, // 204: inventory.v1.ChangeMongoDBExporterParams.custom_labels:type_name -> common.StringMap + 115, // 205: inventory.v1.ChangeMongoDBExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 114, // 206: inventory.v1.ChangeMongoDBExporterParams.log_level:type_name -> inventory.v1.LogLevel + 116, // 207: inventory.v1.ChangeMongoDBExporterParams.connection_timeout:type_name -> google.protobuf.Duration + 97, // 208: inventory.v1.AddPostgresExporterParams.custom_labels:type_name -> inventory.v1.AddPostgresExporterParams.CustomLabelsEntry + 114, // 209: inventory.v1.AddPostgresExporterParams.log_level:type_name -> inventory.v1.LogLevel + 116, // 210: inventory.v1.AddPostgresExporterParams.connection_timeout:type_name -> google.protobuf.Duration + 117, // 211: inventory.v1.ChangePostgresExporterParams.custom_labels:type_name -> common.StringMap + 115, // 212: inventory.v1.ChangePostgresExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 114, // 213: inventory.v1.ChangePostgresExporterParams.log_level:type_name -> inventory.v1.LogLevel + 116, // 214: inventory.v1.ChangePostgresExporterParams.connection_timeout:type_name -> google.protobuf.Duration + 98, // 215: inventory.v1.AddProxySQLExporterParams.custom_labels:type_name -> inventory.v1.AddProxySQLExporterParams.CustomLabelsEntry + 114, // 216: inventory.v1.AddProxySQLExporterParams.log_level:type_name -> inventory.v1.LogLevel + 116, // 217: inventory.v1.AddProxySQLExporterParams.connection_timeout:type_name -> google.protobuf.Duration + 117, // 218: inventory.v1.ChangeProxySQLExporterParams.custom_labels:type_name -> common.StringMap + 115, // 219: inventory.v1.ChangeProxySQLExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 114, // 220: inventory.v1.ChangeProxySQLExporterParams.log_level:type_name -> inventory.v1.LogLevel + 116, // 221: inventory.v1.ChangeProxySQLExporterParams.connection_timeout:type_name -> google.protobuf.Duration + 99, // 222: inventory.v1.AddQANMySQLPerfSchemaAgentParams.custom_labels:type_name -> inventory.v1.AddQANMySQLPerfSchemaAgentParams.CustomLabelsEntry + 114, // 223: inventory.v1.AddQANMySQLPerfSchemaAgentParams.log_level:type_name -> inventory.v1.LogLevel + 100, // 224: inventory.v1.AddQANMySQLPerfSchemaAgentParams.extra_dsn_params:type_name -> inventory.v1.AddQANMySQLPerfSchemaAgentParams.ExtraDsnParamsEntry + 117, // 225: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams.custom_labels:type_name -> common.StringMap + 115, // 226: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 114, // 227: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams.log_level:type_name -> inventory.v1.LogLevel + 101, // 228: inventory.v1.AddQANMySQLSlowlogAgentParams.custom_labels:type_name -> inventory.v1.AddQANMySQLSlowlogAgentParams.CustomLabelsEntry + 114, // 229: inventory.v1.AddQANMySQLSlowlogAgentParams.log_level:type_name -> inventory.v1.LogLevel + 102, // 230: inventory.v1.AddQANMySQLSlowlogAgentParams.extra_dsn_params:type_name -> inventory.v1.AddQANMySQLSlowlogAgentParams.ExtraDsnParamsEntry + 117, // 231: inventory.v1.ChangeQANMySQLSlowlogAgentParams.custom_labels:type_name -> common.StringMap + 115, // 232: inventory.v1.ChangeQANMySQLSlowlogAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 114, // 233: inventory.v1.ChangeQANMySQLSlowlogAgentParams.log_level:type_name -> inventory.v1.LogLevel + 103, // 234: inventory.v1.AddQANMongoDBProfilerAgentParams.custom_labels:type_name -> inventory.v1.AddQANMongoDBProfilerAgentParams.CustomLabelsEntry + 114, // 235: inventory.v1.AddQANMongoDBProfilerAgentParams.log_level:type_name -> inventory.v1.LogLevel + 117, // 236: inventory.v1.ChangeQANMongoDBProfilerAgentParams.custom_labels:type_name -> common.StringMap + 115, // 237: inventory.v1.ChangeQANMongoDBProfilerAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 114, // 238: inventory.v1.ChangeQANMongoDBProfilerAgentParams.log_level:type_name -> inventory.v1.LogLevel + 104, // 239: inventory.v1.AddQANMongoDBMongologAgentParams.custom_labels:type_name -> inventory.v1.AddQANMongoDBMongologAgentParams.CustomLabelsEntry + 114, // 240: inventory.v1.AddQANMongoDBMongologAgentParams.log_level:type_name -> inventory.v1.LogLevel + 117, // 241: inventory.v1.ChangeQANMongoDBMongologAgentParams.custom_labels:type_name -> common.StringMap + 115, // 242: inventory.v1.ChangeQANMongoDBMongologAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 114, // 243: inventory.v1.ChangeQANMongoDBMongologAgentParams.log_level:type_name -> inventory.v1.LogLevel + 105, // 244: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.custom_labels:type_name -> inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.CustomLabelsEntry + 114, // 245: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.log_level:type_name -> inventory.v1.LogLevel + 117, // 246: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams.custom_labels:type_name -> common.StringMap + 115, // 247: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 114, // 248: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams.log_level:type_name -> inventory.v1.LogLevel + 106, // 249: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.custom_labels:type_name -> inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.CustomLabelsEntry + 114, // 250: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.log_level:type_name -> inventory.v1.LogLevel + 117, // 251: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams.custom_labels:type_name -> common.StringMap + 115, // 252: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 114, // 253: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams.log_level:type_name -> inventory.v1.LogLevel + 107, // 254: inventory.v1.AddRDSExporterParams.custom_labels:type_name -> inventory.v1.AddRDSExporterParams.CustomLabelsEntry + 114, // 255: inventory.v1.AddRDSExporterParams.log_level:type_name -> inventory.v1.LogLevel + 117, // 256: inventory.v1.ChangeRDSExporterParams.custom_labels:type_name -> common.StringMap + 115, // 257: inventory.v1.ChangeRDSExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 114, // 258: inventory.v1.ChangeRDSExporterParams.log_level:type_name -> inventory.v1.LogLevel + 108, // 259: inventory.v1.AddExternalExporterParams.custom_labels:type_name -> inventory.v1.AddExternalExporterParams.CustomLabelsEntry + 117, // 260: inventory.v1.ChangeExternalExporterParams.custom_labels:type_name -> common.StringMap + 115, // 261: inventory.v1.ChangeExternalExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 109, // 262: inventory.v1.AddAzureDatabaseExporterParams.custom_labels:type_name -> inventory.v1.AddAzureDatabaseExporterParams.CustomLabelsEntry + 114, // 263: inventory.v1.AddAzureDatabaseExporterParams.log_level:type_name -> inventory.v1.LogLevel + 117, // 264: inventory.v1.ChangeAzureDatabaseExporterParams.custom_labels:type_name -> common.StringMap + 115, // 265: inventory.v1.ChangeAzureDatabaseExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 114, // 266: inventory.v1.ChangeAzureDatabaseExporterParams.log_level:type_name -> inventory.v1.LogLevel + 110, // 267: inventory.v1.AddValkeyExporterParams.custom_labels:type_name -> inventory.v1.AddValkeyExporterParams.CustomLabelsEntry + 114, // 268: inventory.v1.AddValkeyExporterParams.log_level:type_name -> inventory.v1.LogLevel + 116, // 269: inventory.v1.AddValkeyExporterParams.connection_timeout:type_name -> google.protobuf.Duration + 117, // 270: inventory.v1.ChangeValkeyExporterParams.custom_labels:type_name -> common.StringMap + 115, // 271: inventory.v1.ChangeValkeyExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 114, // 272: inventory.v1.ChangeValkeyExporterParams.log_level:type_name -> inventory.v1.LogLevel + 116, // 273: inventory.v1.ChangeValkeyExporterParams.connection_timeout:type_name -> google.protobuf.Duration + 111, // 274: inventory.v1.AddRTAMongoDBAgentParams.custom_labels:type_name -> inventory.v1.AddRTAMongoDBAgentParams.CustomLabelsEntry + 114, // 275: inventory.v1.AddRTAMongoDBAgentParams.log_level:type_name -> inventory.v1.LogLevel + 14, // 276: inventory.v1.AddRTAMongoDBAgentParams.rta_options:type_name -> inventory.v1.RTAOptions + 117, // 277: inventory.v1.ChangeRTAMongoDBAgentParams.custom_labels:type_name -> common.StringMap + 114, // 278: inventory.v1.ChangeRTAMongoDBAgentParams.log_level:type_name -> inventory.v1.LogLevel + 14, // 279: inventory.v1.ChangeRTAMongoDBAgentParams.rta_options:type_name -> inventory.v1.RTAOptions + 112, // 280: inventory.v1.AddRTAMySQLAgentParams.custom_labels:type_name -> inventory.v1.AddRTAMySQLAgentParams.CustomLabelsEntry + 114, // 281: inventory.v1.AddRTAMySQLAgentParams.log_level:type_name -> inventory.v1.LogLevel + 14, // 282: inventory.v1.AddRTAMySQLAgentParams.rta_options:type_name -> inventory.v1.RTAOptions + 117, // 283: inventory.v1.ChangeRTAMySQLAgentParams.custom_labels:type_name -> common.StringMap + 114, // 284: inventory.v1.ChangeRTAMySQLAgentParams.log_level:type_name -> inventory.v1.LogLevel + 14, // 285: inventory.v1.ChangeRTAMySQLAgentParams.rta_options:type_name -> inventory.v1.RTAOptions + 23, // 286: inventory.v1.AgentsService.ListAgents:input_type -> inventory.v1.ListAgentsRequest + 25, // 287: inventory.v1.AgentsService.GetAgent:input_type -> inventory.v1.GetAgentRequest + 27, // 288: inventory.v1.AgentsService.GetAgentLogs:input_type -> inventory.v1.GetAgentLogsRequest + 29, // 289: inventory.v1.AgentsService.AddAgent:input_type -> inventory.v1.AddAgentRequest + 31, // 290: inventory.v1.AgentsService.ChangeAgent:input_type -> inventory.v1.ChangeAgentRequest + 69, // 291: inventory.v1.AgentsService.RemoveAgent:input_type -> inventory.v1.RemoveAgentRequest + 24, // 292: inventory.v1.AgentsService.ListAgents:output_type -> inventory.v1.ListAgentsResponse + 26, // 293: inventory.v1.AgentsService.GetAgent:output_type -> inventory.v1.GetAgentResponse + 28, // 294: inventory.v1.AgentsService.GetAgentLogs:output_type -> inventory.v1.GetAgentLogsResponse + 30, // 295: inventory.v1.AgentsService.AddAgent:output_type -> inventory.v1.AddAgentResponse + 32, // 296: inventory.v1.AgentsService.ChangeAgent:output_type -> inventory.v1.ChangeAgentResponse + 70, // 297: inventory.v1.AgentsService.RemoveAgent:output_type -> inventory.v1.RemoveAgentResponse + 292, // [292:298] is the sub-list for method output_type + 286, // [286:292] is the sub-list for method input_type + 286, // [286:286] is the sub-list for extension type_name + 286, // [286:286] is the sub-list for extension extendee + 0, // [0:286] is the sub-list for field type_name } func init() { file_inventory_v1_agents_proto_init() } @@ -12811,8 +13418,8 @@ func file_inventory_v1_agents_proto_init() { } file_inventory_v1_agent_status_proto_init() file_inventory_v1_log_level_proto_init() - file_inventory_v1_agents_proto_msgTypes[20].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[24].OneofWrappers = []any{ + file_inventory_v1_agents_proto_msgTypes[21].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[25].OneofWrappers = []any{ (*GetAgentResponse_PmmAgent)(nil), (*GetAgentResponse_Vmagent)(nil), (*GetAgentResponse_NodeExporter)(nil), @@ -12832,8 +13439,9 @@ func file_inventory_v1_agents_proto_init() { (*GetAgentResponse_NomadAgent)(nil), (*GetAgentResponse_ValkeyExporter)(nil), (*GetAgentResponse_RtaMongodbAgent)(nil), + (*GetAgentResponse_RtaMysqlAgent)(nil), } - file_inventory_v1_agents_proto_msgTypes[27].OneofWrappers = []any{ + file_inventory_v1_agents_proto_msgTypes[28].OneofWrappers = []any{ (*AddAgentRequest_PmmAgent)(nil), (*AddAgentRequest_NodeExporter)(nil), (*AddAgentRequest_MysqldExporter)(nil), @@ -12851,8 +13459,9 @@ func file_inventory_v1_agents_proto_init() { (*AddAgentRequest_QanPostgresqlPgstatmonitorAgent)(nil), (*AddAgentRequest_ValkeyExporter)(nil), (*AddAgentRequest_RtaMongodbAgent)(nil), + (*AddAgentRequest_RtaMysqlAgent)(nil), } - file_inventory_v1_agents_proto_msgTypes[28].OneofWrappers = []any{ + file_inventory_v1_agents_proto_msgTypes[29].OneofWrappers = []any{ (*AddAgentResponse_PmmAgent)(nil), (*AddAgentResponse_NodeExporter)(nil), (*AddAgentResponse_MysqldExporter)(nil), @@ -12870,8 +13479,9 @@ func file_inventory_v1_agents_proto_init() { (*AddAgentResponse_QanPostgresqlPgstatmonitorAgent)(nil), (*AddAgentResponse_ValkeyExporter)(nil), (*AddAgentResponse_RtaMongodbAgent)(nil), + (*AddAgentResponse_RtaMysqlAgent)(nil), } - file_inventory_v1_agents_proto_msgTypes[29].OneofWrappers = []any{ + file_inventory_v1_agents_proto_msgTypes[30].OneofWrappers = []any{ (*ChangeAgentRequest_NodeExporter)(nil), (*ChangeAgentRequest_MysqldExporter)(nil), (*ChangeAgentRequest_MongodbExporter)(nil), @@ -12889,8 +13499,9 @@ func file_inventory_v1_agents_proto_init() { (*ChangeAgentRequest_NomadAgent)(nil), (*ChangeAgentRequest_ValkeyExporter)(nil), (*ChangeAgentRequest_RtaMongodbAgent)(nil), + (*ChangeAgentRequest_RtaMysqlAgent)(nil), } - file_inventory_v1_agents_proto_msgTypes[30].OneofWrappers = []any{ + file_inventory_v1_agents_proto_msgTypes[31].OneofWrappers = []any{ (*ChangeAgentResponse_NodeExporter)(nil), (*ChangeAgentResponse_MysqldExporter)(nil), (*ChangeAgentResponse_MongodbExporter)(nil), @@ -12908,31 +13519,33 @@ func file_inventory_v1_agents_proto_init() { (*ChangeAgentResponse_NomadAgent)(nil), (*ChangeAgentResponse_ValkeyExporter)(nil), (*ChangeAgentResponse_RtaMongodbAgent)(nil), - } - file_inventory_v1_agents_proto_msgTypes[33].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[35].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[37].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[39].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[41].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[43].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[45].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[47].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[49].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[51].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[53].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[55].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[57].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[59].OneofWrappers = []any{} + (*ChangeAgentResponse_RtaMysqlAgent)(nil), + } + file_inventory_v1_agents_proto_msgTypes[34].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[36].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[38].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[40].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[42].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[44].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[46].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[48].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[50].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[52].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[54].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[56].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[58].OneofWrappers = []any{} file_inventory_v1_agents_proto_msgTypes[60].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[62].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[64].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[61].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[63].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[65].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[67].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_inventory_v1_agents_proto_rawDesc), len(file_inventory_v1_agents_proto_rawDesc)), NumEnums: 1, - NumMessages: 107, + NumMessages: 112, NumExtensions: 0, NumServices: 1, }, diff --git a/api/inventory/v1/agents.pb.validate.go b/api/inventory/v1/agents.pb.validate.go index 0c310df49e6..cb79a6efdaf 100644 --- a/api/inventory/v1/agents.pb.validate.go +++ b/api/inventory/v1/agents.pb.validate.go @@ -134,8 +134,7 @@ func (e PMMAgentValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = PMMAgentValidationError{} @@ -243,8 +242,7 @@ func (e VMAgentValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = VMAgentValidationError{} @@ -355,8 +353,7 @@ func (e NomadAgentValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = NomadAgentValidationError{} @@ -504,8 +501,7 @@ func (e NodeExporterValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = NodeExporterValidationError{} @@ -705,8 +701,7 @@ func (e MySQLdExporterValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = MySQLdExporterValidationError{} @@ -896,8 +891,7 @@ func (e MongoDBExporterValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = MongoDBExporterValidationError{} @@ -1087,8 +1081,7 @@ func (e PostgresExporterValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = PostgresExporterValidationError{} @@ -1274,8 +1267,7 @@ func (e ProxySQLExporterValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ProxySQLExporterValidationError{} @@ -1459,8 +1451,7 @@ func (e ValkeyExporterValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ValkeyExporterValidationError{} @@ -1598,8 +1589,7 @@ func (e QANMySQLPerfSchemaAgentValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = QANMySQLPerfSchemaAgentValidationError{} @@ -1739,8 +1729,7 @@ func (e QANMySQLSlowlogAgentValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = QANMySQLSlowlogAgentValidationError{} @@ -1866,8 +1855,7 @@ func (e QANMongoDBProfilerAgentValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = QANMongoDBProfilerAgentValidationError{} @@ -1993,8 +1981,7 @@ func (e QANMongoDBMongologAgentValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = QANMongoDBMongologAgentValidationError{} @@ -2123,8 +2110,7 @@ func (e RTAOptionsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = RTAOptionsValidationError{} @@ -2273,8 +2259,7 @@ func (e RTAMongoDBAgentValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = RTAMongoDBAgentValidationError{} @@ -2287,6 +2272,155 @@ var _ interface { ErrorName() string } = RTAMongoDBAgentValidationError{} +// Validate checks the field values on RTAMySQLAgent with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *RTAMySQLAgent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RTAMySQLAgent with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RTAMySQLAgentMultiError, or +// nil if none found. +func (m *RTAMySQLAgent) ValidateAll() error { + return m.validate(true) +} + +func (m *RTAMySQLAgent) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for AgentId + + // no validation rules for PmmAgentId + + // no validation rules for Disabled + + // no validation rules for ServiceId + + // no validation rules for Username + + // no validation rules for Tls + + // no validation rules for TlsSkipVerify + + // no validation rules for CustomLabels + + if all { + switch v := interface{}(m.GetRtaOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RTAMySQLAgentValidationError{ + field: "RtaOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RTAMySQLAgentValidationError{ + field: "RtaOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRtaOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RTAMySQLAgentValidationError{ + field: "RtaOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Status + + // no validation rules for LogLevel + + if len(errors) > 0 { + return RTAMySQLAgentMultiError(errors) + } + + return nil +} + +// RTAMySQLAgentMultiError is an error wrapping multiple validation errors +// returned by RTAMySQLAgent.ValidateAll() if the designated constraints +// aren't met. +type RTAMySQLAgentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RTAMySQLAgentMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RTAMySQLAgentMultiError) AllErrors() []error { return m } + +// RTAMySQLAgentValidationError is the validation error returned by +// RTAMySQLAgent.Validate if the designated constraints aren't met. +type RTAMySQLAgentValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RTAMySQLAgentValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RTAMySQLAgentValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RTAMySQLAgentValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RTAMySQLAgentValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RTAMySQLAgentValidationError) ErrorName() string { return "RTAMySQLAgentValidationError" } + +// Error satisfies the builtin error interface +func (e RTAMySQLAgentValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRTAMySQLAgent.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RTAMySQLAgentValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RTAMySQLAgentValidationError{} + // Validate checks the field values on QANPostgreSQLPgStatementsAgent with the // rules defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. @@ -2403,8 +2537,7 @@ func (e QANPostgreSQLPgStatementsAgentValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = QANPostgreSQLPgStatementsAgentValidationError{} @@ -2535,8 +2668,7 @@ func (e QANPostgreSQLPgStatMonitorAgentValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = QANPostgreSQLPgStatMonitorAgentValidationError{} @@ -2692,8 +2824,7 @@ func (e RDSExporterValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = RDSExporterValidationError{} @@ -2848,8 +2979,7 @@ func (e ExternalExporterValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ExternalExporterValidationError{} @@ -3004,8 +3134,7 @@ func (e AzureDatabaseExporterValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AzureDatabaseExporterValidationError{} @@ -3074,6 +3203,7 @@ func (m *ChangeCommonAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -3102,6 +3232,7 @@ func (m *ChangeCommonAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -3175,8 +3306,7 @@ func (e ChangeCommonAgentParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeCommonAgentParamsValidationError{} @@ -3286,8 +3416,7 @@ func (e ListAgentsRequestValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ListAgentsRequestValidationError{} @@ -3968,6 +4097,40 @@ func (m *ListAgentsResponse) validate(all bool) error { } + for idx, item := range m.GetRtaMysqlAgent() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListAgentsResponseValidationError{ + field: fmt.Sprintf("RtaMysqlAgent[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListAgentsResponseValidationError{ + field: fmt.Sprintf("RtaMysqlAgent[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListAgentsResponseValidationError{ + field: fmt.Sprintf("RtaMysqlAgent[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + if len(errors) > 0 { return ListAgentsResponseMultiError(errors) } @@ -4035,8 +4198,7 @@ func (e ListAgentsResponseValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ListAgentsResponseValidationError{} @@ -4147,8 +4309,7 @@ func (e GetAgentRequestValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = GetAgentRequestValidationError{} @@ -4963,6 +5124,47 @@ func (m *GetAgentResponse) validate(all bool) error { } } + case *GetAgentResponse_RtaMysqlAgent: + if v == nil { + err := GetAgentResponseValidationError{ + field: "Agent", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetRtaMysqlAgent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GetAgentResponseValidationError{ + field: "RtaMysqlAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GetAgentResponseValidationError{ + field: "RtaMysqlAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRtaMysqlAgent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetAgentResponseValidationError{ + field: "RtaMysqlAgent", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: _ = v // ensures v is used } @@ -5032,8 +5234,7 @@ func (e GetAgentResponseValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = GetAgentResponseValidationError{} @@ -5148,8 +5349,7 @@ func (e GetAgentLogsRequestValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = GetAgentLogsRequestValidationError{} @@ -5253,8 +5453,7 @@ func (e GetAgentLogsResponseValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = GetAgentLogsResponseValidationError{} @@ -5987,6 +6186,47 @@ func (m *AddAgentRequest) validate(all bool) error { } } + case *AddAgentRequest_RtaMysqlAgent: + if v == nil { + err := AddAgentRequestValidationError{ + field: "Agent", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetRtaMysqlAgent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddAgentRequestValidationError{ + field: "RtaMysqlAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddAgentRequestValidationError{ + field: "RtaMysqlAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRtaMysqlAgent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AddAgentRequestValidationError{ + field: "RtaMysqlAgent", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: _ = v // ensures v is used } @@ -6056,8 +6296,7 @@ func (e AddAgentRequestValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddAgentRequestValidationError{} @@ -6790,30 +7029,71 @@ func (m *AddAgentResponse) validate(all bool) error { } } - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return AddAgentResponseMultiError(errors) - } - - return nil -} - -// AddAgentResponseMultiError is an error wrapping multiple validation errors -// returned by AddAgentResponse.ValidateAll() if the designated constraints -// aren't met. -type AddAgentResponseMultiError []error + case *AddAgentResponse_RtaMysqlAgent: + if v == nil { + err := AddAgentResponseValidationError{ + field: "Agent", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } -// Error returns a concatenation of all the error messages it wraps. -func (m AddAgentResponseMultiError) Error() string { - msgs := make([]string, 0, len(m)) - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} + if all { + switch v := interface{}(m.GetRtaMysqlAgent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddAgentResponseValidationError{ + field: "RtaMysqlAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddAgentResponseValidationError{ + field: "RtaMysqlAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRtaMysqlAgent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AddAgentResponseValidationError{ + field: "RtaMysqlAgent", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return AddAgentResponseMultiError(errors) + } + + return nil +} + +// AddAgentResponseMultiError is an error wrapping multiple validation errors +// returned by AddAgentResponse.ValidateAll() if the designated constraints +// aren't met. +type AddAgentResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AddAgentResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} // AllErrors returns a list of validation violation errors. func (m AddAgentResponseMultiError) AllErrors() []error { return m } @@ -6859,8 +7139,7 @@ func (e AddAgentResponseValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddAgentResponseValidationError{} @@ -7604,6 +7883,47 @@ func (m *ChangeAgentRequest) validate(all bool) error { } } + case *ChangeAgentRequest_RtaMysqlAgent: + if v == nil { + err := ChangeAgentRequestValidationError{ + field: "Agent", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetRtaMysqlAgent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ChangeAgentRequestValidationError{ + field: "RtaMysqlAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ChangeAgentRequestValidationError{ + field: "RtaMysqlAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRtaMysqlAgent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ChangeAgentRequestValidationError{ + field: "RtaMysqlAgent", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: _ = v // ensures v is used } @@ -7675,8 +7995,7 @@ func (e ChangeAgentRequestValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeAgentRequestValidationError{} @@ -8409,6 +8728,47 @@ func (m *ChangeAgentResponse) validate(all bool) error { } } + case *ChangeAgentResponse_RtaMysqlAgent: + if v == nil { + err := ChangeAgentResponseValidationError{ + field: "Agent", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetRtaMysqlAgent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ChangeAgentResponseValidationError{ + field: "RtaMysqlAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ChangeAgentResponseValidationError{ + field: "RtaMysqlAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRtaMysqlAgent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ChangeAgentResponseValidationError{ + field: "RtaMysqlAgent", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: _ = v // ensures v is used } @@ -8480,8 +8840,7 @@ func (e ChangeAgentResponseValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeAgentResponseValidationError{} @@ -8596,8 +8955,7 @@ func (e AddPMMAgentParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddPMMAgentParamsValidationError{} @@ -8718,8 +9076,7 @@ func (e AddNodeExporterParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddNodeExporterParamsValidationError{} @@ -8788,6 +9145,7 @@ func (m *ChangeNodeExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -8816,6 +9174,7 @@ func (m *ChangeNodeExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -8897,8 +9256,7 @@ func (e ChangeNodeExporterParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeNodeExporterParamsValidationError{} @@ -9091,8 +9449,7 @@ func (e AddMySQLdExporterParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddMySQLdExporterParamsValidationError{} @@ -9191,6 +9548,7 @@ func (m *ChangeMySQLdExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -9219,6 +9577,7 @@ func (m *ChangeMySQLdExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -9340,8 +9699,7 @@ func (e ChangeMySQLdExporterParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeMySQLdExporterParamsValidationError{} @@ -9529,8 +9887,7 @@ func (e AddMongoDBExporterParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddMongoDBExporterParamsValidationError{} @@ -9629,6 +9986,7 @@ func (m *ChangeMongoDBExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -9657,6 +10015,7 @@ func (m *ChangeMongoDBExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -9791,8 +10150,7 @@ func (e ChangeMongoDBExporterParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeMongoDBExporterParamsValidationError{} @@ -9985,8 +10343,7 @@ func (e AddPostgresExporterParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddPostgresExporterParamsValidationError{} @@ -10085,6 +10442,7 @@ func (m *ChangePostgresExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -10113,6 +10471,7 @@ func (m *ChangePostgresExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -10239,8 +10598,7 @@ func (e ChangePostgresExporterParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangePostgresExporterParamsValidationError{} @@ -10423,8 +10781,7 @@ func (e AddProxySQLExporterParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddProxySQLExporterParamsValidationError{} @@ -10523,6 +10880,7 @@ func (m *ChangeProxySQLExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -10551,6 +10909,7 @@ func (m *ChangeProxySQLExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -10653,8 +11012,7 @@ func (e ChangeProxySQLExporterParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeProxySQLExporterParamsValidationError{} @@ -10818,8 +11176,7 @@ func (e AddQANMySQLPerfSchemaAgentParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddQANMySQLPerfSchemaAgentParamsValidationError{} @@ -10889,6 +11246,7 @@ func (m *ChangeQANMySQLPerfSchemaAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -10917,6 +11275,7 @@ func (m *ChangeQANMySQLPerfSchemaAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -11040,8 +11399,7 @@ func (e ChangeQANMySQLPerfSchemaAgentParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeQANMySQLPerfSchemaAgentParamsValidationError{} @@ -11205,8 +11563,7 @@ func (e AddQANMySQLSlowlogAgentParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddQANMySQLSlowlogAgentParamsValidationError{} @@ -11276,6 +11633,7 @@ func (m *ChangeQANMySQLSlowlogAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -11304,6 +11662,7 @@ func (m *ChangeQANMySQLSlowlogAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -11431,8 +11790,7 @@ func (e ChangeQANMySQLSlowlogAgentParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeQANMySQLSlowlogAgentParamsValidationError{} @@ -11585,8 +11943,7 @@ func (e AddQANMongoDBProfilerAgentParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddQANMongoDBProfilerAgentParamsValidationError{} @@ -11656,6 +12013,7 @@ func (m *ChangeQANMongoDBProfilerAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -11684,6 +12042,7 @@ func (m *ChangeQANMongoDBProfilerAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -11803,8 +12162,7 @@ func (e ChangeQANMongoDBProfilerAgentParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeQANMongoDBProfilerAgentParamsValidationError{} @@ -11957,8 +12315,7 @@ func (e AddQANMongoDBMongologAgentParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddQANMongoDBMongologAgentParamsValidationError{} @@ -12028,6 +12385,7 @@ func (m *ChangeQANMongoDBMongologAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -12056,6 +12414,7 @@ func (m *ChangeQANMongoDBMongologAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -12175,8 +12534,7 @@ func (e ChangeQANMongoDBMongologAgentParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeQANMongoDBMongologAgentParamsValidationError{} @@ -12337,8 +12695,7 @@ func (e AddQANPostgreSQLPgStatementsAgentParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddQANPostgreSQLPgStatementsAgentParamsValidationError{} @@ -12409,6 +12766,7 @@ func (m *ChangeQANPostgreSQLPgStatementsAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -12437,6 +12795,7 @@ func (m *ChangeQANPostgreSQLPgStatementsAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -12552,8 +12911,7 @@ func (e ChangeQANPostgreSQLPgStatementsAgentParamsValidationError) Error() strin key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeQANPostgreSQLPgStatementsAgentParamsValidationError{} @@ -12716,8 +13074,7 @@ func (e AddQANPostgreSQLPgStatMonitorAgentParamsValidationError) Error() string key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddQANPostgreSQLPgStatMonitorAgentParamsValidationError{} @@ -12788,6 +13145,7 @@ func (m *ChangeQANPostgreSQLPgStatMonitorAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -12816,6 +13174,7 @@ func (m *ChangeQANPostgreSQLPgStatMonitorAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -12935,8 +13294,7 @@ func (e ChangeQANPostgreSQLPgStatMonitorAgentParamsValidationError) Error() stri key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeQANPostgreSQLPgStatMonitorAgentParamsValidationError{} @@ -13076,8 +13434,7 @@ func (e AddRDSExporterParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddRDSExporterParamsValidationError{} @@ -13146,6 +13503,7 @@ func (m *ChangeRDSExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -13174,6 +13532,7 @@ func (m *ChangeRDSExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -13267,8 +13626,7 @@ func (e ChangeRDSExporterParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeRDSExporterParamsValidationError{} @@ -13408,8 +13766,7 @@ func (e AddExternalExporterParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddExternalExporterParamsValidationError{} @@ -13478,6 +13835,7 @@ func (m *ChangeExternalExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -13506,6 +13864,7 @@ func (m *ChangeExternalExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -13596,8 +13955,7 @@ func (e ChangeExternalExporterParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeExternalExporterParamsValidationError{} @@ -13751,8 +14109,7 @@ func (e AddAzureDatabaseExporterParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddAzureDatabaseExporterParamsValidationError{} @@ -13822,6 +14179,7 @@ func (m *ChangeAzureDatabaseExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -13850,6 +14208,7 @@ func (m *ChangeAzureDatabaseExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -13949,8 +14308,7 @@ func (e ChangeAzureDatabaseExporterParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeAzureDatabaseExporterParamsValidationError{} @@ -14056,8 +14414,7 @@ func (e ChangeNomadAgentParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeNomadAgentParamsValidationError{} @@ -14255,8 +14612,7 @@ func (e AddValkeyExporterParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddValkeyExporterParamsValidationError{} @@ -14355,6 +14711,7 @@ func (m *ChangeValkeyExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -14383,6 +14740,7 @@ func (m *ChangeValkeyExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -14390,6 +14748,7 @@ func (m *ChangeValkeyExporterParams) validate(all bool) error { } if m.Username != nil { + if utf8.RuneCountInString(m.GetUsername()) < 1 { err := ChangeValkeyExporterParamsValidationError{ field: "Username", @@ -14400,6 +14759,7 @@ func (m *ChangeValkeyExporterParams) validate(all bool) error { } errors = append(errors, err) } + } if m.Password != nil { @@ -14505,8 +14865,7 @@ func (e ChangeValkeyExporterParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeValkeyExporterParamsValidationError{} @@ -14681,8 +15040,7 @@ func (e AddRTAMongoDBAgentParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = AddRTAMongoDBAgentParamsValidationError{} @@ -14722,6 +15080,7 @@ func (m *ChangeRTAMongoDBAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -14750,6 +15109,7 @@ func (m *ChangeRTAMongoDBAgentParams) validate(all bool) error { } } } + } if m.LogLevel != nil { @@ -14789,6 +15149,7 @@ func (m *ChangeRTAMongoDBAgentParams) validate(all bool) error { } if m.RtaOptions != nil { + if all { switch v := interface{}(m.GetRtaOptions()).(type) { case interface{ ValidateAll() error }: @@ -14817,6 +15178,7 @@ func (m *ChangeRTAMongoDBAgentParams) validate(all bool) error { } } } + } if len(errors) > 0 { @@ -14887,8 +15249,7 @@ func (e ChangeRTAMongoDBAgentParamsValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ChangeRTAMongoDBAgentParamsValidationError{} @@ -14901,6 +15262,383 @@ var _ interface { ErrorName() string } = ChangeRTAMongoDBAgentParamsValidationError{} +// Validate checks the field values on AddRTAMySQLAgentParams with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *AddRTAMySQLAgentParams) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AddRTAMySQLAgentParams with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AddRTAMySQLAgentParamsMultiError, or nil if none found. +func (m *AddRTAMySQLAgentParams) ValidateAll() error { + return m.validate(true) +} + +func (m *AddRTAMySQLAgentParams) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetPmmAgentId()) < 1 { + err := AddRTAMySQLAgentParamsValidationError{ + field: "PmmAgentId", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if utf8.RuneCountInString(m.GetServiceId()) < 1 { + err := AddRTAMySQLAgentParamsValidationError{ + field: "ServiceId", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for Username + + // no validation rules for Password + + // no validation rules for CustomLabels + + // no validation rules for LogLevel + + // no validation rules for Tls + + // no validation rules for TlsSkipVerify + + // no validation rules for TlsCa + + // no validation rules for TlsCert + + // no validation rules for TlsKey + + // no validation rules for SkipConnectionCheck + + if all { + switch v := interface{}(m.GetRtaOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddRTAMySQLAgentParamsValidationError{ + field: "RtaOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddRTAMySQLAgentParamsValidationError{ + field: "RtaOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRtaOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AddRTAMySQLAgentParamsValidationError{ + field: "RtaOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return AddRTAMySQLAgentParamsMultiError(errors) + } + + return nil +} + +// AddRTAMySQLAgentParamsMultiError is an error wrapping multiple validation +// errors returned by AddRTAMySQLAgentParams.ValidateAll() if the designated +// constraints aren't met. +type AddRTAMySQLAgentParamsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AddRTAMySQLAgentParamsMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AddRTAMySQLAgentParamsMultiError) AllErrors() []error { return m } + +// AddRTAMySQLAgentParamsValidationError is the validation error returned by +// AddRTAMySQLAgentParams.Validate if the designated constraints aren't met. +type AddRTAMySQLAgentParamsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AddRTAMySQLAgentParamsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AddRTAMySQLAgentParamsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AddRTAMySQLAgentParamsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AddRTAMySQLAgentParamsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AddRTAMySQLAgentParamsValidationError) ErrorName() string { + return "AddRTAMySQLAgentParamsValidationError" +} + +// Error satisfies the builtin error interface +func (e AddRTAMySQLAgentParamsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sAddRTAMySQLAgentParams.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AddRTAMySQLAgentParamsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AddRTAMySQLAgentParamsValidationError{} + +// Validate checks the field values on ChangeRTAMySQLAgentParams with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ChangeRTAMySQLAgentParams) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ChangeRTAMySQLAgentParams with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ChangeRTAMySQLAgentParamsMultiError, or nil if none found. +func (m *ChangeRTAMySQLAgentParams) ValidateAll() error { + return m.validate(true) +} + +func (m *ChangeRTAMySQLAgentParams) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.Enable != nil { + // no validation rules for Enable + } + + if m.CustomLabels != nil { + + if all { + switch v := interface{}(m.GetCustomLabels()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ChangeRTAMySQLAgentParamsValidationError{ + field: "CustomLabels", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ChangeRTAMySQLAgentParamsValidationError{ + field: "CustomLabels", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCustomLabels()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ChangeRTAMySQLAgentParamsValidationError{ + field: "CustomLabels", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if m.LogLevel != nil { + // no validation rules for LogLevel + } + + if m.Username != nil { + // no validation rules for Username + } + + if m.Password != nil { + // no validation rules for Password + } + + if m.Tls != nil { + // no validation rules for Tls + } + + if m.TlsSkipVerify != nil { + // no validation rules for TlsSkipVerify + } + + if m.TlsCa != nil { + // no validation rules for TlsCa + } + + if m.TlsCert != nil { + // no validation rules for TlsCert + } + + if m.TlsKey != nil { + // no validation rules for TlsKey + } + + if m.RtaOptions != nil { + + if all { + switch v := interface{}(m.GetRtaOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ChangeRTAMySQLAgentParamsValidationError{ + field: "RtaOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ChangeRTAMySQLAgentParamsValidationError{ + field: "RtaOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRtaOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ChangeRTAMySQLAgentParamsValidationError{ + field: "RtaOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ChangeRTAMySQLAgentParamsMultiError(errors) + } + + return nil +} + +// ChangeRTAMySQLAgentParamsMultiError is an error wrapping multiple validation +// errors returned by ChangeRTAMySQLAgentParams.ValidateAll() if the +// designated constraints aren't met. +type ChangeRTAMySQLAgentParamsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ChangeRTAMySQLAgentParamsMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ChangeRTAMySQLAgentParamsMultiError) AllErrors() []error { return m } + +// ChangeRTAMySQLAgentParamsValidationError is the validation error returned by +// ChangeRTAMySQLAgentParams.Validate if the designated constraints aren't met. +type ChangeRTAMySQLAgentParamsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ChangeRTAMySQLAgentParamsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ChangeRTAMySQLAgentParamsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ChangeRTAMySQLAgentParamsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ChangeRTAMySQLAgentParamsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ChangeRTAMySQLAgentParamsValidationError) ErrorName() string { + return "ChangeRTAMySQLAgentParamsValidationError" +} + +// Error satisfies the builtin error interface +func (e ChangeRTAMySQLAgentParamsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sChangeRTAMySQLAgentParams.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ChangeRTAMySQLAgentParamsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ChangeRTAMySQLAgentParamsValidationError{} + // Validate checks the field values on RemoveAgentRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. @@ -15003,8 +15741,7 @@ func (e RemoveAgentRequestValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = RemoveAgentRequestValidationError{} @@ -15106,8 +15843,7 @@ func (e RemoveAgentResponseValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = RemoveAgentResponseValidationError{} diff --git a/api/inventory/v1/agents.proto b/api/inventory/v1/agents.proto index fea2b5df13e..e681a48dbd3 100644 --- a/api/inventory/v1/agents.proto +++ b/api/inventory/v1/agents.proto @@ -34,6 +34,7 @@ enum AgentType { AGENT_TYPE_AZURE_DATABASE_EXPORTER = 15; AGENT_TYPE_NOMAD_AGENT = 16; AGENT_TYPE_RTA_MONGODB_AGENT = 19; + AGENT_TYPE_RTA_MYSQL_AGENT = 20; } // PMMAgent runs on Generic or Container Node. @@ -574,6 +575,32 @@ message RTAMongoDBAgent { LogLevel log_level = 11; } +// RTAMySQLAgent runs within pmm-agent and sends MySQL Real-Time Query Analytics data to the PMM Server. +message RTAMySQLAgent { + // Unique agent identifier. + string agent_id = 1; + // The pmm-agent identifier which runs this instance. + string pmm_agent_id = 2; + // Desired Agent status: enabled (false) or disabled (true). + bool disabled = 3; + // Service identifier. + string service_id = 4; + // MySQL username for getting the currently running queries. + string username = 5 [(extensions.v1.sensitive) = REDACT_TYPE_FULL]; + // Use TLS for database connections. + bool tls = 6; + // Skip TLS certificate and hostname validation. + bool tls_skip_verify = 7; + // Custom user-assigned labels. + map custom_labels = 8; + // Real-Time Analytics options. + RTAOptions rta_options = 9; + // Actual Agent status. + AgentStatus status = 10; + // Log level for exporter. + LogLevel log_level = 11; +} + // QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server. message QANPostgreSQLPgStatementsAgent { // Unique randomly generated instance identifier. @@ -805,6 +832,7 @@ message ListAgentsResponse { repeated NomadAgent nomad_agent = 16; repeated ValkeyExporter valkey_exporter = 17; repeated RTAMongoDBAgent rta_mongodb_agent = 19; + repeated RTAMySQLAgent rta_mysql_agent = 20; } // Get @@ -835,6 +863,7 @@ message GetAgentResponse { NomadAgent nomad_agent = 16; ValkeyExporter valkey_exporter = 17; RTAMongoDBAgent rta_mongodb_agent = 19; + RTAMySQLAgent rta_mysql_agent = 20; } } @@ -875,6 +904,7 @@ message AddAgentRequest { AddQANPostgreSQLPgStatMonitorAgentParams qan_postgresql_pgstatmonitor_agent = 14; AddValkeyExporterParams valkey_exporter = 15; AddRTAMongoDBAgentParams rta_mongodb_agent = 17; + AddRTAMySQLAgentParams rta_mysql_agent = 18; } } @@ -897,6 +927,7 @@ message AddAgentResponse { QANPostgreSQLPgStatMonitorAgent qan_postgresql_pgstatmonitor_agent = 14; ValkeyExporter valkey_exporter = 15; RTAMongoDBAgent rta_mongodb_agent = 17; + RTAMySQLAgent rta_mysql_agent = 18; } } @@ -923,6 +954,7 @@ message ChangeAgentRequest { ChangeNomadAgentParams nomad_agent = 15; ChangeValkeyExporterParams valkey_exporter = 16; ChangeRTAMongoDBAgentParams rta_mongodb_agent = 18; + ChangeRTAMySQLAgentParams rta_mysql_agent = 19; } } @@ -947,6 +979,7 @@ message ChangeAgentResponse { NomadAgent nomad_agent = 15; ValkeyExporter valkey_exporter = 16; RTAMongoDBAgent rta_mongodb_agent = 18; + RTAMySQLAgent rta_mysql_agent = 19; } } @@ -2081,6 +2114,64 @@ message ChangeRTAMongoDBAgentParams { optional RTAOptions rta_options = 12; } +// Add/Change RTAMySQLAgent + +message AddRTAMySQLAgentParams { + // The pmm-agent identifier which runs this instance. + string pmm_agent_id = 1 [(validate.rules).string.min_len = 1]; + // Service identifier. + string service_id = 2 [(validate.rules).string.min_len = 1]; + // MySQL username for getting queries data. + string username = 3 [(extensions.v1.sensitive) = REDACT_TYPE_FULL]; + // MySQL password for getting queries data. + string password = 4 [(extensions.v1.sensitive) = REDACT_TYPE_FULL]; + // Custom user-assigned labels. + map custom_labels = 5; + // Log level for agent. + LogLevel log_level = 6; + + // MySQL specific options. + // Use TLS for database connections. + bool tls = 7; + // Skip TLS certificate and hostname validation. + bool tls_skip_verify = 8; + // Certificate Authority certificate chain. + string tls_ca = 9; + // Client certificate. + string tls_cert = 10 [(extensions.v1.sensitive) = REDACT_TYPE_FULL]; + // Password for decrypting tls_cert. + string tls_key = 11 [(extensions.v1.sensitive) = REDACT_TYPE_FULL]; + // Skip connection check. + bool skip_connection_check = 12; + // Real-Time Analytics options. + RTAOptions rta_options = 13; +} + +message ChangeRTAMySQLAgentParams { + // Enable this Agent. Agents are enabled by default when they get added. + optional bool enable = 1; + // Replace all custom user-assigned labels. + optional common.StringMap custom_labels = 2; + // Log level for exporter. + optional LogLevel log_level = 3; + // MySQL username for getting queries data. + optional string username = 4 [(extensions.v1.sensitive) = REDACT_TYPE_FULL]; + // MySQL password for getting queries data. + optional string password = 5 [(extensions.v1.sensitive) = REDACT_TYPE_FULL]; + // Use TLS for database connections. + optional bool tls = 6; + // Skip TLS certificate and hostname validation. + optional bool tls_skip_verify = 7; + // Certificate Authority certificate chain. + optional string tls_ca = 8; + // Client certificate. + optional string tls_cert = 9 [(extensions.v1.sensitive) = REDACT_TYPE_FULL]; + // Password for decrypting tls_cert. + optional string tls_key = 10 [(extensions.v1.sensitive) = REDACT_TYPE_FULL]; + // Real-Time Analytics options. + optional RTAOptions rta_options = 11; +} + // Remove message RemoveAgentRequest { diff --git a/api/inventory/v1/agents_grpc.pb.go b/api/inventory/v1/agents_grpc.pb.go index 0b4c6fc63e1..bfb234718bc 100644 --- a/api/inventory/v1/agents_grpc.pb.go +++ b/api/inventory/v1/agents_grpc.pb.go @@ -8,7 +8,6 @@ package inventoryv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -147,23 +146,18 @@ type UnimplementedAgentsServiceServer struct{} func (UnimplementedAgentsServiceServer) ListAgents(context.Context, *ListAgentsRequest) (*ListAgentsResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListAgents not implemented") } - func (UnimplementedAgentsServiceServer) GetAgent(context.Context, *GetAgentRequest) (*GetAgentResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetAgent not implemented") } - func (UnimplementedAgentsServiceServer) GetAgentLogs(context.Context, *GetAgentLogsRequest) (*GetAgentLogsResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetAgentLogs not implemented") } - func (UnimplementedAgentsServiceServer) AddAgent(context.Context, *AddAgentRequest) (*AddAgentResponse, error) { return nil, status.Error(codes.Unimplemented, "method AddAgent not implemented") } - func (UnimplementedAgentsServiceServer) ChangeAgent(context.Context, *ChangeAgentRequest) (*ChangeAgentResponse, error) { return nil, status.Error(codes.Unimplemented, "method ChangeAgent not implemented") } - func (UnimplementedAgentsServiceServer) RemoveAgent(context.Context, *RemoveAgentRequest) (*RemoveAgentResponse, error) { return nil, status.Error(codes.Unimplemented, "method RemoveAgent not implemented") } diff --git a/api/inventory/v1/json/client/agents_service/add_agent_parameters.go b/api/inventory/v1/json/client/agents_service/add_agent_parameters.go index fa5a68ebb91..fcc0a34853a 100644 --- a/api/inventory/v1/json/client/agents_service/add_agent_parameters.go +++ b/api/inventory/v1/json/client/agents_service/add_agent_parameters.go @@ -57,6 +57,7 @@ AddAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddAgentParams struct { + // Body. Body AddAgentBody @@ -126,6 +127,7 @@ func (o *AddAgentParams) SetBody(body AddAgentBody) { // WriteToRequest writes these params to a swagger request func (o *AddAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/add_agent_responses.go b/api/inventory/v1/json/client/agents_service/add_agent_responses.go index ea0b289313f..6c96804d276 100644 --- a/api/inventory/v1/json/client/agents_service/add_agent_responses.go +++ b/api/inventory/v1/json/client/agents_service/add_agent_responses.go @@ -102,6 +102,7 @@ func (o *AddAgentOK) GetPayload() *AddAgentOKBody { } func (o *AddAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddAgentOKBody) // response payload @@ -175,6 +176,7 @@ func (o *AddAgentDefault) GetPayload() *AddAgentDefaultBody { } func (o *AddAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddAgentDefaultBody) // response payload @@ -190,6 +192,7 @@ AddAgentBody add agent body swagger:model AddAgentBody */ type AddAgentBody struct { + // azure database exporter AzureDatabaseExporter *AddAgentParamsBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -238,6 +241,9 @@ type AddAgentBody struct { // rta mongodb agent RtaMongodbAgent *AddAgentParamsBodyRtaMongodbAgent `json:"rta_mongodb_agent,omitempty"` + // rta mysql agent + RtaMysqlAgent *AddAgentParamsBodyRtaMysqlAgent `json:"rta_mysql_agent,omitempty"` + // valkey exporter ValkeyExporter *AddAgentParamsBodyValkeyExporter `json:"valkey_exporter,omitempty"` } @@ -310,6 +316,10 @@ func (o *AddAgentBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateRtaMysqlAgent(formats); err != nil { + res = append(res, err) + } + if err := o.validateValkeyExporter(formats); err != nil { res = append(res, err) } @@ -688,6 +698,29 @@ func (o *AddAgentBody) validateRtaMongodbAgent(formats strfmt.Registry) error { return nil } +func (o *AddAgentBody) validateRtaMysqlAgent(formats strfmt.Registry) error { + if swag.IsZero(o.RtaMysqlAgent) { // not required + return nil + } + + if o.RtaMysqlAgent != nil { + if err := o.RtaMysqlAgent.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("body" + "." + "rta_mysql_agent") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("body" + "." + "rta_mysql_agent") + } + + return err + } + } + + return nil +} + func (o *AddAgentBody) validateValkeyExporter(formats strfmt.Registry) error { if swag.IsZero(o.ValkeyExporter) { // not required return nil @@ -779,6 +812,10 @@ func (o *AddAgentBody) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } + if err := o.contextValidateRtaMysqlAgent(ctx, formats); err != nil { + res = append(res, err) + } + if err := o.contextValidateValkeyExporter(ctx, formats); err != nil { res = append(res, err) } @@ -790,6 +827,7 @@ func (o *AddAgentBody) ContextValidate(ctx context.Context, formats strfmt.Regis } func (o *AddAgentBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -814,6 +852,7 @@ func (o *AddAgentBody) contextValidateAzureDatabaseExporter(ctx context.Context, } func (o *AddAgentBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -838,6 +877,7 @@ func (o *AddAgentBody) contextValidateExternalExporter(ctx context.Context, form } func (o *AddAgentBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -862,6 +902,7 @@ func (o *AddAgentBody) contextValidateMongodbExporter(ctx context.Context, forma } func (o *AddAgentBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -886,6 +927,7 @@ func (o *AddAgentBody) contextValidateMysqldExporter(ctx context.Context, format } func (o *AddAgentBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -910,6 +952,7 @@ func (o *AddAgentBody) contextValidateNodeExporter(ctx context.Context, formats } func (o *AddAgentBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { + if o.PMMAgent != nil { if swag.IsZero(o.PMMAgent) { // not required @@ -934,6 +977,7 @@ func (o *AddAgentBody) contextValidatePMMAgent(ctx context.Context, formats strf } func (o *AddAgentBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -958,6 +1002,7 @@ func (o *AddAgentBody) contextValidatePostgresExporter(ctx context.Context, form } func (o *AddAgentBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -982,6 +1027,7 @@ func (o *AddAgentBody) contextValidateProxysqlExporter(ctx context.Context, form } func (o *AddAgentBody) contextValidateQANMongodbMongologAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbMongologAgent != nil { if swag.IsZero(o.QANMongodbMongologAgent) { // not required @@ -1006,6 +1052,7 @@ func (o *AddAgentBody) contextValidateQANMongodbMongologAgent(ctx context.Contex } func (o *AddAgentBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -1030,6 +1077,7 @@ func (o *AddAgentBody) contextValidateQANMongodbProfilerAgent(ctx context.Contex } func (o *AddAgentBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -1054,6 +1102,7 @@ func (o *AddAgentBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Contex } func (o *AddAgentBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -1078,6 +1127,7 @@ func (o *AddAgentBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, } func (o *AddAgentBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -1102,6 +1152,7 @@ func (o *AddAgentBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context } func (o *AddAgentBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -1126,6 +1177,7 @@ func (o *AddAgentBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx contex } func (o *AddAgentBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -1150,6 +1202,7 @@ func (o *AddAgentBody) contextValidateRDSExporter(ctx context.Context, formats s } func (o *AddAgentBody) contextValidateRtaMongodbAgent(ctx context.Context, formats strfmt.Registry) error { + if o.RtaMongodbAgent != nil { if swag.IsZero(o.RtaMongodbAgent) { // not required @@ -1173,7 +1226,33 @@ func (o *AddAgentBody) contextValidateRtaMongodbAgent(ctx context.Context, forma return nil } +func (o *AddAgentBody) contextValidateRtaMysqlAgent(ctx context.Context, formats strfmt.Registry) error { + + if o.RtaMysqlAgent != nil { + + if swag.IsZero(o.RtaMysqlAgent) { // not required + return nil + } + + if err := o.RtaMysqlAgent.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("body" + "." + "rta_mysql_agent") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("body" + "." + "rta_mysql_agent") + } + + return err + } + } + + return nil +} + func (o *AddAgentBody) contextValidateValkeyExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ValkeyExporter != nil { if swag.IsZero(o.ValkeyExporter) { // not required @@ -1220,6 +1299,7 @@ AddAgentDefaultBody add agent default body swagger:model AddAgentDefaultBody */ type AddAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -1289,7 +1369,9 @@ func (o *AddAgentDefaultBody) ContextValidate(ctx context.Context, formats strfm } func (o *AddAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -1309,6 +1391,7 @@ func (o *AddAgentDefaultBody) contextValidateDetails(ctx context.Context, format return err } } + } return nil @@ -1337,6 +1420,7 @@ AddAgentDefaultBodyDetailsItems0 add agent default body details items0 swagger:model AddAgentDefaultBodyDetailsItems0 */ type AddAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -1348,6 +1432,7 @@ type AddAgentDefaultBodyDetailsItems0 struct { func (o *AddAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -1385,6 +1470,7 @@ func (o *AddAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AddAgentDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -1448,6 +1534,7 @@ AddAgentOKBody add agent OK body swagger:model AddAgentOKBody */ type AddAgentOKBody struct { + // azure database exporter AzureDatabaseExporter *AddAgentOKBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -1496,6 +1583,9 @@ type AddAgentOKBody struct { // rta mongodb agent RtaMongodbAgent *AddAgentOKBodyRtaMongodbAgent `json:"rta_mongodb_agent,omitempty"` + // rta mysql agent + RtaMysqlAgent *AddAgentOKBodyRtaMysqlAgent `json:"rta_mysql_agent,omitempty"` + // valkey exporter ValkeyExporter *AddAgentOKBodyValkeyExporter `json:"valkey_exporter,omitempty"` } @@ -1568,6 +1658,10 @@ func (o *AddAgentOKBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateRtaMysqlAgent(formats); err != nil { + res = append(res, err) + } + if err := o.validateValkeyExporter(formats); err != nil { res = append(res, err) } @@ -1946,6 +2040,29 @@ func (o *AddAgentOKBody) validateRtaMongodbAgent(formats strfmt.Registry) error return nil } +func (o *AddAgentOKBody) validateRtaMysqlAgent(formats strfmt.Registry) error { + if swag.IsZero(o.RtaMysqlAgent) { // not required + return nil + } + + if o.RtaMysqlAgent != nil { + if err := o.RtaMysqlAgent.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("addAgentOk" + "." + "rta_mysql_agent") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("addAgentOk" + "." + "rta_mysql_agent") + } + + return err + } + } + + return nil +} + func (o *AddAgentOKBody) validateValkeyExporter(formats strfmt.Registry) error { if swag.IsZero(o.ValkeyExporter) { // not required return nil @@ -2037,6 +2154,10 @@ func (o *AddAgentOKBody) ContextValidate(ctx context.Context, formats strfmt.Reg res = append(res, err) } + if err := o.contextValidateRtaMysqlAgent(ctx, formats); err != nil { + res = append(res, err) + } + if err := o.contextValidateValkeyExporter(ctx, formats); err != nil { res = append(res, err) } @@ -2048,6 +2169,7 @@ func (o *AddAgentOKBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -2072,6 +2194,7 @@ func (o *AddAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Contex } func (o *AddAgentOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -2096,6 +2219,7 @@ func (o *AddAgentOKBody) contextValidateExternalExporter(ctx context.Context, fo } func (o *AddAgentOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -2120,6 +2244,7 @@ func (o *AddAgentOKBody) contextValidateMongodbExporter(ctx context.Context, for } func (o *AddAgentOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -2144,6 +2269,7 @@ func (o *AddAgentOKBody) contextValidateMysqldExporter(ctx context.Context, form } func (o *AddAgentOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -2168,6 +2294,7 @@ func (o *AddAgentOKBody) contextValidateNodeExporter(ctx context.Context, format } func (o *AddAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { + if o.PMMAgent != nil { if swag.IsZero(o.PMMAgent) { // not required @@ -2192,6 +2319,7 @@ func (o *AddAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats st } func (o *AddAgentOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -2216,6 +2344,7 @@ func (o *AddAgentOKBody) contextValidatePostgresExporter(ctx context.Context, fo } func (o *AddAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -2240,6 +2369,7 @@ func (o *AddAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, fo } func (o *AddAgentOKBody) contextValidateQANMongodbMongologAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbMongologAgent != nil { if swag.IsZero(o.QANMongodbMongologAgent) { // not required @@ -2264,6 +2394,7 @@ func (o *AddAgentOKBody) contextValidateQANMongodbMongologAgent(ctx context.Cont } func (o *AddAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -2288,6 +2419,7 @@ func (o *AddAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Cont } func (o *AddAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -2312,6 +2444,7 @@ func (o *AddAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Cont } func (o *AddAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -2336,6 +2469,7 @@ func (o *AddAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context } func (o *AddAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -2360,6 +2494,7 @@ func (o *AddAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx conte } func (o *AddAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -2384,6 +2519,7 @@ func (o *AddAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx cont } func (o *AddAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -2408,6 +2544,7 @@ func (o *AddAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats } func (o *AddAgentOKBody) contextValidateRtaMongodbAgent(ctx context.Context, formats strfmt.Registry) error { + if o.RtaMongodbAgent != nil { if swag.IsZero(o.RtaMongodbAgent) { // not required @@ -2431,7 +2568,33 @@ func (o *AddAgentOKBody) contextValidateRtaMongodbAgent(ctx context.Context, for return nil } +func (o *AddAgentOKBody) contextValidateRtaMysqlAgent(ctx context.Context, formats strfmt.Registry) error { + + if o.RtaMysqlAgent != nil { + + if swag.IsZero(o.RtaMysqlAgent) { // not required + return nil + } + + if err := o.RtaMysqlAgent.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("addAgentOk" + "." + "rta_mysql_agent") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("addAgentOk" + "." + "rta_mysql_agent") + } + + return err + } + } + + return nil +} + func (o *AddAgentOKBody) contextValidateValkeyExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ValkeyExporter != nil { if swag.IsZero(o.ValkeyExporter) { // not required @@ -2478,6 +2641,7 @@ AddAgentOKBodyAzureDatabaseExporter AzureDatabaseExporter runs on Generic or Con swagger:model AddAgentOKBodyAzureDatabaseExporter */ type AddAgentOKBodyAzureDatabaseExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2704,6 +2868,7 @@ func (o *AddAgentOKBodyAzureDatabaseExporter) ContextValidate(ctx context.Contex } func (o *AddAgentOKBodyAzureDatabaseExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2750,6 +2915,7 @@ AddAgentOKBodyAzureDatabaseExporterMetricsResolutions MetricsResolutions represe swagger:model AddAgentOKBodyAzureDatabaseExporterMetricsResolutions */ type AddAgentOKBodyAzureDatabaseExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2793,6 +2959,7 @@ AddAgentOKBodyExternalExporter ExternalExporter runs on any Node type, including swagger:model AddAgentOKBodyExternalExporter */ type AddAgentOKBodyExternalExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2961,6 +3128,7 @@ func (o *AddAgentOKBodyExternalExporter) ContextValidate(ctx context.Context, fo } func (o *AddAgentOKBodyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3007,6 +3175,7 @@ AddAgentOKBodyExternalExporterMetricsResolutions MetricsResolutions represents P swagger:model AddAgentOKBodyExternalExporterMetricsResolutions */ type AddAgentOKBodyExternalExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3050,6 +3219,7 @@ AddAgentOKBodyMongodbExporter MongoDBExporter runs on Generic or Container Node swagger:model AddAgentOKBodyMongodbExporter */ type AddAgentOKBodyMongodbExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3301,6 +3471,7 @@ func (o *AddAgentOKBodyMongodbExporter) ContextValidate(ctx context.Context, for } func (o *AddAgentOKBodyMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3347,6 +3518,7 @@ AddAgentOKBodyMongodbExporterMetricsResolutions MetricsResolutions represents Pr swagger:model AddAgentOKBodyMongodbExporterMetricsResolutions */ type AddAgentOKBodyMongodbExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3390,6 +3562,7 @@ AddAgentOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node an swagger:model AddAgentOKBodyMysqldExporter */ type AddAgentOKBodyMysqldExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3651,6 +3824,7 @@ func (o *AddAgentOKBodyMysqldExporter) ContextValidate(ctx context.Context, form } func (o *AddAgentOKBodyMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3697,6 +3871,7 @@ AddAgentOKBodyMysqldExporterMetricsResolutions MetricsResolutions represents Pro swagger:model AddAgentOKBodyMysqldExporterMetricsResolutions */ type AddAgentOKBodyMysqldExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3740,6 +3915,7 @@ AddAgentOKBodyNodeExporter NodeExporter runs on Generic or Container Node and ex swagger:model AddAgentOKBodyNodeExporter */ type AddAgentOKBodyNodeExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3963,6 +4139,7 @@ func (o *AddAgentOKBodyNodeExporter) ContextValidate(ctx context.Context, format } func (o *AddAgentOKBodyNodeExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4009,6 +4186,7 @@ AddAgentOKBodyNodeExporterMetricsResolutions MetricsResolutions represents Prome swagger:model AddAgentOKBodyNodeExporterMetricsResolutions */ type AddAgentOKBodyNodeExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4052,6 +4230,7 @@ AddAgentOKBodyPMMAgent PMMAgent runs on Generic or Container Node. swagger:model AddAgentOKBodyPMMAgent */ type AddAgentOKBodyPMMAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4101,6 +4280,7 @@ AddAgentOKBodyPostgresExporter PostgresExporter runs on Generic or Container Nod swagger:model AddAgentOKBodyPostgresExporter */ type AddAgentOKBodyPostgresExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4345,6 +4525,7 @@ func (o *AddAgentOKBodyPostgresExporter) ContextValidate(ctx context.Context, fo } func (o *AddAgentOKBodyPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4391,6 +4572,7 @@ AddAgentOKBodyPostgresExporterMetricsResolutions MetricsResolutions represents P swagger:model AddAgentOKBodyPostgresExporterMetricsResolutions */ type AddAgentOKBodyPostgresExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4434,6 +4616,7 @@ AddAgentOKBodyProxysqlExporter ProxySQLExporter runs on Generic or Container Nod swagger:model AddAgentOKBodyProxysqlExporter */ type AddAgentOKBodyProxysqlExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4672,6 +4855,7 @@ func (o *AddAgentOKBodyProxysqlExporter) ContextValidate(ctx context.Context, fo } func (o *AddAgentOKBodyProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4718,6 +4902,7 @@ AddAgentOKBodyProxysqlExporterMetricsResolutions MetricsResolutions represents P swagger:model AddAgentOKBodyProxysqlExporterMetricsResolutions */ type AddAgentOKBodyProxysqlExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4761,6 +4946,7 @@ AddAgentOKBodyQANMongodbMongologAgent QANMongoDBMongologAgent runs within pmm-ag swagger:model AddAgentOKBodyQANMongodbMongologAgent */ type AddAgentOKBodyQANMongodbMongologAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4970,6 +5156,7 @@ AddAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent runs within pmm-ag swagger:model AddAgentOKBodyQANMongodbProfilerAgent */ type AddAgentOKBodyQANMongodbProfilerAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5179,6 +5366,7 @@ AddAgentOKBodyQANMysqlPerfschemaAgent QANMySQLPerfSchemaAgent runs within pmm-ag swagger:model AddAgentOKBodyQANMysqlPerfschemaAgent */ type AddAgentOKBodyQANMysqlPerfschemaAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5406,6 +5594,7 @@ AddAgentOKBodyQANMysqlSlowlogAgent QANMySQLSlowlogAgent runs within pmm-agent an swagger:model AddAgentOKBodyQANMysqlSlowlogAgent */ type AddAgentOKBodyQANMysqlSlowlogAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5636,6 +5825,7 @@ AddAgentOKBodyQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatementsAgent runs swagger:model AddAgentOKBodyQANPostgresqlPgstatementsAgent */ type AddAgentOKBodyQANPostgresqlPgstatementsAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5848,6 +6038,7 @@ AddAgentOKBodyQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMonitorAgent ru swagger:model AddAgentOKBodyQANPostgresqlPgstatmonitorAgent */ type AddAgentOKBodyQANPostgresqlPgstatmonitorAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6063,6 +6254,7 @@ AddAgentOKBodyRDSExporter RDSExporter runs on Generic or Container Node and expo swagger:model AddAgentOKBodyRDSExporter */ type AddAgentOKBodyRDSExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6295,6 +6487,7 @@ func (o *AddAgentOKBodyRDSExporter) ContextValidate(ctx context.Context, formats } func (o *AddAgentOKBodyRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6341,6 +6534,7 @@ AddAgentOKBodyRDSExporterMetricsResolutions MetricsResolutions represents Promet swagger:model AddAgentOKBodyRDSExporterMetricsResolutions */ type AddAgentOKBodyRDSExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6384,6 +6578,7 @@ AddAgentOKBodyRtaMongodbAgent RTAMongoDBAgent runs within pmm-agent and sends Mo swagger:model AddAgentOKBodyRtaMongodbAgent */ type AddAgentOKBodyRtaMongodbAgent struct { + // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -6604,6 +6799,7 @@ func (o *AddAgentOKBodyRtaMongodbAgent) ContextValidate(ctx context.Context, for } func (o *AddAgentOKBodyRtaMongodbAgent) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + if o.RtaOptions != nil { if swag.IsZero(o.RtaOptions) { // not required @@ -6650,6 +6846,7 @@ AddAgentOKBodyRtaMongodbAgentRtaOptions RTAOptions holds Real-Time Query Analyti swagger:model AddAgentOKBodyRtaMongodbAgentRtaOptions */ type AddAgentOKBodyRtaMongodbAgentRtaOptions struct { + // Query collect interval (default 2s is set by server). CollectInterval string `json:"collect_interval,omitempty"` } @@ -6683,11 +6880,12 @@ func (o *AddAgentOKBodyRtaMongodbAgentRtaOptions) UnmarshalBinary(b []byte) erro } /* -AddAgentOKBodyValkeyExporter ValkeyExporter runs on Generic or Container Node and exposes Valkey Service metrics. -swagger:model AddAgentOKBodyValkeyExporter +AddAgentOKBodyRtaMysqlAgent RTAMySQLAgent runs within pmm-agent and sends MySQL Real-Time Query Analytics data to the PMM Server. +swagger:model AddAgentOKBodyRtaMysqlAgent */ -type AddAgentOKBodyValkeyExporter struct { - // Unique randomly generated instance identifier. +type AddAgentOKBodyRtaMysqlAgent struct { + + // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` // The pmm-agent identifier which runs this instance. @@ -6699,24 +6897,18 @@ type AddAgentOKBodyValkeyExporter struct { // Service identifier. ServiceID string `json:"service_id,omitempty"` - // Valkey username for scraping metrics. + // MySQL username for getting the currently running queries. Username string `json:"username,omitempty"` // Use TLS for database connections. TLS bool `json:"tls,omitempty"` - // Skip TLS certificate and hostname verification. + // Skip TLS certificate and hostname validation. TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` // Custom user-assigned labels. CustomLabels map[string]string `json:"custom_labels,omitempty"` - // True if exporter uses push metrics mode. - PushMetricsEnabled bool `json:"push_metrics_enabled,omitempty"` - - // List of disabled collector names. - DisabledCollectors []string `json:"disabled_collectors"` - // AgentStatus represents actual Agent status. // // - AGENT_STATUS_STARTING: Agent is starting. @@ -6729,31 +6921,29 @@ type AddAgentOKBodyValkeyExporter struct { // Enum: ["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_INITIALIZATION_ERROR","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"] Status *string `json:"status,omitempty"` - // Listen port for scraping metrics. - ListenPort int64 `json:"listen_port,omitempty"` - - // Path to exec process. - ProcessExecPath string `json:"process_exec_path,omitempty"` - - // Optionally expose the exporter process on all public interfaces - ExposeExporter bool `json:"expose_exporter,omitempty"` - - // Connection timeout for exporter (if set). - ConnectionTimeout string `json:"connection_timeout,omitempty"` + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: ["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"] + LogLevel *string `json:"log_level,omitempty"` - // metrics resolutions - MetricsResolutions *AddAgentOKBodyValkeyExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` + // rta options + RtaOptions *AddAgentOKBodyRtaMysqlAgentRtaOptions `json:"rta_options,omitempty"` } -// Validate validates this add agent OK body valkey exporter -func (o *AddAgentOKBodyValkeyExporter) Validate(formats strfmt.Registry) error { +// Validate validates this add agent OK body rta mysql agent +func (o *AddAgentOKBodyRtaMysqlAgent) Validate(formats strfmt.Registry) error { var res []error if err := o.validateStatus(formats); err != nil { res = append(res, err) } - if err := o.validateMetricsResolutions(formats); err != nil { + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + + if err := o.validateRtaOptions(formats); err != nil { res = append(res, err) } @@ -6763,7 +6953,7 @@ func (o *AddAgentOKBodyValkeyExporter) Validate(formats strfmt.Registry) error { return nil } -var addAgentOkBodyValkeyExporterTypeStatusPropEnum []any +var addAgentOkBodyRtaMysqlAgentTypeStatusPropEnum []any func init() { var res []string @@ -6771,80 +6961,394 @@ func init() { panic(err) } for _, v := range res { - addAgentOkBodyValkeyExporterTypeStatusPropEnum = append(addAgentOkBodyValkeyExporterTypeStatusPropEnum, v) + addAgentOkBodyRtaMysqlAgentTypeStatusPropEnum = append(addAgentOkBodyRtaMysqlAgentTypeStatusPropEnum, v) } } const ( - // AddAgentOKBodyValkeyExporterStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" - AddAgentOKBodyValkeyExporterStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + // AddAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + AddAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" - // AddAgentOKBodyValkeyExporterStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" - AddAgentOKBodyValkeyExporterStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + // AddAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + AddAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" - // AddAgentOKBodyValkeyExporterStatusAGENTSTATUSINITIALIZATIONERROR captures enum value "AGENT_STATUS_INITIALIZATION_ERROR" - AddAgentOKBodyValkeyExporterStatusAGENTSTATUSINITIALIZATIONERROR string = "AGENT_STATUS_INITIALIZATION_ERROR" + // AddAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSINITIALIZATIONERROR captures enum value "AGENT_STATUS_INITIALIZATION_ERROR" + AddAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSINITIALIZATIONERROR string = "AGENT_STATUS_INITIALIZATION_ERROR" - // AddAgentOKBodyValkeyExporterStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" - AddAgentOKBodyValkeyExporterStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + // AddAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + AddAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" - // AddAgentOKBodyValkeyExporterStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" - AddAgentOKBodyValkeyExporterStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + // AddAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + AddAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" - // AddAgentOKBodyValkeyExporterStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" - AddAgentOKBodyValkeyExporterStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + // AddAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + AddAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" - // AddAgentOKBodyValkeyExporterStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" - AddAgentOKBodyValkeyExporterStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + // AddAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + AddAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" - // AddAgentOKBodyValkeyExporterStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" - AddAgentOKBodyValkeyExporterStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" + // AddAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + AddAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" ) // prop value enum -func (o *AddAgentOKBodyValkeyExporter) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addAgentOkBodyValkeyExporterTypeStatusPropEnum, true); err != nil { +func (o *AddAgentOKBodyRtaMysqlAgent) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addAgentOkBodyRtaMysqlAgentTypeStatusPropEnum, true); err != nil { return err } return nil } -func (o *AddAgentOKBodyValkeyExporter) validateStatus(formats strfmt.Registry) error { +func (o *AddAgentOKBodyRtaMysqlAgent) validateStatus(formats strfmt.Registry) error { if swag.IsZero(o.Status) { // not required return nil } // value enum - if err := o.validateStatusEnum("addAgentOk"+"."+"valkey_exporter"+"."+"status", "body", *o.Status); err != nil { + if err := o.validateStatusEnum("addAgentOk"+"."+"rta_mysql_agent"+"."+"status", "body", *o.Status); err != nil { return err } return nil } -func (o *AddAgentOKBodyValkeyExporter) validateMetricsResolutions(formats strfmt.Registry) error { - if swag.IsZero(o.MetricsResolutions) { // not required - return nil +var addAgentOkBodyRtaMysqlAgentTypeLogLevelPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addAgentOkBodyRtaMysqlAgentTypeLogLevelPropEnum = append(addAgentOkBodyRtaMysqlAgentTypeLogLevelPropEnum, v) } +} - if o.MetricsResolutions != nil { - if err := o.MetricsResolutions.Validate(formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("addAgentOk" + "." + "valkey_exporter" + "." + "metrics_resolutions") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("addAgentOk" + "." + "valkey_exporter" + "." + "metrics_resolutions") - } +const ( - return err - } - } + // AddAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + AddAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - return nil -} + // AddAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + AddAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // AddAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + AddAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // AddAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + AddAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // AddAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + AddAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // AddAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + AddAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *AddAgentOKBodyRtaMysqlAgent) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addAgentOkBodyRtaMysqlAgentTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddAgentOKBodyRtaMysqlAgent) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("addAgentOk"+"."+"rta_mysql_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +func (o *AddAgentOKBodyRtaMysqlAgent) validateRtaOptions(formats strfmt.Registry) error { + if swag.IsZero(o.RtaOptions) { // not required + return nil + } + + if o.RtaOptions != nil { + if err := o.RtaOptions.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("addAgentOk" + "." + "rta_mysql_agent" + "." + "rta_options") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("addAgentOk" + "." + "rta_mysql_agent" + "." + "rta_options") + } + + return err + } + } + + return nil +} + +// ContextValidate validate this add agent OK body rta mysql agent based on the context it is used +func (o *AddAgentOKBodyRtaMysqlAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateRtaOptions(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddAgentOKBodyRtaMysqlAgent) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + + if o.RtaOptions != nil { + + if swag.IsZero(o.RtaOptions) { // not required + return nil + } + + if err := o.RtaOptions.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("addAgentOk" + "." + "rta_mysql_agent" + "." + "rta_options") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("addAgentOk" + "." + "rta_mysql_agent" + "." + "rta_options") + } + + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *AddAgentOKBodyRtaMysqlAgent) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddAgentOKBodyRtaMysqlAgent) UnmarshalBinary(b []byte) error { + var res AddAgentOKBodyRtaMysqlAgent + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddAgentOKBodyRtaMysqlAgentRtaOptions RTAOptions holds Real-Time Query Analytics agent options. +swagger:model AddAgentOKBodyRtaMysqlAgentRtaOptions +*/ +type AddAgentOKBodyRtaMysqlAgentRtaOptions struct { + + // Query collect interval (default 2s is set by server). + CollectInterval string `json:"collect_interval,omitempty"` +} + +// Validate validates this add agent OK body rta mysql agent rta options +func (o *AddAgentOKBodyRtaMysqlAgentRtaOptions) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this add agent OK body rta mysql agent rta options based on context it is used +func (o *AddAgentOKBodyRtaMysqlAgentRtaOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddAgentOKBodyRtaMysqlAgentRtaOptions) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddAgentOKBodyRtaMysqlAgentRtaOptions) UnmarshalBinary(b []byte) error { + var res AddAgentOKBodyRtaMysqlAgentRtaOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddAgentOKBodyValkeyExporter ValkeyExporter runs on Generic or Container Node and exposes Valkey Service metrics. +swagger:model AddAgentOKBodyValkeyExporter +*/ +type AddAgentOKBodyValkeyExporter struct { + + // Unique randomly generated instance identifier. + AgentID string `json:"agent_id,omitempty"` + + // The pmm-agent identifier which runs this instance. + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // Desired Agent status: enabled (false) or disabled (true). + Disabled bool `json:"disabled,omitempty"` + + // Service identifier. + ServiceID string `json:"service_id,omitempty"` + + // Valkey username for scraping metrics. + Username string `json:"username,omitempty"` + + // Use TLS for database connections. + TLS bool `json:"tls,omitempty"` + + // Skip TLS certificate and hostname verification. + TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // True if exporter uses push metrics mode. + PushMetricsEnabled bool `json:"push_metrics_enabled,omitempty"` + + // List of disabled collector names. + DisabledCollectors []string `json:"disabled_collectors"` + + // AgentStatus represents actual Agent status. + // + // - AGENT_STATUS_STARTING: Agent is starting. + // - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when starting. + // - AGENT_STATUS_RUNNING: Agent is running. + // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. + // - AGENT_STATUS_STOPPING: Agent is stopping. + // - AGENT_STATUS_DONE: Agent has been stopped or disabled. + // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. + // Enum: ["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_INITIALIZATION_ERROR","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"] + Status *string `json:"status,omitempty"` + + // Listen port for scraping metrics. + ListenPort int64 `json:"listen_port,omitempty"` + + // Path to exec process. + ProcessExecPath string `json:"process_exec_path,omitempty"` + + // Optionally expose the exporter process on all public interfaces + ExposeExporter bool `json:"expose_exporter,omitempty"` + + // Connection timeout for exporter (if set). + ConnectionTimeout string `json:"connection_timeout,omitempty"` + + // metrics resolutions + MetricsResolutions *AddAgentOKBodyValkeyExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` +} + +// Validate validates this add agent OK body valkey exporter +func (o *AddAgentOKBodyValkeyExporter) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := o.validateMetricsResolutions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addAgentOkBodyValkeyExporterTypeStatusPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_INITIALIZATION_ERROR","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addAgentOkBodyValkeyExporterTypeStatusPropEnum = append(addAgentOkBodyValkeyExporterTypeStatusPropEnum, v) + } +} + +const ( + + // AddAgentOKBodyValkeyExporterStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + AddAgentOKBodyValkeyExporterStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // AddAgentOKBodyValkeyExporterStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + AddAgentOKBodyValkeyExporterStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // AddAgentOKBodyValkeyExporterStatusAGENTSTATUSINITIALIZATIONERROR captures enum value "AGENT_STATUS_INITIALIZATION_ERROR" + AddAgentOKBodyValkeyExporterStatusAGENTSTATUSINITIALIZATIONERROR string = "AGENT_STATUS_INITIALIZATION_ERROR" + + // AddAgentOKBodyValkeyExporterStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + AddAgentOKBodyValkeyExporterStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // AddAgentOKBodyValkeyExporterStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + AddAgentOKBodyValkeyExporterStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // AddAgentOKBodyValkeyExporterStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + AddAgentOKBodyValkeyExporterStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // AddAgentOKBodyValkeyExporterStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + AddAgentOKBodyValkeyExporterStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // AddAgentOKBodyValkeyExporterStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + AddAgentOKBodyValkeyExporterStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *AddAgentOKBodyValkeyExporter) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addAgentOkBodyValkeyExporterTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddAgentOKBodyValkeyExporter) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("addAgentOk"+"."+"valkey_exporter"+"."+"status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +func (o *AddAgentOKBodyValkeyExporter) validateMetricsResolutions(formats strfmt.Registry) error { + if swag.IsZero(o.MetricsResolutions) { // not required + return nil + } + + if o.MetricsResolutions != nil { + if err := o.MetricsResolutions.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("addAgentOk" + "." + "valkey_exporter" + "." + "metrics_resolutions") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("addAgentOk" + "." + "valkey_exporter" + "." + "metrics_resolutions") + } + + return err + } + } + + return nil +} // ContextValidate validate this add agent OK body valkey exporter based on the context it is used func (o *AddAgentOKBodyValkeyExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { @@ -6861,6 +7365,7 @@ func (o *AddAgentOKBodyValkeyExporter) ContextValidate(ctx context.Context, form } func (o *AddAgentOKBodyValkeyExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6907,6 +7412,7 @@ AddAgentOKBodyValkeyExporterMetricsResolutions MetricsResolutions represents Pro swagger:model AddAgentOKBodyValkeyExporterMetricsResolutions */ type AddAgentOKBodyValkeyExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6950,6 +7456,7 @@ AddAgentParamsBodyAzureDatabaseExporter add agent params body azure database exp swagger:model AddAgentParamsBodyAzureDatabaseExporter */ type AddAgentParamsBodyAzureDatabaseExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -7086,6 +7593,7 @@ AddAgentParamsBodyExternalExporter add agent params body external exporter swagger:model AddAgentParamsBodyExternalExporter */ type AddAgentParamsBodyExternalExporter struct { + // The node identifier where this instance is run. RunsOnNodeID string `json:"runs_on_node_id,omitempty"` @@ -7150,6 +7658,7 @@ AddAgentParamsBodyMongodbExporter add agent params body mongodb exporter swagger:model AddAgentParamsBodyMongodbExporter */ type AddAgentParamsBodyMongodbExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -7323,6 +7832,7 @@ AddAgentParamsBodyMysqldExporter add agent params body mysqld exporter swagger:model AddAgentParamsBodyMysqldExporter */ type AddAgentParamsBodyMysqldExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -7482,6 +7992,7 @@ AddAgentParamsBodyNodeExporter add agent params body node exporter swagger:model AddAgentParamsBodyNodeExporter */ type AddAgentParamsBodyNodeExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -7600,6 +8111,7 @@ AddAgentParamsBodyPMMAgent add agent params body PMM agent swagger:model AddAgentParamsBodyPMMAgent */ type AddAgentParamsBodyPMMAgent struct { + // Node identifier where this instance runs. RunsOnNodeID string `json:"runs_on_node_id,omitempty"` @@ -7640,6 +8152,7 @@ AddAgentParamsBodyPostgresExporter add agent params body postgres exporter swagger:model AddAgentParamsBodyPostgresExporter */ type AddAgentParamsBodyPostgresExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -7797,6 +8310,7 @@ AddAgentParamsBodyProxysqlExporter add agent params body proxysql exporter swagger:model AddAgentParamsBodyProxysqlExporter */ type AddAgentParamsBodyProxysqlExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -7939,6 +8453,7 @@ AddAgentParamsBodyQANMongodbMongologAgent add agent params body QAN mongodb mong swagger:model AddAgentParamsBodyQANMongodbMongologAgent */ type AddAgentParamsBodyQANMongodbMongologAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -8086,6 +8601,7 @@ AddAgentParamsBodyQANMongodbProfilerAgent add agent params body QAN mongodb prof swagger:model AddAgentParamsBodyQANMongodbProfilerAgent */ type AddAgentParamsBodyQANMongodbProfilerAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -8233,6 +8749,7 @@ AddAgentParamsBodyQANMysqlPerfschemaAgent add agent params body QAN mysql perfsc swagger:model AddAgentParamsBodyQANMysqlPerfschemaAgent */ type AddAgentParamsBodyQANMysqlPerfschemaAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -8381,6 +8898,7 @@ AddAgentParamsBodyQANMysqlSlowlogAgent add agent params body QAN mysql slowlog a swagger:model AddAgentParamsBodyQANMysqlSlowlogAgent */ type AddAgentParamsBodyQANMysqlSlowlogAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -8533,6 +9051,7 @@ AddAgentParamsBodyQANPostgresqlPgstatementsAgent add agent params body QAN postg swagger:model AddAgentParamsBodyQANPostgresqlPgstatementsAgent */ type AddAgentParamsBodyQANPostgresqlPgstatementsAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -8675,6 +9194,7 @@ AddAgentParamsBodyQANPostgresqlPgstatmonitorAgent add agent params body QAN post swagger:model AddAgentParamsBodyQANPostgresqlPgstatmonitorAgent */ type AddAgentParamsBodyQANPostgresqlPgstatmonitorAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -8820,6 +9340,7 @@ AddAgentParamsBodyRDSExporter add agent params body RDS exporter swagger:model AddAgentParamsBodyRDSExporter */ type AddAgentParamsBodyRDSExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -8950,6 +9471,7 @@ AddAgentParamsBodyRtaMongodbAgent add agent params body rta mongodb agent swagger:model AddAgentParamsBodyRtaMongodbAgent */ type AddAgentParamsBodyRtaMongodbAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -9109,6 +9631,7 @@ func (o *AddAgentParamsBodyRtaMongodbAgent) ContextValidate(ctx context.Context, } func (o *AddAgentParamsBodyRtaMongodbAgent) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + if o.RtaOptions != nil { if swag.IsZero(o.RtaOptions) { // not required @@ -9155,6 +9678,7 @@ AddAgentParamsBodyRtaMongodbAgentRtaOptions RTAOptions holds Real-Time Query Ana swagger:model AddAgentParamsBodyRtaMongodbAgentRtaOptions */ type AddAgentParamsBodyRtaMongodbAgentRtaOptions struct { + // Query collect interval (default 2s is set by server). CollectInterval string `json:"collect_interval,omitempty"` } @@ -9187,11 +9711,252 @@ func (o *AddAgentParamsBodyRtaMongodbAgentRtaOptions) UnmarshalBinary(b []byte) return nil } +/* +AddAgentParamsBodyRtaMysqlAgent add agent params body rta mysql agent +swagger:model AddAgentParamsBodyRtaMysqlAgent +*/ +type AddAgentParamsBodyRtaMysqlAgent struct { + + // The pmm-agent identifier which runs this instance. + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // Service identifier. + ServiceID string `json:"service_id,omitempty"` + + // MySQL username for getting queries data. + Username string `json:"username,omitempty"` + + // MySQL password for getting queries data. + Password string `json:"password,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: ["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"] + LogLevel *string `json:"log_level,omitempty"` + + // MySQL specific options. + // Use TLS for database connections. + TLS bool `json:"tls,omitempty"` + + // Skip TLS certificate and hostname validation. + TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` + + // Certificate Authority certificate chain. + TLSCa string `json:"tls_ca,omitempty"` + + // Client certificate. + TLSCert string `json:"tls_cert,omitempty"` + + // Password for decrypting tls_cert. + TLSKey string `json:"tls_key,omitempty"` + + // Skip connection check. + SkipConnectionCheck bool `json:"skip_connection_check,omitempty"` + + // rta options + RtaOptions *AddAgentParamsBodyRtaMysqlAgentRtaOptions `json:"rta_options,omitempty"` +} + +// Validate validates this add agent params body rta mysql agent +func (o *AddAgentParamsBodyRtaMysqlAgent) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + + if err := o.validateRtaOptions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addAgentParamsBodyRtaMysqlAgentTypeLogLevelPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addAgentParamsBodyRtaMysqlAgentTypeLogLevelPropEnum = append(addAgentParamsBodyRtaMysqlAgentTypeLogLevelPropEnum, v) + } +} + +const ( + + // AddAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + AddAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // AddAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + AddAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // AddAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + AddAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // AddAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + AddAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // AddAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + AddAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // AddAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + AddAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *AddAgentParamsBodyRtaMysqlAgent) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addAgentParamsBodyRtaMysqlAgentTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddAgentParamsBodyRtaMysqlAgent) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("body"+"."+"rta_mysql_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +func (o *AddAgentParamsBodyRtaMysqlAgent) validateRtaOptions(formats strfmt.Registry) error { + if swag.IsZero(o.RtaOptions) { // not required + return nil + } + + if o.RtaOptions != nil { + if err := o.RtaOptions.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("body" + "." + "rta_mysql_agent" + "." + "rta_options") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("body" + "." + "rta_mysql_agent" + "." + "rta_options") + } + + return err + } + } + + return nil +} + +// ContextValidate validate this add agent params body rta mysql agent based on the context it is used +func (o *AddAgentParamsBodyRtaMysqlAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateRtaOptions(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddAgentParamsBodyRtaMysqlAgent) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + + if o.RtaOptions != nil { + + if swag.IsZero(o.RtaOptions) { // not required + return nil + } + + if err := o.RtaOptions.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("body" + "." + "rta_mysql_agent" + "." + "rta_options") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("body" + "." + "rta_mysql_agent" + "." + "rta_options") + } + + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *AddAgentParamsBodyRtaMysqlAgent) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddAgentParamsBodyRtaMysqlAgent) UnmarshalBinary(b []byte) error { + var res AddAgentParamsBodyRtaMysqlAgent + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddAgentParamsBodyRtaMysqlAgentRtaOptions RTAOptions holds Real-Time Query Analytics agent options. +swagger:model AddAgentParamsBodyRtaMysqlAgentRtaOptions +*/ +type AddAgentParamsBodyRtaMysqlAgentRtaOptions struct { + + // Query collect interval (default 2s is set by server). + CollectInterval string `json:"collect_interval,omitempty"` +} + +// Validate validates this add agent params body rta mysql agent rta options +func (o *AddAgentParamsBodyRtaMysqlAgentRtaOptions) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this add agent params body rta mysql agent rta options based on context it is used +func (o *AddAgentParamsBodyRtaMysqlAgentRtaOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddAgentParamsBodyRtaMysqlAgentRtaOptions) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddAgentParamsBodyRtaMysqlAgentRtaOptions) UnmarshalBinary(b []byte) error { + var res AddAgentParamsBodyRtaMysqlAgentRtaOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + /* AddAgentParamsBodyValkeyExporter add agent params body valkey exporter swagger:model AddAgentParamsBodyValkeyExporter */ type AddAgentParamsBodyValkeyExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` diff --git a/api/inventory/v1/json/client/agents_service/change_agent_parameters.go b/api/inventory/v1/json/client/agents_service/change_agent_parameters.go index 8fa73d2c2a3..b84ab863191 100644 --- a/api/inventory/v1/json/client/agents_service/change_agent_parameters.go +++ b/api/inventory/v1/json/client/agents_service/change_agent_parameters.go @@ -57,6 +57,7 @@ ChangeAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeAgentParams struct { + // AgentID. AgentID string @@ -140,6 +141,7 @@ func (o *ChangeAgentParams) SetBody(body ChangeAgentBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/change_agent_responses.go b/api/inventory/v1/json/client/agents_service/change_agent_responses.go index 76c5dc89783..d7e6bb615e1 100644 --- a/api/inventory/v1/json/client/agents_service/change_agent_responses.go +++ b/api/inventory/v1/json/client/agents_service/change_agent_responses.go @@ -102,6 +102,7 @@ func (o *ChangeAgentOK) GetPayload() *ChangeAgentOKBody { } func (o *ChangeAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeAgentOKBody) // response payload @@ -175,6 +176,7 @@ func (o *ChangeAgentDefault) GetPayload() *ChangeAgentDefaultBody { } func (o *ChangeAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeAgentDefaultBody) // response payload @@ -190,6 +192,7 @@ ChangeAgentBody change agent body swagger:model ChangeAgentBody */ type ChangeAgentBody struct { + // azure database exporter AzureDatabaseExporter *ChangeAgentParamsBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -238,6 +241,9 @@ type ChangeAgentBody struct { // rta mongodb agent RtaMongodbAgent *ChangeAgentParamsBodyRtaMongodbAgent `json:"rta_mongodb_agent,omitempty"` + // rta mysql agent + RtaMysqlAgent *ChangeAgentParamsBodyRtaMysqlAgent `json:"rta_mysql_agent,omitempty"` + // valkey exporter ValkeyExporter *ChangeAgentParamsBodyValkeyExporter `json:"valkey_exporter,omitempty"` } @@ -310,6 +316,10 @@ func (o *ChangeAgentBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateRtaMysqlAgent(formats); err != nil { + res = append(res, err) + } + if err := o.validateValkeyExporter(formats); err != nil { res = append(res, err) } @@ -688,6 +698,29 @@ func (o *ChangeAgentBody) validateRtaMongodbAgent(formats strfmt.Registry) error return nil } +func (o *ChangeAgentBody) validateRtaMysqlAgent(formats strfmt.Registry) error { + if swag.IsZero(o.RtaMysqlAgent) { // not required + return nil + } + + if o.RtaMysqlAgent != nil { + if err := o.RtaMysqlAgent.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("body" + "." + "rta_mysql_agent") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("body" + "." + "rta_mysql_agent") + } + + return err + } + } + + return nil +} + func (o *ChangeAgentBody) validateValkeyExporter(formats strfmt.Registry) error { if swag.IsZero(o.ValkeyExporter) { // not required return nil @@ -779,6 +812,10 @@ func (o *ChangeAgentBody) ContextValidate(ctx context.Context, formats strfmt.Re res = append(res, err) } + if err := o.contextValidateRtaMysqlAgent(ctx, formats); err != nil { + res = append(res, err) + } + if err := o.contextValidateValkeyExporter(ctx, formats); err != nil { res = append(res, err) } @@ -790,6 +827,7 @@ func (o *ChangeAgentBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ChangeAgentBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -814,6 +852,7 @@ func (o *ChangeAgentBody) contextValidateAzureDatabaseExporter(ctx context.Conte } func (o *ChangeAgentBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -838,6 +877,7 @@ func (o *ChangeAgentBody) contextValidateExternalExporter(ctx context.Context, f } func (o *ChangeAgentBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -862,6 +902,7 @@ func (o *ChangeAgentBody) contextValidateMongodbExporter(ctx context.Context, fo } func (o *ChangeAgentBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -886,6 +927,7 @@ func (o *ChangeAgentBody) contextValidateMysqldExporter(ctx context.Context, for } func (o *ChangeAgentBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -910,6 +952,7 @@ func (o *ChangeAgentBody) contextValidateNodeExporter(ctx context.Context, forma } func (o *ChangeAgentBody) contextValidateNomadAgent(ctx context.Context, formats strfmt.Registry) error { + if o.NomadAgent != nil { if swag.IsZero(o.NomadAgent) { // not required @@ -934,6 +977,7 @@ func (o *ChangeAgentBody) contextValidateNomadAgent(ctx context.Context, formats } func (o *ChangeAgentBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -958,6 +1002,7 @@ func (o *ChangeAgentBody) contextValidatePostgresExporter(ctx context.Context, f } func (o *ChangeAgentBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -982,6 +1027,7 @@ func (o *ChangeAgentBody) contextValidateProxysqlExporter(ctx context.Context, f } func (o *ChangeAgentBody) contextValidateQANMongodbMongologAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbMongologAgent != nil { if swag.IsZero(o.QANMongodbMongologAgent) { // not required @@ -1006,6 +1052,7 @@ func (o *ChangeAgentBody) contextValidateQANMongodbMongologAgent(ctx context.Con } func (o *ChangeAgentBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -1030,6 +1077,7 @@ func (o *ChangeAgentBody) contextValidateQANMongodbProfilerAgent(ctx context.Con } func (o *ChangeAgentBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -1054,6 +1102,7 @@ func (o *ChangeAgentBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Con } func (o *ChangeAgentBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -1078,6 +1127,7 @@ func (o *ChangeAgentBody) contextValidateQANMysqlSlowlogAgent(ctx context.Contex } func (o *ChangeAgentBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -1102,6 +1152,7 @@ func (o *ChangeAgentBody) contextValidateQANPostgresqlPgstatementsAgent(ctx cont } func (o *ChangeAgentBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -1126,6 +1177,7 @@ func (o *ChangeAgentBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx con } func (o *ChangeAgentBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -1150,6 +1202,7 @@ func (o *ChangeAgentBody) contextValidateRDSExporter(ctx context.Context, format } func (o *ChangeAgentBody) contextValidateRtaMongodbAgent(ctx context.Context, formats strfmt.Registry) error { + if o.RtaMongodbAgent != nil { if swag.IsZero(o.RtaMongodbAgent) { // not required @@ -1173,7 +1226,33 @@ func (o *ChangeAgentBody) contextValidateRtaMongodbAgent(ctx context.Context, fo return nil } +func (o *ChangeAgentBody) contextValidateRtaMysqlAgent(ctx context.Context, formats strfmt.Registry) error { + + if o.RtaMysqlAgent != nil { + + if swag.IsZero(o.RtaMysqlAgent) { // not required + return nil + } + + if err := o.RtaMysqlAgent.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("body" + "." + "rta_mysql_agent") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("body" + "." + "rta_mysql_agent") + } + + return err + } + } + + return nil +} + func (o *ChangeAgentBody) contextValidateValkeyExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ValkeyExporter != nil { if swag.IsZero(o.ValkeyExporter) { // not required @@ -1220,6 +1299,7 @@ ChangeAgentDefaultBody change agent default body swagger:model ChangeAgentDefaultBody */ type ChangeAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -1289,7 +1369,9 @@ func (o *ChangeAgentDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *ChangeAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -1309,6 +1391,7 @@ func (o *ChangeAgentDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -1337,6 +1420,7 @@ ChangeAgentDefaultBodyDetailsItems0 change agent default body details items0 swagger:model ChangeAgentDefaultBodyDetailsItems0 */ type ChangeAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -1348,6 +1432,7 @@ type ChangeAgentDefaultBodyDetailsItems0 struct { func (o *ChangeAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -1385,6 +1470,7 @@ func (o *ChangeAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeAgentDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -1448,6 +1534,7 @@ ChangeAgentOKBody change agent OK body swagger:model ChangeAgentOKBody */ type ChangeAgentOKBody struct { + // azure database exporter AzureDatabaseExporter *ChangeAgentOKBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -1496,6 +1583,9 @@ type ChangeAgentOKBody struct { // rta mongodb agent RtaMongodbAgent *ChangeAgentOKBodyRtaMongodbAgent `json:"rta_mongodb_agent,omitempty"` + // rta mysql agent + RtaMysqlAgent *ChangeAgentOKBodyRtaMysqlAgent `json:"rta_mysql_agent,omitempty"` + // valkey exporter ValkeyExporter *ChangeAgentOKBodyValkeyExporter `json:"valkey_exporter,omitempty"` } @@ -1568,6 +1658,10 @@ func (o *ChangeAgentOKBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateRtaMysqlAgent(formats); err != nil { + res = append(res, err) + } + if err := o.validateValkeyExporter(formats); err != nil { res = append(res, err) } @@ -1946,6 +2040,29 @@ func (o *ChangeAgentOKBody) validateRtaMongodbAgent(formats strfmt.Registry) err return nil } +func (o *ChangeAgentOKBody) validateRtaMysqlAgent(formats strfmt.Registry) error { + if swag.IsZero(o.RtaMysqlAgent) { // not required + return nil + } + + if o.RtaMysqlAgent != nil { + if err := o.RtaMysqlAgent.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("changeAgentOk" + "." + "rta_mysql_agent") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("changeAgentOk" + "." + "rta_mysql_agent") + } + + return err + } + } + + return nil +} + func (o *ChangeAgentOKBody) validateValkeyExporter(formats strfmt.Registry) error { if swag.IsZero(o.ValkeyExporter) { // not required return nil @@ -2037,6 +2154,10 @@ func (o *ChangeAgentOKBody) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } + if err := o.contextValidateRtaMysqlAgent(ctx, formats); err != nil { + res = append(res, err) + } + if err := o.contextValidateValkeyExporter(ctx, formats); err != nil { res = append(res, err) } @@ -2048,6 +2169,7 @@ func (o *ChangeAgentOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *ChangeAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -2072,6 +2194,7 @@ func (o *ChangeAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Con } func (o *ChangeAgentOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -2096,6 +2219,7 @@ func (o *ChangeAgentOKBody) contextValidateExternalExporter(ctx context.Context, } func (o *ChangeAgentOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -2120,6 +2244,7 @@ func (o *ChangeAgentOKBody) contextValidateMongodbExporter(ctx context.Context, } func (o *ChangeAgentOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -2144,6 +2269,7 @@ func (o *ChangeAgentOKBody) contextValidateMysqldExporter(ctx context.Context, f } func (o *ChangeAgentOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -2168,6 +2294,7 @@ func (o *ChangeAgentOKBody) contextValidateNodeExporter(ctx context.Context, for } func (o *ChangeAgentOKBody) contextValidateNomadAgent(ctx context.Context, formats strfmt.Registry) error { + if o.NomadAgent != nil { if swag.IsZero(o.NomadAgent) { // not required @@ -2192,6 +2319,7 @@ func (o *ChangeAgentOKBody) contextValidateNomadAgent(ctx context.Context, forma } func (o *ChangeAgentOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -2216,6 +2344,7 @@ func (o *ChangeAgentOKBody) contextValidatePostgresExporter(ctx context.Context, } func (o *ChangeAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -2240,6 +2369,7 @@ func (o *ChangeAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, } func (o *ChangeAgentOKBody) contextValidateQANMongodbMongologAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbMongologAgent != nil { if swag.IsZero(o.QANMongodbMongologAgent) { // not required @@ -2264,6 +2394,7 @@ func (o *ChangeAgentOKBody) contextValidateQANMongodbMongologAgent(ctx context.C } func (o *ChangeAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -2288,6 +2419,7 @@ func (o *ChangeAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.C } func (o *ChangeAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -2312,6 +2444,7 @@ func (o *ChangeAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.C } func (o *ChangeAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -2336,6 +2469,7 @@ func (o *ChangeAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Cont } func (o *ChangeAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -2360,6 +2494,7 @@ func (o *ChangeAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx co } func (o *ChangeAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -2384,6 +2519,7 @@ func (o *ChangeAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx c } func (o *ChangeAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -2408,6 +2544,7 @@ func (o *ChangeAgentOKBody) contextValidateRDSExporter(ctx context.Context, form } func (o *ChangeAgentOKBody) contextValidateRtaMongodbAgent(ctx context.Context, formats strfmt.Registry) error { + if o.RtaMongodbAgent != nil { if swag.IsZero(o.RtaMongodbAgent) { // not required @@ -2431,7 +2568,33 @@ func (o *ChangeAgentOKBody) contextValidateRtaMongodbAgent(ctx context.Context, return nil } +func (o *ChangeAgentOKBody) contextValidateRtaMysqlAgent(ctx context.Context, formats strfmt.Registry) error { + + if o.RtaMysqlAgent != nil { + + if swag.IsZero(o.RtaMysqlAgent) { // not required + return nil + } + + if err := o.RtaMysqlAgent.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("changeAgentOk" + "." + "rta_mysql_agent") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("changeAgentOk" + "." + "rta_mysql_agent") + } + + return err + } + } + + return nil +} + func (o *ChangeAgentOKBody) contextValidateValkeyExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ValkeyExporter != nil { if swag.IsZero(o.ValkeyExporter) { // not required @@ -2478,6 +2641,7 @@ ChangeAgentOKBodyAzureDatabaseExporter AzureDatabaseExporter runs on Generic or swagger:model ChangeAgentOKBodyAzureDatabaseExporter */ type ChangeAgentOKBodyAzureDatabaseExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2704,6 +2868,7 @@ func (o *ChangeAgentOKBodyAzureDatabaseExporter) ContextValidate(ctx context.Con } func (o *ChangeAgentOKBodyAzureDatabaseExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2750,6 +2915,7 @@ ChangeAgentOKBodyAzureDatabaseExporterMetricsResolutions MetricsResolutions repr swagger:model ChangeAgentOKBodyAzureDatabaseExporterMetricsResolutions */ type ChangeAgentOKBodyAzureDatabaseExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2793,6 +2959,7 @@ ChangeAgentOKBodyExternalExporter ExternalExporter runs on any Node type, includ swagger:model ChangeAgentOKBodyExternalExporter */ type ChangeAgentOKBodyExternalExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2961,6 +3128,7 @@ func (o *ChangeAgentOKBodyExternalExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentOKBodyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3007,6 +3175,7 @@ ChangeAgentOKBodyExternalExporterMetricsResolutions MetricsResolutions represent swagger:model ChangeAgentOKBodyExternalExporterMetricsResolutions */ type ChangeAgentOKBodyExternalExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3050,6 +3219,7 @@ ChangeAgentOKBodyMongodbExporter MongoDBExporter runs on Generic or Container No swagger:model ChangeAgentOKBodyMongodbExporter */ type ChangeAgentOKBodyMongodbExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3301,6 +3471,7 @@ func (o *ChangeAgentOKBodyMongodbExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentOKBodyMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3347,6 +3518,7 @@ ChangeAgentOKBodyMongodbExporterMetricsResolutions MetricsResolutions represents swagger:model ChangeAgentOKBodyMongodbExporterMetricsResolutions */ type ChangeAgentOKBodyMongodbExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3390,6 +3562,7 @@ ChangeAgentOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node swagger:model ChangeAgentOKBodyMysqldExporter */ type ChangeAgentOKBodyMysqldExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3651,6 +3824,7 @@ func (o *ChangeAgentOKBodyMysqldExporter) ContextValidate(ctx context.Context, f } func (o *ChangeAgentOKBodyMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3697,6 +3871,7 @@ ChangeAgentOKBodyMysqldExporterMetricsResolutions MetricsResolutions represents swagger:model ChangeAgentOKBodyMysqldExporterMetricsResolutions */ type ChangeAgentOKBodyMysqldExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3740,6 +3915,7 @@ ChangeAgentOKBodyNodeExporter NodeExporter runs on Generic or Container Node and swagger:model ChangeAgentOKBodyNodeExporter */ type ChangeAgentOKBodyNodeExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3963,6 +4139,7 @@ func (o *ChangeAgentOKBodyNodeExporter) ContextValidate(ctx context.Context, for } func (o *ChangeAgentOKBodyNodeExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4009,6 +4186,7 @@ ChangeAgentOKBodyNodeExporterMetricsResolutions MetricsResolutions represents Pr swagger:model ChangeAgentOKBodyNodeExporterMetricsResolutions */ type ChangeAgentOKBodyNodeExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4052,6 +4230,7 @@ ChangeAgentOKBodyNomadAgent change agent OK body nomad agent swagger:model ChangeAgentOKBodyNomadAgent */ type ChangeAgentOKBodyNomadAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4182,6 +4361,7 @@ ChangeAgentOKBodyPostgresExporter PostgresExporter runs on Generic or Container swagger:model ChangeAgentOKBodyPostgresExporter */ type ChangeAgentOKBodyPostgresExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4426,6 +4606,7 @@ func (o *ChangeAgentOKBodyPostgresExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentOKBodyPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4472,6 +4653,7 @@ ChangeAgentOKBodyPostgresExporterMetricsResolutions MetricsResolutions represent swagger:model ChangeAgentOKBodyPostgresExporterMetricsResolutions */ type ChangeAgentOKBodyPostgresExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4515,6 +4697,7 @@ ChangeAgentOKBodyProxysqlExporter ProxySQLExporter runs on Generic or Container swagger:model ChangeAgentOKBodyProxysqlExporter */ type ChangeAgentOKBodyProxysqlExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4753,6 +4936,7 @@ func (o *ChangeAgentOKBodyProxysqlExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentOKBodyProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4799,6 +4983,7 @@ ChangeAgentOKBodyProxysqlExporterMetricsResolutions MetricsResolutions represent swagger:model ChangeAgentOKBodyProxysqlExporterMetricsResolutions */ type ChangeAgentOKBodyProxysqlExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4842,6 +5027,7 @@ ChangeAgentOKBodyQANMongodbMongologAgent QANMongoDBMongologAgent runs within pmm swagger:model ChangeAgentOKBodyQANMongodbMongologAgent */ type ChangeAgentOKBodyQANMongodbMongologAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5051,6 +5237,7 @@ ChangeAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent runs within pmm swagger:model ChangeAgentOKBodyQANMongodbProfilerAgent */ type ChangeAgentOKBodyQANMongodbProfilerAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5260,6 +5447,7 @@ ChangeAgentOKBodyQANMysqlPerfschemaAgent QANMySQLPerfSchemaAgent runs within pmm swagger:model ChangeAgentOKBodyQANMysqlPerfschemaAgent */ type ChangeAgentOKBodyQANMysqlPerfschemaAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5487,6 +5675,7 @@ ChangeAgentOKBodyQANMysqlSlowlogAgent QANMySQLSlowlogAgent runs within pmm-agent swagger:model ChangeAgentOKBodyQANMysqlSlowlogAgent */ type ChangeAgentOKBodyQANMysqlSlowlogAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5717,6 +5906,7 @@ ChangeAgentOKBodyQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatementsAgent r swagger:model ChangeAgentOKBodyQANPostgresqlPgstatementsAgent */ type ChangeAgentOKBodyQANPostgresqlPgstatementsAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5929,6 +6119,7 @@ ChangeAgentOKBodyQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMonitorAgent swagger:model ChangeAgentOKBodyQANPostgresqlPgstatmonitorAgent */ type ChangeAgentOKBodyQANPostgresqlPgstatmonitorAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6144,6 +6335,7 @@ ChangeAgentOKBodyRDSExporter RDSExporter runs on Generic or Container Node and e swagger:model ChangeAgentOKBodyRDSExporter */ type ChangeAgentOKBodyRDSExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6376,6 +6568,7 @@ func (o *ChangeAgentOKBodyRDSExporter) ContextValidate(ctx context.Context, form } func (o *ChangeAgentOKBodyRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6422,6 +6615,7 @@ ChangeAgentOKBodyRDSExporterMetricsResolutions MetricsResolutions represents Pro swagger:model ChangeAgentOKBodyRDSExporterMetricsResolutions */ type ChangeAgentOKBodyRDSExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6465,6 +6659,7 @@ ChangeAgentOKBodyRtaMongodbAgent RTAMongoDBAgent runs within pmm-agent and sends swagger:model ChangeAgentOKBodyRtaMongodbAgent */ type ChangeAgentOKBodyRtaMongodbAgent struct { + // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -6685,6 +6880,7 @@ func (o *ChangeAgentOKBodyRtaMongodbAgent) ContextValidate(ctx context.Context, } func (o *ChangeAgentOKBodyRtaMongodbAgent) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + if o.RtaOptions != nil { if swag.IsZero(o.RtaOptions) { // not required @@ -6731,6 +6927,7 @@ ChangeAgentOKBodyRtaMongodbAgentRtaOptions RTAOptions holds Real-Time Query Anal swagger:model ChangeAgentOKBodyRtaMongodbAgentRtaOptions */ type ChangeAgentOKBodyRtaMongodbAgentRtaOptions struct { + // Query collect interval (default 2s is set by server). CollectInterval string `json:"collect_interval,omitempty"` } @@ -6764,11 +6961,12 @@ func (o *ChangeAgentOKBodyRtaMongodbAgentRtaOptions) UnmarshalBinary(b []byte) e } /* -ChangeAgentOKBodyValkeyExporter ValkeyExporter runs on Generic or Container Node and exposes Valkey Service metrics. -swagger:model ChangeAgentOKBodyValkeyExporter +ChangeAgentOKBodyRtaMysqlAgent RTAMySQLAgent runs within pmm-agent and sends MySQL Real-Time Query Analytics data to the PMM Server. +swagger:model ChangeAgentOKBodyRtaMysqlAgent */ -type ChangeAgentOKBodyValkeyExporter struct { - // Unique randomly generated instance identifier. +type ChangeAgentOKBodyRtaMysqlAgent struct { + + // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` // The pmm-agent identifier which runs this instance. @@ -6780,24 +6978,18 @@ type ChangeAgentOKBodyValkeyExporter struct { // Service identifier. ServiceID string `json:"service_id,omitempty"` - // Valkey username for scraping metrics. + // MySQL username for getting the currently running queries. Username string `json:"username,omitempty"` // Use TLS for database connections. TLS bool `json:"tls,omitempty"` - // Skip TLS certificate and hostname verification. + // Skip TLS certificate and hostname validation. TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` // Custom user-assigned labels. CustomLabels map[string]string `json:"custom_labels,omitempty"` - // True if exporter uses push metrics mode. - PushMetricsEnabled bool `json:"push_metrics_enabled,omitempty"` - - // List of disabled collector names. - DisabledCollectors []string `json:"disabled_collectors"` - // AgentStatus represents actual Agent status. // // - AGENT_STATUS_STARTING: Agent is starting. @@ -6810,31 +7002,29 @@ type ChangeAgentOKBodyValkeyExporter struct { // Enum: ["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_INITIALIZATION_ERROR","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"] Status *string `json:"status,omitempty"` - // Listen port for scraping metrics. - ListenPort int64 `json:"listen_port,omitempty"` - - // Path to exec process. - ProcessExecPath string `json:"process_exec_path,omitempty"` - - // Optionally expose the exporter process on all public interfaces - ExposeExporter bool `json:"expose_exporter,omitempty"` - - // Connection timeout for exporter (if set). - ConnectionTimeout string `json:"connection_timeout,omitempty"` + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: ["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"] + LogLevel *string `json:"log_level,omitempty"` - // metrics resolutions - MetricsResolutions *ChangeAgentOKBodyValkeyExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` + // rta options + RtaOptions *ChangeAgentOKBodyRtaMysqlAgentRtaOptions `json:"rta_options,omitempty"` } -// Validate validates this change agent OK body valkey exporter -func (o *ChangeAgentOKBodyValkeyExporter) Validate(formats strfmt.Registry) error { +// Validate validates this change agent OK body rta mysql agent +func (o *ChangeAgentOKBodyRtaMysqlAgent) Validate(formats strfmt.Registry) error { var res []error if err := o.validateStatus(formats); err != nil { res = append(res, err) } - if err := o.validateMetricsResolutions(formats); err != nil { + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + + if err := o.validateRtaOptions(formats); err != nil { res = append(res, err) } @@ -6844,7 +7034,7 @@ func (o *ChangeAgentOKBodyValkeyExporter) Validate(formats strfmt.Registry) erro return nil } -var changeAgentOkBodyValkeyExporterTypeStatusPropEnum []any +var changeAgentOkBodyRtaMysqlAgentTypeStatusPropEnum []any func init() { var res []string @@ -6852,80 +7042,394 @@ func init() { panic(err) } for _, v := range res { - changeAgentOkBodyValkeyExporterTypeStatusPropEnum = append(changeAgentOkBodyValkeyExporterTypeStatusPropEnum, v) + changeAgentOkBodyRtaMysqlAgentTypeStatusPropEnum = append(changeAgentOkBodyRtaMysqlAgentTypeStatusPropEnum, v) } } const ( - // ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" - ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + // ChangeAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + ChangeAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" - // ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" - ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + // ChangeAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + ChangeAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" - // ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSINITIALIZATIONERROR captures enum value "AGENT_STATUS_INITIALIZATION_ERROR" - ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSINITIALIZATIONERROR string = "AGENT_STATUS_INITIALIZATION_ERROR" + // ChangeAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSINITIALIZATIONERROR captures enum value "AGENT_STATUS_INITIALIZATION_ERROR" + ChangeAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSINITIALIZATIONERROR string = "AGENT_STATUS_INITIALIZATION_ERROR" - // ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" - ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + // ChangeAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + ChangeAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" - // ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" - ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + // ChangeAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + ChangeAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" - // ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" - ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + // ChangeAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + ChangeAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" - // ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" - ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + // ChangeAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + ChangeAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" - // ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" - ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" + // ChangeAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + ChangeAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" ) // prop value enum -func (o *ChangeAgentOKBodyValkeyExporter) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, changeAgentOkBodyValkeyExporterTypeStatusPropEnum, true); err != nil { +func (o *ChangeAgentOKBodyRtaMysqlAgent) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentOkBodyRtaMysqlAgentTypeStatusPropEnum, true); err != nil { return err } return nil } -func (o *ChangeAgentOKBodyValkeyExporter) validateStatus(formats strfmt.Registry) error { +func (o *ChangeAgentOKBodyRtaMysqlAgent) validateStatus(formats strfmt.Registry) error { if swag.IsZero(o.Status) { // not required return nil } // value enum - if err := o.validateStatusEnum("changeAgentOk"+"."+"valkey_exporter"+"."+"status", "body", *o.Status); err != nil { + if err := o.validateStatusEnum("changeAgentOk"+"."+"rta_mysql_agent"+"."+"status", "body", *o.Status); err != nil { return err } return nil } -func (o *ChangeAgentOKBodyValkeyExporter) validateMetricsResolutions(formats strfmt.Registry) error { - if swag.IsZero(o.MetricsResolutions) { // not required - return nil +var changeAgentOkBodyRtaMysqlAgentTypeLogLevelPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + changeAgentOkBodyRtaMysqlAgentTypeLogLevelPropEnum = append(changeAgentOkBodyRtaMysqlAgentTypeLogLevelPropEnum, v) } +} - if o.MetricsResolutions != nil { - if err := o.MetricsResolutions.Validate(formats); err != nil { - ve := new(errors.Validation) - if stderrors.As(err, &ve) { - return ve.ValidateName("changeAgentOk" + "." + "valkey_exporter" + "." + "metrics_resolutions") - } - ce := new(errors.CompositeError) - if stderrors.As(err, &ce) { - return ce.ValidateName("changeAgentOk" + "." + "valkey_exporter" + "." + "metrics_resolutions") - } +const ( - return err - } - } + // ChangeAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ChangeAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - return nil -} + // ChangeAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ChangeAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // ChangeAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ChangeAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // ChangeAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ChangeAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // ChangeAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ChangeAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // ChangeAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ChangeAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *ChangeAgentOKBodyRtaMysqlAgent) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentOkBodyRtaMysqlAgentTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *ChangeAgentOKBodyRtaMysqlAgent) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("changeAgentOk"+"."+"rta_mysql_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +func (o *ChangeAgentOKBodyRtaMysqlAgent) validateRtaOptions(formats strfmt.Registry) error { + if swag.IsZero(o.RtaOptions) { // not required + return nil + } + + if o.RtaOptions != nil { + if err := o.RtaOptions.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("changeAgentOk" + "." + "rta_mysql_agent" + "." + "rta_options") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("changeAgentOk" + "." + "rta_mysql_agent" + "." + "rta_options") + } + + return err + } + } + + return nil +} + +// ContextValidate validate this change agent OK body rta mysql agent based on the context it is used +func (o *ChangeAgentOKBodyRtaMysqlAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateRtaOptions(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ChangeAgentOKBodyRtaMysqlAgent) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + + if o.RtaOptions != nil { + + if swag.IsZero(o.RtaOptions) { // not required + return nil + } + + if err := o.RtaOptions.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("changeAgentOk" + "." + "rta_mysql_agent" + "." + "rta_options") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("changeAgentOk" + "." + "rta_mysql_agent" + "." + "rta_options") + } + + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeAgentOKBodyRtaMysqlAgent) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeAgentOKBodyRtaMysqlAgent) UnmarshalBinary(b []byte) error { + var res ChangeAgentOKBodyRtaMysqlAgent + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ChangeAgentOKBodyRtaMysqlAgentRtaOptions RTAOptions holds Real-Time Query Analytics agent options. +swagger:model ChangeAgentOKBodyRtaMysqlAgentRtaOptions +*/ +type ChangeAgentOKBodyRtaMysqlAgentRtaOptions struct { + + // Query collect interval (default 2s is set by server). + CollectInterval string `json:"collect_interval,omitempty"` +} + +// Validate validates this change agent OK body rta mysql agent rta options +func (o *ChangeAgentOKBodyRtaMysqlAgentRtaOptions) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this change agent OK body rta mysql agent rta options based on context it is used +func (o *ChangeAgentOKBodyRtaMysqlAgentRtaOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeAgentOKBodyRtaMysqlAgentRtaOptions) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeAgentOKBodyRtaMysqlAgentRtaOptions) UnmarshalBinary(b []byte) error { + var res ChangeAgentOKBodyRtaMysqlAgentRtaOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ChangeAgentOKBodyValkeyExporter ValkeyExporter runs on Generic or Container Node and exposes Valkey Service metrics. +swagger:model ChangeAgentOKBodyValkeyExporter +*/ +type ChangeAgentOKBodyValkeyExporter struct { + + // Unique randomly generated instance identifier. + AgentID string `json:"agent_id,omitempty"` + + // The pmm-agent identifier which runs this instance. + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // Desired Agent status: enabled (false) or disabled (true). + Disabled bool `json:"disabled,omitempty"` + + // Service identifier. + ServiceID string `json:"service_id,omitempty"` + + // Valkey username for scraping metrics. + Username string `json:"username,omitempty"` + + // Use TLS for database connections. + TLS bool `json:"tls,omitempty"` + + // Skip TLS certificate and hostname verification. + TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // True if exporter uses push metrics mode. + PushMetricsEnabled bool `json:"push_metrics_enabled,omitempty"` + + // List of disabled collector names. + DisabledCollectors []string `json:"disabled_collectors"` + + // AgentStatus represents actual Agent status. + // + // - AGENT_STATUS_STARTING: Agent is starting. + // - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when starting. + // - AGENT_STATUS_RUNNING: Agent is running. + // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. + // - AGENT_STATUS_STOPPING: Agent is stopping. + // - AGENT_STATUS_DONE: Agent has been stopped or disabled. + // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. + // Enum: ["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_INITIALIZATION_ERROR","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"] + Status *string `json:"status,omitempty"` + + // Listen port for scraping metrics. + ListenPort int64 `json:"listen_port,omitempty"` + + // Path to exec process. + ProcessExecPath string `json:"process_exec_path,omitempty"` + + // Optionally expose the exporter process on all public interfaces + ExposeExporter bool `json:"expose_exporter,omitempty"` + + // Connection timeout for exporter (if set). + ConnectionTimeout string `json:"connection_timeout,omitempty"` + + // metrics resolutions + MetricsResolutions *ChangeAgentOKBodyValkeyExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` +} + +// Validate validates this change agent OK body valkey exporter +func (o *ChangeAgentOKBodyValkeyExporter) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := o.validateMetricsResolutions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var changeAgentOkBodyValkeyExporterTypeStatusPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_INITIALIZATION_ERROR","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + changeAgentOkBodyValkeyExporterTypeStatusPropEnum = append(changeAgentOkBodyValkeyExporterTypeStatusPropEnum, v) + } +} + +const ( + + // ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSINITIALIZATIONERROR captures enum value "AGENT_STATUS_INITIALIZATION_ERROR" + ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSINITIALIZATIONERROR string = "AGENT_STATUS_INITIALIZATION_ERROR" + + // ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + ChangeAgentOKBodyValkeyExporterStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *ChangeAgentOKBodyValkeyExporter) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentOkBodyValkeyExporterTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *ChangeAgentOKBodyValkeyExporter) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("changeAgentOk"+"."+"valkey_exporter"+"."+"status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +func (o *ChangeAgentOKBodyValkeyExporter) validateMetricsResolutions(formats strfmt.Registry) error { + if swag.IsZero(o.MetricsResolutions) { // not required + return nil + } + + if o.MetricsResolutions != nil { + if err := o.MetricsResolutions.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("changeAgentOk" + "." + "valkey_exporter" + "." + "metrics_resolutions") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("changeAgentOk" + "." + "valkey_exporter" + "." + "metrics_resolutions") + } + + return err + } + } + + return nil +} // ContextValidate validate this change agent OK body valkey exporter based on the context it is used func (o *ChangeAgentOKBodyValkeyExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { @@ -6935,13 +7439,306 @@ func (o *ChangeAgentOKBodyValkeyExporter) ContextValidate(ctx context.Context, f res = append(res, err) } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ChangeAgentOKBodyValkeyExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + + if o.MetricsResolutions != nil { + + if swag.IsZero(o.MetricsResolutions) { // not required + return nil + } + + if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("changeAgentOk" + "." + "valkey_exporter" + "." + "metrics_resolutions") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("changeAgentOk" + "." + "valkey_exporter" + "." + "metrics_resolutions") + } + + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeAgentOKBodyValkeyExporter) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeAgentOKBodyValkeyExporter) UnmarshalBinary(b []byte) error { + var res ChangeAgentOKBodyValkeyExporter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ChangeAgentOKBodyValkeyExporterMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. +swagger:model ChangeAgentOKBodyValkeyExporterMetricsResolutions +*/ +type ChangeAgentOKBodyValkeyExporterMetricsResolutions struct { + + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. + Hr string `json:"hr,omitempty"` + + // Medium resolution. In JSON should be represented as a string with number of seconds with `s` suffix. + Mr string `json:"mr,omitempty"` + + // Low resolution. In JSON should be represented as a string with number of seconds with `s` suffix. + Lr string `json:"lr,omitempty"` +} + +// Validate validates this change agent OK body valkey exporter metrics resolutions +func (o *ChangeAgentOKBodyValkeyExporterMetricsResolutions) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this change agent OK body valkey exporter metrics resolutions based on context it is used +func (o *ChangeAgentOKBodyValkeyExporterMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeAgentOKBodyValkeyExporterMetricsResolutions) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeAgentOKBodyValkeyExporterMetricsResolutions) UnmarshalBinary(b []byte) error { + var res ChangeAgentOKBodyValkeyExporterMetricsResolutions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ChangeAgentParamsBodyAzureDatabaseExporter change agent params body azure database exporter +swagger:model ChangeAgentParamsBodyAzureDatabaseExporter +*/ +type ChangeAgentParamsBodyAzureDatabaseExporter struct { + + // Enable this Agent. Agents are enabled by default when they get added. + Enable *bool `json:"enable,omitempty"` + + // Enables push metrics with vmagent. + EnablePushMetrics *bool `json:"enable_push_metrics,omitempty"` + + // Azure client ID + AzureClientID *string `json:"azure_client_id,omitempty"` + + // Azure client secret + AzureClientSecret *string `json:"azure_client_secret,omitempty"` + + // Azure tenant ID + AzureTenantID *string `json:"azure_tenant_id,omitempty"` + + // Azure subscription ID + AzureSubscriptionID *string `json:"azure_subscription_id,omitempty"` + + // Azure resource group. + AzureResourceGroup *string `json:"azure_resource_group,omitempty"` + + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: ["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"] + LogLevel *string `json:"log_level,omitempty"` + + // custom labels + CustomLabels *ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels `json:"custom_labels,omitempty"` + + // metrics resolutions + MetricsResolutions *ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` +} + +// Validate validates this change agent params body azure database exporter +func (o *ChangeAgentParamsBodyAzureDatabaseExporter) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + + if err := o.validateCustomLabels(formats); err != nil { + res = append(res, err) + } + + if err := o.validateMetricsResolutions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var changeAgentParamsBodyAzureDatabaseExporterTypeLogLevelPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + changeAgentParamsBodyAzureDatabaseExporterTypeLogLevelPropEnum = append(changeAgentParamsBodyAzureDatabaseExporterTypeLogLevelPropEnum, v) + } +} + +const ( + + // ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *ChangeAgentParamsBodyAzureDatabaseExporter) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentParamsBodyAzureDatabaseExporterTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *ChangeAgentParamsBodyAzureDatabaseExporter) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("body"+"."+"azure_database_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +func (o *ChangeAgentParamsBodyAzureDatabaseExporter) validateCustomLabels(formats strfmt.Registry) error { + if swag.IsZero(o.CustomLabels) { // not required + return nil + } + + if o.CustomLabels != nil { + if err := o.CustomLabels.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("body" + "." + "azure_database_exporter" + "." + "custom_labels") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("body" + "." + "azure_database_exporter" + "." + "custom_labels") + } + + return err + } + } + + return nil +} + +func (o *ChangeAgentParamsBodyAzureDatabaseExporter) validateMetricsResolutions(formats strfmt.Registry) error { + if swag.IsZero(o.MetricsResolutions) { // not required + return nil + } + + if o.MetricsResolutions != nil { + if err := o.MetricsResolutions.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("body" + "." + "azure_database_exporter" + "." + "metrics_resolutions") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("body" + "." + "azure_database_exporter" + "." + "metrics_resolutions") + } + + return err + } + } + + return nil +} + +// ContextValidate validate this change agent params body azure database exporter based on the context it is used +func (o *ChangeAgentParamsBodyAzureDatabaseExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateCustomLabels(ctx, formats); err != nil { + res = append(res, err) + } + + if err := o.contextValidateMetricsResolutions(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ChangeAgentParamsBodyAzureDatabaseExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + + if o.CustomLabels != nil { + + if swag.IsZero(o.CustomLabels) { // not required + return nil + } + + if err := o.CustomLabels.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("body" + "." + "azure_database_exporter" + "." + "custom_labels") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("body" + "." + "azure_database_exporter" + "." + "custom_labels") + } + + return err + } + } + return nil } -func (o *ChangeAgentOKBodyValkeyExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyAzureDatabaseExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6951,11 +7748,11 @@ func (o *ChangeAgentOKBodyValkeyExporter) contextValidateMetricsResolutions(ctx if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("changeAgentOk" + "." + "valkey_exporter" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "azure_database_exporter" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("changeAgentOk" + "." + "valkey_exporter" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "azure_database_exporter" + "." + "metrics_resolutions") } return err @@ -6966,7 +7763,7 @@ func (o *ChangeAgentOKBodyValkeyExporter) contextValidateMetricsResolutions(ctx } // MarshalBinary interface implementation -func (o *ChangeAgentOKBodyValkeyExporter) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyAzureDatabaseExporter) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -6974,8 +7771,8 @@ func (o *ChangeAgentOKBodyValkeyExporter) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (o *ChangeAgentOKBodyValkeyExporter) UnmarshalBinary(b []byte) error { - var res ChangeAgentOKBodyValkeyExporter +func (o *ChangeAgentParamsBodyAzureDatabaseExporter) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyAzureDatabaseExporter if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -6984,10 +7781,49 @@ func (o *ChangeAgentOKBodyValkeyExporter) UnmarshalBinary(b []byte) error { } /* -ChangeAgentOKBodyValkeyExporterMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. -swagger:model ChangeAgentOKBodyValkeyExporterMetricsResolutions +ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. +swagger:model ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels */ -type ChangeAgentOKBodyValkeyExporterMetricsResolutions struct { +type ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels struct { + + // values + Values map[string]string `json:"values,omitempty"` +} + +// Validate validates this change agent params body azure database exporter custom labels +func (o *ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this change agent params body azure database exporter custom labels based on context it is used +func (o *ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. +swagger:model ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions +*/ +type ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6998,18 +7834,18 @@ type ChangeAgentOKBodyValkeyExporterMetricsResolutions struct { Lr string `json:"lr,omitempty"` } -// Validate validates this change agent OK body valkey exporter metrics resolutions -func (o *ChangeAgentOKBodyValkeyExporterMetricsResolutions) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body azure database exporter metrics resolutions +func (o *ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent OK body valkey exporter metrics resolutions based on context it is used -func (o *ChangeAgentOKBodyValkeyExporterMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body azure database exporter metrics resolutions based on context it is used +func (o *ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentOKBodyValkeyExporterMetricsResolutions) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -7017,8 +7853,8 @@ func (o *ChangeAgentOKBodyValkeyExporterMetricsResolutions) MarshalBinary() ([]b } // UnmarshalBinary interface implementation -func (o *ChangeAgentOKBodyValkeyExporterMetricsResolutions) UnmarshalBinary(b []byte) error { - var res ChangeAgentOKBodyValkeyExporterMetricsResolutions +func (o *ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -7027,52 +7863,40 @@ func (o *ChangeAgentOKBodyValkeyExporterMetricsResolutions) UnmarshalBinary(b [] } /* -ChangeAgentParamsBodyAzureDatabaseExporter change agent params body azure database exporter -swagger:model ChangeAgentParamsBodyAzureDatabaseExporter +ChangeAgentParamsBodyExternalExporter change agent params body external exporter +swagger:model ChangeAgentParamsBodyExternalExporter */ -type ChangeAgentParamsBodyAzureDatabaseExporter struct { +type ChangeAgentParamsBodyExternalExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` // Enables push metrics with vmagent. EnablePushMetrics *bool `json:"enable_push_metrics,omitempty"` - // Azure client ID - AzureClientID *string `json:"azure_client_id,omitempty"` - - // Azure client secret - AzureClientSecret *string `json:"azure_client_secret,omitempty"` - - // Azure tenant ID - AzureTenantID *string `json:"azure_tenant_id,omitempty"` + // HTTP basic auth username for collecting metrics. + Username *string `json:"username,omitempty"` - // Azure subscription ID - AzureSubscriptionID *string `json:"azure_subscription_id,omitempty"` + // Scheme to generate URI to exporter metrics endpoints. + Scheme *string `json:"scheme,omitempty"` - // Azure resource group. - AzureResourceGroup *string `json:"azure_resource_group,omitempty"` + // Path under which metrics are exposed, used to generate URI. + MetricsPath *string `json:"metrics_path,omitempty"` - // Log level for exporters - // - // - LOG_LEVEL_UNSPECIFIED: Auto - // Enum: ["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"] - LogLevel *string `json:"log_level,omitempty"` + // Listen port for scraping metrics. + ListenPort *int64 `json:"listen_port,omitempty"` // custom labels - CustomLabels *ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels `json:"custom_labels,omitempty"` + CustomLabels *ChangeAgentParamsBodyExternalExporterCustomLabels `json:"custom_labels,omitempty"` // metrics resolutions - MetricsResolutions *ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` + MetricsResolutions *ChangeAgentParamsBodyExternalExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` } -// Validate validates this change agent params body azure database exporter -func (o *ChangeAgentParamsBodyAzureDatabaseExporter) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body external exporter +func (o *ChangeAgentParamsBodyExternalExporter) Validate(formats strfmt.Registry) error { var res []error - if err := o.validateLogLevel(formats); err != nil { - res = append(res, err) - } - if err := o.validateCustomLabels(formats); err != nil { res = append(res, err) } @@ -7087,61 +7911,7 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporter) Validate(formats strfmt.Reg return nil } -var changeAgentParamsBodyAzureDatabaseExporterTypeLogLevelPropEnum []any - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - changeAgentParamsBodyAzureDatabaseExporterTypeLogLevelPropEnum = append(changeAgentParamsBodyAzureDatabaseExporterTypeLogLevelPropEnum, v) - } -} - -const ( - - // ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - - // ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - - // ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - - // ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - - // ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - - // ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - ChangeAgentParamsBodyAzureDatabaseExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" -) - -// prop value enum -func (o *ChangeAgentParamsBodyAzureDatabaseExporter) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, changeAgentParamsBodyAzureDatabaseExporterTypeLogLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *ChangeAgentParamsBodyAzureDatabaseExporter) validateLogLevel(formats strfmt.Registry) error { - if swag.IsZero(o.LogLevel) { // not required - return nil - } - - // value enum - if err := o.validateLogLevelEnum("body"+"."+"azure_database_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { - return err - } - - return nil -} - -func (o *ChangeAgentParamsBodyAzureDatabaseExporter) validateCustomLabels(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyExternalExporter) validateCustomLabels(formats strfmt.Registry) error { if swag.IsZero(o.CustomLabels) { // not required return nil } @@ -7150,11 +7920,11 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporter) validateCustomLabels(format if err := o.CustomLabels.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "azure_database_exporter" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "external_exporter" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "azure_database_exporter" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "external_exporter" + "." + "custom_labels") } return err @@ -7164,7 +7934,7 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporter) validateCustomLabels(format return nil } -func (o *ChangeAgentParamsBodyAzureDatabaseExporter) validateMetricsResolutions(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyExternalExporter) validateMetricsResolutions(formats strfmt.Registry) error { if swag.IsZero(o.MetricsResolutions) { // not required return nil } @@ -7173,11 +7943,11 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporter) validateMetricsResolutions( if err := o.MetricsResolutions.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "azure_database_exporter" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "external_exporter" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "azure_database_exporter" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "external_exporter" + "." + "metrics_resolutions") } return err @@ -7187,8 +7957,8 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporter) validateMetricsResolutions( return nil } -// ContextValidate validate this change agent params body azure database exporter based on the context it is used -func (o *ChangeAgentParamsBodyAzureDatabaseExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this change agent params body external exporter based on the context it is used +func (o *ChangeAgentParamsBodyExternalExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := o.contextValidateCustomLabels(ctx, formats); err != nil { @@ -7205,7 +7975,8 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporter) ContextValidate(ctx context return nil } -func (o *ChangeAgentParamsBodyAzureDatabaseExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyExternalExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -7215,11 +7986,11 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporter) contextValidateCustomLabels if err := o.CustomLabels.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "azure_database_exporter" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "external_exporter" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "azure_database_exporter" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "external_exporter" + "." + "custom_labels") } return err @@ -7229,7 +8000,8 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporter) contextValidateCustomLabels return nil } -func (o *ChangeAgentParamsBodyAzureDatabaseExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -7239,11 +8011,11 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporter) contextValidateMetricsResol if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "azure_database_exporter" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "external_exporter" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "azure_database_exporter" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "external_exporter" + "." + "metrics_resolutions") } return err @@ -7254,7 +8026,7 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporter) contextValidateMetricsResol } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyAzureDatabaseExporter) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyExternalExporter) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -7262,8 +8034,8 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporter) MarshalBinary() ([]byte, er } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyAzureDatabaseExporter) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyAzureDatabaseExporter +func (o *ChangeAgentParamsBodyExternalExporter) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyExternalExporter if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -7272,26 +8044,27 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporter) UnmarshalBinary(b []byte) e } /* -ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. -swagger:model ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels +ChangeAgentParamsBodyExternalExporterCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. +swagger:model ChangeAgentParamsBodyExternalExporterCustomLabels */ -type ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels struct { +type ChangeAgentParamsBodyExternalExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } -// Validate validates this change agent params body azure database exporter custom labels -func (o *ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body external exporter custom labels +func (o *ChangeAgentParamsBodyExternalExporterCustomLabels) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body azure database exporter custom labels based on context it is used -func (o *ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body external exporter custom labels based on context it is used +func (o *ChangeAgentParamsBodyExternalExporterCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyExternalExporterCustomLabels) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -7299,8 +8072,8 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels) MarshalBinary() } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels +func (o *ChangeAgentParamsBodyExternalExporterCustomLabels) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyExternalExporterCustomLabels if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -7309,10 +8082,11 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels) UnmarshalBinary } /* -ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. -swagger:model ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions +ChangeAgentParamsBodyExternalExporterMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. +swagger:model ChangeAgentParamsBodyExternalExporterMetricsResolutions */ -type ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions struct { +type ChangeAgentParamsBodyExternalExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -7323,18 +8097,18 @@ type ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions struct { Lr string `json:"lr,omitempty"` } -// Validate validates this change agent params body azure database exporter metrics resolutions -func (o *ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body external exporter metrics resolutions +func (o *ChangeAgentParamsBodyExternalExporterMetricsResolutions) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body azure database exporter metrics resolutions based on context it is used -func (o *ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body external exporter metrics resolutions based on context it is used +func (o *ChangeAgentParamsBodyExternalExporterMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyExternalExporterMetricsResolutions) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -7342,8 +8116,8 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions) MarshalBi } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions +func (o *ChangeAgentParamsBodyExternalExporterMetricsResolutions) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyExternalExporterMetricsResolutions if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -7352,39 +8126,89 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions) Unmarshal } /* -ChangeAgentParamsBodyExternalExporter change agent params body external exporter -swagger:model ChangeAgentParamsBodyExternalExporter +ChangeAgentParamsBodyMongodbExporter change agent params body mongodb exporter +swagger:model ChangeAgentParamsBodyMongodbExporter */ -type ChangeAgentParamsBodyExternalExporter struct { +type ChangeAgentParamsBodyMongodbExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` // Enables push metrics with vmagent. EnablePushMetrics *bool `json:"enable_push_metrics,omitempty"` - // HTTP basic auth username for collecting metrics. + // MongoDB username for scraping metrics. Username *string `json:"username,omitempty"` - // Scheme to generate URI to exporter metrics endpoints. - Scheme *string `json:"scheme,omitempty"` + // MongoDB password for scraping metrics. + Password *string `json:"password,omitempty"` - // Path under which metrics are exposed, used to generate URI. - MetricsPath *string `json:"metrics_path,omitempty"` + // Use TLS for database connections. + TLS *bool `json:"tls,omitempty"` - // Listen port for scraping metrics. - ListenPort *int64 `json:"listen_port,omitempty"` + // Skip TLS certificate and hostname validation. + TLSSkipVerify *bool `json:"tls_skip_verify,omitempty"` + + // Client certificate and key. + TLSCertificateKey *string `json:"tls_certificate_key,omitempty"` + + // Password for decrypting tls_certificate_key. + TLSCertificateKeyFilePassword *string `json:"tls_certificate_key_file_password,omitempty"` + + // Certificate Authority certificate chain. + TLSCa *string `json:"tls_ca,omitempty"` + + // Skip connection check. + SkipConnectionCheck *bool `json:"skip_connection_check,omitempty"` + + // List of collector names to disable in this exporter. + DisableCollectors []string `json:"disable_collectors"` + + // Authentication mechanism. + AuthenticationMechanism *string `json:"authentication_mechanism,omitempty"` + + // Authentication database. + AuthenticationDatabase *string `json:"authentication_database,omitempty"` + + // Custom password for exporter endpoint /metrics. + AgentPassword *string `json:"agent_password,omitempty"` + + // List of collections to get stats from. Can use * + StatsCollections []string `json:"stats_collections"` + + // Collections limit. Only get Databases and collection stats if the total number of collections in the server is less than this value. 0: no limit + CollectionsLimit *int32 `json:"collections_limit,omitempty"` + + // Enable all collectors. + EnableAllCollectors *bool `json:"enable_all_collectors,omitempty"` + + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: ["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"] + LogLevel *string `json:"log_level,omitempty"` + + // Optionally expose the exporter process on all public interfaces. + ExposeExporter *bool `json:"expose_exporter,omitempty"` + + // Connection timeout for exporter (if set). + ConnectionTimeout string `json:"connection_timeout,omitempty"` // custom labels - CustomLabels *ChangeAgentParamsBodyExternalExporterCustomLabels `json:"custom_labels,omitempty"` + CustomLabels *ChangeAgentParamsBodyMongodbExporterCustomLabels `json:"custom_labels,omitempty"` // metrics resolutions - MetricsResolutions *ChangeAgentParamsBodyExternalExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` + MetricsResolutions *ChangeAgentParamsBodyMongodbExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` } -// Validate validates this change agent params body external exporter -func (o *ChangeAgentParamsBodyExternalExporter) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body mongodb exporter +func (o *ChangeAgentParamsBodyMongodbExporter) Validate(formats strfmt.Registry) error { var res []error + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + if err := o.validateCustomLabels(formats); err != nil { res = append(res, err) } @@ -7399,7 +8223,61 @@ func (o *ChangeAgentParamsBodyExternalExporter) Validate(formats strfmt.Registry return nil } -func (o *ChangeAgentParamsBodyExternalExporter) validateCustomLabels(formats strfmt.Registry) error { +var changeAgentParamsBodyMongodbExporterTypeLogLevelPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + changeAgentParamsBodyMongodbExporterTypeLogLevelPropEnum = append(changeAgentParamsBodyMongodbExporterTypeLogLevelPropEnum, v) + } +} + +const ( + + // ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *ChangeAgentParamsBodyMongodbExporter) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentParamsBodyMongodbExporterTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *ChangeAgentParamsBodyMongodbExporter) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("body"+"."+"mongodb_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +func (o *ChangeAgentParamsBodyMongodbExporter) validateCustomLabels(formats strfmt.Registry) error { if swag.IsZero(o.CustomLabels) { // not required return nil } @@ -7408,11 +8286,11 @@ func (o *ChangeAgentParamsBodyExternalExporter) validateCustomLabels(formats str if err := o.CustomLabels.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "external_exporter" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "mongodb_exporter" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "external_exporter" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "mongodb_exporter" + "." + "custom_labels") } return err @@ -7422,7 +8300,7 @@ func (o *ChangeAgentParamsBodyExternalExporter) validateCustomLabels(formats str return nil } -func (o *ChangeAgentParamsBodyExternalExporter) validateMetricsResolutions(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyMongodbExporter) validateMetricsResolutions(formats strfmt.Registry) error { if swag.IsZero(o.MetricsResolutions) { // not required return nil } @@ -7431,11 +8309,11 @@ func (o *ChangeAgentParamsBodyExternalExporter) validateMetricsResolutions(forma if err := o.MetricsResolutions.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "external_exporter" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "mongodb_exporter" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "external_exporter" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "mongodb_exporter" + "." + "metrics_resolutions") } return err @@ -7445,8 +8323,8 @@ func (o *ChangeAgentParamsBodyExternalExporter) validateMetricsResolutions(forma return nil } -// ContextValidate validate this change agent params body external exporter based on the context it is used -func (o *ChangeAgentParamsBodyExternalExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this change agent params body mongodb exporter based on the context it is used +func (o *ChangeAgentParamsBodyMongodbExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := o.contextValidateCustomLabels(ctx, formats); err != nil { @@ -7463,7 +8341,8 @@ func (o *ChangeAgentParamsBodyExternalExporter) ContextValidate(ctx context.Cont return nil } -func (o *ChangeAgentParamsBodyExternalExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyMongodbExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -7473,11 +8352,11 @@ func (o *ChangeAgentParamsBodyExternalExporter) contextValidateCustomLabels(ctx if err := o.CustomLabels.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "external_exporter" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "mongodb_exporter" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "external_exporter" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "mongodb_exporter" + "." + "custom_labels") } return err @@ -7487,7 +8366,8 @@ func (o *ChangeAgentParamsBodyExternalExporter) contextValidateCustomLabels(ctx return nil } -func (o *ChangeAgentParamsBodyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -7497,11 +8377,11 @@ func (o *ChangeAgentParamsBodyExternalExporter) contextValidateMetricsResolution if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "external_exporter" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "mongodb_exporter" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "external_exporter" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "mongodb_exporter" + "." + "metrics_resolutions") } return err @@ -7512,7 +8392,7 @@ func (o *ChangeAgentParamsBodyExternalExporter) contextValidateMetricsResolution } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyExternalExporter) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyMongodbExporter) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -7520,8 +8400,8 @@ func (o *ChangeAgentParamsBodyExternalExporter) MarshalBinary() ([]byte, error) } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyExternalExporter) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyExternalExporter +func (o *ChangeAgentParamsBodyMongodbExporter) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyMongodbExporter if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -7530,26 +8410,27 @@ func (o *ChangeAgentParamsBodyExternalExporter) UnmarshalBinary(b []byte) error } /* -ChangeAgentParamsBodyExternalExporterCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. -swagger:model ChangeAgentParamsBodyExternalExporterCustomLabels +ChangeAgentParamsBodyMongodbExporterCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. +swagger:model ChangeAgentParamsBodyMongodbExporterCustomLabels */ -type ChangeAgentParamsBodyExternalExporterCustomLabels struct { +type ChangeAgentParamsBodyMongodbExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } -// Validate validates this change agent params body external exporter custom labels -func (o *ChangeAgentParamsBodyExternalExporterCustomLabels) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body mongodb exporter custom labels +func (o *ChangeAgentParamsBodyMongodbExporterCustomLabels) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body external exporter custom labels based on context it is used -func (o *ChangeAgentParamsBodyExternalExporterCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body mongodb exporter custom labels based on context it is used +func (o *ChangeAgentParamsBodyMongodbExporterCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyExternalExporterCustomLabels) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyMongodbExporterCustomLabels) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -7557,8 +8438,8 @@ func (o *ChangeAgentParamsBodyExternalExporterCustomLabels) MarshalBinary() ([]b } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyExternalExporterCustomLabels) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyExternalExporterCustomLabels +func (o *ChangeAgentParamsBodyMongodbExporterCustomLabels) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyMongodbExporterCustomLabels if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -7567,10 +8448,11 @@ func (o *ChangeAgentParamsBodyExternalExporterCustomLabels) UnmarshalBinary(b [] } /* -ChangeAgentParamsBodyExternalExporterMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. -swagger:model ChangeAgentParamsBodyExternalExporterMetricsResolutions +ChangeAgentParamsBodyMongodbExporterMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. +swagger:model ChangeAgentParamsBodyMongodbExporterMetricsResolutions */ -type ChangeAgentParamsBodyExternalExporterMetricsResolutions struct { +type ChangeAgentParamsBodyMongodbExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -7581,18 +8463,18 @@ type ChangeAgentParamsBodyExternalExporterMetricsResolutions struct { Lr string `json:"lr,omitempty"` } -// Validate validates this change agent params body external exporter metrics resolutions -func (o *ChangeAgentParamsBodyExternalExporterMetricsResolutions) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body mongodb exporter metrics resolutions +func (o *ChangeAgentParamsBodyMongodbExporterMetricsResolutions) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body external exporter metrics resolutions based on context it is used -func (o *ChangeAgentParamsBodyExternalExporterMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body mongodb exporter metrics resolutions based on context it is used +func (o *ChangeAgentParamsBodyMongodbExporterMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyExternalExporterMetricsResolutions) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyMongodbExporterMetricsResolutions) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -7600,8 +8482,8 @@ func (o *ChangeAgentParamsBodyExternalExporterMetricsResolutions) MarshalBinary( } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyExternalExporterMetricsResolutions) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyExternalExporterMetricsResolutions +func (o *ChangeAgentParamsBodyMongodbExporterMetricsResolutions) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyMongodbExporterMetricsResolutions if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -7610,20 +8492,21 @@ func (o *ChangeAgentParamsBodyExternalExporterMetricsResolutions) UnmarshalBinar } /* -ChangeAgentParamsBodyMongodbExporter change agent params body mongodb exporter -swagger:model ChangeAgentParamsBodyMongodbExporter +ChangeAgentParamsBodyMysqldExporter change agent params body mysqld exporter +swagger:model ChangeAgentParamsBodyMysqldExporter */ -type ChangeAgentParamsBodyMongodbExporter struct { +type ChangeAgentParamsBodyMysqldExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` // Enables push metrics with vmagent. EnablePushMetrics *bool `json:"enable_push_metrics,omitempty"` - // MongoDB username for scraping metrics. + // MySQL username for scraping metrics. Username *string `json:"username,omitempty"` - // MongoDB password for scraping metrics. + // MySQL password for scraping metrics. Password *string `json:"password,omitempty"` // Use TLS for database connections. @@ -7632,39 +8515,27 @@ type ChangeAgentParamsBodyMongodbExporter struct { // Skip TLS certificate and hostname validation. TLSSkipVerify *bool `json:"tls_skip_verify,omitempty"` - // Client certificate and key. - TLSCertificateKey *string `json:"tls_certificate_key,omitempty"` - - // Password for decrypting tls_certificate_key. - TLSCertificateKeyFilePassword *string `json:"tls_certificate_key_file_password,omitempty"` - // Certificate Authority certificate chain. TLSCa *string `json:"tls_ca,omitempty"` + // Client certificate. + TLSCert *string `json:"tls_cert,omitempty"` + + // Password for decrypting tls_cert. + TLSKey *string `json:"tls_key,omitempty"` + + // Tablestats group collectors will be disabled if there are more than that number of tables. + TablestatsGroupTableLimit *int32 `json:"tablestats_group_table_limit,omitempty"` + // Skip connection check. SkipConnectionCheck *bool `json:"skip_connection_check,omitempty"` // List of collector names to disable in this exporter. DisableCollectors []string `json:"disable_collectors"` - // Authentication mechanism. - AuthenticationMechanism *string `json:"authentication_mechanism,omitempty"` - - // Authentication database. - AuthenticationDatabase *string `json:"authentication_database,omitempty"` - // Custom password for exporter endpoint /metrics. AgentPassword *string `json:"agent_password,omitempty"` - // List of collections to get stats from. Can use * - StatsCollections []string `json:"stats_collections"` - - // Collections limit. Only get Databases and collection stats if the total number of collections in the server is less than this value. 0: no limit - CollectionsLimit *int32 `json:"collections_limit,omitempty"` - - // Enable all collectors. - EnableAllCollectors *bool `json:"enable_all_collectors,omitempty"` - // Log level for exporters // // - LOG_LEVEL_UNSPECIFIED: Auto @@ -7678,14 +8549,14 @@ type ChangeAgentParamsBodyMongodbExporter struct { ConnectionTimeout string `json:"connection_timeout,omitempty"` // custom labels - CustomLabels *ChangeAgentParamsBodyMongodbExporterCustomLabels `json:"custom_labels,omitempty"` + CustomLabels *ChangeAgentParamsBodyMysqldExporterCustomLabels `json:"custom_labels,omitempty"` // metrics resolutions - MetricsResolutions *ChangeAgentParamsBodyMongodbExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` + MetricsResolutions *ChangeAgentParamsBodyMysqldExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` } -// Validate validates this change agent params body mongodb exporter -func (o *ChangeAgentParamsBodyMongodbExporter) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body mysqld exporter +func (o *ChangeAgentParamsBodyMysqldExporter) Validate(formats strfmt.Registry) error { var res []error if err := o.validateLogLevel(formats); err != nil { @@ -7706,7 +8577,7 @@ func (o *ChangeAgentParamsBodyMongodbExporter) Validate(formats strfmt.Registry) return nil } -var changeAgentParamsBodyMongodbExporterTypeLogLevelPropEnum []any +var changeAgentParamsBodyMysqldExporterTypeLogLevelPropEnum []any func init() { var res []string @@ -7714,53 +8585,53 @@ func init() { panic(err) } for _, v := range res { - changeAgentParamsBodyMongodbExporterTypeLogLevelPropEnum = append(changeAgentParamsBodyMongodbExporterTypeLogLevelPropEnum, v) + changeAgentParamsBodyMysqldExporterTypeLogLevelPropEnum = append(changeAgentParamsBodyMysqldExporterTypeLogLevelPropEnum, v) } } const ( - // ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + // ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - // ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + // ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - // ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + // ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - // ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + // ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - // ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + // ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - // ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - ChangeAgentParamsBodyMongodbExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" + // ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" ) // prop value enum -func (o *ChangeAgentParamsBodyMongodbExporter) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, changeAgentParamsBodyMongodbExporterTypeLogLevelPropEnum, true); err != nil { +func (o *ChangeAgentParamsBodyMysqldExporter) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentParamsBodyMysqldExporterTypeLogLevelPropEnum, true); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyMongodbExporter) validateLogLevel(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyMysqldExporter) validateLogLevel(formats strfmt.Registry) error { if swag.IsZero(o.LogLevel) { // not required return nil } // value enum - if err := o.validateLogLevelEnum("body"+"."+"mongodb_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { + if err := o.validateLogLevelEnum("body"+"."+"mysqld_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyMongodbExporter) validateCustomLabels(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyMysqldExporter) validateCustomLabels(formats strfmt.Registry) error { if swag.IsZero(o.CustomLabels) { // not required return nil } @@ -7769,11 +8640,11 @@ func (o *ChangeAgentParamsBodyMongodbExporter) validateCustomLabels(formats strf if err := o.CustomLabels.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "mongodb_exporter" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "mysqld_exporter" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "mongodb_exporter" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "mysqld_exporter" + "." + "custom_labels") } return err @@ -7783,7 +8654,7 @@ func (o *ChangeAgentParamsBodyMongodbExporter) validateCustomLabels(formats strf return nil } -func (o *ChangeAgentParamsBodyMongodbExporter) validateMetricsResolutions(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyMysqldExporter) validateMetricsResolutions(formats strfmt.Registry) error { if swag.IsZero(o.MetricsResolutions) { // not required return nil } @@ -7792,11 +8663,11 @@ func (o *ChangeAgentParamsBodyMongodbExporter) validateMetricsResolutions(format if err := o.MetricsResolutions.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "mongodb_exporter" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "mysqld_exporter" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "mongodb_exporter" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "mysqld_exporter" + "." + "metrics_resolutions") } return err @@ -7806,8 +8677,8 @@ func (o *ChangeAgentParamsBodyMongodbExporter) validateMetricsResolutions(format return nil } -// ContextValidate validate this change agent params body mongodb exporter based on the context it is used -func (o *ChangeAgentParamsBodyMongodbExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this change agent params body mysqld exporter based on the context it is used +func (o *ChangeAgentParamsBodyMysqldExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := o.contextValidateCustomLabels(ctx, formats); err != nil { @@ -7824,7 +8695,8 @@ func (o *ChangeAgentParamsBodyMongodbExporter) ContextValidate(ctx context.Conte return nil } -func (o *ChangeAgentParamsBodyMongodbExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyMysqldExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -7834,11 +8706,11 @@ func (o *ChangeAgentParamsBodyMongodbExporter) contextValidateCustomLabels(ctx c if err := o.CustomLabels.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "mongodb_exporter" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "mysqld_exporter" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "mongodb_exporter" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "mysqld_exporter" + "." + "custom_labels") } return err @@ -7848,7 +8720,8 @@ func (o *ChangeAgentParamsBodyMongodbExporter) contextValidateCustomLabels(ctx c return nil } -func (o *ChangeAgentParamsBodyMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -7858,11 +8731,11 @@ func (o *ChangeAgentParamsBodyMongodbExporter) contextValidateMetricsResolutions if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "mongodb_exporter" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "mysqld_exporter" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "mongodb_exporter" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "mysqld_exporter" + "." + "metrics_resolutions") } return err @@ -7873,7 +8746,7 @@ func (o *ChangeAgentParamsBodyMongodbExporter) contextValidateMetricsResolutions } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyMongodbExporter) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyMysqldExporter) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -7881,8 +8754,8 @@ func (o *ChangeAgentParamsBodyMongodbExporter) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyMongodbExporter) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyMongodbExporter +func (o *ChangeAgentParamsBodyMysqldExporter) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyMysqldExporter if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -7891,26 +8764,27 @@ func (o *ChangeAgentParamsBodyMongodbExporter) UnmarshalBinary(b []byte) error { } /* -ChangeAgentParamsBodyMongodbExporterCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. -swagger:model ChangeAgentParamsBodyMongodbExporterCustomLabels +ChangeAgentParamsBodyMysqldExporterCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. +swagger:model ChangeAgentParamsBodyMysqldExporterCustomLabels */ -type ChangeAgentParamsBodyMongodbExporterCustomLabels struct { +type ChangeAgentParamsBodyMysqldExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } -// Validate validates this change agent params body mongodb exporter custom labels -func (o *ChangeAgentParamsBodyMongodbExporterCustomLabels) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body mysqld exporter custom labels +func (o *ChangeAgentParamsBodyMysqldExporterCustomLabels) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body mongodb exporter custom labels based on context it is used -func (o *ChangeAgentParamsBodyMongodbExporterCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body mysqld exporter custom labels based on context it is used +func (o *ChangeAgentParamsBodyMysqldExporterCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyMongodbExporterCustomLabels) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyMysqldExporterCustomLabels) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -7918,8 +8792,8 @@ func (o *ChangeAgentParamsBodyMongodbExporterCustomLabels) MarshalBinary() ([]by } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyMongodbExporterCustomLabels) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyMongodbExporterCustomLabels +func (o *ChangeAgentParamsBodyMysqldExporterCustomLabels) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyMysqldExporterCustomLabels if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -7928,10 +8802,11 @@ func (o *ChangeAgentParamsBodyMongodbExporterCustomLabels) UnmarshalBinary(b []b } /* -ChangeAgentParamsBodyMongodbExporterMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. -swagger:model ChangeAgentParamsBodyMongodbExporterMetricsResolutions +ChangeAgentParamsBodyMysqldExporterMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. +swagger:model ChangeAgentParamsBodyMysqldExporterMetricsResolutions */ -type ChangeAgentParamsBodyMongodbExporterMetricsResolutions struct { +type ChangeAgentParamsBodyMysqldExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -7942,18 +8817,18 @@ type ChangeAgentParamsBodyMongodbExporterMetricsResolutions struct { Lr string `json:"lr,omitempty"` } -// Validate validates this change agent params body mongodb exporter metrics resolutions -func (o *ChangeAgentParamsBodyMongodbExporterMetricsResolutions) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body mysqld exporter metrics resolutions +func (o *ChangeAgentParamsBodyMysqldExporterMetricsResolutions) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body mongodb exporter metrics resolutions based on context it is used -func (o *ChangeAgentParamsBodyMongodbExporterMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body mysqld exporter metrics resolutions based on context it is used +func (o *ChangeAgentParamsBodyMysqldExporterMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyMongodbExporterMetricsResolutions) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyMysqldExporterMetricsResolutions) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -7961,8 +8836,8 @@ func (o *ChangeAgentParamsBodyMongodbExporterMetricsResolutions) MarshalBinary() } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyMongodbExporterMetricsResolutions) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyMongodbExporterMetricsResolutions +func (o *ChangeAgentParamsBodyMysqldExporterMetricsResolutions) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyMysqldExporterMetricsResolutions if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -7971,70 +8846,38 @@ func (o *ChangeAgentParamsBodyMongodbExporterMetricsResolutions) UnmarshalBinary } /* -ChangeAgentParamsBodyMysqldExporter change agent params body mysqld exporter -swagger:model ChangeAgentParamsBodyMysqldExporter +ChangeAgentParamsBodyNodeExporter change agent params body node exporter +swagger:model ChangeAgentParamsBodyNodeExporter */ -type ChangeAgentParamsBodyMysqldExporter struct { +type ChangeAgentParamsBodyNodeExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` // Enables push metrics with vmagent. EnablePushMetrics *bool `json:"enable_push_metrics,omitempty"` - // MySQL username for scraping metrics. - Username *string `json:"username,omitempty"` - - // MySQL password for scraping metrics. - Password *string `json:"password,omitempty"` - - // Use TLS for database connections. - TLS *bool `json:"tls,omitempty"` - - // Skip TLS certificate and hostname validation. - TLSSkipVerify *bool `json:"tls_skip_verify,omitempty"` - - // Certificate Authority certificate chain. - TLSCa *string `json:"tls_ca,omitempty"` - - // Client certificate. - TLSCert *string `json:"tls_cert,omitempty"` - - // Password for decrypting tls_cert. - TLSKey *string `json:"tls_key,omitempty"` - - // Tablestats group collectors will be disabled if there are more than that number of tables. - TablestatsGroupTableLimit *int32 `json:"tablestats_group_table_limit,omitempty"` - - // Skip connection check. - SkipConnectionCheck *bool `json:"skip_connection_check,omitempty"` - // List of collector names to disable in this exporter. DisableCollectors []string `json:"disable_collectors"` - // Custom password for exporter endpoint /metrics. - AgentPassword *string `json:"agent_password,omitempty"` - // Log level for exporters // // - LOG_LEVEL_UNSPECIFIED: Auto // Enum: ["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"] LogLevel *string `json:"log_level,omitempty"` - // Optionally expose the exporter process on all public interfaces. + // Expose the node_exporter process on all public interfaces. ExposeExporter *bool `json:"expose_exporter,omitempty"` - // Connection timeout for exporter (if set). - ConnectionTimeout string `json:"connection_timeout,omitempty"` - // custom labels - CustomLabels *ChangeAgentParamsBodyMysqldExporterCustomLabels `json:"custom_labels,omitempty"` + CustomLabels *ChangeAgentParamsBodyNodeExporterCustomLabels `json:"custom_labels,omitempty"` // metrics resolutions - MetricsResolutions *ChangeAgentParamsBodyMysqldExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` + MetricsResolutions *ChangeAgentParamsBodyNodeExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` } -// Validate validates this change agent params body mysqld exporter -func (o *ChangeAgentParamsBodyMysqldExporter) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body node exporter +func (o *ChangeAgentParamsBodyNodeExporter) Validate(formats strfmt.Registry) error { var res []error if err := o.validateLogLevel(formats); err != nil { @@ -8055,7 +8898,7 @@ func (o *ChangeAgentParamsBodyMysqldExporter) Validate(formats strfmt.Registry) return nil } -var changeAgentParamsBodyMysqldExporterTypeLogLevelPropEnum []any +var changeAgentParamsBodyNodeExporterTypeLogLevelPropEnum []any func init() { var res []string @@ -8063,53 +8906,53 @@ func init() { panic(err) } for _, v := range res { - changeAgentParamsBodyMysqldExporterTypeLogLevelPropEnum = append(changeAgentParamsBodyMysqldExporterTypeLogLevelPropEnum, v) + changeAgentParamsBodyNodeExporterTypeLogLevelPropEnum = append(changeAgentParamsBodyNodeExporterTypeLogLevelPropEnum, v) } } const ( - // ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + // ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - // ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + // ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - // ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + // ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - // ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + // ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - // ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + // ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - // ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - ChangeAgentParamsBodyMysqldExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" + // ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" ) // prop value enum -func (o *ChangeAgentParamsBodyMysqldExporter) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, changeAgentParamsBodyMysqldExporterTypeLogLevelPropEnum, true); err != nil { +func (o *ChangeAgentParamsBodyNodeExporter) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentParamsBodyNodeExporterTypeLogLevelPropEnum, true); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyMysqldExporter) validateLogLevel(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyNodeExporter) validateLogLevel(formats strfmt.Registry) error { if swag.IsZero(o.LogLevel) { // not required return nil } // value enum - if err := o.validateLogLevelEnum("body"+"."+"mysqld_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { + if err := o.validateLogLevelEnum("body"+"."+"node_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyMysqldExporter) validateCustomLabels(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyNodeExporter) validateCustomLabels(formats strfmt.Registry) error { if swag.IsZero(o.CustomLabels) { // not required return nil } @@ -8118,11 +8961,11 @@ func (o *ChangeAgentParamsBodyMysqldExporter) validateCustomLabels(formats strfm if err := o.CustomLabels.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "mysqld_exporter" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "node_exporter" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "mysqld_exporter" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "node_exporter" + "." + "custom_labels") } return err @@ -8132,7 +8975,7 @@ func (o *ChangeAgentParamsBodyMysqldExporter) validateCustomLabels(formats strfm return nil } -func (o *ChangeAgentParamsBodyMysqldExporter) validateMetricsResolutions(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyNodeExporter) validateMetricsResolutions(formats strfmt.Registry) error { if swag.IsZero(o.MetricsResolutions) { // not required return nil } @@ -8141,11 +8984,11 @@ func (o *ChangeAgentParamsBodyMysqldExporter) validateMetricsResolutions(formats if err := o.MetricsResolutions.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "mysqld_exporter" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "node_exporter" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "mysqld_exporter" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "node_exporter" + "." + "metrics_resolutions") } return err @@ -8155,8 +8998,8 @@ func (o *ChangeAgentParamsBodyMysqldExporter) validateMetricsResolutions(formats return nil } -// ContextValidate validate this change agent params body mysqld exporter based on the context it is used -func (o *ChangeAgentParamsBodyMysqldExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this change agent params body node exporter based on the context it is used +func (o *ChangeAgentParamsBodyNodeExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := o.contextValidateCustomLabels(ctx, formats); err != nil { @@ -8173,7 +9016,8 @@ func (o *ChangeAgentParamsBodyMysqldExporter) ContextValidate(ctx context.Contex return nil } -func (o *ChangeAgentParamsBodyMysqldExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyNodeExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -8183,11 +9027,11 @@ func (o *ChangeAgentParamsBodyMysqldExporter) contextValidateCustomLabels(ctx co if err := o.CustomLabels.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "mysqld_exporter" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "node_exporter" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "mysqld_exporter" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "node_exporter" + "." + "custom_labels") } return err @@ -8197,7 +9041,8 @@ func (o *ChangeAgentParamsBodyMysqldExporter) contextValidateCustomLabels(ctx co return nil } -func (o *ChangeAgentParamsBodyMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyNodeExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -8207,22 +9052,60 @@ func (o *ChangeAgentParamsBodyMysqldExporter) contextValidateMetricsResolutions( if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "mysqld_exporter" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "node_exporter" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "mysqld_exporter" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "node_exporter" + "." + "metrics_resolutions") } - return err - } - } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeAgentParamsBodyNodeExporter) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeAgentParamsBodyNodeExporter) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyNodeExporter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ChangeAgentParamsBodyNodeExporterCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. +swagger:model ChangeAgentParamsBodyNodeExporterCustomLabels +*/ +type ChangeAgentParamsBodyNodeExporterCustomLabels struct { + + // values + Values map[string]string `json:"values,omitempty"` +} + +// Validate validates this change agent params body node exporter custom labels +func (o *ChangeAgentParamsBodyNodeExporterCustomLabels) Validate(formats strfmt.Registry) error { + return nil +} +// ContextValidate validates this change agent params body node exporter custom labels based on context it is used +func (o *ChangeAgentParamsBodyNodeExporterCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyMysqldExporter) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyNodeExporterCustomLabels) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -8230,8 +9113,8 @@ func (o *ChangeAgentParamsBodyMysqldExporter) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyMysqldExporter) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyMysqldExporter +func (o *ChangeAgentParamsBodyNodeExporterCustomLabels) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyNodeExporterCustomLabels if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -8240,26 +9123,33 @@ func (o *ChangeAgentParamsBodyMysqldExporter) UnmarshalBinary(b []byte) error { } /* -ChangeAgentParamsBodyMysqldExporterCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. -swagger:model ChangeAgentParamsBodyMysqldExporterCustomLabels +ChangeAgentParamsBodyNodeExporterMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. +swagger:model ChangeAgentParamsBodyNodeExporterMetricsResolutions */ -type ChangeAgentParamsBodyMysqldExporterCustomLabels struct { - // values - Values map[string]string `json:"values,omitempty"` +type ChangeAgentParamsBodyNodeExporterMetricsResolutions struct { + + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. + Hr string `json:"hr,omitempty"` + + // Medium resolution. In JSON should be represented as a string with number of seconds with `s` suffix. + Mr string `json:"mr,omitempty"` + + // Low resolution. In JSON should be represented as a string with number of seconds with `s` suffix. + Lr string `json:"lr,omitempty"` } -// Validate validates this change agent params body mysqld exporter custom labels -func (o *ChangeAgentParamsBodyMysqldExporterCustomLabels) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body node exporter metrics resolutions +func (o *ChangeAgentParamsBodyNodeExporterMetricsResolutions) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body mysqld exporter custom labels based on context it is used -func (o *ChangeAgentParamsBodyMysqldExporterCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body node exporter metrics resolutions based on context it is used +func (o *ChangeAgentParamsBodyNodeExporterMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyMysqldExporterCustomLabels) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyNodeExporterMetricsResolutions) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -8267,8 +9157,8 @@ func (o *ChangeAgentParamsBodyMysqldExporterCustomLabels) MarshalBinary() ([]byt } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyMysqldExporterCustomLabels) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyMysqldExporterCustomLabels +func (o *ChangeAgentParamsBodyNodeExporterMetricsResolutions) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyNodeExporterMetricsResolutions if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -8277,32 +9167,27 @@ func (o *ChangeAgentParamsBodyMysqldExporterCustomLabels) UnmarshalBinary(b []by } /* -ChangeAgentParamsBodyMysqldExporterMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. -swagger:model ChangeAgentParamsBodyMysqldExporterMetricsResolutions +ChangeAgentParamsBodyNomadAgent change agent params body nomad agent +swagger:model ChangeAgentParamsBodyNomadAgent */ -type ChangeAgentParamsBodyMysqldExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. - Hr string `json:"hr,omitempty"` - - // Medium resolution. In JSON should be represented as a string with number of seconds with `s` suffix. - Mr string `json:"mr,omitempty"` +type ChangeAgentParamsBodyNomadAgent struct { - // Low resolution. In JSON should be represented as a string with number of seconds with `s` suffix. - Lr string `json:"lr,omitempty"` + // Enable this Agent. Agents are enabled by default when they get added. + Enable *bool `json:"enable,omitempty"` } -// Validate validates this change agent params body mysqld exporter metrics resolutions -func (o *ChangeAgentParamsBodyMysqldExporterMetricsResolutions) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body nomad agent +func (o *ChangeAgentParamsBodyNomadAgent) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body mysqld exporter metrics resolutions based on context it is used -func (o *ChangeAgentParamsBodyMysqldExporterMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body nomad agent based on context it is used +func (o *ChangeAgentParamsBodyNomadAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyMysqldExporterMetricsResolutions) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyNomadAgent) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -8310,8 +9195,8 @@ func (o *ChangeAgentParamsBodyMysqldExporterMetricsResolutions) MarshalBinary() } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyMysqldExporterMetricsResolutions) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyMysqldExporterMetricsResolutions +func (o *ChangeAgentParamsBodyNomadAgent) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyNomadAgent if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -8320,37 +9205,74 @@ func (o *ChangeAgentParamsBodyMysqldExporterMetricsResolutions) UnmarshalBinary( } /* -ChangeAgentParamsBodyNodeExporter change agent params body node exporter -swagger:model ChangeAgentParamsBodyNodeExporter +ChangeAgentParamsBodyPostgresExporter change agent params body postgres exporter +swagger:model ChangeAgentParamsBodyPostgresExporter */ -type ChangeAgentParamsBodyNodeExporter struct { +type ChangeAgentParamsBodyPostgresExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` // Enables push metrics with vmagent. EnablePushMetrics *bool `json:"enable_push_metrics,omitempty"` + // PostgreSQL username for scraping metrics. + Username *string `json:"username,omitempty"` + + // PostgreSQL password for scraping metrics. + Password *string `json:"password,omitempty"` + + // Use TLS for database connections. + TLS *bool `json:"tls,omitempty"` + + // Skip TLS certificate and hostname validation. + TLSSkipVerify *bool `json:"tls_skip_verify,omitempty"` + + // Skip connection check. + SkipConnectionCheck *bool `json:"skip_connection_check,omitempty"` + // List of collector names to disable in this exporter. DisableCollectors []string `json:"disable_collectors"` + // TLS CA certificate. + TLSCa *string `json:"tls_ca,omitempty"` + + // TLS Certificate. + TLSCert *string `json:"tls_cert,omitempty"` + + // TLS Certificate Key. + TLSKey *string `json:"tls_key,omitempty"` + + // Custom password for exporter endpoint /metrics. + AgentPassword *string `json:"agent_password,omitempty"` + // Log level for exporters // // - LOG_LEVEL_UNSPECIFIED: Auto // Enum: ["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"] LogLevel *string `json:"log_level,omitempty"` - // Expose the node_exporter process on all public interfaces. + // Limit of databases for auto-discovery. + AutoDiscoveryLimit *int32 `json:"auto_discovery_limit,omitempty"` + + // Optionally expose the exporter process on all public interfaces. ExposeExporter *bool `json:"expose_exporter,omitempty"` + // Maximum number of connections that exporter can open to the database instance. + MaxExporterConnections *int32 `json:"max_exporter_connections,omitempty"` + + // Connection timeout for exporter (if set). + ConnectionTimeout string `json:"connection_timeout,omitempty"` + // custom labels - CustomLabels *ChangeAgentParamsBodyNodeExporterCustomLabels `json:"custom_labels,omitempty"` + CustomLabels *ChangeAgentParamsBodyPostgresExporterCustomLabels `json:"custom_labels,omitempty"` // metrics resolutions - MetricsResolutions *ChangeAgentParamsBodyNodeExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` + MetricsResolutions *ChangeAgentParamsBodyPostgresExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` } -// Validate validates this change agent params body node exporter -func (o *ChangeAgentParamsBodyNodeExporter) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body postgres exporter +func (o *ChangeAgentParamsBodyPostgresExporter) Validate(formats strfmt.Registry) error { var res []error if err := o.validateLogLevel(formats); err != nil { @@ -8371,7 +9293,7 @@ func (o *ChangeAgentParamsBodyNodeExporter) Validate(formats strfmt.Registry) er return nil } -var changeAgentParamsBodyNodeExporterTypeLogLevelPropEnum []any +var changeAgentParamsBodyPostgresExporterTypeLogLevelPropEnum []any func init() { var res []string @@ -8379,53 +9301,53 @@ func init() { panic(err) } for _, v := range res { - changeAgentParamsBodyNodeExporterTypeLogLevelPropEnum = append(changeAgentParamsBodyNodeExporterTypeLogLevelPropEnum, v) + changeAgentParamsBodyPostgresExporterTypeLogLevelPropEnum = append(changeAgentParamsBodyPostgresExporterTypeLogLevelPropEnum, v) } } const ( - // ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + // ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - // ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + // ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - // ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + // ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - // ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + // ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - // ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + // ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - // ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - ChangeAgentParamsBodyNodeExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" + // ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" ) // prop value enum -func (o *ChangeAgentParamsBodyNodeExporter) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, changeAgentParamsBodyNodeExporterTypeLogLevelPropEnum, true); err != nil { +func (o *ChangeAgentParamsBodyPostgresExporter) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentParamsBodyPostgresExporterTypeLogLevelPropEnum, true); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyNodeExporter) validateLogLevel(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyPostgresExporter) validateLogLevel(formats strfmt.Registry) error { if swag.IsZero(o.LogLevel) { // not required return nil } // value enum - if err := o.validateLogLevelEnum("body"+"."+"node_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { + if err := o.validateLogLevelEnum("body"+"."+"postgres_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyNodeExporter) validateCustomLabels(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyPostgresExporter) validateCustomLabels(formats strfmt.Registry) error { if swag.IsZero(o.CustomLabels) { // not required return nil } @@ -8434,11 +9356,11 @@ func (o *ChangeAgentParamsBodyNodeExporter) validateCustomLabels(formats strfmt. if err := o.CustomLabels.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "node_exporter" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "postgres_exporter" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "node_exporter" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "postgres_exporter" + "." + "custom_labels") } return err @@ -8448,7 +9370,7 @@ func (o *ChangeAgentParamsBodyNodeExporter) validateCustomLabels(formats strfmt. return nil } -func (o *ChangeAgentParamsBodyNodeExporter) validateMetricsResolutions(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyPostgresExporter) validateMetricsResolutions(formats strfmt.Registry) error { if swag.IsZero(o.MetricsResolutions) { // not required return nil } @@ -8457,11 +9379,11 @@ func (o *ChangeAgentParamsBodyNodeExporter) validateMetricsResolutions(formats s if err := o.MetricsResolutions.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "node_exporter" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "postgres_exporter" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "node_exporter" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "postgres_exporter" + "." + "metrics_resolutions") } return err @@ -8471,8 +9393,8 @@ func (o *ChangeAgentParamsBodyNodeExporter) validateMetricsResolutions(formats s return nil } -// ContextValidate validate this change agent params body node exporter based on the context it is used -func (o *ChangeAgentParamsBodyNodeExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this change agent params body postgres exporter based on the context it is used +func (o *ChangeAgentParamsBodyPostgresExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := o.contextValidateCustomLabels(ctx, formats); err != nil { @@ -8489,7 +9411,8 @@ func (o *ChangeAgentParamsBodyNodeExporter) ContextValidate(ctx context.Context, return nil } -func (o *ChangeAgentParamsBodyNodeExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyPostgresExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -8499,11 +9422,11 @@ func (o *ChangeAgentParamsBodyNodeExporter) contextValidateCustomLabels(ctx cont if err := o.CustomLabels.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "node_exporter" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "postgres_exporter" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "node_exporter" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "postgres_exporter" + "." + "custom_labels") } return err @@ -8513,7 +9436,8 @@ func (o *ChangeAgentParamsBodyNodeExporter) contextValidateCustomLabels(ctx cont return nil } -func (o *ChangeAgentParamsBodyNodeExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -8523,11 +9447,11 @@ func (o *ChangeAgentParamsBodyNodeExporter) contextValidateMetricsResolutions(ct if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "node_exporter" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "postgres_exporter" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "node_exporter" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "postgres_exporter" + "." + "metrics_resolutions") } return err @@ -8538,44 +9462,7 @@ func (o *ChangeAgentParamsBodyNodeExporter) contextValidateMetricsResolutions(ct } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyNodeExporter) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyNodeExporter) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyNodeExporter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ChangeAgentParamsBodyNodeExporterCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. -swagger:model ChangeAgentParamsBodyNodeExporterCustomLabels -*/ -type ChangeAgentParamsBodyNodeExporterCustomLabels struct { - // values - Values map[string]string `json:"values,omitempty"` -} - -// Validate validates this change agent params body node exporter custom labels -func (o *ChangeAgentParamsBodyNodeExporterCustomLabels) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this change agent params body node exporter custom labels based on context it is used -func (o *ChangeAgentParamsBodyNodeExporterCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyNodeExporterCustomLabels) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyPostgresExporter) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -8583,8 +9470,8 @@ func (o *ChangeAgentParamsBodyNodeExporterCustomLabels) MarshalBinary() ([]byte, } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyNodeExporterCustomLabels) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyNodeExporterCustomLabels +func (o *ChangeAgentParamsBodyPostgresExporter) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyPostgresExporter if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -8593,32 +9480,27 @@ func (o *ChangeAgentParamsBodyNodeExporterCustomLabels) UnmarshalBinary(b []byte } /* -ChangeAgentParamsBodyNodeExporterMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. -swagger:model ChangeAgentParamsBodyNodeExporterMetricsResolutions +ChangeAgentParamsBodyPostgresExporterCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. +swagger:model ChangeAgentParamsBodyPostgresExporterCustomLabels */ -type ChangeAgentParamsBodyNodeExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. - Hr string `json:"hr,omitempty"` - - // Medium resolution. In JSON should be represented as a string with number of seconds with `s` suffix. - Mr string `json:"mr,omitempty"` +type ChangeAgentParamsBodyPostgresExporterCustomLabels struct { - // Low resolution. In JSON should be represented as a string with number of seconds with `s` suffix. - Lr string `json:"lr,omitempty"` + // values + Values map[string]string `json:"values,omitempty"` } -// Validate validates this change agent params body node exporter metrics resolutions -func (o *ChangeAgentParamsBodyNodeExporterMetricsResolutions) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body postgres exporter custom labels +func (o *ChangeAgentParamsBodyPostgresExporterCustomLabels) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body node exporter metrics resolutions based on context it is used -func (o *ChangeAgentParamsBodyNodeExporterMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body postgres exporter custom labels based on context it is used +func (o *ChangeAgentParamsBodyPostgresExporterCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyNodeExporterMetricsResolutions) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyPostgresExporterCustomLabels) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -8626,8 +9508,8 @@ func (o *ChangeAgentParamsBodyNodeExporterMetricsResolutions) MarshalBinary() ([ } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyNodeExporterMetricsResolutions) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyNodeExporterMetricsResolutions +func (o *ChangeAgentParamsBodyPostgresExporterCustomLabels) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyPostgresExporterCustomLabels if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -8636,26 +9518,33 @@ func (o *ChangeAgentParamsBodyNodeExporterMetricsResolutions) UnmarshalBinary(b } /* -ChangeAgentParamsBodyNomadAgent change agent params body nomad agent -swagger:model ChangeAgentParamsBodyNomadAgent +ChangeAgentParamsBodyPostgresExporterMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. +swagger:model ChangeAgentParamsBodyPostgresExporterMetricsResolutions */ -type ChangeAgentParamsBodyNomadAgent struct { - // Enable this Agent. Agents are enabled by default when they get added. - Enable *bool `json:"enable,omitempty"` +type ChangeAgentParamsBodyPostgresExporterMetricsResolutions struct { + + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. + Hr string `json:"hr,omitempty"` + + // Medium resolution. In JSON should be represented as a string with number of seconds with `s` suffix. + Mr string `json:"mr,omitempty"` + + // Low resolution. In JSON should be represented as a string with number of seconds with `s` suffix. + Lr string `json:"lr,omitempty"` } -// Validate validates this change agent params body nomad agent -func (o *ChangeAgentParamsBodyNomadAgent) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body postgres exporter metrics resolutions +func (o *ChangeAgentParamsBodyPostgresExporterMetricsResolutions) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body nomad agent based on context it is used -func (o *ChangeAgentParamsBodyNomadAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body postgres exporter metrics resolutions based on context it is used +func (o *ChangeAgentParamsBodyPostgresExporterMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyNomadAgent) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyPostgresExporterMetricsResolutions) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -8663,8 +9552,8 @@ func (o *ChangeAgentParamsBodyNomadAgent) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyNomadAgent) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyNomadAgent +func (o *ChangeAgentParamsBodyPostgresExporterMetricsResolutions) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyPostgresExporterMetricsResolutions if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -8673,20 +9562,21 @@ func (o *ChangeAgentParamsBodyNomadAgent) UnmarshalBinary(b []byte) error { } /* -ChangeAgentParamsBodyPostgresExporter change agent params body postgres exporter -swagger:model ChangeAgentParamsBodyPostgresExporter +ChangeAgentParamsBodyProxysqlExporter change agent params body proxysql exporter +swagger:model ChangeAgentParamsBodyProxysqlExporter */ -type ChangeAgentParamsBodyPostgresExporter struct { +type ChangeAgentParamsBodyProxysqlExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` // Enables push metrics with vmagent. EnablePushMetrics *bool `json:"enable_push_metrics,omitempty"` - // PostgreSQL username for scraping metrics. + // ProxySQL username for scraping metrics. Username *string `json:"username,omitempty"` - // PostgreSQL password for scraping metrics. + // ProxySQL password for scraping metrics. Password *string `json:"password,omitempty"` // Use TLS for database connections. @@ -8695,21 +9585,9 @@ type ChangeAgentParamsBodyPostgresExporter struct { // Skip TLS certificate and hostname validation. TLSSkipVerify *bool `json:"tls_skip_verify,omitempty"` - // Skip connection check. - SkipConnectionCheck *bool `json:"skip_connection_check,omitempty"` - // List of collector names to disable in this exporter. DisableCollectors []string `json:"disable_collectors"` - // TLS CA certificate. - TLSCa *string `json:"tls_ca,omitempty"` - - // TLS Certificate. - TLSCert *string `json:"tls_cert,omitempty"` - - // TLS Certificate Key. - TLSKey *string `json:"tls_key,omitempty"` - // Custom password for exporter endpoint /metrics. AgentPassword *string `json:"agent_password,omitempty"` @@ -8719,27 +9597,21 @@ type ChangeAgentParamsBodyPostgresExporter struct { // Enum: ["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"] LogLevel *string `json:"log_level,omitempty"` - // Limit of databases for auto-discovery. - AutoDiscoveryLimit *int32 `json:"auto_discovery_limit,omitempty"` - // Optionally expose the exporter process on all public interfaces. ExposeExporter *bool `json:"expose_exporter,omitempty"` - // Maximum number of connections that exporter can open to the database instance. - MaxExporterConnections *int32 `json:"max_exporter_connections,omitempty"` - // Connection timeout for exporter (if set). ConnectionTimeout string `json:"connection_timeout,omitempty"` // custom labels - CustomLabels *ChangeAgentParamsBodyPostgresExporterCustomLabels `json:"custom_labels,omitempty"` + CustomLabels *ChangeAgentParamsBodyProxysqlExporterCustomLabels `json:"custom_labels,omitempty"` // metrics resolutions - MetricsResolutions *ChangeAgentParamsBodyPostgresExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` + MetricsResolutions *ChangeAgentParamsBodyProxysqlExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` } -// Validate validates this change agent params body postgres exporter -func (o *ChangeAgentParamsBodyPostgresExporter) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body proxysql exporter +func (o *ChangeAgentParamsBodyProxysqlExporter) Validate(formats strfmt.Registry) error { var res []error if err := o.validateLogLevel(formats); err != nil { @@ -8760,7 +9632,7 @@ func (o *ChangeAgentParamsBodyPostgresExporter) Validate(formats strfmt.Registry return nil } -var changeAgentParamsBodyPostgresExporterTypeLogLevelPropEnum []any +var changeAgentParamsBodyProxysqlExporterTypeLogLevelPropEnum []any func init() { var res []string @@ -8768,53 +9640,53 @@ func init() { panic(err) } for _, v := range res { - changeAgentParamsBodyPostgresExporterTypeLogLevelPropEnum = append(changeAgentParamsBodyPostgresExporterTypeLogLevelPropEnum, v) + changeAgentParamsBodyProxysqlExporterTypeLogLevelPropEnum = append(changeAgentParamsBodyProxysqlExporterTypeLogLevelPropEnum, v) } } const ( - // ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + // ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - // ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + // ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - // ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + // ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - // ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + // ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - // ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + // ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - // ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - ChangeAgentParamsBodyPostgresExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" + // ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" ) // prop value enum -func (o *ChangeAgentParamsBodyPostgresExporter) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, changeAgentParamsBodyPostgresExporterTypeLogLevelPropEnum, true); err != nil { +func (o *ChangeAgentParamsBodyProxysqlExporter) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentParamsBodyProxysqlExporterTypeLogLevelPropEnum, true); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyPostgresExporter) validateLogLevel(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyProxysqlExporter) validateLogLevel(formats strfmt.Registry) error { if swag.IsZero(o.LogLevel) { // not required return nil } // value enum - if err := o.validateLogLevelEnum("body"+"."+"postgres_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { + if err := o.validateLogLevelEnum("body"+"."+"proxysql_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyPostgresExporter) validateCustomLabels(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyProxysqlExporter) validateCustomLabels(formats strfmt.Registry) error { if swag.IsZero(o.CustomLabels) { // not required return nil } @@ -8823,11 +9695,11 @@ func (o *ChangeAgentParamsBodyPostgresExporter) validateCustomLabels(formats str if err := o.CustomLabels.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "postgres_exporter" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "proxysql_exporter" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "postgres_exporter" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "proxysql_exporter" + "." + "custom_labels") } return err @@ -8837,7 +9709,7 @@ func (o *ChangeAgentParamsBodyPostgresExporter) validateCustomLabels(formats str return nil } -func (o *ChangeAgentParamsBodyPostgresExporter) validateMetricsResolutions(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyProxysqlExporter) validateMetricsResolutions(formats strfmt.Registry) error { if swag.IsZero(o.MetricsResolutions) { // not required return nil } @@ -8846,11 +9718,11 @@ func (o *ChangeAgentParamsBodyPostgresExporter) validateMetricsResolutions(forma if err := o.MetricsResolutions.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "postgres_exporter" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "proxysql_exporter" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "postgres_exporter" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "proxysql_exporter" + "." + "metrics_resolutions") } return err @@ -8860,8 +9732,8 @@ func (o *ChangeAgentParamsBodyPostgresExporter) validateMetricsResolutions(forma return nil } -// ContextValidate validate this change agent params body postgres exporter based on the context it is used -func (o *ChangeAgentParamsBodyPostgresExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this change agent params body proxysql exporter based on the context it is used +func (o *ChangeAgentParamsBodyProxysqlExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := o.contextValidateCustomLabels(ctx, formats); err != nil { @@ -8878,7 +9750,8 @@ func (o *ChangeAgentParamsBodyPostgresExporter) ContextValidate(ctx context.Cont return nil } -func (o *ChangeAgentParamsBodyPostgresExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyProxysqlExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -8888,11 +9761,11 @@ func (o *ChangeAgentParamsBodyPostgresExporter) contextValidateCustomLabels(ctx if err := o.CustomLabels.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "postgres_exporter" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "proxysql_exporter" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "postgres_exporter" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "proxysql_exporter" + "." + "custom_labels") } return err @@ -8902,7 +9775,8 @@ func (o *ChangeAgentParamsBodyPostgresExporter) contextValidateCustomLabels(ctx return nil } -func (o *ChangeAgentParamsBodyPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -8912,11 +9786,11 @@ func (o *ChangeAgentParamsBodyPostgresExporter) contextValidateMetricsResolution if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "postgres_exporter" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "proxysql_exporter" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "postgres_exporter" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "proxysql_exporter" + "." + "metrics_resolutions") } return err @@ -8927,7 +9801,7 @@ func (o *ChangeAgentParamsBodyPostgresExporter) contextValidateMetricsResolution } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyPostgresExporter) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyProxysqlExporter) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -8935,8 +9809,8 @@ func (o *ChangeAgentParamsBodyPostgresExporter) MarshalBinary() ([]byte, error) } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyPostgresExporter) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyPostgresExporter +func (o *ChangeAgentParamsBodyProxysqlExporter) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyProxysqlExporter if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -8945,26 +9819,27 @@ func (o *ChangeAgentParamsBodyPostgresExporter) UnmarshalBinary(b []byte) error } /* -ChangeAgentParamsBodyPostgresExporterCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. -swagger:model ChangeAgentParamsBodyPostgresExporterCustomLabels +ChangeAgentParamsBodyProxysqlExporterCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. +swagger:model ChangeAgentParamsBodyProxysqlExporterCustomLabels */ -type ChangeAgentParamsBodyPostgresExporterCustomLabels struct { +type ChangeAgentParamsBodyProxysqlExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } -// Validate validates this change agent params body postgres exporter custom labels -func (o *ChangeAgentParamsBodyPostgresExporterCustomLabels) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body proxysql exporter custom labels +func (o *ChangeAgentParamsBodyProxysqlExporterCustomLabels) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body postgres exporter custom labels based on context it is used -func (o *ChangeAgentParamsBodyPostgresExporterCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body proxysql exporter custom labels based on context it is used +func (o *ChangeAgentParamsBodyProxysqlExporterCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyPostgresExporterCustomLabels) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyProxysqlExporterCustomLabels) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -8972,8 +9847,8 @@ func (o *ChangeAgentParamsBodyPostgresExporterCustomLabels) MarshalBinary() ([]b } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyPostgresExporterCustomLabels) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyPostgresExporterCustomLabels +func (o *ChangeAgentParamsBodyProxysqlExporterCustomLabels) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyProxysqlExporterCustomLabels if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -8982,10 +9857,11 @@ func (o *ChangeAgentParamsBodyPostgresExporterCustomLabels) UnmarshalBinary(b [] } /* -ChangeAgentParamsBodyPostgresExporterMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. -swagger:model ChangeAgentParamsBodyPostgresExporterMetricsResolutions +ChangeAgentParamsBodyProxysqlExporterMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. +swagger:model ChangeAgentParamsBodyProxysqlExporterMetricsResolutions */ -type ChangeAgentParamsBodyPostgresExporterMetricsResolutions struct { +type ChangeAgentParamsBodyProxysqlExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -8996,18 +9872,18 @@ type ChangeAgentParamsBodyPostgresExporterMetricsResolutions struct { Lr string `json:"lr,omitempty"` } -// Validate validates this change agent params body postgres exporter metrics resolutions -func (o *ChangeAgentParamsBodyPostgresExporterMetricsResolutions) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body proxysql exporter metrics resolutions +func (o *ChangeAgentParamsBodyProxysqlExporterMetricsResolutions) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body postgres exporter metrics resolutions based on context it is used -func (o *ChangeAgentParamsBodyPostgresExporterMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body proxysql exporter metrics resolutions based on context it is used +func (o *ChangeAgentParamsBodyProxysqlExporterMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyPostgresExporterMetricsResolutions) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyProxysqlExporterMetricsResolutions) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -9015,8 +9891,8 @@ func (o *ChangeAgentParamsBodyPostgresExporterMetricsResolutions) MarshalBinary( } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyPostgresExporterMetricsResolutions) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyPostgresExporterMetricsResolutions +func (o *ChangeAgentParamsBodyProxysqlExporterMetricsResolutions) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyProxysqlExporterMetricsResolutions if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -9025,20 +9901,21 @@ func (o *ChangeAgentParamsBodyPostgresExporterMetricsResolutions) UnmarshalBinar } /* -ChangeAgentParamsBodyProxysqlExporter change agent params body proxysql exporter -swagger:model ChangeAgentParamsBodyProxysqlExporter +ChangeAgentParamsBodyQANMongodbMongologAgent change agent params body QAN mongodb mongolog agent +swagger:model ChangeAgentParamsBodyQANMongodbMongologAgent */ -type ChangeAgentParamsBodyProxysqlExporter struct { +type ChangeAgentParamsBodyQANMongodbMongologAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` // Enables push metrics with vmagent. EnablePushMetrics *bool `json:"enable_push_metrics,omitempty"` - // ProxySQL username for scraping metrics. + // MongoDB username for getting mongolog data. Username *string `json:"username,omitempty"` - // ProxySQL password for scraping metrics. + // MongoDB password for getting mongolog data. Password *string `json:"password,omitempty"` // Use TLS for database connections. @@ -9047,11 +9924,23 @@ type ChangeAgentParamsBodyProxysqlExporter struct { // Skip TLS certificate and hostname validation. TLSSkipVerify *bool `json:"tls_skip_verify,omitempty"` - // List of collector names to disable in this exporter. - DisableCollectors []string `json:"disable_collectors"` + // Client certificate and key. + TLSCertificateKey *string `json:"tls_certificate_key,omitempty"` - // Custom password for exporter endpoint /metrics. - AgentPassword *string `json:"agent_password,omitempty"` + // Password for decrypting tls_certificate_key. + TLSCertificateKeyFilePassword *string `json:"tls_certificate_key_file_password,omitempty"` + + // Certificate Authority certificate chain. + TLSCa *string `json:"tls_ca,omitempty"` + + // Limit query length in QAN (default: server-defined; -1: no limit). + MaxQueryLength *int32 `json:"max_query_length,omitempty"` + + // Authentication mechanism. + AuthenticationMechanism *string `json:"authentication_mechanism,omitempty"` + + // Authentication database. + AuthenticationDatabase *string `json:"authentication_database,omitempty"` // Log level for exporters // @@ -9059,21 +9948,15 @@ type ChangeAgentParamsBodyProxysqlExporter struct { // Enum: ["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"] LogLevel *string `json:"log_level,omitempty"` - // Optionally expose the exporter process on all public interfaces. - ExposeExporter *bool `json:"expose_exporter,omitempty"` - - // Connection timeout for exporter (if set). - ConnectionTimeout string `json:"connection_timeout,omitempty"` - // custom labels - CustomLabels *ChangeAgentParamsBodyProxysqlExporterCustomLabels `json:"custom_labels,omitempty"` + CustomLabels *ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels `json:"custom_labels,omitempty"` // metrics resolutions - MetricsResolutions *ChangeAgentParamsBodyProxysqlExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` + MetricsResolutions *ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions `json:"metrics_resolutions,omitempty"` } -// Validate validates this change agent params body proxysql exporter -func (o *ChangeAgentParamsBodyProxysqlExporter) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body QAN mongodb mongolog agent +func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) Validate(formats strfmt.Registry) error { var res []error if err := o.validateLogLevel(formats); err != nil { @@ -9094,7 +9977,7 @@ func (o *ChangeAgentParamsBodyProxysqlExporter) Validate(formats strfmt.Registry return nil } -var changeAgentParamsBodyProxysqlExporterTypeLogLevelPropEnum []any +var changeAgentParamsBodyQanMongodbMongologAgentTypeLogLevelPropEnum []any func init() { var res []string @@ -9102,53 +9985,53 @@ func init() { panic(err) } for _, v := range res { - changeAgentParamsBodyProxysqlExporterTypeLogLevelPropEnum = append(changeAgentParamsBodyProxysqlExporterTypeLogLevelPropEnum, v) + changeAgentParamsBodyQanMongodbMongologAgentTypeLogLevelPropEnum = append(changeAgentParamsBodyQanMongodbMongologAgentTypeLogLevelPropEnum, v) } } const ( - // ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + // ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - // ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + // ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - // ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + // ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - // ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + // ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - // ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + // ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - // ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - ChangeAgentParamsBodyProxysqlExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" + // ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" ) // prop value enum -func (o *ChangeAgentParamsBodyProxysqlExporter) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, changeAgentParamsBodyProxysqlExporterTypeLogLevelPropEnum, true); err != nil { +func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentParamsBodyQanMongodbMongologAgentTypeLogLevelPropEnum, true); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyProxysqlExporter) validateLogLevel(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) validateLogLevel(formats strfmt.Registry) error { if swag.IsZero(o.LogLevel) { // not required return nil } // value enum - if err := o.validateLogLevelEnum("body"+"."+"proxysql_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { + if err := o.validateLogLevelEnum("body"+"."+"qan_mongodb_mongolog_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyProxysqlExporter) validateCustomLabels(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) validateCustomLabels(formats strfmt.Registry) error { if swag.IsZero(o.CustomLabels) { // not required return nil } @@ -9157,11 +10040,11 @@ func (o *ChangeAgentParamsBodyProxysqlExporter) validateCustomLabels(formats str if err := o.CustomLabels.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "proxysql_exporter" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "proxysql_exporter" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "custom_labels") } return err @@ -9171,7 +10054,7 @@ func (o *ChangeAgentParamsBodyProxysqlExporter) validateCustomLabels(formats str return nil } -func (o *ChangeAgentParamsBodyProxysqlExporter) validateMetricsResolutions(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) validateMetricsResolutions(formats strfmt.Registry) error { if swag.IsZero(o.MetricsResolutions) { // not required return nil } @@ -9180,11 +10063,11 @@ func (o *ChangeAgentParamsBodyProxysqlExporter) validateMetricsResolutions(forma if err := o.MetricsResolutions.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "proxysql_exporter" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "proxysql_exporter" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "metrics_resolutions") } return err @@ -9194,8 +10077,8 @@ func (o *ChangeAgentParamsBodyProxysqlExporter) validateMetricsResolutions(forma return nil } -// ContextValidate validate this change agent params body proxysql exporter based on the context it is used -func (o *ChangeAgentParamsBodyProxysqlExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this change agent params body QAN mongodb mongolog agent based on the context it is used +func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := o.contextValidateCustomLabels(ctx, formats); err != nil { @@ -9212,7 +10095,8 @@ func (o *ChangeAgentParamsBodyProxysqlExporter) ContextValidate(ctx context.Cont return nil } -func (o *ChangeAgentParamsBodyProxysqlExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -9222,11 +10106,11 @@ func (o *ChangeAgentParamsBodyProxysqlExporter) contextValidateCustomLabels(ctx if err := o.CustomLabels.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "proxysql_exporter" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "proxysql_exporter" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "custom_labels") } return err @@ -9236,7 +10120,8 @@ func (o *ChangeAgentParamsBodyProxysqlExporter) contextValidateCustomLabels(ctx return nil } -func (o *ChangeAgentParamsBodyProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -9246,11 +10131,11 @@ func (o *ChangeAgentParamsBodyProxysqlExporter) contextValidateMetricsResolution if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "proxysql_exporter" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "proxysql_exporter" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "metrics_resolutions") } return err @@ -9261,7 +10146,7 @@ func (o *ChangeAgentParamsBodyProxysqlExporter) contextValidateMetricsResolution } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyProxysqlExporter) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -9269,8 +10154,8 @@ func (o *ChangeAgentParamsBodyProxysqlExporter) MarshalBinary() ([]byte, error) } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyProxysqlExporter) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyProxysqlExporter +func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANMongodbMongologAgent if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -9279,26 +10164,27 @@ func (o *ChangeAgentParamsBodyProxysqlExporter) UnmarshalBinary(b []byte) error } /* -ChangeAgentParamsBodyProxysqlExporterCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. -swagger:model ChangeAgentParamsBodyProxysqlExporterCustomLabels +ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. +swagger:model ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels */ -type ChangeAgentParamsBodyProxysqlExporterCustomLabels struct { +type ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } -// Validate validates this change agent params body proxysql exporter custom labels -func (o *ChangeAgentParamsBodyProxysqlExporterCustomLabels) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body QAN mongodb mongolog agent custom labels +func (o *ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body proxysql exporter custom labels based on context it is used -func (o *ChangeAgentParamsBodyProxysqlExporterCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body QAN mongodb mongolog agent custom labels based on context it is used +func (o *ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyProxysqlExporterCustomLabels) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -9306,8 +10192,8 @@ func (o *ChangeAgentParamsBodyProxysqlExporterCustomLabels) MarshalBinary() ([]b } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyProxysqlExporterCustomLabels) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyProxysqlExporterCustomLabels +func (o *ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -9316,10 +10202,11 @@ func (o *ChangeAgentParamsBodyProxysqlExporterCustomLabels) UnmarshalBinary(b [] } /* -ChangeAgentParamsBodyProxysqlExporterMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. -swagger:model ChangeAgentParamsBodyProxysqlExporterMetricsResolutions +ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. +swagger:model ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions */ -type ChangeAgentParamsBodyProxysqlExporterMetricsResolutions struct { +type ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -9330,18 +10217,18 @@ type ChangeAgentParamsBodyProxysqlExporterMetricsResolutions struct { Lr string `json:"lr,omitempty"` } -// Validate validates this change agent params body proxysql exporter metrics resolutions -func (o *ChangeAgentParamsBodyProxysqlExporterMetricsResolutions) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body QAN mongodb mongolog agent metrics resolutions +func (o *ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body proxysql exporter metrics resolutions based on context it is used -func (o *ChangeAgentParamsBodyProxysqlExporterMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body QAN mongodb mongolog agent metrics resolutions based on context it is used +func (o *ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyProxysqlExporterMetricsResolutions) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -9349,8 +10236,8 @@ func (o *ChangeAgentParamsBodyProxysqlExporterMetricsResolutions) MarshalBinary( } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyProxysqlExporterMetricsResolutions) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyProxysqlExporterMetricsResolutions +func (o *ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -9359,20 +10246,21 @@ func (o *ChangeAgentParamsBodyProxysqlExporterMetricsResolutions) UnmarshalBinar } /* -ChangeAgentParamsBodyQANMongodbMongologAgent change agent params body QAN mongodb mongolog agent -swagger:model ChangeAgentParamsBodyQANMongodbMongologAgent +ChangeAgentParamsBodyQANMongodbProfilerAgent change agent params body QAN mongodb profiler agent +swagger:model ChangeAgentParamsBodyQANMongodbProfilerAgent */ -type ChangeAgentParamsBodyQANMongodbMongologAgent struct { +type ChangeAgentParamsBodyQANMongodbProfilerAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` // Enables push metrics with vmagent. EnablePushMetrics *bool `json:"enable_push_metrics,omitempty"` - // MongoDB username for getting mongolog data. + // MongoDB username for getting profile data. Username *string `json:"username,omitempty"` - // MongoDB password for getting mongolog data. + // MongoDB password for getting profile data. Password *string `json:"password,omitempty"` // Use TLS for database connections. @@ -9406,14 +10294,14 @@ type ChangeAgentParamsBodyQANMongodbMongologAgent struct { LogLevel *string `json:"log_level,omitempty"` // custom labels - CustomLabels *ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels `json:"custom_labels,omitempty"` + CustomLabels *ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels `json:"custom_labels,omitempty"` // metrics resolutions - MetricsResolutions *ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions `json:"metrics_resolutions,omitempty"` + MetricsResolutions *ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions `json:"metrics_resolutions,omitempty"` } -// Validate validates this change agent params body QAN mongodb mongolog agent -func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body QAN mongodb profiler agent +func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) Validate(formats strfmt.Registry) error { var res []error if err := o.validateLogLevel(formats); err != nil { @@ -9434,7 +10322,7 @@ func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) Validate(formats strfmt.R return nil } -var changeAgentParamsBodyQanMongodbMongologAgentTypeLogLevelPropEnum []any +var changeAgentParamsBodyQanMongodbProfilerAgentTypeLogLevelPropEnum []any func init() { var res []string @@ -9442,53 +10330,53 @@ func init() { panic(err) } for _, v := range res { - changeAgentParamsBodyQanMongodbMongologAgentTypeLogLevelPropEnum = append(changeAgentParamsBodyQanMongodbMongologAgentTypeLogLevelPropEnum, v) + changeAgentParamsBodyQanMongodbProfilerAgentTypeLogLevelPropEnum = append(changeAgentParamsBodyQanMongodbProfilerAgentTypeLogLevelPropEnum, v) } } const ( - // ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + // ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - // ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + // ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - // ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + // ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - // ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + // ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - // ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + // ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - // ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - ChangeAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" + // ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" ) // prop value enum -func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, changeAgentParamsBodyQanMongodbMongologAgentTypeLogLevelPropEnum, true); err != nil { +func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentParamsBodyQanMongodbProfilerAgentTypeLogLevelPropEnum, true); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) validateLogLevel(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) validateLogLevel(formats strfmt.Registry) error { if swag.IsZero(o.LogLevel) { // not required return nil } // value enum - if err := o.validateLogLevelEnum("body"+"."+"qan_mongodb_mongolog_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { + if err := o.validateLogLevelEnum("body"+"."+"qan_mongodb_profiler_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) validateCustomLabels(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) validateCustomLabels(formats strfmt.Registry) error { if swag.IsZero(o.CustomLabels) { // not required return nil } @@ -9497,11 +10385,11 @@ func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) validateCustomLabels(form if err := o.CustomLabels.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "qan_mongodb_profiler_agent" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "qan_mongodb_profiler_agent" + "." + "custom_labels") } return err @@ -9511,7 +10399,7 @@ func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) validateCustomLabels(form return nil } -func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) validateMetricsResolutions(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) validateMetricsResolutions(formats strfmt.Registry) error { if swag.IsZero(o.MetricsResolutions) { // not required return nil } @@ -9520,11 +10408,11 @@ func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) validateMetricsResolution if err := o.MetricsResolutions.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "qan_mongodb_profiler_agent" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "qan_mongodb_profiler_agent" + "." + "metrics_resolutions") } return err @@ -9534,8 +10422,8 @@ func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) validateMetricsResolution return nil } -// ContextValidate validate this change agent params body QAN mongodb mongolog agent based on the context it is used -func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this change agent params body QAN mongodb profiler agent based on the context it is used +func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := o.contextValidateCustomLabels(ctx, formats); err != nil { @@ -9552,7 +10440,8 @@ func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) ContextValidate(ctx conte return nil } -func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -9562,11 +10451,11 @@ func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) contextValidateCustomLabe if err := o.CustomLabels.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "qan_mongodb_profiler_agent" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "qan_mongodb_profiler_agent" + "." + "custom_labels") } return err @@ -9576,7 +10465,8 @@ func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) contextValidateCustomLabe return nil } -func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -9586,11 +10476,11 @@ func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) contextValidateMetricsRes if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "qan_mongodb_profiler_agent" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "qan_mongodb_profiler_agent" + "." + "metrics_resolutions") } return err @@ -9601,7 +10491,7 @@ func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) contextValidateMetricsRes } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -9609,8 +10499,8 @@ func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) MarshalBinary() ([]byte, } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyQANMongodbMongologAgent +func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANMongodbProfilerAgent if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -9619,26 +10509,27 @@ func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) UnmarshalBinary(b []byte) } /* -ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. -swagger:model ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels +ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. +swagger:model ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels */ -type ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels struct { +type ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } -// Validate validates this change agent params body QAN mongodb mongolog agent custom labels -func (o *ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body QAN mongodb profiler agent custom labels +func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body QAN mongodb mongolog agent custom labels based on context it is used -func (o *ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body QAN mongodb profiler agent custom labels based on context it is used +func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -9646,8 +10537,8 @@ func (o *ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels) MarshalBinary } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels +func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -9656,10 +10547,11 @@ func (o *ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels) UnmarshalBina } /* -ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. -swagger:model ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions +ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. +swagger:model ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions */ -type ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions struct { +type ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -9670,18 +10562,18 @@ type ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions struct { Lr string `json:"lr,omitempty"` } -// Validate validates this change agent params body QAN mongodb mongolog agent metrics resolutions -func (o *ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body QAN mongodb profiler agent metrics resolutions +func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body QAN mongodb mongolog agent metrics resolutions based on context it is used -func (o *ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body QAN mongodb profiler agent metrics resolutions based on context it is used +func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -9689,8 +10581,8 @@ func (o *ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions) Marshal } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions +func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -9699,45 +10591,49 @@ func (o *ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions) Unmarsh } /* -ChangeAgentParamsBodyQANMongodbProfilerAgent change agent params body QAN mongodb profiler agent -swagger:model ChangeAgentParamsBodyQANMongodbProfilerAgent +ChangeAgentParamsBodyQANMysqlPerfschemaAgent change agent params body QAN mysql perfschema agent +swagger:model ChangeAgentParamsBodyQANMysqlPerfschemaAgent */ -type ChangeAgentParamsBodyQANMongodbProfilerAgent struct { +type ChangeAgentParamsBodyQANMysqlPerfschemaAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` // Enables push metrics with vmagent. EnablePushMetrics *bool `json:"enable_push_metrics,omitempty"` - // MongoDB username for getting profile data. + // MySQL username for getting performance data. Username *string `json:"username,omitempty"` - // MongoDB password for getting profile data. + // MySQL password for getting performance data. Password *string `json:"password,omitempty"` // Use TLS for database connections. TLS *bool `json:"tls,omitempty"` - // Skip TLS certificate and hostname validation. - TLSSkipVerify *bool `json:"tls_skip_verify,omitempty"` - - // Client certificate and key. - TLSCertificateKey *string `json:"tls_certificate_key,omitempty"` - - // Password for decrypting tls_certificate_key. - TLSCertificateKeyFilePassword *string `json:"tls_certificate_key_file_password,omitempty"` - + // Skip TLS certificate and hostname validation. + TLSSkipVerify *bool `json:"tls_skip_verify,omitempty"` + // Certificate Authority certificate chain. TLSCa *string `json:"tls_ca,omitempty"` + // Client certificate. + TLSCert *string `json:"tls_cert,omitempty"` + + // Password for decrypting tls_cert. + TLSKey *string `json:"tls_key,omitempty"` + // Limit query length in QAN (default: server-defined; -1: no limit). MaxQueryLength *int32 `json:"max_query_length,omitempty"` - // Authentication mechanism. - AuthenticationMechanism *string `json:"authentication_mechanism,omitempty"` + // Disable query examples. + DisableQueryExamples *bool `json:"disable_query_examples,omitempty"` - // Authentication database. - AuthenticationDatabase *string `json:"authentication_database,omitempty"` + // Skip connection check. + SkipConnectionCheck *bool `json:"skip_connection_check,omitempty"` + + // Disable parsing comments from queries and showing them in QAN. + DisableCommentsParsing *bool `json:"disable_comments_parsing,omitempty"` // Log level for exporters // @@ -9746,14 +10642,14 @@ type ChangeAgentParamsBodyQANMongodbProfilerAgent struct { LogLevel *string `json:"log_level,omitempty"` // custom labels - CustomLabels *ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels `json:"custom_labels,omitempty"` + CustomLabels *ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels `json:"custom_labels,omitempty"` // metrics resolutions - MetricsResolutions *ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions `json:"metrics_resolutions,omitempty"` + MetricsResolutions *ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions `json:"metrics_resolutions,omitempty"` } -// Validate validates this change agent params body QAN mongodb profiler agent -func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body QAN mysql perfschema agent +func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) Validate(formats strfmt.Registry) error { var res []error if err := o.validateLogLevel(formats); err != nil { @@ -9774,7 +10670,7 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) Validate(formats strfmt.R return nil } -var changeAgentParamsBodyQanMongodbProfilerAgentTypeLogLevelPropEnum []any +var changeAgentParamsBodyQanMysqlPerfschemaAgentTypeLogLevelPropEnum []any func init() { var res []string @@ -9782,53 +10678,53 @@ func init() { panic(err) } for _, v := range res { - changeAgentParamsBodyQanMongodbProfilerAgentTypeLogLevelPropEnum = append(changeAgentParamsBodyQanMongodbProfilerAgentTypeLogLevelPropEnum, v) + changeAgentParamsBodyQanMysqlPerfschemaAgentTypeLogLevelPropEnum = append(changeAgentParamsBodyQanMysqlPerfschemaAgentTypeLogLevelPropEnum, v) } } const ( - // ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + // ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - // ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + // ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - // ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + // ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - // ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + // ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - // ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + // ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - // ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - ChangeAgentParamsBodyQANMongodbProfilerAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" + // ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" ) // prop value enum -func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, changeAgentParamsBodyQanMongodbProfilerAgentTypeLogLevelPropEnum, true); err != nil { +func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentParamsBodyQanMysqlPerfschemaAgentTypeLogLevelPropEnum, true); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) validateLogLevel(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) validateLogLevel(formats strfmt.Registry) error { if swag.IsZero(o.LogLevel) { // not required return nil } // value enum - if err := o.validateLogLevelEnum("body"+"."+"qan_mongodb_profiler_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { + if err := o.validateLogLevelEnum("body"+"."+"qan_mysql_perfschema_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) validateCustomLabels(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) validateCustomLabels(formats strfmt.Registry) error { if swag.IsZero(o.CustomLabels) { // not required return nil } @@ -9837,11 +10733,11 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) validateCustomLabels(form if err := o.CustomLabels.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_mongodb_profiler_agent" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "qan_mysql_perfschema_agent" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_mongodb_profiler_agent" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "qan_mysql_perfschema_agent" + "." + "custom_labels") } return err @@ -9851,7 +10747,7 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) validateCustomLabels(form return nil } -func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) validateMetricsResolutions(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) validateMetricsResolutions(formats strfmt.Registry) error { if swag.IsZero(o.MetricsResolutions) { // not required return nil } @@ -9860,11 +10756,11 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) validateMetricsResolution if err := o.MetricsResolutions.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_mongodb_profiler_agent" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "qan_mysql_perfschema_agent" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_mongodb_profiler_agent" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "qan_mysql_perfschema_agent" + "." + "metrics_resolutions") } return err @@ -9874,8 +10770,8 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) validateMetricsResolution return nil } -// ContextValidate validate this change agent params body QAN mongodb profiler agent based on the context it is used -func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this change agent params body QAN mysql perfschema agent based on the context it is used +func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := o.contextValidateCustomLabels(ctx, formats); err != nil { @@ -9892,7 +10788,8 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) ContextValidate(ctx conte return nil } -func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -9902,11 +10799,11 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) contextValidateCustomLabe if err := o.CustomLabels.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_mongodb_profiler_agent" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "qan_mysql_perfschema_agent" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_mongodb_profiler_agent" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "qan_mysql_perfschema_agent" + "." + "custom_labels") } return err @@ -9916,7 +10813,8 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) contextValidateCustomLabe return nil } -func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -9926,11 +10824,11 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) contextValidateMetricsRes if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_mongodb_profiler_agent" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "qan_mysql_perfschema_agent" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_mongodb_profiler_agent" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "qan_mysql_perfschema_agent" + "." + "metrics_resolutions") } return err @@ -9941,7 +10839,7 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) contextValidateMetricsRes } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -9949,8 +10847,8 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) MarshalBinary() ([]byte, } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyQANMongodbProfilerAgent +func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANMysqlPerfschemaAgent if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -9959,26 +10857,27 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) UnmarshalBinary(b []byte) } /* -ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. -swagger:model ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels +ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. +swagger:model ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels */ -type ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels struct { +type ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } -// Validate validates this change agent params body QAN mongodb profiler agent custom labels -func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body QAN mysql perfschema agent custom labels +func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body QAN mongodb profiler agent custom labels based on context it is used -func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body QAN mysql perfschema agent custom labels based on context it is used +func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -9986,8 +10885,8 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels) MarshalBinary } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels +func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -9996,10 +10895,11 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels) UnmarshalBina } /* -ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. -swagger:model ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions +ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. +swagger:model ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions */ -type ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions struct { +type ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -10010,18 +10910,18 @@ type ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions struct { Lr string `json:"lr,omitempty"` } -// Validate validates this change agent params body QAN mongodb profiler agent metrics resolutions -func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body QAN mysql perfschema agent metrics resolutions +func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body QAN mongodb profiler agent metrics resolutions based on context it is used -func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body QAN mysql perfschema agent metrics resolutions based on context it is used +func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -10029,8 +10929,8 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions) Marshal } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions +func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -10039,20 +10939,21 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions) Unmarsh } /* -ChangeAgentParamsBodyQANMysqlPerfschemaAgent change agent params body QAN mysql perfschema agent -swagger:model ChangeAgentParamsBodyQANMysqlPerfschemaAgent +ChangeAgentParamsBodyQANMysqlSlowlogAgent change agent params body QAN mysql slowlog agent +swagger:model ChangeAgentParamsBodyQANMysqlSlowlogAgent */ -type ChangeAgentParamsBodyQANMysqlPerfschemaAgent struct { +type ChangeAgentParamsBodyQANMysqlSlowlogAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` // Enables push metrics with vmagent. EnablePushMetrics *bool `json:"enable_push_metrics,omitempty"` - // MySQL username for getting performance data. + // MySQL username for getting slowlog data. Username *string `json:"username,omitempty"` - // MySQL password for getting performance data. + // MySQL password for getting slowlog data. Password *string `json:"password,omitempty"` // Use TLS for database connections. @@ -10076,6 +10977,9 @@ type ChangeAgentParamsBodyQANMysqlPerfschemaAgent struct { // Disable query examples. DisableQueryExamples *bool `json:"disable_query_examples,omitempty"` + // Rotate slowlog file at this size if > 0. + MaxSlowlogFileSize *string `json:"max_slowlog_file_size,omitempty"` + // Skip connection check. SkipConnectionCheck *bool `json:"skip_connection_check,omitempty"` @@ -10089,14 +10993,14 @@ type ChangeAgentParamsBodyQANMysqlPerfschemaAgent struct { LogLevel *string `json:"log_level,omitempty"` // custom labels - CustomLabels *ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels `json:"custom_labels,omitempty"` + CustomLabels *ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels `json:"custom_labels,omitempty"` // metrics resolutions - MetricsResolutions *ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions `json:"metrics_resolutions,omitempty"` + MetricsResolutions *ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions `json:"metrics_resolutions,omitempty"` } -// Validate validates this change agent params body QAN mysql perfschema agent -func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body QAN mysql slowlog agent +func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) Validate(formats strfmt.Registry) error { var res []error if err := o.validateLogLevel(formats); err != nil { @@ -10117,7 +11021,7 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) Validate(formats strfmt.R return nil } -var changeAgentParamsBodyQanMysqlPerfschemaAgentTypeLogLevelPropEnum []any +var changeAgentParamsBodyQanMysqlSlowlogAgentTypeLogLevelPropEnum []any func init() { var res []string @@ -10125,53 +11029,53 @@ func init() { panic(err) } for _, v := range res { - changeAgentParamsBodyQanMysqlPerfschemaAgentTypeLogLevelPropEnum = append(changeAgentParamsBodyQanMysqlPerfschemaAgentTypeLogLevelPropEnum, v) + changeAgentParamsBodyQanMysqlSlowlogAgentTypeLogLevelPropEnum = append(changeAgentParamsBodyQanMysqlSlowlogAgentTypeLogLevelPropEnum, v) } } const ( - // ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + // ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - // ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + // ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - // ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + // ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - // ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + // ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - // ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + // ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - // ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - ChangeAgentParamsBodyQANMysqlPerfschemaAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" + // ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" ) // prop value enum -func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, changeAgentParamsBodyQanMysqlPerfschemaAgentTypeLogLevelPropEnum, true); err != nil { +func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentParamsBodyQanMysqlSlowlogAgentTypeLogLevelPropEnum, true); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) validateLogLevel(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) validateLogLevel(formats strfmt.Registry) error { if swag.IsZero(o.LogLevel) { // not required return nil } // value enum - if err := o.validateLogLevelEnum("body"+"."+"qan_mysql_perfschema_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { + if err := o.validateLogLevelEnum("body"+"."+"qan_mysql_slowlog_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) validateCustomLabels(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) validateCustomLabels(formats strfmt.Registry) error { if swag.IsZero(o.CustomLabels) { // not required return nil } @@ -10180,11 +11084,11 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) validateCustomLabels(form if err := o.CustomLabels.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_mysql_perfschema_agent" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "qan_mysql_slowlog_agent" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_mysql_perfschema_agent" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "qan_mysql_slowlog_agent" + "." + "custom_labels") } return err @@ -10194,7 +11098,7 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) validateCustomLabels(form return nil } -func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) validateMetricsResolutions(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) validateMetricsResolutions(formats strfmt.Registry) error { if swag.IsZero(o.MetricsResolutions) { // not required return nil } @@ -10203,11 +11107,11 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) validateMetricsResolution if err := o.MetricsResolutions.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_mysql_perfschema_agent" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "qan_mysql_slowlog_agent" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_mysql_perfschema_agent" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "qan_mysql_slowlog_agent" + "." + "metrics_resolutions") } return err @@ -10217,8 +11121,8 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) validateMetricsResolution return nil } -// ContextValidate validate this change agent params body QAN mysql perfschema agent based on the context it is used -func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this change agent params body QAN mysql slowlog agent based on the context it is used +func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := o.contextValidateCustomLabels(ctx, formats); err != nil { @@ -10235,7 +11139,8 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) ContextValidate(ctx conte return nil } -func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -10245,11 +11150,11 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) contextValidateCustomLabe if err := o.CustomLabels.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_mysql_perfschema_agent" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "qan_mysql_slowlog_agent" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_mysql_perfschema_agent" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "qan_mysql_slowlog_agent" + "." + "custom_labels") } return err @@ -10259,7 +11164,8 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) contextValidateCustomLabe return nil } -func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -10269,11 +11175,11 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) contextValidateMetricsRes if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_mysql_perfschema_agent" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "qan_mysql_slowlog_agent" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_mysql_perfschema_agent" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "qan_mysql_slowlog_agent" + "." + "metrics_resolutions") } return err @@ -10284,7 +11190,7 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) contextValidateMetricsRes } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -10292,8 +11198,8 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) MarshalBinary() ([]byte, } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyQANMysqlPerfschemaAgent +func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANMysqlSlowlogAgent if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -10302,35 +11208,36 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) UnmarshalBinary(b []byte) } /* -ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. -swagger:model ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels +ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. +swagger:model ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels */ -type ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels struct { +type ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } -// Validate validates this change agent params body QAN mysql perfschema agent custom labels -func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body QAN mysql slowlog agent custom labels +func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body QAN mysql perfschema agent custom labels based on context it is used -func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body QAN mysql slowlog agent custom labels based on context it is used +func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } return swag.WriteJSON(o) } -// UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels +// UnmarshalBinary interface implementation +func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -10339,10 +11246,11 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels) UnmarshalBina } /* -ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. -swagger:model ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions +ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. +swagger:model ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions */ -type ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions struct { +type ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -10353,18 +11261,18 @@ type ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions struct { Lr string `json:"lr,omitempty"` } -// Validate validates this change agent params body QAN mysql perfschema agent metrics resolutions -func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body QAN mysql slowlog agent metrics resolutions +func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body QAN mysql perfschema agent metrics resolutions based on context it is used -func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body QAN mysql slowlog agent metrics resolutions based on context it is used +func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -10372,8 +11280,8 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions) Marshal } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions +func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -10382,20 +11290,21 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions) Unmarsh } /* -ChangeAgentParamsBodyQANMysqlSlowlogAgent change agent params body QAN mysql slowlog agent -swagger:model ChangeAgentParamsBodyQANMysqlSlowlogAgent +ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent change agent params body QAN postgresql pgstatements agent +swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent */ -type ChangeAgentParamsBodyQANMysqlSlowlogAgent struct { +type ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` // Enables push metrics with vmagent. EnablePushMetrics *bool `json:"enable_push_metrics,omitempty"` - // MySQL username for getting slowlog data. + // PostgreSQL username for getting pg stat statements data. Username *string `json:"username,omitempty"` - // MySQL password for getting slowlog data. + // PostgreSQL password for getting pg stat statements data. Password *string `json:"password,omitempty"` // Use TLS for database connections. @@ -10404,29 +11313,20 @@ type ChangeAgentParamsBodyQANMysqlSlowlogAgent struct { // Skip TLS certificate and hostname validation. TLSSkipVerify *bool `json:"tls_skip_verify,omitempty"` - // Certificate Authority certificate chain. - TLSCa *string `json:"tls_ca,omitempty"` - - // Client certificate. - TLSCert *string `json:"tls_cert,omitempty"` - - // Password for decrypting tls_cert. - TLSKey *string `json:"tls_key,omitempty"` + // Disable parsing comments from queries and showing them in QAN. + DisableCommentsParsing *bool `json:"disable_comments_parsing,omitempty"` // Limit query length in QAN (default: server-defined; -1: no limit). MaxQueryLength *int32 `json:"max_query_length,omitempty"` - // Disable query examples. - DisableQueryExamples *bool `json:"disable_query_examples,omitempty"` - - // Rotate slowlog file at this size if > 0. - MaxSlowlogFileSize *string `json:"max_slowlog_file_size,omitempty"` + // TLS CA certificate. + TLSCa *string `json:"tls_ca,omitempty"` - // Skip connection check. - SkipConnectionCheck *bool `json:"skip_connection_check,omitempty"` + // TLS Certificate. + TLSCert *string `json:"tls_cert,omitempty"` - // Disable parsing comments from queries and showing them in QAN. - DisableCommentsParsing *bool `json:"disable_comments_parsing,omitempty"` + // TLS Certificate Key. + TLSKey *string `json:"tls_key,omitempty"` // Log level for exporters // @@ -10435,14 +11335,14 @@ type ChangeAgentParamsBodyQANMysqlSlowlogAgent struct { LogLevel *string `json:"log_level,omitempty"` // custom labels - CustomLabels *ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels `json:"custom_labels,omitempty"` + CustomLabels *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels `json:"custom_labels,omitempty"` // metrics resolutions - MetricsResolutions *ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions `json:"metrics_resolutions,omitempty"` + MetricsResolutions *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions `json:"metrics_resolutions,omitempty"` } -// Validate validates this change agent params body QAN mysql slowlog agent -func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body QAN postgresql pgstatements agent +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) Validate(formats strfmt.Registry) error { var res []error if err := o.validateLogLevel(formats); err != nil { @@ -10463,7 +11363,7 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) Validate(formats strfmt.Regi return nil } -var changeAgentParamsBodyQanMysqlSlowlogAgentTypeLogLevelPropEnum []any +var changeAgentParamsBodyQanPostgresqlPgstatementsAgentTypeLogLevelPropEnum []any func init() { var res []string @@ -10471,53 +11371,53 @@ func init() { panic(err) } for _, v := range res { - changeAgentParamsBodyQanMysqlSlowlogAgentTypeLogLevelPropEnum = append(changeAgentParamsBodyQanMysqlSlowlogAgentTypeLogLevelPropEnum, v) + changeAgentParamsBodyQanPostgresqlPgstatementsAgentTypeLogLevelPropEnum = append(changeAgentParamsBodyQanPostgresqlPgstatementsAgentTypeLogLevelPropEnum, v) } } const ( - // ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + // ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - // ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + // ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - // ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + // ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - // ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + // ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - // ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + // ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - // ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - ChangeAgentParamsBodyQANMysqlSlowlogAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" + // ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" ) // prop value enum -func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, changeAgentParamsBodyQanMysqlSlowlogAgentTypeLogLevelPropEnum, true); err != nil { +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentParamsBodyQanPostgresqlPgstatementsAgentTypeLogLevelPropEnum, true); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) validateLogLevel(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) validateLogLevel(formats strfmt.Registry) error { if swag.IsZero(o.LogLevel) { // not required return nil } // value enum - if err := o.validateLogLevelEnum("body"+"."+"qan_mysql_slowlog_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { + if err := o.validateLogLevelEnum("body"+"."+"qan_postgresql_pgstatements_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) validateCustomLabels(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) validateCustomLabels(formats strfmt.Registry) error { if swag.IsZero(o.CustomLabels) { // not required return nil } @@ -10526,11 +11426,11 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) validateCustomLabels(formats if err := o.CustomLabels.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_mysql_slowlog_agent" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "qan_postgresql_pgstatements_agent" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_mysql_slowlog_agent" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "qan_postgresql_pgstatements_agent" + "." + "custom_labels") } return err @@ -10540,7 +11440,7 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) validateCustomLabels(formats return nil } -func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) validateMetricsResolutions(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) validateMetricsResolutions(formats strfmt.Registry) error { if swag.IsZero(o.MetricsResolutions) { // not required return nil } @@ -10549,11 +11449,11 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) validateMetricsResolutions(f if err := o.MetricsResolutions.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_mysql_slowlog_agent" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "qan_postgresql_pgstatements_agent" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_mysql_slowlog_agent" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "qan_postgresql_pgstatements_agent" + "." + "metrics_resolutions") } return err @@ -10563,8 +11463,8 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) validateMetricsResolutions(f return nil } -// ContextValidate validate this change agent params body QAN mysql slowlog agent based on the context it is used -func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this change agent params body QAN postgresql pgstatements agent based on the context it is used +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := o.contextValidateCustomLabels(ctx, formats); err != nil { @@ -10581,7 +11481,8 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) ContextValidate(ctx context. return nil } -func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -10591,11 +11492,11 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) contextValidateCustomLabels( if err := o.CustomLabels.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_mysql_slowlog_agent" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "qan_postgresql_pgstatements_agent" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_mysql_slowlog_agent" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "qan_postgresql_pgstatements_agent" + "." + "custom_labels") } return err @@ -10605,7 +11506,8 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) contextValidateCustomLabels( return nil } -func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -10615,11 +11517,11 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) contextValidateMetricsResolu if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_mysql_slowlog_agent" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "qan_postgresql_pgstatements_agent" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_mysql_slowlog_agent" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "qan_postgresql_pgstatements_agent" + "." + "metrics_resolutions") } return err @@ -10630,7 +11532,7 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) contextValidateMetricsResolu } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -10638,8 +11540,8 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) MarshalBinary() ([]byte, err } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyQANMysqlSlowlogAgent +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -10648,26 +11550,27 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) UnmarshalBinary(b []byte) er } /* -ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. -swagger:model ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels +ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. +swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels */ -type ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels struct { +type ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } -// Validate validates this change agent params body QAN mysql slowlog agent custom labels -func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body QAN postgresql pgstatements agent custom labels +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body QAN mysql slowlog agent custom labels based on context it is used -func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body QAN postgresql pgstatements agent custom labels based on context it is used +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -10675,8 +11578,8 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels) MarshalBinary() } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -10685,10 +11588,11 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels) UnmarshalBinary( } /* -ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. -swagger:model ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions +ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. +swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions */ -type ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions struct { +type ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -10699,18 +11603,18 @@ type ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions struct { Lr string `json:"lr,omitempty"` } -// Validate validates this change agent params body QAN mysql slowlog agent metrics resolutions -func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body QAN postgresql pgstatements agent metrics resolutions +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body QAN mysql slowlog agent metrics resolutions based on context it is used -func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body QAN postgresql pgstatements agent metrics resolutions based on context it is used +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -10718,8 +11622,8 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions) MarshalBin } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -10728,20 +11632,21 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions) UnmarshalB } /* -ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent change agent params body QAN postgresql pgstatements agent -swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent +ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent change agent params body QAN postgresql pgstatmonitor agent +swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent */ -type ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent struct { +type ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` // Enables push metrics with vmagent. EnablePushMetrics *bool `json:"enable_push_metrics,omitempty"` - // PostgreSQL username for getting pg stat statements data. + // PostgreSQL username for getting pg stat monitor data. Username *string `json:"username,omitempty"` - // PostgreSQL password for getting pg stat statements data. + // PostgreSQL password for getting pg stat monitor data. Password *string `json:"password,omitempty"` // Use TLS for database connections. @@ -10750,12 +11655,15 @@ type ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent struct { // Skip TLS certificate and hostname validation. TLSSkipVerify *bool `json:"tls_skip_verify,omitempty"` - // Disable parsing comments from queries and showing them in QAN. - DisableCommentsParsing *bool `json:"disable_comments_parsing,omitempty"` - // Limit query length in QAN (default: server-defined; -1: no limit). MaxQueryLength *int32 `json:"max_query_length,omitempty"` + // Disable query examples. + DisableQueryExamples *bool `json:"disable_query_examples,omitempty"` + + // Disable parsing comments from queries and showing them in QAN. + DisableCommentsParsing *bool `json:"disable_comments_parsing,omitempty"` + // TLS CA certificate. TLSCa *string `json:"tls_ca,omitempty"` @@ -10772,14 +11680,14 @@ type ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent struct { LogLevel *string `json:"log_level,omitempty"` // custom labels - CustomLabels *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels `json:"custom_labels,omitempty"` + CustomLabels *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels `json:"custom_labels,omitempty"` // metrics resolutions - MetricsResolutions *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions `json:"metrics_resolutions,omitempty"` + MetricsResolutions *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions `json:"metrics_resolutions,omitempty"` } -// Validate validates this change agent params body QAN postgresql pgstatements agent -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body QAN postgresql pgstatmonitor agent +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) Validate(formats strfmt.Registry) error { var res []error if err := o.validateLogLevel(formats); err != nil { @@ -10800,7 +11708,7 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) Validate(formats s return nil } -var changeAgentParamsBodyQanPostgresqlPgstatementsAgentTypeLogLevelPropEnum []any +var changeAgentParamsBodyQanPostgresqlPgstatmonitorAgentTypeLogLevelPropEnum []any func init() { var res []string @@ -10808,53 +11716,53 @@ func init() { panic(err) } for _, v := range res { - changeAgentParamsBodyQanPostgresqlPgstatementsAgentTypeLogLevelPropEnum = append(changeAgentParamsBodyQanPostgresqlPgstatementsAgentTypeLogLevelPropEnum, v) + changeAgentParamsBodyQanPostgresqlPgstatmonitorAgentTypeLogLevelPropEnum = append(changeAgentParamsBodyQanPostgresqlPgstatmonitorAgentTypeLogLevelPropEnum, v) } } const ( - // ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + // ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - // ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + // ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - // ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + // ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - // ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + // ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - // ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + // ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - // ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" + // ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" ) // prop value enum -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, changeAgentParamsBodyQanPostgresqlPgstatementsAgentTypeLogLevelPropEnum, true); err != nil { +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentParamsBodyQanPostgresqlPgstatmonitorAgentTypeLogLevelPropEnum, true); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) validateLogLevel(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) validateLogLevel(formats strfmt.Registry) error { if swag.IsZero(o.LogLevel) { // not required return nil } // value enum - if err := o.validateLogLevelEnum("body"+"."+"qan_postgresql_pgstatements_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { + if err := o.validateLogLevelEnum("body"+"."+"qan_postgresql_pgstatmonitor_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) validateCustomLabels(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) validateCustomLabels(formats strfmt.Registry) error { if swag.IsZero(o.CustomLabels) { // not required return nil } @@ -10863,11 +11771,11 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) validateCustomLabe if err := o.CustomLabels.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_postgresql_pgstatements_agent" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "qan_postgresql_pgstatmonitor_agent" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_postgresql_pgstatements_agent" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "qan_postgresql_pgstatmonitor_agent" + "." + "custom_labels") } return err @@ -10877,7 +11785,7 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) validateCustomLabe return nil } -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) validateMetricsResolutions(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) validateMetricsResolutions(formats strfmt.Registry) error { if swag.IsZero(o.MetricsResolutions) { // not required return nil } @@ -10886,11 +11794,11 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) validateMetricsRes if err := o.MetricsResolutions.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_postgresql_pgstatements_agent" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "qan_postgresql_pgstatmonitor_agent" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_postgresql_pgstatements_agent" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "qan_postgresql_pgstatmonitor_agent" + "." + "metrics_resolutions") } return err @@ -10900,8 +11808,8 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) validateMetricsRes return nil } -// ContextValidate validate this change agent params body QAN postgresql pgstatements agent based on the context it is used -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this change agent params body QAN postgresql pgstatmonitor agent based on the context it is used +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := o.contextValidateCustomLabels(ctx, formats); err != nil { @@ -10918,7 +11826,8 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) ContextValidate(ct return nil } -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -10928,11 +11837,11 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) contextValidateCus if err := o.CustomLabels.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_postgresql_pgstatements_agent" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "qan_postgresql_pgstatmonitor_agent" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_postgresql_pgstatements_agent" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "qan_postgresql_pgstatmonitor_agent" + "." + "custom_labels") } return err @@ -10942,7 +11851,8 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) contextValidateCus return nil } -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -10952,11 +11862,11 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) contextValidateMet if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_postgresql_pgstatements_agent" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "qan_postgresql_pgstatmonitor_agent" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_postgresql_pgstatements_agent" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "qan_postgresql_pgstatmonitor_agent" + "." + "metrics_resolutions") } return err @@ -10967,7 +11877,7 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) contextValidateMet } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -10975,8 +11885,8 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) MarshalBinary() ([ } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -10985,26 +11895,27 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) UnmarshalBinary(b } /* -ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. -swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels +ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. +swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels */ -type ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels struct { +type ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } -// Validate validates this change agent params body QAN postgresql pgstatements agent custom labels -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body QAN postgresql pgstatmonitor agent custom labels +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body QAN postgresql pgstatements agent custom labels based on context it is used -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body QAN postgresql pgstatmonitor agent custom labels based on context it is used +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -11012,8 +11923,8 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels) Marsha } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -11022,10 +11933,11 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels) Unmars } /* -ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. -swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions +ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. +swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions */ -type ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions struct { +type ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -11036,18 +11948,18 @@ type ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions struc Lr string `json:"lr,omitempty"` } -// Validate validates this change agent params body QAN postgresql pgstatements agent metrics resolutions -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body QAN postgresql pgstatmonitor agent metrics resolutions +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body QAN postgresql pgstatements agent metrics resolutions based on context it is used -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body QAN postgresql pgstatmonitor agent metrics resolutions based on context it is used +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -11055,8 +11967,8 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions) } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions +func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -11065,45 +11977,28 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions) } /* -ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent change agent params body QAN postgresql pgstatmonitor agent -swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent +ChangeAgentParamsBodyRDSExporter change agent params body RDS exporter +swagger:model ChangeAgentParamsBodyRDSExporter */ -type ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent struct { +type ChangeAgentParamsBodyRDSExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` // Enables push metrics with vmagent. EnablePushMetrics *bool `json:"enable_push_metrics,omitempty"` - // PostgreSQL username for getting pg stat monitor data. - Username *string `json:"username,omitempty"` - - // PostgreSQL password for getting pg stat monitor data. - Password *string `json:"password,omitempty"` - - // Use TLS for database connections. - TLS *bool `json:"tls,omitempty"` - - // Skip TLS certificate and hostname validation. - TLSSkipVerify *bool `json:"tls_skip_verify,omitempty"` - - // Limit query length in QAN (default: server-defined; -1: no limit). - MaxQueryLength *int32 `json:"max_query_length,omitempty"` - - // Disable query examples. - DisableQueryExamples *bool `json:"disable_query_examples,omitempty"` - - // Disable parsing comments from queries and showing them in QAN. - DisableCommentsParsing *bool `json:"disable_comments_parsing,omitempty"` + // AWS Access Key. + AWSAccessKey *string `json:"aws_access_key,omitempty"` - // TLS CA certificate. - TLSCa *string `json:"tls_ca,omitempty"` + // AWS Secret Key. + AWSSecretKey *string `json:"aws_secret_key,omitempty"` - // TLS Certificate. - TLSCert *string `json:"tls_cert,omitempty"` + // Disable basic metrics. + DisableBasicMetrics *bool `json:"disable_basic_metrics,omitempty"` - // TLS Certificate Key. - TLSKey *string `json:"tls_key,omitempty"` + // Disable enhanced metrics. + DisableEnhancedMetrics *bool `json:"disable_enhanced_metrics,omitempty"` // Log level for exporters // @@ -11112,14 +12007,14 @@ type ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent struct { LogLevel *string `json:"log_level,omitempty"` // custom labels - CustomLabels *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels `json:"custom_labels,omitempty"` + CustomLabels *ChangeAgentParamsBodyRDSExporterCustomLabels `json:"custom_labels,omitempty"` // metrics resolutions - MetricsResolutions *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions `json:"metrics_resolutions,omitempty"` + MetricsResolutions *ChangeAgentParamsBodyRDSExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` } -// Validate validates this change agent params body QAN postgresql pgstatmonitor agent -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body RDS exporter +func (o *ChangeAgentParamsBodyRDSExporter) Validate(formats strfmt.Registry) error { var res []error if err := o.validateLogLevel(formats); err != nil { @@ -11140,7 +12035,7 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) Validate(formats return nil } -var changeAgentParamsBodyQanPostgresqlPgstatmonitorAgentTypeLogLevelPropEnum []any +var changeAgentParamsBodyRdsExporterTypeLogLevelPropEnum []any func init() { var res []string @@ -11148,53 +12043,53 @@ func init() { panic(err) } for _, v := range res { - changeAgentParamsBodyQanPostgresqlPgstatmonitorAgentTypeLogLevelPropEnum = append(changeAgentParamsBodyQanPostgresqlPgstatmonitorAgentTypeLogLevelPropEnum, v) + changeAgentParamsBodyRdsExporterTypeLogLevelPropEnum = append(changeAgentParamsBodyRdsExporterTypeLogLevelPropEnum, v) } } const ( - // ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + // ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - // ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + // ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - // ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + // ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - // ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + // ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - // ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + // ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - // ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" + // ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" ) // prop value enum -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, changeAgentParamsBodyQanPostgresqlPgstatmonitorAgentTypeLogLevelPropEnum, true); err != nil { +func (o *ChangeAgentParamsBodyRDSExporter) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentParamsBodyRdsExporterTypeLogLevelPropEnum, true); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) validateLogLevel(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyRDSExporter) validateLogLevel(formats strfmt.Registry) error { if swag.IsZero(o.LogLevel) { // not required return nil } // value enum - if err := o.validateLogLevelEnum("body"+"."+"qan_postgresql_pgstatmonitor_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { + if err := o.validateLogLevelEnum("body"+"."+"rds_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) validateCustomLabels(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyRDSExporter) validateCustomLabels(formats strfmt.Registry) error { if swag.IsZero(o.CustomLabels) { // not required return nil } @@ -11203,11 +12098,11 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) validateCustomLab if err := o.CustomLabels.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_postgresql_pgstatmonitor_agent" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "rds_exporter" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_postgresql_pgstatmonitor_agent" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "rds_exporter" + "." + "custom_labels") } return err @@ -11217,7 +12112,7 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) validateCustomLab return nil } -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) validateMetricsResolutions(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyRDSExporter) validateMetricsResolutions(formats strfmt.Registry) error { if swag.IsZero(o.MetricsResolutions) { // not required return nil } @@ -11226,11 +12121,11 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) validateMetricsRe if err := o.MetricsResolutions.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_postgresql_pgstatmonitor_agent" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "rds_exporter" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_postgresql_pgstatmonitor_agent" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "rds_exporter" + "." + "metrics_resolutions") } return err @@ -11240,8 +12135,8 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) validateMetricsRe return nil } -// ContextValidate validate this change agent params body QAN postgresql pgstatmonitor agent based on the context it is used -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this change agent params body RDS exporter based on the context it is used +func (o *ChangeAgentParamsBodyRDSExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := o.contextValidateCustomLabels(ctx, formats); err != nil { @@ -11258,7 +12153,8 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) ContextValidate(c return nil } -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyRDSExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -11268,11 +12164,11 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) contextValidateCu if err := o.CustomLabels.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_postgresql_pgstatmonitor_agent" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "rds_exporter" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_postgresql_pgstatmonitor_agent" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "rds_exporter" + "." + "custom_labels") } return err @@ -11282,7 +12178,8 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) contextValidateCu return nil } -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -11292,11 +12189,11 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) contextValidateMe if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "qan_postgresql_pgstatmonitor_agent" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "rds_exporter" + "." + "metrics_resolutions") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "qan_postgresql_pgstatmonitor_agent" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "rds_exporter" + "." + "metrics_resolutions") } return err @@ -11307,7 +12204,7 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) contextValidateMe } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyRDSExporter) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -11315,8 +12212,8 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) MarshalBinary() ( } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent +func (o *ChangeAgentParamsBodyRDSExporter) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyRDSExporter if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -11325,26 +12222,27 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) UnmarshalBinary(b } /* -ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. -swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels +ChangeAgentParamsBodyRDSExporterCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. +swagger:model ChangeAgentParamsBodyRDSExporterCustomLabels */ -type ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels struct { +type ChangeAgentParamsBodyRDSExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } -// Validate validates this change agent params body QAN postgresql pgstatmonitor agent custom labels -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body RDS exporter custom labels +func (o *ChangeAgentParamsBodyRDSExporterCustomLabels) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body QAN postgresql pgstatmonitor agent custom labels based on context it is used -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body RDS exporter custom labels based on context it is used +func (o *ChangeAgentParamsBodyRDSExporterCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyRDSExporterCustomLabels) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -11352,8 +12250,8 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels) Marsh } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels +func (o *ChangeAgentParamsBodyRDSExporterCustomLabels) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyRDSExporterCustomLabels if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -11362,10 +12260,11 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels) Unmar } /* -ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. -swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions +ChangeAgentParamsBodyRDSExporterMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. +swagger:model ChangeAgentParamsBodyRDSExporterMetricsResolutions */ -type ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions struct { +type ChangeAgentParamsBodyRDSExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -11376,18 +12275,18 @@ type ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions stru Lr string `json:"lr,omitempty"` } -// Validate validates this change agent params body QAN postgresql pgstatmonitor agent metrics resolutions -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body RDS exporter metrics resolutions +func (o *ChangeAgentParamsBodyRDSExporterMetricsResolutions) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body QAN postgresql pgstatmonitor agent metrics resolutions based on context it is used -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body RDS exporter metrics resolutions based on context it is used +func (o *ChangeAgentParamsBodyRDSExporterMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyRDSExporterMetricsResolutions) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -11395,8 +12294,8 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions) } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions +func (o *ChangeAgentParamsBodyRDSExporterMetricsResolutions) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyRDSExporterMetricsResolutions if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -11405,43 +12304,53 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions) } /* -ChangeAgentParamsBodyRDSExporter change agent params body RDS exporter -swagger:model ChangeAgentParamsBodyRDSExporter +ChangeAgentParamsBodyRtaMongodbAgent change agent params body rta mongodb agent +swagger:model ChangeAgentParamsBodyRtaMongodbAgent */ -type ChangeAgentParamsBodyRDSExporter struct { +type ChangeAgentParamsBodyRtaMongodbAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` - // Enables push metrics with vmagent. - EnablePushMetrics *bool `json:"enable_push_metrics,omitempty"` + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: ["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"] + LogLevel *string `json:"log_level,omitempty"` - // AWS Access Key. - AWSAccessKey *string `json:"aws_access_key,omitempty"` + // MongoDB username for getting profile data. + Username *string `json:"username,omitempty"` + + // MongoDB password for getting profile data. + Password *string `json:"password,omitempty"` + + // Use TLS for database connections. + TLS *bool `json:"tls,omitempty"` + + // Skip TLS certificate and hostname validation. + TLSSkipVerify *bool `json:"tls_skip_verify,omitempty"` - // AWS Secret Key. - AWSSecretKey *string `json:"aws_secret_key,omitempty"` + // Client certificate and key. + TLSCertificateKey *string `json:"tls_certificate_key,omitempty"` - // Disable basic metrics. - DisableBasicMetrics *bool `json:"disable_basic_metrics,omitempty"` + // Password for decrypting tls_certificate_key. + TLSCertificateKeyFilePassword *string `json:"tls_certificate_key_file_password,omitempty"` - // Disable enhanced metrics. - DisableEnhancedMetrics *bool `json:"disable_enhanced_metrics,omitempty"` + // Certificate Authority certificate chain. + TLSCa *string `json:"tls_ca,omitempty"` - // Log level for exporters - // - // - LOG_LEVEL_UNSPECIFIED: Auto - // Enum: ["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"] - LogLevel *string `json:"log_level,omitempty"` + // Authentication mechanism. + AuthenticationMechanism *string `json:"authentication_mechanism,omitempty"` // custom labels - CustomLabels *ChangeAgentParamsBodyRDSExporterCustomLabels `json:"custom_labels,omitempty"` + CustomLabels *ChangeAgentParamsBodyRtaMongodbAgentCustomLabels `json:"custom_labels,omitempty"` - // metrics resolutions - MetricsResolutions *ChangeAgentParamsBodyRDSExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` + // rta options + RtaOptions *ChangeAgentParamsBodyRtaMongodbAgentRtaOptions `json:"rta_options,omitempty"` } -// Validate validates this change agent params body RDS exporter -func (o *ChangeAgentParamsBodyRDSExporter) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body rta mongodb agent +func (o *ChangeAgentParamsBodyRtaMongodbAgent) Validate(formats strfmt.Registry) error { var res []error if err := o.validateLogLevel(formats); err != nil { @@ -11452,7 +12361,7 @@ func (o *ChangeAgentParamsBodyRDSExporter) Validate(formats strfmt.Registry) err res = append(res, err) } - if err := o.validateMetricsResolutions(formats); err != nil { + if err := o.validateRtaOptions(formats); err != nil { res = append(res, err) } @@ -11462,7 +12371,7 @@ func (o *ChangeAgentParamsBodyRDSExporter) Validate(formats strfmt.Registry) err return nil } -var changeAgentParamsBodyRdsExporterTypeLogLevelPropEnum []any +var changeAgentParamsBodyRtaMongodbAgentTypeLogLevelPropEnum []any func init() { var res []string @@ -11470,53 +12379,53 @@ func init() { panic(err) } for _, v := range res { - changeAgentParamsBodyRdsExporterTypeLogLevelPropEnum = append(changeAgentParamsBodyRdsExporterTypeLogLevelPropEnum, v) + changeAgentParamsBodyRtaMongodbAgentTypeLogLevelPropEnum = append(changeAgentParamsBodyRtaMongodbAgentTypeLogLevelPropEnum, v) } } const ( - // ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + // ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - // ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + // ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - // ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + // ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - // ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + // ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - // ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + // ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - // ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - ChangeAgentParamsBodyRDSExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" + // ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" ) // prop value enum -func (o *ChangeAgentParamsBodyRDSExporter) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, changeAgentParamsBodyRdsExporterTypeLogLevelPropEnum, true); err != nil { +func (o *ChangeAgentParamsBodyRtaMongodbAgent) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentParamsBodyRtaMongodbAgentTypeLogLevelPropEnum, true); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyRDSExporter) validateLogLevel(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyRtaMongodbAgent) validateLogLevel(formats strfmt.Registry) error { if swag.IsZero(o.LogLevel) { // not required return nil } // value enum - if err := o.validateLogLevelEnum("body"+"."+"rds_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { + if err := o.validateLogLevelEnum("body"+"."+"rta_mongodb_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyRDSExporter) validateCustomLabels(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyRtaMongodbAgent) validateCustomLabels(formats strfmt.Registry) error { if swag.IsZero(o.CustomLabels) { // not required return nil } @@ -11525,11 +12434,11 @@ func (o *ChangeAgentParamsBodyRDSExporter) validateCustomLabels(formats strfmt.R if err := o.CustomLabels.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "rds_exporter" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "rta_mongodb_agent" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "rds_exporter" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "rta_mongodb_agent" + "." + "custom_labels") } return err @@ -11539,20 +12448,20 @@ func (o *ChangeAgentParamsBodyRDSExporter) validateCustomLabels(formats strfmt.R return nil } -func (o *ChangeAgentParamsBodyRDSExporter) validateMetricsResolutions(formats strfmt.Registry) error { - if swag.IsZero(o.MetricsResolutions) { // not required +func (o *ChangeAgentParamsBodyRtaMongodbAgent) validateRtaOptions(formats strfmt.Registry) error { + if swag.IsZero(o.RtaOptions) { // not required return nil } - if o.MetricsResolutions != nil { - if err := o.MetricsResolutions.Validate(formats); err != nil { + if o.RtaOptions != nil { + if err := o.RtaOptions.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "rds_exporter" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "rta_mongodb_agent" + "." + "rta_options") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "rds_exporter" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "rta_mongodb_agent" + "." + "rta_options") } return err @@ -11562,15 +12471,15 @@ func (o *ChangeAgentParamsBodyRDSExporter) validateMetricsResolutions(formats st return nil } -// ContextValidate validate this change agent params body RDS exporter based on the context it is used -func (o *ChangeAgentParamsBodyRDSExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this change agent params body rta mongodb agent based on the context it is used +func (o *ChangeAgentParamsBodyRtaMongodbAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := o.contextValidateCustomLabels(ctx, formats); err != nil { res = append(res, err) } - if err := o.contextValidateMetricsResolutions(ctx, formats); err != nil { + if err := o.contextValidateRtaOptions(ctx, formats); err != nil { res = append(res, err) } @@ -11580,7 +12489,8 @@ func (o *ChangeAgentParamsBodyRDSExporter) ContextValidate(ctx context.Context, return nil } -func (o *ChangeAgentParamsBodyRDSExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyRtaMongodbAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -11590,11 +12500,11 @@ func (o *ChangeAgentParamsBodyRDSExporter) contextValidateCustomLabels(ctx conte if err := o.CustomLabels.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "rds_exporter" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "rta_mongodb_agent" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "rds_exporter" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "rta_mongodb_agent" + "." + "custom_labels") } return err @@ -11604,21 +12514,22 @@ func (o *ChangeAgentParamsBodyRDSExporter) contextValidateCustomLabels(ctx conte return nil } -func (o *ChangeAgentParamsBodyRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { +func (o *ChangeAgentParamsBodyRtaMongodbAgent) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { - if swag.IsZero(o.MetricsResolutions) { // not required + if o.RtaOptions != nil { + + if swag.IsZero(o.RtaOptions) { // not required return nil } - if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { + if err := o.RtaOptions.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "rds_exporter" + "." + "metrics_resolutions") + return ve.ValidateName("body" + "." + "rta_mongodb_agent" + "." + "rta_options") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "rds_exporter" + "." + "metrics_resolutions") + return ce.ValidateName("body" + "." + "rta_mongodb_agent" + "." + "rta_options") } return err @@ -11629,7 +12540,7 @@ func (o *ChangeAgentParamsBodyRDSExporter) contextValidateMetricsResolutions(ctx } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyRDSExporter) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyRtaMongodbAgent) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -11637,8 +12548,8 @@ func (o *ChangeAgentParamsBodyRDSExporter) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyRDSExporter) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyRDSExporter +func (o *ChangeAgentParamsBodyRtaMongodbAgent) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyRtaMongodbAgent if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -11647,26 +12558,27 @@ func (o *ChangeAgentParamsBodyRDSExporter) UnmarshalBinary(b []byte) error { } /* -ChangeAgentParamsBodyRDSExporterCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. -swagger:model ChangeAgentParamsBodyRDSExporterCustomLabels +ChangeAgentParamsBodyRtaMongodbAgentCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. +swagger:model ChangeAgentParamsBodyRtaMongodbAgentCustomLabels */ -type ChangeAgentParamsBodyRDSExporterCustomLabels struct { +type ChangeAgentParamsBodyRtaMongodbAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } -// Validate validates this change agent params body RDS exporter custom labels -func (o *ChangeAgentParamsBodyRDSExporterCustomLabels) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body rta mongodb agent custom labels +func (o *ChangeAgentParamsBodyRtaMongodbAgentCustomLabels) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body RDS exporter custom labels based on context it is used -func (o *ChangeAgentParamsBodyRDSExporterCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body rta mongodb agent custom labels based on context it is used +func (o *ChangeAgentParamsBodyRtaMongodbAgentCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyRDSExporterCustomLabels) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyRtaMongodbAgentCustomLabels) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -11674,8 +12586,8 @@ func (o *ChangeAgentParamsBodyRDSExporterCustomLabels) MarshalBinary() ([]byte, } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyRDSExporterCustomLabels) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyRDSExporterCustomLabels +func (o *ChangeAgentParamsBodyRtaMongodbAgentCustomLabels) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyRtaMongodbAgentCustomLabels if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -11684,32 +12596,27 @@ func (o *ChangeAgentParamsBodyRDSExporterCustomLabels) UnmarshalBinary(b []byte) } /* -ChangeAgentParamsBodyRDSExporterMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. -swagger:model ChangeAgentParamsBodyRDSExporterMetricsResolutions +ChangeAgentParamsBodyRtaMongodbAgentRtaOptions RTAOptions holds Real-Time Query Analytics agent options. +swagger:model ChangeAgentParamsBodyRtaMongodbAgentRtaOptions */ -type ChangeAgentParamsBodyRDSExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. - Hr string `json:"hr,omitempty"` - - // Medium resolution. In JSON should be represented as a string with number of seconds with `s` suffix. - Mr string `json:"mr,omitempty"` +type ChangeAgentParamsBodyRtaMongodbAgentRtaOptions struct { - // Low resolution. In JSON should be represented as a string with number of seconds with `s` suffix. - Lr string `json:"lr,omitempty"` + // Query collect interval (default 2s is set by server). + CollectInterval string `json:"collect_interval,omitempty"` } -// Validate validates this change agent params body RDS exporter metrics resolutions -func (o *ChangeAgentParamsBodyRDSExporterMetricsResolutions) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body rta mongodb agent rta options +func (o *ChangeAgentParamsBodyRtaMongodbAgentRtaOptions) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body RDS exporter metrics resolutions based on context it is used -func (o *ChangeAgentParamsBodyRDSExporterMetricsResolutions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body rta mongodb agent rta options based on context it is used +func (o *ChangeAgentParamsBodyRtaMongodbAgentRtaOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyRDSExporterMetricsResolutions) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyRtaMongodbAgentRtaOptions) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -11717,8 +12624,8 @@ func (o *ChangeAgentParamsBodyRDSExporterMetricsResolutions) MarshalBinary() ([] } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyRDSExporterMetricsResolutions) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyRDSExporterMetricsResolutions +func (o *ChangeAgentParamsBodyRtaMongodbAgentRtaOptions) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyRtaMongodbAgentRtaOptions if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -11727,10 +12634,11 @@ func (o *ChangeAgentParamsBodyRDSExporterMetricsResolutions) UnmarshalBinary(b [ } /* -ChangeAgentParamsBodyRtaMongodbAgent change agent params body rta mongodb agent -swagger:model ChangeAgentParamsBodyRtaMongodbAgent +ChangeAgentParamsBodyRtaMysqlAgent change agent params body rta mysql agent +swagger:model ChangeAgentParamsBodyRtaMysqlAgent */ -type ChangeAgentParamsBodyRtaMongodbAgent struct { +type ChangeAgentParamsBodyRtaMysqlAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -11740,10 +12648,10 @@ type ChangeAgentParamsBodyRtaMongodbAgent struct { // Enum: ["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"] LogLevel *string `json:"log_level,omitempty"` - // MongoDB username for getting profile data. + // MySQL username for getting queries data. Username *string `json:"username,omitempty"` - // MongoDB password for getting profile data. + // MySQL password for getting queries data. Password *string `json:"password,omitempty"` // Use TLS for database connections. @@ -11752,27 +12660,24 @@ type ChangeAgentParamsBodyRtaMongodbAgent struct { // Skip TLS certificate and hostname validation. TLSSkipVerify *bool `json:"tls_skip_verify,omitempty"` - // Client certificate and key. - TLSCertificateKey *string `json:"tls_certificate_key,omitempty"` - - // Password for decrypting tls_certificate_key. - TLSCertificateKeyFilePassword *string `json:"tls_certificate_key_file_password,omitempty"` - // Certificate Authority certificate chain. TLSCa *string `json:"tls_ca,omitempty"` - // Authentication mechanism. - AuthenticationMechanism *string `json:"authentication_mechanism,omitempty"` + // Client certificate. + TLSCert *string `json:"tls_cert,omitempty"` + + // Password for decrypting tls_cert. + TLSKey *string `json:"tls_key,omitempty"` // custom labels - CustomLabels *ChangeAgentParamsBodyRtaMongodbAgentCustomLabels `json:"custom_labels,omitempty"` + CustomLabels *ChangeAgentParamsBodyRtaMysqlAgentCustomLabels `json:"custom_labels,omitempty"` // rta options - RtaOptions *ChangeAgentParamsBodyRtaMongodbAgentRtaOptions `json:"rta_options,omitempty"` + RtaOptions *ChangeAgentParamsBodyRtaMysqlAgentRtaOptions `json:"rta_options,omitempty"` } -// Validate validates this change agent params body rta mongodb agent -func (o *ChangeAgentParamsBodyRtaMongodbAgent) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body rta mysql agent +func (o *ChangeAgentParamsBodyRtaMysqlAgent) Validate(formats strfmt.Registry) error { var res []error if err := o.validateLogLevel(formats); err != nil { @@ -11793,7 +12698,7 @@ func (o *ChangeAgentParamsBodyRtaMongodbAgent) Validate(formats strfmt.Registry) return nil } -var changeAgentParamsBodyRtaMongodbAgentTypeLogLevelPropEnum []any +var changeAgentParamsBodyRtaMysqlAgentTypeLogLevelPropEnum []any func init() { var res []string @@ -11801,53 +12706,53 @@ func init() { panic(err) } for _, v := range res { - changeAgentParamsBodyRtaMongodbAgentTypeLogLevelPropEnum = append(changeAgentParamsBodyRtaMongodbAgentTypeLogLevelPropEnum, v) + changeAgentParamsBodyRtaMysqlAgentTypeLogLevelPropEnum = append(changeAgentParamsBodyRtaMysqlAgentTypeLogLevelPropEnum, v) } } const ( - // ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + // ChangeAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ChangeAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - // ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + // ChangeAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ChangeAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - // ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + // ChangeAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ChangeAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - // ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + // ChangeAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ChangeAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - // ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + // ChangeAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ChangeAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - // ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - ChangeAgentParamsBodyRtaMongodbAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" + // ChangeAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ChangeAgentParamsBodyRtaMysqlAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" ) // prop value enum -func (o *ChangeAgentParamsBodyRtaMongodbAgent) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, changeAgentParamsBodyRtaMongodbAgentTypeLogLevelPropEnum, true); err != nil { +func (o *ChangeAgentParamsBodyRtaMysqlAgent) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentParamsBodyRtaMysqlAgentTypeLogLevelPropEnum, true); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyRtaMongodbAgent) validateLogLevel(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyRtaMysqlAgent) validateLogLevel(formats strfmt.Registry) error { if swag.IsZero(o.LogLevel) { // not required return nil } // value enum - if err := o.validateLogLevelEnum("body"+"."+"rta_mongodb_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { + if err := o.validateLogLevelEnum("body"+"."+"rta_mysql_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { return err } return nil } -func (o *ChangeAgentParamsBodyRtaMongodbAgent) validateCustomLabels(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyRtaMysqlAgent) validateCustomLabels(formats strfmt.Registry) error { if swag.IsZero(o.CustomLabels) { // not required return nil } @@ -11856,11 +12761,11 @@ func (o *ChangeAgentParamsBodyRtaMongodbAgent) validateCustomLabels(formats strf if err := o.CustomLabels.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "rta_mongodb_agent" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "rta_mysql_agent" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "rta_mongodb_agent" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "rta_mysql_agent" + "." + "custom_labels") } return err @@ -11870,7 +12775,7 @@ func (o *ChangeAgentParamsBodyRtaMongodbAgent) validateCustomLabels(formats strf return nil } -func (o *ChangeAgentParamsBodyRtaMongodbAgent) validateRtaOptions(formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyRtaMysqlAgent) validateRtaOptions(formats strfmt.Registry) error { if swag.IsZero(o.RtaOptions) { // not required return nil } @@ -11879,11 +12784,11 @@ func (o *ChangeAgentParamsBodyRtaMongodbAgent) validateRtaOptions(formats strfmt if err := o.RtaOptions.Validate(formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "rta_mongodb_agent" + "." + "rta_options") + return ve.ValidateName("body" + "." + "rta_mysql_agent" + "." + "rta_options") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "rta_mongodb_agent" + "." + "rta_options") + return ce.ValidateName("body" + "." + "rta_mysql_agent" + "." + "rta_options") } return err @@ -11893,8 +12798,8 @@ func (o *ChangeAgentParamsBodyRtaMongodbAgent) validateRtaOptions(formats strfmt return nil } -// ContextValidate validate this change agent params body rta mongodb agent based on the context it is used -func (o *ChangeAgentParamsBodyRtaMongodbAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this change agent params body rta mysql agent based on the context it is used +func (o *ChangeAgentParamsBodyRtaMysqlAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := o.contextValidateCustomLabels(ctx, formats); err != nil { @@ -11911,7 +12816,8 @@ func (o *ChangeAgentParamsBodyRtaMongodbAgent) ContextValidate(ctx context.Conte return nil } -func (o *ChangeAgentParamsBodyRtaMongodbAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyRtaMysqlAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -11921,11 +12827,11 @@ func (o *ChangeAgentParamsBodyRtaMongodbAgent) contextValidateCustomLabels(ctx c if err := o.CustomLabels.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "rta_mongodb_agent" + "." + "custom_labels") + return ve.ValidateName("body" + "." + "rta_mysql_agent" + "." + "custom_labels") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "rta_mongodb_agent" + "." + "custom_labels") + return ce.ValidateName("body" + "." + "rta_mysql_agent" + "." + "custom_labels") } return err @@ -11935,7 +12841,8 @@ func (o *ChangeAgentParamsBodyRtaMongodbAgent) contextValidateCustomLabels(ctx c return nil } -func (o *ChangeAgentParamsBodyRtaMongodbAgent) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { +func (o *ChangeAgentParamsBodyRtaMysqlAgent) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + if o.RtaOptions != nil { if swag.IsZero(o.RtaOptions) { // not required @@ -11945,11 +12852,11 @@ func (o *ChangeAgentParamsBodyRtaMongodbAgent) contextValidateRtaOptions(ctx con if err := o.RtaOptions.ContextValidate(ctx, formats); err != nil { ve := new(errors.Validation) if stderrors.As(err, &ve) { - return ve.ValidateName("body" + "." + "rta_mongodb_agent" + "." + "rta_options") + return ve.ValidateName("body" + "." + "rta_mysql_agent" + "." + "rta_options") } ce := new(errors.CompositeError) if stderrors.As(err, &ce) { - return ce.ValidateName("body" + "." + "rta_mongodb_agent" + "." + "rta_options") + return ce.ValidateName("body" + "." + "rta_mysql_agent" + "." + "rta_options") } return err @@ -11960,7 +12867,7 @@ func (o *ChangeAgentParamsBodyRtaMongodbAgent) contextValidateRtaOptions(ctx con } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyRtaMongodbAgent) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyRtaMysqlAgent) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -11968,8 +12875,8 @@ func (o *ChangeAgentParamsBodyRtaMongodbAgent) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyRtaMongodbAgent) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyRtaMongodbAgent +func (o *ChangeAgentParamsBodyRtaMysqlAgent) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyRtaMysqlAgent if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -11978,26 +12885,27 @@ func (o *ChangeAgentParamsBodyRtaMongodbAgent) UnmarshalBinary(b []byte) error { } /* -ChangeAgentParamsBodyRtaMongodbAgentCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. -swagger:model ChangeAgentParamsBodyRtaMongodbAgentCustomLabels +ChangeAgentParamsBodyRtaMysqlAgentCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. +swagger:model ChangeAgentParamsBodyRtaMysqlAgentCustomLabels */ -type ChangeAgentParamsBodyRtaMongodbAgentCustomLabels struct { +type ChangeAgentParamsBodyRtaMysqlAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } -// Validate validates this change agent params body rta mongodb agent custom labels -func (o *ChangeAgentParamsBodyRtaMongodbAgentCustomLabels) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body rta mysql agent custom labels +func (o *ChangeAgentParamsBodyRtaMysqlAgentCustomLabels) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body rta mongodb agent custom labels based on context it is used -func (o *ChangeAgentParamsBodyRtaMongodbAgentCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body rta mysql agent custom labels based on context it is used +func (o *ChangeAgentParamsBodyRtaMysqlAgentCustomLabels) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyRtaMongodbAgentCustomLabels) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyRtaMysqlAgentCustomLabels) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -12005,8 +12913,8 @@ func (o *ChangeAgentParamsBodyRtaMongodbAgentCustomLabels) MarshalBinary() ([]by } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyRtaMongodbAgentCustomLabels) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyRtaMongodbAgentCustomLabels +func (o *ChangeAgentParamsBodyRtaMysqlAgentCustomLabels) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyRtaMysqlAgentCustomLabels if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -12015,26 +12923,27 @@ func (o *ChangeAgentParamsBodyRtaMongodbAgentCustomLabels) UnmarshalBinary(b []b } /* -ChangeAgentParamsBodyRtaMongodbAgentRtaOptions RTAOptions holds Real-Time Query Analytics agent options. -swagger:model ChangeAgentParamsBodyRtaMongodbAgentRtaOptions +ChangeAgentParamsBodyRtaMysqlAgentRtaOptions RTAOptions holds Real-Time Query Analytics agent options. +swagger:model ChangeAgentParamsBodyRtaMysqlAgentRtaOptions */ -type ChangeAgentParamsBodyRtaMongodbAgentRtaOptions struct { +type ChangeAgentParamsBodyRtaMysqlAgentRtaOptions struct { + // Query collect interval (default 2s is set by server). CollectInterval string `json:"collect_interval,omitempty"` } -// Validate validates this change agent params body rta mongodb agent rta options -func (o *ChangeAgentParamsBodyRtaMongodbAgentRtaOptions) Validate(formats strfmt.Registry) error { +// Validate validates this change agent params body rta mysql agent rta options +func (o *ChangeAgentParamsBodyRtaMysqlAgentRtaOptions) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this change agent params body rta mongodb agent rta options based on context it is used -func (o *ChangeAgentParamsBodyRtaMongodbAgentRtaOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this change agent params body rta mysql agent rta options based on context it is used +func (o *ChangeAgentParamsBodyRtaMysqlAgentRtaOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (o *ChangeAgentParamsBodyRtaMongodbAgentRtaOptions) MarshalBinary() ([]byte, error) { +func (o *ChangeAgentParamsBodyRtaMysqlAgentRtaOptions) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } @@ -12042,8 +12951,8 @@ func (o *ChangeAgentParamsBodyRtaMongodbAgentRtaOptions) MarshalBinary() ([]byte } // UnmarshalBinary interface implementation -func (o *ChangeAgentParamsBodyRtaMongodbAgentRtaOptions) UnmarshalBinary(b []byte) error { - var res ChangeAgentParamsBodyRtaMongodbAgentRtaOptions +func (o *ChangeAgentParamsBodyRtaMysqlAgentRtaOptions) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyRtaMysqlAgentRtaOptions if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -12056,6 +12965,7 @@ ChangeAgentParamsBodyValkeyExporter change agent params body valkey exporter swagger:model ChangeAgentParamsBodyValkeyExporter */ type ChangeAgentParamsBodyValkeyExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -12249,6 +13159,7 @@ func (o *ChangeAgentParamsBodyValkeyExporter) ContextValidate(ctx context.Contex } func (o *ChangeAgentParamsBodyValkeyExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -12273,6 +13184,7 @@ func (o *ChangeAgentParamsBodyValkeyExporter) contextValidateCustomLabels(ctx co } func (o *ChangeAgentParamsBodyValkeyExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -12319,6 +13231,7 @@ ChangeAgentParamsBodyValkeyExporterCustomLabels A wrapper for map[string]string. swagger:model ChangeAgentParamsBodyValkeyExporterCustomLabels */ type ChangeAgentParamsBodyValkeyExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -12356,6 +13269,7 @@ ChangeAgentParamsBodyValkeyExporterMetricsResolutions MetricsResolutions represe swagger:model ChangeAgentParamsBodyValkeyExporterMetricsResolutions */ type ChangeAgentParamsBodyValkeyExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` diff --git a/api/inventory/v1/json/client/agents_service/get_agent_logs_parameters.go b/api/inventory/v1/json/client/agents_service/get_agent_logs_parameters.go index 4736e3edce6..7c505b88184 100644 --- a/api/inventory/v1/json/client/agents_service/get_agent_logs_parameters.go +++ b/api/inventory/v1/json/client/agents_service/get_agent_logs_parameters.go @@ -58,6 +58,7 @@ GetAgentLogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetAgentLogsParams struct { + /* AgentID. Unique randomly generated instance identifier. @@ -149,6 +150,7 @@ func (o *GetAgentLogsParams) SetLimit(limit *int64) { // WriteToRequest writes these params to a swagger request func (o *GetAgentLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -169,6 +171,7 @@ func (o *GetAgentLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qLimit := swag.FormatInt64(qrLimit) if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/get_agent_logs_responses.go b/api/inventory/v1/json/client/agents_service/get_agent_logs_responses.go index 182e1fad614..00135ae965b 100644 --- a/api/inventory/v1/json/client/agents_service/get_agent_logs_responses.go +++ b/api/inventory/v1/json/client/agents_service/get_agent_logs_responses.go @@ -101,6 +101,7 @@ func (o *GetAgentLogsOK) GetPayload() *GetAgentLogsOKBody { } func (o *GetAgentLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetAgentLogsOKBody) // response payload @@ -174,6 +175,7 @@ func (o *GetAgentLogsDefault) GetPayload() *GetAgentLogsDefaultBody { } func (o *GetAgentLogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetAgentLogsDefaultBody) // response payload @@ -189,6 +191,7 @@ GetAgentLogsDefaultBody get agent logs default body swagger:model GetAgentLogsDefaultBody */ type GetAgentLogsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -258,7 +261,9 @@ func (o *GetAgentLogsDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *GetAgentLogsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,6 +283,7 @@ func (o *GetAgentLogsDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -306,6 +312,7 @@ GetAgentLogsDefaultBodyDetailsItems0 get agent logs default body details items0 swagger:model GetAgentLogsDefaultBodyDetailsItems0 */ type GetAgentLogsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -317,6 +324,7 @@ type GetAgentLogsDefaultBodyDetailsItems0 struct { func (o *GetAgentLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -354,6 +362,7 @@ func (o *GetAgentLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o GetAgentLogsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -417,6 +426,7 @@ GetAgentLogsOKBody get agent logs OK body swagger:model GetAgentLogsOKBody */ type GetAgentLogsOKBody struct { + // logs Logs []string `json:"logs"` diff --git a/api/inventory/v1/json/client/agents_service/get_agent_parameters.go b/api/inventory/v1/json/client/agents_service/get_agent_parameters.go index d9bb847c144..c57fe8c77be 100644 --- a/api/inventory/v1/json/client/agents_service/get_agent_parameters.go +++ b/api/inventory/v1/json/client/agents_service/get_agent_parameters.go @@ -57,6 +57,7 @@ GetAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetAgentParams struct { + /* AgentID. Unique randomly generated instance identifier. @@ -129,6 +130,7 @@ func (o *GetAgentParams) SetAgentID(agentID string) { // WriteToRequest writes these params to a swagger request func (o *GetAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/get_agent_responses.go b/api/inventory/v1/json/client/agents_service/get_agent_responses.go index 9f4fc725525..daec9eeb67b 100644 --- a/api/inventory/v1/json/client/agents_service/get_agent_responses.go +++ b/api/inventory/v1/json/client/agents_service/get_agent_responses.go @@ -102,6 +102,7 @@ func (o *GetAgentOK) GetPayload() *GetAgentOKBody { } func (o *GetAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetAgentOKBody) // response payload @@ -175,6 +176,7 @@ func (o *GetAgentDefault) GetPayload() *GetAgentDefaultBody { } func (o *GetAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetAgentDefaultBody) // response payload @@ -190,6 +192,7 @@ GetAgentDefaultBody get agent default body swagger:model GetAgentDefaultBody */ type GetAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -259,7 +262,9 @@ func (o *GetAgentDefaultBody) ContextValidate(ctx context.Context, formats strfm } func (o *GetAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -279,6 +284,7 @@ func (o *GetAgentDefaultBody) contextValidateDetails(ctx context.Context, format return err } } + } return nil @@ -307,6 +313,7 @@ GetAgentDefaultBodyDetailsItems0 get agent default body details items0 swagger:model GetAgentDefaultBodyDetailsItems0 */ type GetAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -318,6 +325,7 @@ type GetAgentDefaultBodyDetailsItems0 struct { func (o *GetAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -355,6 +363,7 @@ func (o *GetAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetAgentDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -418,6 +427,7 @@ GetAgentOKBody get agent OK body swagger:model GetAgentOKBody */ type GetAgentOKBody struct { + // azure database exporter AzureDatabaseExporter *GetAgentOKBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -469,6 +479,9 @@ type GetAgentOKBody struct { // rta mongodb agent RtaMongodbAgent *GetAgentOKBodyRtaMongodbAgent `json:"rta_mongodb_agent,omitempty"` + // rta mysql agent + RtaMysqlAgent *GetAgentOKBodyRtaMysqlAgent `json:"rta_mysql_agent,omitempty"` + // valkey exporter ValkeyExporter *GetAgentOKBodyValkeyExporter `json:"valkey_exporter,omitempty"` @@ -548,6 +561,10 @@ func (o *GetAgentOKBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateRtaMysqlAgent(formats); err != nil { + res = append(res, err) + } + if err := o.validateValkeyExporter(formats); err != nil { res = append(res, err) } @@ -953,6 +970,29 @@ func (o *GetAgentOKBody) validateRtaMongodbAgent(formats strfmt.Registry) error return nil } +func (o *GetAgentOKBody) validateRtaMysqlAgent(formats strfmt.Registry) error { + if swag.IsZero(o.RtaMysqlAgent) { // not required + return nil + } + + if o.RtaMysqlAgent != nil { + if err := o.RtaMysqlAgent.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("getAgentOk" + "." + "rta_mysql_agent") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("getAgentOk" + "." + "rta_mysql_agent") + } + + return err + } + } + + return nil +} + func (o *GetAgentOKBody) validateValkeyExporter(formats strfmt.Registry) error { if swag.IsZero(o.ValkeyExporter) { // not required return nil @@ -1071,6 +1111,10 @@ func (o *GetAgentOKBody) ContextValidate(ctx context.Context, formats strfmt.Reg res = append(res, err) } + if err := o.contextValidateRtaMysqlAgent(ctx, formats); err != nil { + res = append(res, err) + } + if err := o.contextValidateValkeyExporter(ctx, formats); err != nil { res = append(res, err) } @@ -1086,6 +1130,7 @@ func (o *GetAgentOKBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *GetAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -1110,6 +1155,7 @@ func (o *GetAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Contex } func (o *GetAgentOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -1134,6 +1180,7 @@ func (o *GetAgentOKBody) contextValidateExternalExporter(ctx context.Context, fo } func (o *GetAgentOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -1158,6 +1205,7 @@ func (o *GetAgentOKBody) contextValidateMongodbExporter(ctx context.Context, for } func (o *GetAgentOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -1182,6 +1230,7 @@ func (o *GetAgentOKBody) contextValidateMysqldExporter(ctx context.Context, form } func (o *GetAgentOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -1206,6 +1255,7 @@ func (o *GetAgentOKBody) contextValidateNodeExporter(ctx context.Context, format } func (o *GetAgentOKBody) contextValidateNomadAgent(ctx context.Context, formats strfmt.Registry) error { + if o.NomadAgent != nil { if swag.IsZero(o.NomadAgent) { // not required @@ -1230,6 +1280,7 @@ func (o *GetAgentOKBody) contextValidateNomadAgent(ctx context.Context, formats } func (o *GetAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { + if o.PMMAgent != nil { if swag.IsZero(o.PMMAgent) { // not required @@ -1254,6 +1305,7 @@ func (o *GetAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats st } func (o *GetAgentOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -1278,6 +1330,7 @@ func (o *GetAgentOKBody) contextValidatePostgresExporter(ctx context.Context, fo } func (o *GetAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -1302,6 +1355,7 @@ func (o *GetAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, fo } func (o *GetAgentOKBody) contextValidateQANMongodbMongologAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbMongologAgent != nil { if swag.IsZero(o.QANMongodbMongologAgent) { // not required @@ -1326,6 +1380,7 @@ func (o *GetAgentOKBody) contextValidateQANMongodbMongologAgent(ctx context.Cont } func (o *GetAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -1350,6 +1405,7 @@ func (o *GetAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Cont } func (o *GetAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -1374,6 +1430,7 @@ func (o *GetAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Cont } func (o *GetAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -1398,6 +1455,7 @@ func (o *GetAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context } func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -1422,6 +1480,7 @@ func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx conte } func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -1446,6 +1505,7 @@ func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx cont } func (o *GetAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -1470,6 +1530,7 @@ func (o *GetAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats } func (o *GetAgentOKBody) contextValidateRtaMongodbAgent(ctx context.Context, formats strfmt.Registry) error { + if o.RtaMongodbAgent != nil { if swag.IsZero(o.RtaMongodbAgent) { // not required @@ -1493,7 +1554,33 @@ func (o *GetAgentOKBody) contextValidateRtaMongodbAgent(ctx context.Context, for return nil } +func (o *GetAgentOKBody) contextValidateRtaMysqlAgent(ctx context.Context, formats strfmt.Registry) error { + + if o.RtaMysqlAgent != nil { + + if swag.IsZero(o.RtaMysqlAgent) { // not required + return nil + } + + if err := o.RtaMysqlAgent.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("getAgentOk" + "." + "rta_mysql_agent") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("getAgentOk" + "." + "rta_mysql_agent") + } + + return err + } + } + + return nil +} + func (o *GetAgentOKBody) contextValidateValkeyExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ValkeyExporter != nil { if swag.IsZero(o.ValkeyExporter) { // not required @@ -1518,6 +1605,7 @@ func (o *GetAgentOKBody) contextValidateValkeyExporter(ctx context.Context, form } func (o *GetAgentOKBody) contextValidateVmagent(ctx context.Context, formats strfmt.Registry) error { + if o.Vmagent != nil { if swag.IsZero(o.Vmagent) { // not required @@ -1564,6 +1652,7 @@ GetAgentOKBodyAzureDatabaseExporter AzureDatabaseExporter runs on Generic or Con swagger:model GetAgentOKBodyAzureDatabaseExporter */ type GetAgentOKBodyAzureDatabaseExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1790,6 +1879,7 @@ func (o *GetAgentOKBodyAzureDatabaseExporter) ContextValidate(ctx context.Contex } func (o *GetAgentOKBodyAzureDatabaseExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1836,6 +1926,7 @@ GetAgentOKBodyAzureDatabaseExporterMetricsResolutions MetricsResolutions represe swagger:model GetAgentOKBodyAzureDatabaseExporterMetricsResolutions */ type GetAgentOKBodyAzureDatabaseExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -1879,6 +1970,7 @@ GetAgentOKBodyExternalExporter ExternalExporter runs on any Node type, including swagger:model GetAgentOKBodyExternalExporter */ type GetAgentOKBodyExternalExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2047,6 +2139,7 @@ func (o *GetAgentOKBodyExternalExporter) ContextValidate(ctx context.Context, fo } func (o *GetAgentOKBodyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2093,6 +2186,7 @@ GetAgentOKBodyExternalExporterMetricsResolutions MetricsResolutions represents P swagger:model GetAgentOKBodyExternalExporterMetricsResolutions */ type GetAgentOKBodyExternalExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2136,6 +2230,7 @@ GetAgentOKBodyMongodbExporter MongoDBExporter runs on Generic or Container Node swagger:model GetAgentOKBodyMongodbExporter */ type GetAgentOKBodyMongodbExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2387,6 +2482,7 @@ func (o *GetAgentOKBodyMongodbExporter) ContextValidate(ctx context.Context, for } func (o *GetAgentOKBodyMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2433,6 +2529,7 @@ GetAgentOKBodyMongodbExporterMetricsResolutions MetricsResolutions represents Pr swagger:model GetAgentOKBodyMongodbExporterMetricsResolutions */ type GetAgentOKBodyMongodbExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2476,6 +2573,7 @@ GetAgentOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node an swagger:model GetAgentOKBodyMysqldExporter */ type GetAgentOKBodyMysqldExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2737,6 +2835,7 @@ func (o *GetAgentOKBodyMysqldExporter) ContextValidate(ctx context.Context, form } func (o *GetAgentOKBodyMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2783,6 +2882,7 @@ GetAgentOKBodyMysqldExporterMetricsResolutions MetricsResolutions represents Pro swagger:model GetAgentOKBodyMysqldExporterMetricsResolutions */ type GetAgentOKBodyMysqldExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2826,6 +2926,7 @@ GetAgentOKBodyNodeExporter NodeExporter runs on Generic or Container Node and ex swagger:model GetAgentOKBodyNodeExporter */ type GetAgentOKBodyNodeExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3049,6 +3150,7 @@ func (o *GetAgentOKBodyNodeExporter) ContextValidate(ctx context.Context, format } func (o *GetAgentOKBodyNodeExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3095,6 +3197,7 @@ GetAgentOKBodyNodeExporterMetricsResolutions MetricsResolutions represents Prome swagger:model GetAgentOKBodyNodeExporterMetricsResolutions */ type GetAgentOKBodyNodeExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3138,6 +3241,7 @@ GetAgentOKBodyNomadAgent get agent OK body nomad agent swagger:model GetAgentOKBodyNomadAgent */ type GetAgentOKBodyNomadAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3268,6 +3372,7 @@ GetAgentOKBodyPMMAgent PMMAgent runs on Generic or Container Node. swagger:model GetAgentOKBodyPMMAgent */ type GetAgentOKBodyPMMAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3317,6 +3422,7 @@ GetAgentOKBodyPostgresExporter PostgresExporter runs on Generic or Container Nod swagger:model GetAgentOKBodyPostgresExporter */ type GetAgentOKBodyPostgresExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3561,6 +3667,7 @@ func (o *GetAgentOKBodyPostgresExporter) ContextValidate(ctx context.Context, fo } func (o *GetAgentOKBodyPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3607,6 +3714,7 @@ GetAgentOKBodyPostgresExporterMetricsResolutions MetricsResolutions represents P swagger:model GetAgentOKBodyPostgresExporterMetricsResolutions */ type GetAgentOKBodyPostgresExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3650,6 +3758,7 @@ GetAgentOKBodyProxysqlExporter ProxySQLExporter runs on Generic or Container Nod swagger:model GetAgentOKBodyProxysqlExporter */ type GetAgentOKBodyProxysqlExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3888,6 +3997,7 @@ func (o *GetAgentOKBodyProxysqlExporter) ContextValidate(ctx context.Context, fo } func (o *GetAgentOKBodyProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3934,6 +4044,7 @@ GetAgentOKBodyProxysqlExporterMetricsResolutions MetricsResolutions represents P swagger:model GetAgentOKBodyProxysqlExporterMetricsResolutions */ type GetAgentOKBodyProxysqlExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3977,6 +4088,7 @@ GetAgentOKBodyQANMongodbMongologAgent QANMongoDBMongologAgent runs within pmm-ag swagger:model GetAgentOKBodyQANMongodbMongologAgent */ type GetAgentOKBodyQANMongodbMongologAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4186,6 +4298,7 @@ GetAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent runs within pmm-ag swagger:model GetAgentOKBodyQANMongodbProfilerAgent */ type GetAgentOKBodyQANMongodbProfilerAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4395,6 +4508,7 @@ GetAgentOKBodyQANMysqlPerfschemaAgent QANMySQLPerfSchemaAgent runs within pmm-ag swagger:model GetAgentOKBodyQANMysqlPerfschemaAgent */ type GetAgentOKBodyQANMysqlPerfschemaAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4622,6 +4736,7 @@ GetAgentOKBodyQANMysqlSlowlogAgent QANMySQLSlowlogAgent runs within pmm-agent an swagger:model GetAgentOKBodyQANMysqlSlowlogAgent */ type GetAgentOKBodyQANMysqlSlowlogAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4852,6 +4967,7 @@ GetAgentOKBodyQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatementsAgent runs swagger:model GetAgentOKBodyQANPostgresqlPgstatementsAgent */ type GetAgentOKBodyQANPostgresqlPgstatementsAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5064,6 +5180,7 @@ GetAgentOKBodyQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMonitorAgent ru swagger:model GetAgentOKBodyQANPostgresqlPgstatmonitorAgent */ type GetAgentOKBodyQANPostgresqlPgstatmonitorAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5279,6 +5396,7 @@ GetAgentOKBodyRDSExporter RDSExporter runs on Generic or Container Node and expo swagger:model GetAgentOKBodyRDSExporter */ type GetAgentOKBodyRDSExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5511,6 +5629,7 @@ func (o *GetAgentOKBodyRDSExporter) ContextValidate(ctx context.Context, formats } func (o *GetAgentOKBodyRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -5557,6 +5676,7 @@ GetAgentOKBodyRDSExporterMetricsResolutions MetricsResolutions represents Promet swagger:model GetAgentOKBodyRDSExporterMetricsResolutions */ type GetAgentOKBodyRDSExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -5600,6 +5720,7 @@ GetAgentOKBodyRtaMongodbAgent RTAMongoDBAgent runs within pmm-agent and sends Mo swagger:model GetAgentOKBodyRtaMongodbAgent */ type GetAgentOKBodyRtaMongodbAgent struct { + // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -5820,6 +5941,7 @@ func (o *GetAgentOKBodyRtaMongodbAgent) ContextValidate(ctx context.Context, for } func (o *GetAgentOKBodyRtaMongodbAgent) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + if o.RtaOptions != nil { if swag.IsZero(o.RtaOptions) { // not required @@ -5866,6 +5988,7 @@ GetAgentOKBodyRtaMongodbAgentRtaOptions RTAOptions holds Real-Time Query Analyti swagger:model GetAgentOKBodyRtaMongodbAgentRtaOptions */ type GetAgentOKBodyRtaMongodbAgentRtaOptions struct { + // Query collect interval (default 2s is set by server). CollectInterval string `json:"collect_interval,omitempty"` } @@ -5898,11 +6021,318 @@ func (o *GetAgentOKBodyRtaMongodbAgentRtaOptions) UnmarshalBinary(b []byte) erro return nil } +/* +GetAgentOKBodyRtaMysqlAgent RTAMySQLAgent runs within pmm-agent and sends MySQL Real-Time Query Analytics data to the PMM Server. +swagger:model GetAgentOKBodyRtaMysqlAgent +*/ +type GetAgentOKBodyRtaMysqlAgent struct { + + // Unique agent identifier. + AgentID string `json:"agent_id,omitempty"` + + // The pmm-agent identifier which runs this instance. + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // Desired Agent status: enabled (false) or disabled (true). + Disabled bool `json:"disabled,omitempty"` + + // Service identifier. + ServiceID string `json:"service_id,omitempty"` + + // MySQL username for getting the currently running queries. + Username string `json:"username,omitempty"` + + // Use TLS for database connections. + TLS bool `json:"tls,omitempty"` + + // Skip TLS certificate and hostname validation. + TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // AgentStatus represents actual Agent status. + // + // - AGENT_STATUS_STARTING: Agent is starting. + // - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when starting. + // - AGENT_STATUS_RUNNING: Agent is running. + // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. + // - AGENT_STATUS_STOPPING: Agent is stopping. + // - AGENT_STATUS_DONE: Agent has been stopped or disabled. + // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. + // Enum: ["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_INITIALIZATION_ERROR","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"] + Status *string `json:"status,omitempty"` + + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: ["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"] + LogLevel *string `json:"log_level,omitempty"` + + // rta options + RtaOptions *GetAgentOKBodyRtaMysqlAgentRtaOptions `json:"rta_options,omitempty"` +} + +// Validate validates this get agent OK body rta mysql agent +func (o *GetAgentOKBodyRtaMysqlAgent) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + + if err := o.validateRtaOptions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var getAgentOkBodyRtaMysqlAgentTypeStatusPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_INITIALIZATION_ERROR","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + getAgentOkBodyRtaMysqlAgentTypeStatusPropEnum = append(getAgentOkBodyRtaMysqlAgentTypeStatusPropEnum, v) + } +} + +const ( + + // GetAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + GetAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // GetAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + GetAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // GetAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSINITIALIZATIONERROR captures enum value "AGENT_STATUS_INITIALIZATION_ERROR" + GetAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSINITIALIZATIONERROR string = "AGENT_STATUS_INITIALIZATION_ERROR" + + // GetAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + GetAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // GetAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + GetAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // GetAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + GetAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // GetAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + GetAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // GetAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + GetAgentOKBodyRtaMysqlAgentStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *GetAgentOKBodyRtaMysqlAgent) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, getAgentOkBodyRtaMysqlAgentTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *GetAgentOKBodyRtaMysqlAgent) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("getAgentOk"+"."+"rta_mysql_agent"+"."+"status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +var getAgentOkBodyRtaMysqlAgentTypeLogLevelPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + getAgentOkBodyRtaMysqlAgentTypeLogLevelPropEnum = append(getAgentOkBodyRtaMysqlAgentTypeLogLevelPropEnum, v) + } +} + +const ( + + // GetAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + GetAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // GetAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + GetAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // GetAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + GetAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // GetAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + GetAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // GetAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + GetAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // GetAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + GetAgentOKBodyRtaMysqlAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *GetAgentOKBodyRtaMysqlAgent) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, getAgentOkBodyRtaMysqlAgentTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *GetAgentOKBodyRtaMysqlAgent) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("getAgentOk"+"."+"rta_mysql_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +func (o *GetAgentOKBodyRtaMysqlAgent) validateRtaOptions(formats strfmt.Registry) error { + if swag.IsZero(o.RtaOptions) { // not required + return nil + } + + if o.RtaOptions != nil { + if err := o.RtaOptions.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("getAgentOk" + "." + "rta_mysql_agent" + "." + "rta_options") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("getAgentOk" + "." + "rta_mysql_agent" + "." + "rta_options") + } + + return err + } + } + + return nil +} + +// ContextValidate validate this get agent OK body rta mysql agent based on the context it is used +func (o *GetAgentOKBodyRtaMysqlAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateRtaOptions(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *GetAgentOKBodyRtaMysqlAgent) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + + if o.RtaOptions != nil { + + if swag.IsZero(o.RtaOptions) { // not required + return nil + } + + if err := o.RtaOptions.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("getAgentOk" + "." + "rta_mysql_agent" + "." + "rta_options") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("getAgentOk" + "." + "rta_mysql_agent" + "." + "rta_options") + } + + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *GetAgentOKBodyRtaMysqlAgent) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetAgentOKBodyRtaMysqlAgent) UnmarshalBinary(b []byte) error { + var res GetAgentOKBodyRtaMysqlAgent + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +GetAgentOKBodyRtaMysqlAgentRtaOptions RTAOptions holds Real-Time Query Analytics agent options. +swagger:model GetAgentOKBodyRtaMysqlAgentRtaOptions +*/ +type GetAgentOKBodyRtaMysqlAgentRtaOptions struct { + + // Query collect interval (default 2s is set by server). + CollectInterval string `json:"collect_interval,omitempty"` +} + +// Validate validates this get agent OK body rta mysql agent rta options +func (o *GetAgentOKBodyRtaMysqlAgentRtaOptions) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this get agent OK body rta mysql agent rta options based on context it is used +func (o *GetAgentOKBodyRtaMysqlAgentRtaOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GetAgentOKBodyRtaMysqlAgentRtaOptions) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetAgentOKBodyRtaMysqlAgentRtaOptions) UnmarshalBinary(b []byte) error { + var res GetAgentOKBodyRtaMysqlAgentRtaOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + /* GetAgentOKBodyValkeyExporter ValkeyExporter runs on Generic or Container Node and exposes Valkey Service metrics. swagger:model GetAgentOKBodyValkeyExporter */ type GetAgentOKBodyValkeyExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6077,6 +6507,7 @@ func (o *GetAgentOKBodyValkeyExporter) ContextValidate(ctx context.Context, form } func (o *GetAgentOKBodyValkeyExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6123,6 +6554,7 @@ GetAgentOKBodyValkeyExporterMetricsResolutions MetricsResolutions represents Pro swagger:model GetAgentOKBodyValkeyExporterMetricsResolutions */ type GetAgentOKBodyValkeyExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6168,6 +6600,7 @@ GetAgentOKBodyVmagent VMAgent runs on Generic or Container Node alongside pmm-ag swagger:model GetAgentOKBodyVmagent */ type GetAgentOKBodyVmagent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventory/v1/json/client/agents_service/list_agents_responses.go b/api/inventory/v1/json/client/agents_service/list_agents_responses.go index 0bffc1a715a..9428c9c1e0b 100644 --- a/api/inventory/v1/json/client/agents_service/list_agents_responses.go +++ b/api/inventory/v1/json/client/agents_service/list_agents_responses.go @@ -102,6 +102,7 @@ func (o *ListAgentsOK) GetPayload() *ListAgentsOKBody { } func (o *ListAgentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAgentsOKBody) // response payload @@ -175,6 +176,7 @@ func (o *ListAgentsDefault) GetPayload() *ListAgentsDefaultBody { } func (o *ListAgentsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAgentsDefaultBody) // response payload @@ -190,6 +192,7 @@ ListAgentsDefaultBody list agents default body swagger:model ListAgentsDefaultBody */ type ListAgentsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -259,7 +262,9 @@ func (o *ListAgentsDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -279,6 +284,7 @@ func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -307,6 +313,7 @@ ListAgentsDefaultBodyDetailsItems0 list agents default body details items0 swagger:model ListAgentsDefaultBodyDetailsItems0 */ type ListAgentsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -318,6 +325,7 @@ type ListAgentsDefaultBodyDetailsItems0 struct { func (o *ListAgentsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -355,6 +363,7 @@ func (o *ListAgentsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListAgentsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -418,6 +427,7 @@ ListAgentsOKBody list agents OK body swagger:model ListAgentsOKBody */ type ListAgentsOKBody struct { + // pmm agent PMMAgent []*ListAgentsOKBodyPMMAgentItems0 `json:"pmm_agent"` @@ -474,6 +484,9 @@ type ListAgentsOKBody struct { // rta mongodb agent RtaMongodbAgent []*ListAgentsOKBodyRtaMongodbAgentItems0 `json:"rta_mongodb_agent"` + + // rta mysql agent + RtaMysqlAgent []*ListAgentsOKBodyRtaMysqlAgentItems0 `json:"rta_mysql_agent"` } // Validate validates this list agents OK body @@ -556,6 +569,10 @@ func (o *ListAgentsOKBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateRtaMysqlAgent(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -1132,6 +1149,36 @@ func (o *ListAgentsOKBody) validateRtaMongodbAgent(formats strfmt.Registry) erro return nil } +func (o *ListAgentsOKBody) validateRtaMysqlAgent(formats strfmt.Registry) error { + if swag.IsZero(o.RtaMysqlAgent) { // not required + return nil + } + + for i := 0; i < len(o.RtaMysqlAgent); i++ { + if swag.IsZero(o.RtaMysqlAgent[i]) { // not required + continue + } + + if o.RtaMysqlAgent[i] != nil { + if err := o.RtaMysqlAgent[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("listAgentsOk" + "." + "rta_mysql_agent" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("listAgentsOk" + "." + "rta_mysql_agent" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + // ContextValidate validate this list agents OK body based on the context it is used func (o *ListAgentsOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -1212,6 +1259,10 @@ func (o *ListAgentsOKBody) ContextValidate(ctx context.Context, formats strfmt.R res = append(res, err) } + if err := o.contextValidateRtaMysqlAgent(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -1219,7 +1270,9 @@ func (o *ListAgentsOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *ListAgentsOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.PMMAgent); i++ { + if o.PMMAgent[i] != nil { if swag.IsZero(o.PMMAgent[i]) { // not required @@ -1239,13 +1292,16 @@ func (o *ListAgentsOKBody) contextValidatePMMAgent(ctx context.Context, formats return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateVMAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.VMAgent); i++ { + if o.VMAgent[i] != nil { if swag.IsZero(o.VMAgent[i]) { // not required @@ -1265,13 +1321,16 @@ func (o *ListAgentsOKBody) contextValidateVMAgent(ctx context.Context, formats s return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.NodeExporter); i++ { + if o.NodeExporter[i] != nil { if swag.IsZero(o.NodeExporter[i]) { // not required @@ -1291,13 +1350,16 @@ func (o *ListAgentsOKBody) contextValidateNodeExporter(ctx context.Context, form return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.MysqldExporter); i++ { + if o.MysqldExporter[i] != nil { if swag.IsZero(o.MysqldExporter[i]) { // not required @@ -1317,13 +1379,16 @@ func (o *ListAgentsOKBody) contextValidateMysqldExporter(ctx context.Context, fo return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.MongodbExporter); i++ { + if o.MongodbExporter[i] != nil { if swag.IsZero(o.MongodbExporter[i]) { // not required @@ -1343,13 +1408,16 @@ func (o *ListAgentsOKBody) contextValidateMongodbExporter(ctx context.Context, f return err } } + } return nil } func (o *ListAgentsOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.PostgresExporter); i++ { + if o.PostgresExporter[i] != nil { if swag.IsZero(o.PostgresExporter[i]) { // not required @@ -1369,13 +1437,16 @@ func (o *ListAgentsOKBody) contextValidatePostgresExporter(ctx context.Context, return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.ProxysqlExporter); i++ { + if o.ProxysqlExporter[i] != nil { if swag.IsZero(o.ProxysqlExporter[i]) { // not required @@ -1395,13 +1466,16 @@ func (o *ListAgentsOKBody) contextValidateProxysqlExporter(ctx context.Context, return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANMysqlPerfschemaAgent); i++ { + if o.QANMysqlPerfschemaAgent[i] != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent[i]) { // not required @@ -1421,13 +1495,16 @@ func (o *ListAgentsOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Co return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANMysqlSlowlogAgent); i++ { + if o.QANMysqlSlowlogAgent[i] != nil { if swag.IsZero(o.QANMysqlSlowlogAgent[i]) { // not required @@ -1447,13 +1524,16 @@ func (o *ListAgentsOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Conte return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANMongodbProfilerAgent); i++ { + if o.QANMongodbProfilerAgent[i] != nil { if swag.IsZero(o.QANMongodbProfilerAgent[i]) { // not required @@ -1473,13 +1553,16 @@ func (o *ListAgentsOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Co return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANMongodbMongologAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANMongodbMongologAgent); i++ { + if o.QANMongodbMongologAgent[i] != nil { if swag.IsZero(o.QANMongodbMongologAgent[i]) { // not required @@ -1499,13 +1582,16 @@ func (o *ListAgentsOKBody) contextValidateQANMongodbMongologAgent(ctx context.Co return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANPostgresqlPgstatementsAgent); i++ { + if o.QANPostgresqlPgstatementsAgent[i] != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent[i]) { // not required @@ -1525,13 +1611,16 @@ func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx con return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANPostgresqlPgstatmonitorAgent); i++ { + if o.QANPostgresqlPgstatmonitorAgent[i] != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent[i]) { // not required @@ -1551,13 +1640,16 @@ func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx co return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.ExternalExporter); i++ { + if o.ExternalExporter[i] != nil { if swag.IsZero(o.ExternalExporter[i]) { // not required @@ -1577,13 +1669,16 @@ func (o *ListAgentsOKBody) contextValidateExternalExporter(ctx context.Context, return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.RDSExporter); i++ { + if o.RDSExporter[i] != nil { if swag.IsZero(o.RDSExporter[i]) { // not required @@ -1603,13 +1698,16 @@ func (o *ListAgentsOKBody) contextValidateRDSExporter(ctx context.Context, forma return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.AzureDatabaseExporter); i++ { + if o.AzureDatabaseExporter[i] != nil { if swag.IsZero(o.AzureDatabaseExporter[i]) { // not required @@ -1629,13 +1727,16 @@ func (o *ListAgentsOKBody) contextValidateAzureDatabaseExporter(ctx context.Cont return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateNomadAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.NomadAgent); i++ { + if o.NomadAgent[i] != nil { if swag.IsZero(o.NomadAgent[i]) { // not required @@ -1655,13 +1756,16 @@ func (o *ListAgentsOKBody) contextValidateNomadAgent(ctx context.Context, format return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateValkeyExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.ValkeyExporter); i++ { + if o.ValkeyExporter[i] != nil { if swag.IsZero(o.ValkeyExporter[i]) { // not required @@ -1681,13 +1785,16 @@ func (o *ListAgentsOKBody) contextValidateValkeyExporter(ctx context.Context, fo return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateRtaMongodbAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.RtaMongodbAgent); i++ { + if o.RtaMongodbAgent[i] != nil { if swag.IsZero(o.RtaMongodbAgent[i]) { // not required @@ -1707,6 +1814,36 @@ func (o *ListAgentsOKBody) contextValidateRtaMongodbAgent(ctx context.Context, f return err } } + + } + + return nil +} + +func (o *ListAgentsOKBody) contextValidateRtaMysqlAgent(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.RtaMysqlAgent); i++ { + + if o.RtaMysqlAgent[i] != nil { + + if swag.IsZero(o.RtaMysqlAgent[i]) { // not required + return nil + } + + if err := o.RtaMysqlAgent[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("listAgentsOk" + "." + "rta_mysql_agent" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("listAgentsOk" + "." + "rta_mysql_agent" + "." + strconv.Itoa(i)) + } + + return err + } + } + } return nil @@ -1735,6 +1872,7 @@ ListAgentsOKBodyAzureDatabaseExporterItems0 AzureDatabaseExporter runs on Generi swagger:model ListAgentsOKBodyAzureDatabaseExporterItems0 */ type ListAgentsOKBodyAzureDatabaseExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1961,6 +2099,7 @@ func (o *ListAgentsOKBodyAzureDatabaseExporterItems0) ContextValidate(ctx contex } func (o *ListAgentsOKBodyAzureDatabaseExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2007,6 +2146,7 @@ ListAgentsOKBodyAzureDatabaseExporterItems0MetricsResolutions MetricsResolutions swagger:model ListAgentsOKBodyAzureDatabaseExporterItems0MetricsResolutions */ type ListAgentsOKBodyAzureDatabaseExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2050,6 +2190,7 @@ ListAgentsOKBodyExternalExporterItems0 ExternalExporter runs on any Node type, i swagger:model ListAgentsOKBodyExternalExporterItems0 */ type ListAgentsOKBodyExternalExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2218,6 +2359,7 @@ func (o *ListAgentsOKBodyExternalExporterItems0) ContextValidate(ctx context.Con } func (o *ListAgentsOKBodyExternalExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2264,6 +2406,7 @@ ListAgentsOKBodyExternalExporterItems0MetricsResolutions MetricsResolutions repr swagger:model ListAgentsOKBodyExternalExporterItems0MetricsResolutions */ type ListAgentsOKBodyExternalExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2307,6 +2450,7 @@ ListAgentsOKBodyMongodbExporterItems0 MongoDBExporter runs on Generic or Contain swagger:model ListAgentsOKBodyMongodbExporterItems0 */ type ListAgentsOKBodyMongodbExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2558,6 +2702,7 @@ func (o *ListAgentsOKBodyMongodbExporterItems0) ContextValidate(ctx context.Cont } func (o *ListAgentsOKBodyMongodbExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2604,6 +2749,7 @@ ListAgentsOKBodyMongodbExporterItems0MetricsResolutions MetricsResolutions repre swagger:model ListAgentsOKBodyMongodbExporterItems0MetricsResolutions */ type ListAgentsOKBodyMongodbExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2647,6 +2793,7 @@ ListAgentsOKBodyMysqldExporterItems0 MySQLdExporter runs on Generic or Container swagger:model ListAgentsOKBodyMysqldExporterItems0 */ type ListAgentsOKBodyMysqldExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2908,6 +3055,7 @@ func (o *ListAgentsOKBodyMysqldExporterItems0) ContextValidate(ctx context.Conte } func (o *ListAgentsOKBodyMysqldExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2954,6 +3102,7 @@ ListAgentsOKBodyMysqldExporterItems0MetricsResolutions MetricsResolutions repres swagger:model ListAgentsOKBodyMysqldExporterItems0MetricsResolutions */ type ListAgentsOKBodyMysqldExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2997,6 +3146,7 @@ ListAgentsOKBodyNodeExporterItems0 NodeExporter runs on Generic or Container Nod swagger:model ListAgentsOKBodyNodeExporterItems0 */ type ListAgentsOKBodyNodeExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3220,6 +3370,7 @@ func (o *ListAgentsOKBodyNodeExporterItems0) ContextValidate(ctx context.Context } func (o *ListAgentsOKBodyNodeExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3266,6 +3417,7 @@ ListAgentsOKBodyNodeExporterItems0MetricsResolutions MetricsResolutions represen swagger:model ListAgentsOKBodyNodeExporterItems0MetricsResolutions */ type ListAgentsOKBodyNodeExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3309,6 +3461,7 @@ ListAgentsOKBodyNomadAgentItems0 list agents OK body nomad agent items0 swagger:model ListAgentsOKBodyNomadAgentItems0 */ type ListAgentsOKBodyNomadAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3439,6 +3592,7 @@ ListAgentsOKBodyPMMAgentItems0 PMMAgent runs on Generic or Container Node. swagger:model ListAgentsOKBodyPMMAgentItems0 */ type ListAgentsOKBodyPMMAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3488,6 +3642,7 @@ ListAgentsOKBodyPostgresExporterItems0 PostgresExporter runs on Generic or Conta swagger:model ListAgentsOKBodyPostgresExporterItems0 */ type ListAgentsOKBodyPostgresExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3732,6 +3887,7 @@ func (o *ListAgentsOKBodyPostgresExporterItems0) ContextValidate(ctx context.Con } func (o *ListAgentsOKBodyPostgresExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3778,6 +3934,7 @@ ListAgentsOKBodyPostgresExporterItems0MetricsResolutions MetricsResolutions repr swagger:model ListAgentsOKBodyPostgresExporterItems0MetricsResolutions */ type ListAgentsOKBodyPostgresExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3821,6 +3978,7 @@ ListAgentsOKBodyProxysqlExporterItems0 ProxySQLExporter runs on Generic or Conta swagger:model ListAgentsOKBodyProxysqlExporterItems0 */ type ListAgentsOKBodyProxysqlExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4059,6 +4217,7 @@ func (o *ListAgentsOKBodyProxysqlExporterItems0) ContextValidate(ctx context.Con } func (o *ListAgentsOKBodyProxysqlExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4105,6 +4264,7 @@ ListAgentsOKBodyProxysqlExporterItems0MetricsResolutions MetricsResolutions repr swagger:model ListAgentsOKBodyProxysqlExporterItems0MetricsResolutions */ type ListAgentsOKBodyProxysqlExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4148,6 +4308,7 @@ ListAgentsOKBodyQANMongodbMongologAgentItems0 QANMongoDBMongologAgent runs withi swagger:model ListAgentsOKBodyQANMongodbMongologAgentItems0 */ type ListAgentsOKBodyQANMongodbMongologAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4357,6 +4518,7 @@ ListAgentsOKBodyQANMongodbProfilerAgentItems0 QANMongoDBProfilerAgent runs withi swagger:model ListAgentsOKBodyQANMongodbProfilerAgentItems0 */ type ListAgentsOKBodyQANMongodbProfilerAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4566,6 +4728,7 @@ ListAgentsOKBodyQANMysqlPerfschemaAgentItems0 QANMySQLPerfSchemaAgent runs withi swagger:model ListAgentsOKBodyQANMysqlPerfschemaAgentItems0 */ type ListAgentsOKBodyQANMysqlPerfschemaAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4793,6 +4956,7 @@ ListAgentsOKBodyQANMysqlSlowlogAgentItems0 QANMySQLSlowlogAgent runs within pmm- swagger:model ListAgentsOKBodyQANMysqlSlowlogAgentItems0 */ type ListAgentsOKBodyQANMysqlSlowlogAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5023,6 +5187,7 @@ ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 QANPostgreSQLPgStatementsAg swagger:model ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 */ type ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5235,6 +5400,7 @@ ListAgentsOKBodyQANPostgresqlPgstatmonitorAgentItems0 QANPostgreSQLPgStatMonitor swagger:model ListAgentsOKBodyQANPostgresqlPgstatmonitorAgentItems0 */ type ListAgentsOKBodyQANPostgresqlPgstatmonitorAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5450,6 +5616,7 @@ ListAgentsOKBodyRDSExporterItems0 RDSExporter runs on Generic or Container Node swagger:model ListAgentsOKBodyRDSExporterItems0 */ type ListAgentsOKBodyRDSExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5682,6 +5849,7 @@ func (o *ListAgentsOKBodyRDSExporterItems0) ContextValidate(ctx context.Context, } func (o *ListAgentsOKBodyRDSExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -5728,6 +5896,7 @@ ListAgentsOKBodyRDSExporterItems0MetricsResolutions MetricsResolutions represent swagger:model ListAgentsOKBodyRDSExporterItems0MetricsResolutions */ type ListAgentsOKBodyRDSExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -5771,6 +5940,7 @@ ListAgentsOKBodyRtaMongodbAgentItems0 RTAMongoDBAgent runs within pmm-agent and swagger:model ListAgentsOKBodyRtaMongodbAgentItems0 */ type ListAgentsOKBodyRtaMongodbAgentItems0 struct { + // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -5991,6 +6161,7 @@ func (o *ListAgentsOKBodyRtaMongodbAgentItems0) ContextValidate(ctx context.Cont } func (o *ListAgentsOKBodyRtaMongodbAgentItems0) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + if o.RtaOptions != nil { if swag.IsZero(o.RtaOptions) { // not required @@ -6037,6 +6208,7 @@ ListAgentsOKBodyRtaMongodbAgentItems0RtaOptions RTAOptions holds Real-Time Query swagger:model ListAgentsOKBodyRtaMongodbAgentItems0RtaOptions */ type ListAgentsOKBodyRtaMongodbAgentItems0RtaOptions struct { + // Query collect interval (default 2s is set by server). CollectInterval string `json:"collect_interval,omitempty"` } @@ -6069,6 +6241,312 @@ func (o *ListAgentsOKBodyRtaMongodbAgentItems0RtaOptions) UnmarshalBinary(b []by return nil } +/* +ListAgentsOKBodyRtaMysqlAgentItems0 RTAMySQLAgent runs within pmm-agent and sends MySQL Real-Time Query Analytics data to the PMM Server. +swagger:model ListAgentsOKBodyRtaMysqlAgentItems0 +*/ +type ListAgentsOKBodyRtaMysqlAgentItems0 struct { + + // Unique agent identifier. + AgentID string `json:"agent_id,omitempty"` + + // The pmm-agent identifier which runs this instance. + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // Desired Agent status: enabled (false) or disabled (true). + Disabled bool `json:"disabled,omitempty"` + + // Service identifier. + ServiceID string `json:"service_id,omitempty"` + + // MySQL username for getting the currently running queries. + Username string `json:"username,omitempty"` + + // Use TLS for database connections. + TLS bool `json:"tls,omitempty"` + + // Skip TLS certificate and hostname validation. + TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // AgentStatus represents actual Agent status. + // + // - AGENT_STATUS_STARTING: Agent is starting. + // - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when starting. + // - AGENT_STATUS_RUNNING: Agent is running. + // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. + // - AGENT_STATUS_STOPPING: Agent is stopping. + // - AGENT_STATUS_DONE: Agent has been stopped or disabled. + // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. + // Enum: ["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_INITIALIZATION_ERROR","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"] + Status *string `json:"status,omitempty"` + + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: ["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"] + LogLevel *string `json:"log_level,omitempty"` + + // rta options + RtaOptions *ListAgentsOKBodyRtaMysqlAgentItems0RtaOptions `json:"rta_options,omitempty"` +} + +// Validate validates this list agents OK body rta mysql agent items0 +func (o *ListAgentsOKBodyRtaMysqlAgentItems0) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + + if err := o.validateRtaOptions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var listAgentsOkBodyRtaMysqlAgentItems0TypeStatusPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_INITIALIZATION_ERROR","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + listAgentsOkBodyRtaMysqlAgentItems0TypeStatusPropEnum = append(listAgentsOkBodyRtaMysqlAgentItems0TypeStatusPropEnum, v) + } +} + +const ( + + // ListAgentsOKBodyRtaMysqlAgentItems0StatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + ListAgentsOKBodyRtaMysqlAgentItems0StatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // ListAgentsOKBodyRtaMysqlAgentItems0StatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + ListAgentsOKBodyRtaMysqlAgentItems0StatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // ListAgentsOKBodyRtaMysqlAgentItems0StatusAGENTSTATUSINITIALIZATIONERROR captures enum value "AGENT_STATUS_INITIALIZATION_ERROR" + ListAgentsOKBodyRtaMysqlAgentItems0StatusAGENTSTATUSINITIALIZATIONERROR string = "AGENT_STATUS_INITIALIZATION_ERROR" + + // ListAgentsOKBodyRtaMysqlAgentItems0StatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + ListAgentsOKBodyRtaMysqlAgentItems0StatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // ListAgentsOKBodyRtaMysqlAgentItems0StatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + ListAgentsOKBodyRtaMysqlAgentItems0StatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // ListAgentsOKBodyRtaMysqlAgentItems0StatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + ListAgentsOKBodyRtaMysqlAgentItems0StatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // ListAgentsOKBodyRtaMysqlAgentItems0StatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + ListAgentsOKBodyRtaMysqlAgentItems0StatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // ListAgentsOKBodyRtaMysqlAgentItems0StatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + ListAgentsOKBodyRtaMysqlAgentItems0StatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *ListAgentsOKBodyRtaMysqlAgentItems0) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, listAgentsOkBodyRtaMysqlAgentItems0TypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *ListAgentsOKBodyRtaMysqlAgentItems0) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +var listAgentsOkBodyRtaMysqlAgentItems0TypeLogLevelPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + listAgentsOkBodyRtaMysqlAgentItems0TypeLogLevelPropEnum = append(listAgentsOkBodyRtaMysqlAgentItems0TypeLogLevelPropEnum, v) + } +} + +const ( + + // ListAgentsOKBodyRtaMysqlAgentItems0LogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ListAgentsOKBodyRtaMysqlAgentItems0LogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // ListAgentsOKBodyRtaMysqlAgentItems0LogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ListAgentsOKBodyRtaMysqlAgentItems0LogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // ListAgentsOKBodyRtaMysqlAgentItems0LogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ListAgentsOKBodyRtaMysqlAgentItems0LogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // ListAgentsOKBodyRtaMysqlAgentItems0LogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ListAgentsOKBodyRtaMysqlAgentItems0LogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // ListAgentsOKBodyRtaMysqlAgentItems0LogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ListAgentsOKBodyRtaMysqlAgentItems0LogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // ListAgentsOKBodyRtaMysqlAgentItems0LogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ListAgentsOKBodyRtaMysqlAgentItems0LogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *ListAgentsOKBodyRtaMysqlAgentItems0) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, listAgentsOkBodyRtaMysqlAgentItems0TypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *ListAgentsOKBodyRtaMysqlAgentItems0) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +func (o *ListAgentsOKBodyRtaMysqlAgentItems0) validateRtaOptions(formats strfmt.Registry) error { + if swag.IsZero(o.RtaOptions) { // not required + return nil + } + + if o.RtaOptions != nil { + if err := o.RtaOptions.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("rta_options") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("rta_options") + } + + return err + } + } + + return nil +} + +// ContextValidate validate this list agents OK body rta mysql agent items0 based on the context it is used +func (o *ListAgentsOKBodyRtaMysqlAgentItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateRtaOptions(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ListAgentsOKBodyRtaMysqlAgentItems0) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + + if o.RtaOptions != nil { + + if swag.IsZero(o.RtaOptions) { // not required + return nil + } + + if err := o.RtaOptions.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("rta_options") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("rta_options") + } + + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *ListAgentsOKBodyRtaMysqlAgentItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ListAgentsOKBodyRtaMysqlAgentItems0) UnmarshalBinary(b []byte) error { + var res ListAgentsOKBodyRtaMysqlAgentItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ListAgentsOKBodyRtaMysqlAgentItems0RtaOptions RTAOptions holds Real-Time Query Analytics agent options. +swagger:model ListAgentsOKBodyRtaMysqlAgentItems0RtaOptions +*/ +type ListAgentsOKBodyRtaMysqlAgentItems0RtaOptions struct { + + // Query collect interval (default 2s is set by server). + CollectInterval string `json:"collect_interval,omitempty"` +} + +// Validate validates this list agents OK body rta mysql agent items0 rta options +func (o *ListAgentsOKBodyRtaMysqlAgentItems0RtaOptions) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this list agents OK body rta mysql agent items0 rta options based on context it is used +func (o *ListAgentsOKBodyRtaMysqlAgentItems0RtaOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ListAgentsOKBodyRtaMysqlAgentItems0RtaOptions) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ListAgentsOKBodyRtaMysqlAgentItems0RtaOptions) UnmarshalBinary(b []byte) error { + var res ListAgentsOKBodyRtaMysqlAgentItems0RtaOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + /* ListAgentsOKBodyVMAgentItems0 VMAgent runs on Generic or Container Node alongside pmm-agent. // It scrapes other exporter Agents that are configured with push_metrics_enabled @@ -6076,6 +6554,7 @@ ListAgentsOKBodyVMAgentItems0 VMAgent runs on Generic or Container Node alongsid swagger:model ListAgentsOKBodyVMAgentItems0 */ type ListAgentsOKBodyVMAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6203,6 +6682,7 @@ ListAgentsOKBodyValkeyExporterItems0 ValkeyExporter runs on Generic or Container swagger:model ListAgentsOKBodyValkeyExporterItems0 */ type ListAgentsOKBodyValkeyExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6377,6 +6857,7 @@ func (o *ListAgentsOKBodyValkeyExporterItems0) ContextValidate(ctx context.Conte } func (o *ListAgentsOKBodyValkeyExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6423,6 +6904,7 @@ ListAgentsOKBodyValkeyExporterItems0MetricsResolutions MetricsResolutions repres swagger:model ListAgentsOKBodyValkeyExporterItems0MetricsResolutions */ type ListAgentsOKBodyValkeyExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` diff --git a/api/inventory/v1/json/client/agents_service/remove_agent_parameters.go b/api/inventory/v1/json/client/agents_service/remove_agent_parameters.go index d4389483902..104c3916856 100644 --- a/api/inventory/v1/json/client/agents_service/remove_agent_parameters.go +++ b/api/inventory/v1/json/client/agents_service/remove_agent_parameters.go @@ -58,6 +58,7 @@ RemoveAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveAgentParams struct { + // AgentID. AgentID string @@ -144,6 +145,7 @@ func (o *RemoveAgentParams) SetForce(force *bool) { // WriteToRequest writes these params to a swagger request func (o *RemoveAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -164,6 +166,7 @@ func (o *RemoveAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R } qForce := swag.FormatBool(qrForce) if qForce != "" { + if err := r.SetQueryParam("force", qForce); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/remove_agent_responses.go b/api/inventory/v1/json/client/agents_service/remove_agent_responses.go index 470fc0a9a86..10914ccac26 100644 --- a/api/inventory/v1/json/client/agents_service/remove_agent_responses.go +++ b/api/inventory/v1/json/client/agents_service/remove_agent_responses.go @@ -101,6 +101,7 @@ func (o *RemoveAgentOK) GetPayload() any { } func (o *RemoveAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -172,6 +173,7 @@ func (o *RemoveAgentDefault) GetPayload() *RemoveAgentDefaultBody { } func (o *RemoveAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveAgentDefaultBody) // response payload @@ -187,6 +189,7 @@ RemoveAgentDefaultBody remove agent default body swagger:model RemoveAgentDefaultBody */ type RemoveAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *RemoveAgentDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *RemoveAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -276,6 +281,7 @@ func (o *RemoveAgentDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -304,6 +310,7 @@ RemoveAgentDefaultBodyDetailsItems0 remove agent default body details items0 swagger:model RemoveAgentDefaultBodyDetailsItems0 */ type RemoveAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -315,6 +322,7 @@ type RemoveAgentDefaultBodyDetailsItems0 struct { func (o *RemoveAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -352,6 +360,7 @@ func (o *RemoveAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveAgentDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventory/v1/json/client/nodes_service/add_node_parameters.go b/api/inventory/v1/json/client/nodes_service/add_node_parameters.go index 989da437cfe..8c6b192ee8b 100644 --- a/api/inventory/v1/json/client/nodes_service/add_node_parameters.go +++ b/api/inventory/v1/json/client/nodes_service/add_node_parameters.go @@ -57,6 +57,7 @@ AddNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddNodeParams struct { + // Body. Body AddNodeBody @@ -126,6 +127,7 @@ func (o *AddNodeParams) SetBody(body AddNodeBody) { // WriteToRequest writes these params to a swagger request func (o *AddNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } 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 9b1e2539870..e7d7d0c7a4a 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 @@ -101,6 +101,7 @@ func (o *AddNodeOK) GetPayload() *AddNodeOKBody { } func (o *AddNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddNodeOKBody) // response payload @@ -174,6 +175,7 @@ func (o *AddNodeDefault) GetPayload() *AddNodeDefaultBody { } func (o *AddNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddNodeDefaultBody) // response payload @@ -189,6 +191,7 @@ AddNodeBody add node body swagger:model AddNodeBody */ type AddNodeBody struct { + // container Container *AddNodeParamsBodyContainer `json:"container,omitempty"` @@ -381,6 +384,7 @@ func (o *AddNodeBody) ContextValidate(ctx context.Context, formats strfmt.Regist } func (o *AddNodeBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { + if o.Container != nil { if swag.IsZero(o.Container) { // not required @@ -405,6 +409,7 @@ func (o *AddNodeBody) contextValidateContainer(ctx context.Context, formats strf } func (o *AddNodeBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { + if o.Generic != nil { if swag.IsZero(o.Generic) { // not required @@ -429,6 +434,7 @@ func (o *AddNodeBody) contextValidateGeneric(ctx context.Context, formats strfmt } func (o *AddNodeBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { + if o.Remote != nil { if swag.IsZero(o.Remote) { // not required @@ -453,6 +459,7 @@ func (o *AddNodeBody) contextValidateRemote(ctx context.Context, formats strfmt. } func (o *AddNodeBody) contextValidateRemoteAzure(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteAzure != nil { if swag.IsZero(o.RemoteAzure) { // not required @@ -477,6 +484,7 @@ func (o *AddNodeBody) contextValidateRemoteAzure(ctx context.Context, formats st } func (o *AddNodeBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteRDS != nil { if swag.IsZero(o.RemoteRDS) { // not required @@ -523,6 +531,7 @@ AddNodeDefaultBody add node default body swagger:model AddNodeDefaultBody */ type AddNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -592,7 +601,9 @@ func (o *AddNodeDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *AddNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -612,6 +623,7 @@ func (o *AddNodeDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -640,6 +652,7 @@ AddNodeDefaultBodyDetailsItems0 add node default body details items0 swagger:model AddNodeDefaultBodyDetailsItems0 */ type AddNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -651,6 +664,7 @@ type AddNodeDefaultBodyDetailsItems0 struct { func (o *AddNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -688,6 +702,7 @@ func (o *AddNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AddNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -751,6 +766,7 @@ AddNodeOKBody add node OK body swagger:model AddNodeOKBody */ type AddNodeOKBody struct { + // container Container *AddNodeOKBodyContainer `json:"container,omitempty"` @@ -943,6 +959,7 @@ func (o *AddNodeOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *AddNodeOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { + if o.Container != nil { if swag.IsZero(o.Container) { // not required @@ -967,6 +984,7 @@ func (o *AddNodeOKBody) contextValidateContainer(ctx context.Context, formats st } func (o *AddNodeOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { + if o.Generic != nil { if swag.IsZero(o.Generic) { // not required @@ -991,6 +1009,7 @@ func (o *AddNodeOKBody) contextValidateGeneric(ctx context.Context, formats strf } func (o *AddNodeOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { + if o.Remote != nil { if swag.IsZero(o.Remote) { // not required @@ -1015,6 +1034,7 @@ func (o *AddNodeOKBody) contextValidateRemote(ctx context.Context, formats strfm } func (o *AddNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteAzureDatabase != nil { if swag.IsZero(o.RemoteAzureDatabase) { // not required @@ -1039,6 +1059,7 @@ func (o *AddNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, } func (o *AddNodeOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteRDS != nil { if swag.IsZero(o.RemoteRDS) { // not required @@ -1085,6 +1106,7 @@ AddNodeOKBodyContainer ContainerNode represents a Docker container. swagger:model AddNodeOKBodyContainer */ type AddNodeOKBodyContainer struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1152,6 +1174,7 @@ AddNodeOKBodyGeneric GenericNode represents a bare metal server or virtual machi swagger:model AddNodeOKBodyGeneric */ type AddNodeOKBodyGeneric struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1216,6 +1239,7 @@ AddNodeOKBodyRemote RemoteNode represents generic remote Node. It's a node where swagger:model AddNodeOKBodyRemote */ type AddNodeOKBodyRemote struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1271,6 +1295,7 @@ AddNodeOKBodyRemoteAzureDatabase RemoteAzureDatabaseNode represents remote Azure swagger:model AddNodeOKBodyRemoteAzureDatabase */ type AddNodeOKBodyRemoteAzureDatabase struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1326,6 +1351,7 @@ AddNodeOKBodyRemoteRDS RemoteRDSNode represents remote RDS Node. Agents can't ru swagger:model AddNodeOKBodyRemoteRDS */ type AddNodeOKBodyRemoteRDS struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1384,6 +1410,7 @@ AddNodeParamsBodyContainer add node params body container swagger:model AddNodeParamsBodyContainer */ type AddNodeParamsBodyContainer struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -1445,6 +1472,7 @@ AddNodeParamsBodyGeneric add node params body generic swagger:model AddNodeParamsBodyGeneric */ type AddNodeParamsBodyGeneric struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -1503,6 +1531,7 @@ AddNodeParamsBodyRemote add node params body remote swagger:model AddNodeParamsBodyRemote */ type AddNodeParamsBodyRemote struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -1555,6 +1584,7 @@ AddNodeParamsBodyRemoteAzure add node params body remote azure swagger:model AddNodeParamsBodyRemoteAzure */ type AddNodeParamsBodyRemoteAzure struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -1607,6 +1637,7 @@ AddNodeParamsBodyRemoteRDS add node params body remote RDS swagger:model AddNodeParamsBodyRemoteRDS */ type AddNodeParamsBodyRemoteRDS struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` 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 89ea8a50016..9cf9059b0c1 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 @@ -57,6 +57,7 @@ GetNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetNodeParams struct { + /* NodeID. Unique randomly generated instance identifier. @@ -129,6 +130,7 @@ func (o *GetNodeParams) SetNodeID(nodeID string) { // WriteToRequest writes these params to a swagger request func (o *GetNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); 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 ec4913b0da3..80da61b1c9d 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 @@ -101,6 +101,7 @@ func (o *GetNodeOK) GetPayload() *GetNodeOKBody { } func (o *GetNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetNodeOKBody) // response payload @@ -174,6 +175,7 @@ func (o *GetNodeDefault) GetPayload() *GetNodeDefaultBody { } func (o *GetNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetNodeDefaultBody) // response payload @@ -189,6 +191,7 @@ GetNodeDefaultBody get node default body swagger:model GetNodeDefaultBody */ type GetNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -258,7 +261,9 @@ func (o *GetNodeDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,6 +283,7 @@ func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -306,6 +312,7 @@ GetNodeDefaultBodyDetailsItems0 get node default body details items0 swagger:model GetNodeDefaultBodyDetailsItems0 */ type GetNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -317,6 +324,7 @@ type GetNodeDefaultBodyDetailsItems0 struct { func (o *GetNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -354,6 +362,7 @@ func (o *GetNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -417,6 +426,7 @@ GetNodeOKBody get node OK body swagger:model GetNodeOKBody */ type GetNodeOKBody struct { + // container Container *GetNodeOKBodyContainer `json:"container,omitempty"` @@ -609,6 +619,7 @@ func (o *GetNodeOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetNodeOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { + if o.Container != nil { if swag.IsZero(o.Container) { // not required @@ -633,6 +644,7 @@ func (o *GetNodeOKBody) contextValidateContainer(ctx context.Context, formats st } func (o *GetNodeOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { + if o.Generic != nil { if swag.IsZero(o.Generic) { // not required @@ -657,6 +669,7 @@ func (o *GetNodeOKBody) contextValidateGeneric(ctx context.Context, formats strf } func (o *GetNodeOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { + if o.Remote != nil { if swag.IsZero(o.Remote) { // not required @@ -681,6 +694,7 @@ func (o *GetNodeOKBody) contextValidateRemote(ctx context.Context, formats strfm } func (o *GetNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteAzureDatabase != nil { if swag.IsZero(o.RemoteAzureDatabase) { // not required @@ -705,6 +719,7 @@ func (o *GetNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, } func (o *GetNodeOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteRDS != nil { if swag.IsZero(o.RemoteRDS) { // not required @@ -751,6 +766,7 @@ GetNodeOKBodyContainer ContainerNode represents a Docker container. swagger:model GetNodeOKBodyContainer */ type GetNodeOKBodyContainer struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -818,6 +834,7 @@ GetNodeOKBodyGeneric GenericNode represents a bare metal server or virtual machi swagger:model GetNodeOKBodyGeneric */ type GetNodeOKBodyGeneric struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -882,6 +899,7 @@ GetNodeOKBodyRemote RemoteNode represents generic remote Node. It's a node where swagger:model GetNodeOKBodyRemote */ type GetNodeOKBodyRemote struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -937,6 +955,7 @@ GetNodeOKBodyRemoteAzureDatabase RemoteAzureDatabaseNode represents remote Azure swagger:model GetNodeOKBodyRemoteAzureDatabase */ type GetNodeOKBodyRemoteAzureDatabase struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -992,6 +1011,7 @@ GetNodeOKBodyRemoteRDS RemoteRDSNode represents remote RDS Node. Agents can't ru swagger:model GetNodeOKBodyRemoteRDS */ type GetNodeOKBodyRemoteRDS struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` 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 ef036297fe7..306f3dc762a 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 @@ -101,6 +101,7 @@ func (o *ListNodesOK) GetPayload() *ListNodesOKBody { } func (o *ListNodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListNodesOKBody) // response payload @@ -174,6 +175,7 @@ func (o *ListNodesDefault) GetPayload() *ListNodesDefaultBody { } func (o *ListNodesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListNodesDefaultBody) // response payload @@ -189,6 +191,7 @@ ListNodesDefaultBody list nodes default body swagger:model ListNodesDefaultBody */ type ListNodesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -258,7 +261,9 @@ func (o *ListNodesDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,6 +283,7 @@ func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -306,6 +312,7 @@ ListNodesDefaultBodyDetailsItems0 list nodes default body details items0 swagger:model ListNodesDefaultBodyDetailsItems0 */ type ListNodesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -317,6 +324,7 @@ type ListNodesDefaultBodyDetailsItems0 struct { func (o *ListNodesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -354,6 +362,7 @@ func (o *ListNodesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListNodesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -417,6 +426,7 @@ ListNodesOKBody list nodes OK body swagger:model ListNodesOKBody */ type ListNodesOKBody struct { + // generic Generic []*ListNodesOKBodyGenericItems0 `json:"generic"` @@ -644,7 +654,9 @@ func (o *ListNodesOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListNodesOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Generic); i++ { + if o.Generic[i] != nil { if swag.IsZero(o.Generic[i]) { // not required @@ -664,13 +676,16 @@ func (o *ListNodesOKBody) contextValidateGeneric(ctx context.Context, formats st return err } } + } return nil } func (o *ListNodesOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Container); i++ { + if o.Container[i] != nil { if swag.IsZero(o.Container[i]) { // not required @@ -690,13 +705,16 @@ func (o *ListNodesOKBody) contextValidateContainer(ctx context.Context, formats return err } } + } return nil } func (o *ListNodesOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Remote); i++ { + if o.Remote[i] != nil { if swag.IsZero(o.Remote[i]) { // not required @@ -716,13 +734,16 @@ func (o *ListNodesOKBody) contextValidateRemote(ctx context.Context, formats str return err } } + } return nil } func (o *ListNodesOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.RemoteRDS); i++ { + if o.RemoteRDS[i] != nil { if swag.IsZero(o.RemoteRDS[i]) { // not required @@ -742,13 +763,16 @@ func (o *ListNodesOKBody) contextValidateRemoteRDS(ctx context.Context, formats return err } } + } return nil } func (o *ListNodesOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.RemoteAzureDatabase); i++ { + if o.RemoteAzureDatabase[i] != nil { if swag.IsZero(o.RemoteAzureDatabase[i]) { // not required @@ -768,6 +792,7 @@ func (o *ListNodesOKBody) contextValidateRemoteAzureDatabase(ctx context.Context return err } } + } return nil @@ -796,6 +821,7 @@ ListNodesOKBodyContainerItems0 ContainerNode represents a Docker container. swagger:model ListNodesOKBodyContainerItems0 */ type ListNodesOKBodyContainerItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -863,6 +889,7 @@ ListNodesOKBodyGenericItems0 GenericNode represents a bare metal server or virtu swagger:model ListNodesOKBodyGenericItems0 */ type ListNodesOKBodyGenericItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -927,6 +954,7 @@ ListNodesOKBodyRemoteAzureDatabaseItems0 RemoteAzureDatabaseNode represents remo swagger:model ListNodesOKBodyRemoteAzureDatabaseItems0 */ type ListNodesOKBodyRemoteAzureDatabaseItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -982,6 +1010,7 @@ ListNodesOKBodyRemoteItems0 RemoteNode represents generic remote Node. It's a no swagger:model ListNodesOKBodyRemoteItems0 */ type ListNodesOKBodyRemoteItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1037,6 +1066,7 @@ ListNodesOKBodyRemoteRDSItems0 RemoteRDSNode represents remote RDS Node. Agents swagger:model ListNodesOKBodyRemoteRDSItems0 */ type ListNodesOKBodyRemoteRDSItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` 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 ed782689700..570ad8d3c38 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 @@ -58,6 +58,7 @@ RemoveNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveNodeParams struct { + /* Force. Remove node with all dependencies. @@ -147,6 +148,7 @@ func (o *RemoveNodeParams) SetNodeID(nodeID string) { // WriteToRequest writes these params to a swagger request func (o *RemoveNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -162,6 +164,7 @@ func (o *RemoveNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qForce := swag.FormatBool(qrForce) if qForce != "" { + if err := r.SetQueryParam("force", qForce); 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 c62d113cc19..b8c6b5d8228 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 @@ -101,6 +101,7 @@ func (o *RemoveNodeOK) GetPayload() any { } func (o *RemoveNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -172,6 +173,7 @@ func (o *RemoveNodeDefault) GetPayload() *RemoveNodeDefaultBody { } func (o *RemoveNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveNodeDefaultBody) // response payload @@ -187,6 +189,7 @@ RemoveNodeDefaultBody remove node default body swagger:model RemoveNodeDefaultBody */ type RemoveNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *RemoveNodeDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *RemoveNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -276,6 +281,7 @@ func (o *RemoveNodeDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -304,6 +310,7 @@ RemoveNodeDefaultBodyDetailsItems0 remove node default body details items0 swagger:model RemoveNodeDefaultBodyDetailsItems0 */ type RemoveNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -315,6 +322,7 @@ type RemoveNodeDefaultBodyDetailsItems0 struct { func (o *RemoveNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -352,6 +360,7 @@ func (o *RemoveNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventory/v1/json/client/services_service/add_service_parameters.go b/api/inventory/v1/json/client/services_service/add_service_parameters.go index b0a8ea902f2..4f7fe98c2f9 100644 --- a/api/inventory/v1/json/client/services_service/add_service_parameters.go +++ b/api/inventory/v1/json/client/services_service/add_service_parameters.go @@ -57,6 +57,7 @@ AddServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddServiceParams struct { + // Body. Body AddServiceBody @@ -126,6 +127,7 @@ func (o *AddServiceParams) SetBody(body AddServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/add_service_responses.go b/api/inventory/v1/json/client/services_service/add_service_responses.go index 8c3ca308a10..60b295bf6c4 100644 --- a/api/inventory/v1/json/client/services_service/add_service_responses.go +++ b/api/inventory/v1/json/client/services_service/add_service_responses.go @@ -101,6 +101,7 @@ func (o *AddServiceOK) GetPayload() *AddServiceOKBody { } func (o *AddServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddServiceOKBody) // response payload @@ -174,6 +175,7 @@ func (o *AddServiceDefault) GetPayload() *AddServiceDefaultBody { } func (o *AddServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddServiceDefaultBody) // response payload @@ -189,6 +191,7 @@ AddServiceBody add service body swagger:model AddServiceBody */ type AddServiceBody struct { + // external External *AddServiceParamsBodyExternal `json:"external,omitempty"` @@ -449,6 +452,7 @@ func (o *AddServiceBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddServiceBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { if swag.IsZero(o.External) { // not required @@ -473,6 +477,7 @@ func (o *AddServiceBody) contextValidateExternal(ctx context.Context, formats st } func (o *AddServiceBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -497,6 +502,7 @@ func (o *AddServiceBody) contextValidateHaproxy(ctx context.Context, formats str } func (o *AddServiceBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -521,6 +527,7 @@ func (o *AddServiceBody) contextValidateMongodb(ctx context.Context, formats str } func (o *AddServiceBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -545,6 +552,7 @@ func (o *AddServiceBody) contextValidateMysql(ctx context.Context, formats strfm } func (o *AddServiceBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -569,6 +577,7 @@ func (o *AddServiceBody) contextValidatePostgresql(ctx context.Context, formats } func (o *AddServiceBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -593,6 +602,7 @@ func (o *AddServiceBody) contextValidateProxysql(ctx context.Context, formats st } func (o *AddServiceBody) contextValidateValkey(ctx context.Context, formats strfmt.Registry) error { + if o.Valkey != nil { if swag.IsZero(o.Valkey) { // not required @@ -639,6 +649,7 @@ AddServiceDefaultBody add service default body swagger:model AddServiceDefaultBody */ type AddServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -708,7 +719,9 @@ func (o *AddServiceDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *AddServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -728,6 +741,7 @@ func (o *AddServiceDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -756,6 +770,7 @@ AddServiceDefaultBodyDetailsItems0 add service default body details items0 swagger:model AddServiceDefaultBodyDetailsItems0 */ type AddServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -767,6 +782,7 @@ type AddServiceDefaultBodyDetailsItems0 struct { func (o *AddServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -804,6 +820,7 @@ func (o *AddServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AddServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -867,6 +884,7 @@ AddServiceOKBody add service OK body swagger:model AddServiceOKBody */ type AddServiceOKBody struct { + // external External *AddServiceOKBodyExternal `json:"external,omitempty"` @@ -1127,6 +1145,7 @@ func (o *AddServiceOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *AddServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { if swag.IsZero(o.External) { // not required @@ -1151,6 +1170,7 @@ func (o *AddServiceOKBody) contextValidateExternal(ctx context.Context, formats } func (o *AddServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -1175,6 +1195,7 @@ func (o *AddServiceOKBody) contextValidateHaproxy(ctx context.Context, formats s } func (o *AddServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -1199,6 +1220,7 @@ func (o *AddServiceOKBody) contextValidateMongodb(ctx context.Context, formats s } func (o *AddServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -1223,6 +1245,7 @@ func (o *AddServiceOKBody) contextValidateMysql(ctx context.Context, formats str } func (o *AddServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -1247,6 +1270,7 @@ func (o *AddServiceOKBody) contextValidatePostgresql(ctx context.Context, format } func (o *AddServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -1271,6 +1295,7 @@ func (o *AddServiceOKBody) contextValidateProxysql(ctx context.Context, formats } func (o *AddServiceOKBody) contextValidateValkey(ctx context.Context, formats strfmt.Registry) error { + if o.Valkey != nil { if swag.IsZero(o.Valkey) { // not required @@ -1317,6 +1342,7 @@ AddServiceOKBodyExternal ExternalService represents a generic External service i swagger:model AddServiceOKBodyExternal */ type AddServiceOKBodyExternal struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1381,6 +1407,7 @@ AddServiceOKBodyHaproxy HAProxyService represents a generic HAProxy service inst swagger:model AddServiceOKBodyHaproxy */ type AddServiceOKBodyHaproxy struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1436,6 +1463,7 @@ AddServiceOKBodyMongodb MongoDBService represents a generic MongoDB instance. swagger:model AddServiceOKBodyMongodb */ type AddServiceOKBodyMongodb struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1506,6 +1534,7 @@ AddServiceOKBodyMysql MySQLService represents a generic MySQL instance. swagger:model AddServiceOKBodyMysql */ type AddServiceOKBodyMysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1579,6 +1608,7 @@ AddServiceOKBodyPostgresql PostgreSQLService represents a generic PostgreSQL ins swagger:model AddServiceOKBodyPostgresql */ type AddServiceOKBodyPostgresql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1655,6 +1685,7 @@ AddServiceOKBodyProxysql ProxySQLService represents a generic ProxySQL instance. swagger:model AddServiceOKBodyProxysql */ type AddServiceOKBodyProxysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1725,6 +1756,7 @@ AddServiceOKBodyValkey ValkeyService represents a generic Valkey instance. swagger:model AddServiceOKBodyValkey */ type AddServiceOKBodyValkey struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1795,6 +1827,7 @@ AddServiceParamsBodyExternal add service params body external swagger:model AddServiceParamsBodyExternal */ type AddServiceParamsBodyExternal struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -1850,6 +1883,7 @@ AddServiceParamsBodyHaproxy add service params body haproxy swagger:model AddServiceParamsBodyHaproxy */ type AddServiceParamsBodyHaproxy struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -1902,6 +1936,7 @@ AddServiceParamsBodyMongodb add service params body mongodb swagger:model AddServiceParamsBodyMongodb */ type AddServiceParamsBodyMongodb struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -1966,6 +2001,7 @@ AddServiceParamsBodyMysql add service params body mysql swagger:model AddServiceParamsBodyMysql */ type AddServiceParamsBodyMysql struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -2033,6 +2069,7 @@ AddServiceParamsBodyPostgresql add service params body postgresql swagger:model AddServiceParamsBodyPostgresql */ type AddServiceParamsBodyPostgresql struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -2100,6 +2137,7 @@ AddServiceParamsBodyProxysql add service params body proxysql swagger:model AddServiceParamsBodyProxysql */ type AddServiceParamsBodyProxysql struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -2164,6 +2202,7 @@ AddServiceParamsBodyValkey add service params body valkey swagger:model AddServiceParamsBodyValkey */ type AddServiceParamsBodyValkey struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` diff --git a/api/inventory/v1/json/client/services_service/change_service_parameters.go b/api/inventory/v1/json/client/services_service/change_service_parameters.go index 121d67b7429..3e6a415c8ea 100644 --- a/api/inventory/v1/json/client/services_service/change_service_parameters.go +++ b/api/inventory/v1/json/client/services_service/change_service_parameters.go @@ -57,6 +57,7 @@ ChangeServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeServiceParams struct { + // Body. Body ChangeServiceBody @@ -140,6 +141,7 @@ func (o *ChangeServiceParams) SetServiceID(serviceID string) { // WriteToRequest writes these params to a swagger request func (o *ChangeServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/change_service_responses.go b/api/inventory/v1/json/client/services_service/change_service_responses.go index af0de603b83..3fc88db9536 100644 --- a/api/inventory/v1/json/client/services_service/change_service_responses.go +++ b/api/inventory/v1/json/client/services_service/change_service_responses.go @@ -101,6 +101,7 @@ func (o *ChangeServiceOK) GetPayload() *ChangeServiceOKBody { } func (o *ChangeServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeServiceOKBody) // response payload @@ -174,6 +175,7 @@ func (o *ChangeServiceDefault) GetPayload() *ChangeServiceDefaultBody { } func (o *ChangeServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeServiceDefaultBody) // response payload @@ -189,6 +191,7 @@ ChangeServiceBody change service body swagger:model ChangeServiceBody */ type ChangeServiceBody struct { + // environment Environment *string `json:"environment,omitempty"` @@ -257,6 +260,7 @@ func (o *ChangeServiceBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *ChangeServiceBody) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -303,6 +307,7 @@ ChangeServiceDefaultBody change service default body swagger:model ChangeServiceDefaultBody */ type ChangeServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -372,7 +377,9 @@ func (o *ChangeServiceDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ChangeServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -392,6 +399,7 @@ func (o *ChangeServiceDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -420,6 +428,7 @@ ChangeServiceDefaultBodyDetailsItems0 change service default body details items0 swagger:model ChangeServiceDefaultBodyDetailsItems0 */ type ChangeServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -431,6 +440,7 @@ type ChangeServiceDefaultBodyDetailsItems0 struct { func (o *ChangeServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -468,6 +478,7 @@ func (o *ChangeServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -531,6 +542,7 @@ ChangeServiceOKBody change service OK body swagger:model ChangeServiceOKBody */ type ChangeServiceOKBody struct { + // external External *ChangeServiceOKBodyExternal `json:"external,omitempty"` @@ -791,6 +803,7 @@ func (o *ChangeServiceOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ChangeServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { if swag.IsZero(o.External) { // not required @@ -815,6 +828,7 @@ func (o *ChangeServiceOKBody) contextValidateExternal(ctx context.Context, forma } func (o *ChangeServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -839,6 +853,7 @@ func (o *ChangeServiceOKBody) contextValidateHaproxy(ctx context.Context, format } func (o *ChangeServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -863,6 +878,7 @@ func (o *ChangeServiceOKBody) contextValidateMongodb(ctx context.Context, format } func (o *ChangeServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -887,6 +903,7 @@ func (o *ChangeServiceOKBody) contextValidateMysql(ctx context.Context, formats } func (o *ChangeServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -911,6 +928,7 @@ func (o *ChangeServiceOKBody) contextValidatePostgresql(ctx context.Context, for } func (o *ChangeServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -935,6 +953,7 @@ func (o *ChangeServiceOKBody) contextValidateProxysql(ctx context.Context, forma } func (o *ChangeServiceOKBody) contextValidateValkey(ctx context.Context, formats strfmt.Registry) error { + if o.Valkey != nil { if swag.IsZero(o.Valkey) { // not required @@ -981,6 +1000,7 @@ ChangeServiceOKBodyExternal ExternalService represents a generic External servic swagger:model ChangeServiceOKBodyExternal */ type ChangeServiceOKBodyExternal struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1045,6 +1065,7 @@ ChangeServiceOKBodyHaproxy HAProxyService represents a generic HAProxy service i swagger:model ChangeServiceOKBodyHaproxy */ type ChangeServiceOKBodyHaproxy struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1100,6 +1121,7 @@ ChangeServiceOKBodyMongodb MongoDBService represents a generic MongoDB instance. swagger:model ChangeServiceOKBodyMongodb */ type ChangeServiceOKBodyMongodb struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1170,6 +1192,7 @@ ChangeServiceOKBodyMysql MySQLService represents a generic MySQL instance. swagger:model ChangeServiceOKBodyMysql */ type ChangeServiceOKBodyMysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1243,6 +1266,7 @@ ChangeServiceOKBodyPostgresql PostgreSQLService represents a generic PostgreSQL swagger:model ChangeServiceOKBodyPostgresql */ type ChangeServiceOKBodyPostgresql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1319,6 +1343,7 @@ ChangeServiceOKBodyProxysql ProxySQLService represents a generic ProxySQL instan swagger:model ChangeServiceOKBodyProxysql */ type ChangeServiceOKBodyProxysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1389,6 +1414,7 @@ ChangeServiceOKBodyValkey ValkeyService represents a generic Valkey instance. swagger:model ChangeServiceOKBodyValkey */ type ChangeServiceOKBodyValkey struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1459,6 +1485,7 @@ ChangeServiceParamsBodyCustomLabels A wrapper for map[string]string. This type a swagger:model ChangeServiceParamsBodyCustomLabels */ type ChangeServiceParamsBodyCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } diff --git a/api/inventory/v1/json/client/services_service/get_service_parameters.go b/api/inventory/v1/json/client/services_service/get_service_parameters.go index 2c7074adf03..b5be0e88c23 100644 --- a/api/inventory/v1/json/client/services_service/get_service_parameters.go +++ b/api/inventory/v1/json/client/services_service/get_service_parameters.go @@ -57,6 +57,7 @@ GetServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetServiceParams struct { + /* ServiceID. Unique randomly generated instance identifier. @@ -129,6 +130,7 @@ func (o *GetServiceParams) SetServiceID(serviceID string) { // WriteToRequest writes these params to a swagger request func (o *GetServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/get_service_responses.go b/api/inventory/v1/json/client/services_service/get_service_responses.go index 3a1839387cc..1210cfa23b7 100644 --- a/api/inventory/v1/json/client/services_service/get_service_responses.go +++ b/api/inventory/v1/json/client/services_service/get_service_responses.go @@ -101,6 +101,7 @@ func (o *GetServiceOK) GetPayload() *GetServiceOKBody { } func (o *GetServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetServiceOKBody) // response payload @@ -174,6 +175,7 @@ func (o *GetServiceDefault) GetPayload() *GetServiceDefaultBody { } func (o *GetServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetServiceDefaultBody) // response payload @@ -189,6 +191,7 @@ GetServiceDefaultBody get service default body swagger:model GetServiceDefaultBody */ type GetServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -258,7 +261,9 @@ func (o *GetServiceDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *GetServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,6 +283,7 @@ func (o *GetServiceDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -306,6 +312,7 @@ GetServiceDefaultBodyDetailsItems0 get service default body details items0 swagger:model GetServiceDefaultBodyDetailsItems0 */ type GetServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -317,6 +324,7 @@ type GetServiceDefaultBodyDetailsItems0 struct { func (o *GetServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -354,6 +362,7 @@ func (o *GetServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -417,6 +426,7 @@ GetServiceOKBody get service OK body swagger:model GetServiceOKBody */ type GetServiceOKBody struct { + // external External *GetServiceOKBodyExternal `json:"external,omitempty"` @@ -677,6 +687,7 @@ func (o *GetServiceOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *GetServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { if swag.IsZero(o.External) { // not required @@ -701,6 +712,7 @@ func (o *GetServiceOKBody) contextValidateExternal(ctx context.Context, formats } func (o *GetServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -725,6 +737,7 @@ func (o *GetServiceOKBody) contextValidateHaproxy(ctx context.Context, formats s } func (o *GetServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -749,6 +762,7 @@ func (o *GetServiceOKBody) contextValidateMongodb(ctx context.Context, formats s } func (o *GetServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -773,6 +787,7 @@ func (o *GetServiceOKBody) contextValidateMysql(ctx context.Context, formats str } func (o *GetServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -797,6 +812,7 @@ func (o *GetServiceOKBody) contextValidatePostgresql(ctx context.Context, format } func (o *GetServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -821,6 +837,7 @@ func (o *GetServiceOKBody) contextValidateProxysql(ctx context.Context, formats } func (o *GetServiceOKBody) contextValidateValkey(ctx context.Context, formats strfmt.Registry) error { + if o.Valkey != nil { if swag.IsZero(o.Valkey) { // not required @@ -867,6 +884,7 @@ GetServiceOKBodyExternal ExternalService represents a generic External service i swagger:model GetServiceOKBodyExternal */ type GetServiceOKBodyExternal struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -931,6 +949,7 @@ GetServiceOKBodyHaproxy HAProxyService represents a generic HAProxy service inst swagger:model GetServiceOKBodyHaproxy */ type GetServiceOKBodyHaproxy struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -986,6 +1005,7 @@ GetServiceOKBodyMongodb MongoDBService represents a generic MongoDB instance. swagger:model GetServiceOKBodyMongodb */ type GetServiceOKBodyMongodb struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1056,6 +1076,7 @@ GetServiceOKBodyMysql MySQLService represents a generic MySQL instance. swagger:model GetServiceOKBodyMysql */ type GetServiceOKBodyMysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1129,6 +1150,7 @@ GetServiceOKBodyPostgresql PostgreSQLService represents a generic PostgreSQL ins swagger:model GetServiceOKBodyPostgresql */ type GetServiceOKBodyPostgresql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1205,6 +1227,7 @@ GetServiceOKBodyProxysql ProxySQLService represents a generic ProxySQL instance. swagger:model GetServiceOKBodyProxysql */ type GetServiceOKBodyProxysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1275,6 +1298,7 @@ GetServiceOKBodyValkey ValkeyService represents a generic Valkey instance. swagger:model GetServiceOKBodyValkey */ type GetServiceOKBodyValkey struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventory/v1/json/client/services_service/list_active_service_types_parameters.go b/api/inventory/v1/json/client/services_service/list_active_service_types_parameters.go index eb491d178eb..85ac9af4b20 100644 --- a/api/inventory/v1/json/client/services_service/list_active_service_types_parameters.go +++ b/api/inventory/v1/json/client/services_service/list_active_service_types_parameters.go @@ -57,6 +57,7 @@ ListActiveServiceTypesParams contains all the parameters to send to the API endp Typically these are written to a http.Request. */ type ListActiveServiceTypesParams struct { + // Body. Body any @@ -126,6 +127,7 @@ func (o *ListActiveServiceTypesParams) SetBody(body any) { // WriteToRequest writes these params to a swagger request func (o *ListActiveServiceTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/list_active_service_types_responses.go b/api/inventory/v1/json/client/services_service/list_active_service_types_responses.go index 853630c7c6b..e80029218f6 100644 --- a/api/inventory/v1/json/client/services_service/list_active_service_types_responses.go +++ b/api/inventory/v1/json/client/services_service/list_active_service_types_responses.go @@ -102,6 +102,7 @@ func (o *ListActiveServiceTypesOK) GetPayload() *ListActiveServiceTypesOKBody { } func (o *ListActiveServiceTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListActiveServiceTypesOKBody) // response payload @@ -175,6 +176,7 @@ func (o *ListActiveServiceTypesDefault) GetPayload() *ListActiveServiceTypesDefa } func (o *ListActiveServiceTypesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListActiveServiceTypesDefaultBody) // response payload @@ -190,6 +192,7 @@ ListActiveServiceTypesDefaultBody list active service types default body swagger:model ListActiveServiceTypesDefaultBody */ type ListActiveServiceTypesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -259,7 +262,9 @@ func (o *ListActiveServiceTypesDefaultBody) ContextValidate(ctx context.Context, } func (o *ListActiveServiceTypesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -279,6 +284,7 @@ func (o *ListActiveServiceTypesDefaultBody) contextValidateDetails(ctx context.C return err } } + } return nil @@ -307,6 +313,7 @@ ListActiveServiceTypesDefaultBodyDetailsItems0 list active service types default swagger:model ListActiveServiceTypesDefaultBodyDetailsItems0 */ type ListActiveServiceTypesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -318,6 +325,7 @@ type ListActiveServiceTypesDefaultBodyDetailsItems0 struct { func (o *ListActiveServiceTypesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -355,6 +363,7 @@ func (o *ListActiveServiceTypesDefaultBodyDetailsItems0) UnmarshalJSON(data []by // MarshalJSON marshals this object with additional properties into a JSON object func (o ListActiveServiceTypesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -418,6 +427,7 @@ ListActiveServiceTypesOKBody list active service types OK body swagger:model ListActiveServiceTypesOKBody */ type ListActiveServiceTypesOKBody struct { + // service types ServiceTypes []*string `json:"service_types"` } diff --git a/api/inventory/v1/json/client/services_service/list_services_responses.go b/api/inventory/v1/json/client/services_service/list_services_responses.go index 398e7cb2382..54e4f46d1ef 100644 --- a/api/inventory/v1/json/client/services_service/list_services_responses.go +++ b/api/inventory/v1/json/client/services_service/list_services_responses.go @@ -101,6 +101,7 @@ func (o *ListServicesOK) GetPayload() *ListServicesOKBody { } func (o *ListServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListServicesOKBody) // response payload @@ -174,6 +175,7 @@ func (o *ListServicesDefault) GetPayload() *ListServicesDefaultBody { } func (o *ListServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListServicesDefaultBody) // response payload @@ -189,6 +191,7 @@ ListServicesDefaultBody list services default body swagger:model ListServicesDefaultBody */ type ListServicesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -258,7 +261,9 @@ func (o *ListServicesDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,6 +283,7 @@ func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -306,6 +312,7 @@ ListServicesDefaultBodyDetailsItems0 list services default body details items0 swagger:model ListServicesDefaultBodyDetailsItems0 */ type ListServicesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -317,6 +324,7 @@ type ListServicesDefaultBodyDetailsItems0 struct { func (o *ListServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -354,6 +362,7 @@ func (o *ListServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListServicesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -417,6 +426,7 @@ ListServicesOKBody list services OK body swagger:model ListServicesOKBody */ type ListServicesOKBody struct { + // mysql Mysql []*ListServicesOKBodyMysqlItems0 `json:"mysql"` @@ -726,7 +736,9 @@ func (o *ListServicesOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListServicesOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Mysql); i++ { + if o.Mysql[i] != nil { if swag.IsZero(o.Mysql[i]) { // not required @@ -746,13 +758,16 @@ func (o *ListServicesOKBody) contextValidateMysql(ctx context.Context, formats s return err } } + } return nil } func (o *ListServicesOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Mongodb); i++ { + if o.Mongodb[i] != nil { if swag.IsZero(o.Mongodb[i]) { // not required @@ -772,13 +787,16 @@ func (o *ListServicesOKBody) contextValidateMongodb(ctx context.Context, formats return err } } + } return nil } func (o *ListServicesOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Postgresql); i++ { + if o.Postgresql[i] != nil { if swag.IsZero(o.Postgresql[i]) { // not required @@ -798,13 +816,16 @@ func (o *ListServicesOKBody) contextValidatePostgresql(ctx context.Context, form return err } } + } return nil } func (o *ListServicesOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Proxysql); i++ { + if o.Proxysql[i] != nil { if swag.IsZero(o.Proxysql[i]) { // not required @@ -824,13 +845,16 @@ func (o *ListServicesOKBody) contextValidateProxysql(ctx context.Context, format return err } } + } return nil } func (o *ListServicesOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Haproxy); i++ { + if o.Haproxy[i] != nil { if swag.IsZero(o.Haproxy[i]) { // not required @@ -850,13 +874,16 @@ func (o *ListServicesOKBody) contextValidateHaproxy(ctx context.Context, formats return err } } + } return nil } func (o *ListServicesOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.External); i++ { + if o.External[i] != nil { if swag.IsZero(o.External[i]) { // not required @@ -876,13 +903,16 @@ func (o *ListServicesOKBody) contextValidateExternal(ctx context.Context, format return err } } + } return nil } func (o *ListServicesOKBody) contextValidateValkey(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Valkey); i++ { + if o.Valkey[i] != nil { if swag.IsZero(o.Valkey[i]) { // not required @@ -902,6 +932,7 @@ func (o *ListServicesOKBody) contextValidateValkey(ctx context.Context, formats return err } } + } return nil @@ -930,6 +961,7 @@ ListServicesOKBodyExternalItems0 ExternalService represents a generic External s swagger:model ListServicesOKBodyExternalItems0 */ type ListServicesOKBodyExternalItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -994,6 +1026,7 @@ ListServicesOKBodyHaproxyItems0 HAProxyService represents a generic HAProxy serv swagger:model ListServicesOKBodyHaproxyItems0 */ type ListServicesOKBodyHaproxyItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1049,6 +1082,7 @@ ListServicesOKBodyMongodbItems0 MongoDBService represents a generic MongoDB inst swagger:model ListServicesOKBodyMongodbItems0 */ type ListServicesOKBodyMongodbItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1119,6 +1153,7 @@ ListServicesOKBodyMysqlItems0 MySQLService represents a generic MySQL instance. swagger:model ListServicesOKBodyMysqlItems0 */ type ListServicesOKBodyMysqlItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1192,6 +1227,7 @@ ListServicesOKBodyPostgresqlItems0 PostgreSQLService represents a generic Postgr swagger:model ListServicesOKBodyPostgresqlItems0 */ type ListServicesOKBodyPostgresqlItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1268,6 +1304,7 @@ ListServicesOKBodyProxysqlItems0 ProxySQLService represents a generic ProxySQL i swagger:model ListServicesOKBodyProxysqlItems0 */ type ListServicesOKBodyProxysqlItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1338,6 +1375,7 @@ ListServicesOKBodyValkeyItems0 ValkeyService represents a generic Valkey instanc swagger:model ListServicesOKBodyValkeyItems0 */ type ListServicesOKBodyValkeyItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventory/v1/json/client/services_service/remove_service_parameters.go b/api/inventory/v1/json/client/services_service/remove_service_parameters.go index 70b9473b3a3..317dfc5f10e 100644 --- a/api/inventory/v1/json/client/services_service/remove_service_parameters.go +++ b/api/inventory/v1/json/client/services_service/remove_service_parameters.go @@ -58,6 +58,7 @@ RemoveServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveServiceParams struct { + /* Force. Remove service with all dependencies. @@ -147,6 +148,7 @@ func (o *RemoveServiceParams) SetServiceID(serviceID string) { // WriteToRequest writes these params to a swagger request func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -162,6 +164,7 @@ func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } qForce := swag.FormatBool(qrForce) if qForce != "" { + if err := r.SetQueryParam("force", qForce); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/remove_service_responses.go b/api/inventory/v1/json/client/services_service/remove_service_responses.go index 53ea29bf270..d44b6dcf5e6 100644 --- a/api/inventory/v1/json/client/services_service/remove_service_responses.go +++ b/api/inventory/v1/json/client/services_service/remove_service_responses.go @@ -101,6 +101,7 @@ func (o *RemoveServiceOK) GetPayload() any { } func (o *RemoveServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -172,6 +173,7 @@ func (o *RemoveServiceDefault) GetPayload() *RemoveServiceDefaultBody { } func (o *RemoveServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveServiceDefaultBody) // response payload @@ -187,6 +189,7 @@ RemoveServiceDefaultBody remove service default body swagger:model RemoveServiceDefaultBody */ type RemoveServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *RemoveServiceDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -276,6 +281,7 @@ func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -304,6 +310,7 @@ RemoveServiceDefaultBodyDetailsItems0 remove service default body details items0 swagger:model RemoveServiceDefaultBodyDetailsItems0 */ type RemoveServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -315,6 +322,7 @@ type RemoveServiceDefaultBodyDetailsItems0 struct { func (o *RemoveServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -352,6 +360,7 @@ func (o *RemoveServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventory/v1/json/v1.json b/api/inventory/v1/json/v1.json index 1b0a2395e83..14dec0a617b 100644 --- a/api/inventory/v1/json/v1.json +++ b/api/inventory/v1/json/v1.json @@ -63,7 +63,8 @@ "AGENT_TYPE_RDS_EXPORTER", "AGENT_TYPE_AZURE_DATABASE_EXPORTER", "AGENT_TYPE_NOMAD_AGENT", - "AGENT_TYPE_RTA_MONGODB_AGENT" + "AGENT_TYPE_RTA_MONGODB_AGENT", + "AGENT_TYPE_RTA_MYSQL_AGENT" ], "type": "string", "default": "AGENT_TYPE_UNSPECIFIED", @@ -2202,6 +2203,102 @@ } }, "x-order": 18 + }, + "rta_mysql_agent": { + "type": "array", + "items": { + "description": "RTAMySQLAgent runs within pmm-agent and sends MySQL Real-Time Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique agent 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": "MySQL username for getting the currently running queries.", + "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 + }, + "rta_options": { + "description": "RTAOptions holds Real-Time Query Analytics agent options.", + "type": "object", + "properties": { + "collect_interval": { + "description": "Query collect interval (default 2s is set by server).", + "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_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "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": 10 + } + } + }, + "x-order": 19 } } } @@ -3798,6 +3895,97 @@ } }, "x-order": 16 + }, + "rta_mysql_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 queries data.", + "type": "string", + "x-order": 2 + }, + "password": { + "description": "MySQL password for getting queries data.", + "type": "string", + "x-order": 3 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 4 + }, + "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": 5 + }, + "tls": { + "description": "MySQL specific options.\nUse TLS for database connections.", + "type": "boolean", + "x-order": 6 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 7 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 8 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 9 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 10 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 11 + }, + "rta_options": { + "description": "RTAOptions holds Real-Time Query Analytics agent options.", + "type": "object", + "properties": { + "collect_interval": { + "description": "Query collect interval (default 2s is set by server).", + "type": "string", + "x-order": 0 + } + }, + "x-order": 12 + } + }, + "x-order": 17 } } } @@ -5784,6 +5972,99 @@ } }, "x-order": 16 + }, + "rta_mysql_agent": { + "description": "RTAMySQLAgent runs within pmm-agent and sends MySQL Real-Time Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique agent 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": "MySQL username for getting the currently running queries.", + "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 + }, + "rta_options": { + "description": "RTAOptions holds Real-Time Query Analytics agent options.", + "type": "object", + "properties": { + "collect_interval": { + "description": "Query collect interval (default 2s is set by server).", + "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_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "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": 10 + } + }, + "x-order": 17 } } } @@ -7756,7 +8037,128 @@ "items": { "type": "string" }, - "x-order": 9 + "x-order": 9 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "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 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 13 + }, + "metrics_resolutions": { + "description": "MetricsResolutions represents Prometheus exporters metrics resolutions.", + "type": "object", + "properties": { + "hr": { + "description": "High resolution. In JSON should be represented as a string with number of seconds with `s` suffix.", + "type": "string", + "x-order": 0 + }, + "mr": { + "description": "Medium resolution. In JSON should be represented as a string with number of seconds with `s` suffix.", + "type": "string", + "x-order": 1 + }, + "lr": { + "description": "Low resolution. In JSON should be represented as a string with number of seconds with `s` suffix.", + "type": "string", + "x-order": 2 + } + }, + "x-order": 14 + }, + "connection_timeout": { + "description": "Connection timeout for exporter (if set).", + "type": "string", + "x-order": 15 + } + }, + "x-order": 17 + }, + "rta_mongodb_agent": { + "description": "RTAMongoDBAgent runs within pmm-agent and sends MongoDB Real-Time Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique agent 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 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "rta_options": { + "description": "RTAOptions holds Real-Time Query Analytics agent options.", + "type": "object", + "properties": { + "collect_interval": { + "description": "Query collect interval (default 2s is set by server).", + "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_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", @@ -7772,56 +8174,28 @@ "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 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 13 - }, - "metrics_resolutions": { - "description": "MetricsResolutions represents Prometheus exporters metrics resolutions.", - "type": "object", - "properties": { - "hr": { - "description": "High resolution. In JSON should be represented as a string with number of seconds with `s` suffix.", - "type": "string", - "x-order": 0 - }, - "mr": { - "description": "Medium resolution. In JSON should be represented as a string with number of seconds with `s` suffix.", - "type": "string", - "x-order": 1 - }, - "lr": { - "description": "Low resolution. In JSON should be represented as a string with number of seconds with `s` suffix.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 14 + "x-order": 9 }, - "connection_timeout": { - "description": "Connection timeout for exporter (if set).", + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", - "x-order": 15 + "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": 10 } }, - "x-order": 17 + "x-order": 18 }, - "rta_mongodb_agent": { - "description": "RTAMongoDBAgent runs within pmm-agent and sends MongoDB Real-Time Query Analytics data to the PMM Server.", + "rta_mysql_agent": { + "description": "RTAMySQLAgent runs within pmm-agent and sends MySQL Real-Time Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -7845,7 +8219,7 @@ "x-order": 3 }, "username": { - "description": "MongoDB username for getting profiler data.", + "description": "MySQL username for getting the currently running queries.", "type": "string", "x-order": 4 }, @@ -7911,7 +8285,7 @@ "x-order": 10 } }, - "x-order": 18 + "x-order": 19 } } } @@ -9995,6 +10369,104 @@ } }, "x-order": 16 + }, + "rta_mysql_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 + } + }, + "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-nullable": true, + "x-order": 2 + }, + "username": { + "description": "MySQL username for getting queries data.", + "type": "string", + "x-nullable": true, + "x-order": 3 + }, + "password": { + "description": "MySQL password for getting queries data.", + "type": "string", + "x-nullable": true, + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-nullable": true, + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-nullable": true, + "x-order": 6 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-nullable": true, + "x-order": 7 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-nullable": true, + "x-order": 8 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-nullable": true, + "x-order": 9 + }, + "rta_options": { + "description": "RTAOptions holds Real-Time Query Analytics agent options.", + "type": "object", + "properties": { + "collect_interval": { + "description": "Query collect interval (default 2s is set by server).", + "type": "string", + "x-order": 0 + } + }, + "x-nullable": true, + "x-order": 10 + } + }, + "x-order": 17 } } } @@ -11994,6 +12466,99 @@ } }, "x-order": 16 + }, + "rta_mysql_agent": { + "description": "RTAMySQLAgent runs within pmm-agent and sends MySQL Real-Time Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique agent 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": "MySQL username for getting the currently running queries.", + "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 + }, + "rta_options": { + "description": "RTAOptions holds Real-Time Query Analytics agent options.", + "type": "object", + "properties": { + "collect_interval": { + "description": "Query collect interval (default 2s is set by server).", + "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_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "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": 10 + } + }, + "x-order": 17 } } } diff --git a/api/inventory/v1/types/agent_types.go b/api/inventory/v1/types/agent_types.go index 2ddb4e6dd32..c60dda2f9cc 100644 --- a/api/inventory/v1/types/agent_types.go +++ b/api/inventory/v1/types/agent_types.go @@ -37,6 +37,7 @@ const ( AgentTypeExternalExporter = "AGENT_TYPE_EXTERNAL_EXPORTER" AgentTypeAzureDatabaseExporter = "AGENT_TYPE_AZURE_DATABASE_EXPORTER" AgentTypeRTAMongoDBAgent = "AGENT_TYPE_RTA_MONGODB_AGENT" + AgentTypeRTAMySQLAgent = "AGENT_TYPE_RTA_MYSQL_AGENT" ) var agentTypeNames = map[string]string{ @@ -60,6 +61,7 @@ var agentTypeNames = map[string]string{ AgentTypeExternalExporter: "external-exporter", AgentTypeAzureDatabaseExporter: "azure_database_exporter", AgentTypeRTAMongoDBAgent: "rta_mongodb_agent", + AgentTypeRTAMySQLAgent: "rta_mysql_agent", } // AgentTypeName returns human friendly agent type to be used in reports. diff --git a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_services_responses.go b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_services_responses.go index a3222654851..0554fdde343 100644 --- a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_services_responses.go +++ b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_services_responses.go @@ -101,6 +101,7 @@ func (o *ListServicesOK) GetPayload() *ListServicesOKBody { } func (o *ListServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListServicesOKBody) // response payload @@ -174,6 +175,7 @@ func (o *ListServicesDefault) GetPayload() *ListServicesDefaultBody { } func (o *ListServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListServicesDefaultBody) // response payload @@ -189,6 +191,7 @@ ListServicesDefaultBody list services default body swagger:model ListServicesDefaultBody */ type ListServicesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -258,7 +261,9 @@ func (o *ListServicesDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,6 +283,7 @@ func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -306,6 +312,7 @@ ListServicesDefaultBodyDetailsItems0 list services default body details items0 swagger:model ListServicesDefaultBodyDetailsItems0 */ type ListServicesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -317,6 +324,7 @@ type ListServicesDefaultBodyDetailsItems0 struct { func (o *ListServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -354,6 +362,7 @@ func (o *ListServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListServicesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -417,8 +426,12 @@ ListServicesOKBody list services OK body swagger:model ListServicesOKBody */ type ListServicesOKBody struct { + // mongodb Mongodb []*ListServicesOKBodyMongodbItems0 `json:"mongodb"` + + // mysql + Mysql []*ListServicesOKBodyMysqlItems0 `json:"mysql"` } // Validate validates this list services OK body @@ -429,6 +442,10 @@ func (o *ListServicesOKBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateMysql(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -465,6 +482,36 @@ func (o *ListServicesOKBody) validateMongodb(formats strfmt.Registry) error { return nil } +func (o *ListServicesOKBody) validateMysql(formats strfmt.Registry) error { + if swag.IsZero(o.Mysql) { // not required + return nil + } + + for i := 0; i < len(o.Mysql); i++ { + if swag.IsZero(o.Mysql[i]) { // not required + continue + } + + if o.Mysql[i] != nil { + if err := o.Mysql[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("listServicesOk" + "." + "mysql" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("listServicesOk" + "." + "mysql" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + // ContextValidate validate this list services OK body based on the context it is used func (o *ListServicesOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -473,6 +520,10 @@ func (o *ListServicesOKBody) ContextValidate(ctx context.Context, formats strfmt res = append(res, err) } + if err := o.contextValidateMysql(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -480,7 +531,9 @@ func (o *ListServicesOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListServicesOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Mongodb); i++ { + if o.Mongodb[i] != nil { if swag.IsZero(o.Mongodb[i]) { // not required @@ -500,6 +553,36 @@ func (o *ListServicesOKBody) contextValidateMongodb(ctx context.Context, formats return err } } + + } + + return nil +} + +func (o *ListServicesOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Mysql); i++ { + + if o.Mysql[i] != nil { + + if swag.IsZero(o.Mysql[i]) { // not required + return nil + } + + if err := o.Mysql[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("listServicesOk" + "." + "mysql" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("listServicesOk" + "." + "mysql" + "." + strconv.Itoa(i)) + } + + return err + } + } + } return nil @@ -528,6 +611,7 @@ ListServicesOKBodyMongodbItems0 MongoDBService represents a generic MongoDB inst swagger:model ListServicesOKBodyMongodbItems0 */ type ListServicesOKBodyMongodbItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -592,3 +676,77 @@ func (o *ListServicesOKBodyMongodbItems0) UnmarshalBinary(b []byte) error { *o = res return nil } + +/* +ListServicesOKBodyMysqlItems0 MySQLService represents a generic MySQL instance. +swagger:model ListServicesOKBodyMysqlItems0 +*/ +type ListServicesOKBodyMysqlItems0 struct { + + // Unique randomly generated instance identifier. + ServiceID string `json:"service_id,omitempty"` + + // Unique across all Services user-defined name. + ServiceName string `json:"service_name,omitempty"` + + // Node identifier where this instance runs. + NodeID string `json:"node_id,omitempty"` + + // Access address (DNS name or IP). + // Address (and port) or socket is required. + Address string `json:"address,omitempty"` + + // Access port. + // Port is required when the address present. + Port int64 `json:"port,omitempty"` + + // Access unix socket. + // Address (and port) or socket is required. + Socket string `json:"socket,omitempty"` + + // Environment name. + Environment string `json:"environment,omitempty"` + + // Cluster name. + Cluster string `json:"cluster,omitempty"` + + // Replication set name. + ReplicationSet string `json:"replication_set,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // MySQL version. + Version string `json:"version,omitempty"` + + // Extra parameters to be added to the DSN. + ExtraDsnParams map[string]string `json:"extra_dsn_params,omitempty"` +} + +// Validate validates this list services OK body mysql items0 +func (o *ListServicesOKBodyMysqlItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this list services OK body mysql items0 based on context it is used +func (o *ListServicesOKBodyMysqlItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ListServicesOKBodyMysqlItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ListServicesOKBodyMysqlItems0) UnmarshalBinary(b []byte) error { + var res ListServicesOKBodyMysqlItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/search_queries_responses.go b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/search_queries_responses.go index 49e2f7af6c9..1d21e1d03a9 100644 --- a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/search_queries_responses.go +++ b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/search_queries_responses.go @@ -102,6 +102,7 @@ func (o *SearchQueriesOK) GetPayload() *SearchQueriesOKBody { } func (o *SearchQueriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SearchQueriesOKBody) // response payload @@ -175,6 +176,7 @@ func (o *SearchQueriesDefault) GetPayload() *SearchQueriesDefaultBody { } func (o *SearchQueriesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SearchQueriesDefaultBody) // response payload @@ -190,6 +192,7 @@ SearchQueriesBody SearchQueriesRequest contains optional filters for listing act swagger:model SearchQueriesBody */ type SearchQueriesBody struct { + // Optional filter by Service identifiers. ServiceIds []string `json:"service_ids"` @@ -230,6 +233,7 @@ SearchQueriesDefaultBody search queries default body swagger:model SearchQueriesDefaultBody */ type SearchQueriesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -299,7 +303,9 @@ func (o *SearchQueriesDefaultBody) ContextValidate(ctx context.Context, formats } func (o *SearchQueriesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -319,6 +325,7 @@ func (o *SearchQueriesDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -347,6 +354,7 @@ SearchQueriesDefaultBodyDetailsItems0 search queries default body details items0 swagger:model SearchQueriesDefaultBodyDetailsItems0 */ type SearchQueriesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -358,6 +366,7 @@ type SearchQueriesDefaultBodyDetailsItems0 struct { func (o *SearchQueriesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -395,6 +404,7 @@ func (o *SearchQueriesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o SearchQueriesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -458,6 +468,7 @@ SearchQueriesOKBody SearchQueriesResponse returns the list of currently active R swagger:model SearchQueriesOKBody */ type SearchQueriesOKBody struct { + // List of active Real-Time Analytics session Queries. Queries []*SearchQueriesOKBodyQueriesItems0 `json:"queries"` } @@ -521,7 +532,9 @@ func (o *SearchQueriesOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *SearchQueriesOKBody) contextValidateQueries(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Queries); i++ { + if o.Queries[i] != nil { if swag.IsZero(o.Queries[i]) { // not required @@ -541,6 +554,7 @@ func (o *SearchQueriesOKBody) contextValidateQueries(ctx context.Context, format return err } } + } return nil @@ -570,6 +584,7 @@ SearchQueriesOKBodyQueriesItems0 QueryData represents a single Real-Time Analyti swagger:model SearchQueriesOKBodyQueriesItems0 */ type SearchQueriesOKBodyQueriesItems0 struct { + // PMM Service identifier that reported the query. ServiceID string `json:"service_id,omitempty"` @@ -597,6 +612,9 @@ type SearchQueriesOKBodyQueriesItems0 struct { // mongo db payload MongoDBPayload *SearchQueriesOKBodyQueriesItems0MongoDBPayload `json:"mongo_db_payload,omitempty"` + + // my sql payload + MySQLPayload *SearchQueriesOKBodyQueriesItems0MySQLPayload `json:"my_sql_payload,omitempty"` } // Validate validates this search queries OK body queries items0 @@ -611,6 +629,10 @@ func (o *SearchQueriesOKBodyQueriesItems0) Validate(formats strfmt.Registry) err res = append(res, err) } + if err := o.validateMySQLPayload(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -652,6 +674,29 @@ func (o *SearchQueriesOKBodyQueriesItems0) validateMongoDBPayload(formats strfmt return nil } +func (o *SearchQueriesOKBodyQueriesItems0) validateMySQLPayload(formats strfmt.Registry) error { + if swag.IsZero(o.MySQLPayload) { // not required + return nil + } + + if o.MySQLPayload != nil { + if err := o.MySQLPayload.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("my_sql_payload") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("my_sql_payload") + } + + return err + } + } + + return nil +} + // ContextValidate validate this search queries OK body queries items0 based on the context it is used func (o *SearchQueriesOKBodyQueriesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -660,6 +705,10 @@ func (o *SearchQueriesOKBodyQueriesItems0) ContextValidate(ctx context.Context, res = append(res, err) } + if err := o.contextValidateMySQLPayload(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -667,6 +716,7 @@ func (o *SearchQueriesOKBodyQueriesItems0) ContextValidate(ctx context.Context, } func (o *SearchQueriesOKBodyQueriesItems0) contextValidateMongoDBPayload(ctx context.Context, formats strfmt.Registry) error { + if o.MongoDBPayload != nil { if swag.IsZero(o.MongoDBPayload) { // not required @@ -690,6 +740,31 @@ func (o *SearchQueriesOKBodyQueriesItems0) contextValidateMongoDBPayload(ctx con return nil } +func (o *SearchQueriesOKBodyQueriesItems0) contextValidateMySQLPayload(ctx context.Context, formats strfmt.Registry) error { + + if o.MySQLPayload != nil { + + if swag.IsZero(o.MySQLPayload) { // not required + return nil + } + + if err := o.MySQLPayload.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("my_sql_payload") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("my_sql_payload") + } + + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (o *SearchQueriesOKBodyQueriesItems0) MarshalBinary() ([]byte, error) { if o == nil { @@ -713,6 +788,7 @@ SearchQueriesOKBodyQueriesItems0MongoDBPayload QueryMongoDBData holds MongoDB-sp swagger:model SearchQueriesOKBodyQueriesItems0MongoDBPayload */ type SearchQueriesOKBodyQueriesItems0MongoDBPayload struct { + // MongoDB instance address(host:port) that processing the query. DBInstanceAddress string `json:"db_instance_address,omitempty"` @@ -787,3 +863,66 @@ func (o *SearchQueriesOKBodyQueriesItems0MongoDBPayload) UnmarshalBinary(b []byt *o = res return nil } + +/* +SearchQueriesOKBodyQueriesItems0MySQLPayload QueryMySQLData holds MySQL-specific Real-Time Analytics query information. +// The data is sourced from the sys.processlist view. +swagger:model SearchQueriesOKBodyQueriesItems0MySQLPayload +*/ +type SearchQueriesOKBodyQueriesItems0MySQLPayload struct { + + // MySQL instance address(host:port) that processing the query. + DBInstanceAddress string `json:"db_instance_address,omitempty"` + + // Client program name connected to MySQL (program_name from sys.processlist). + ProgramName string `json:"program_name,omitempty"` + + // Database name (db from sys.processlist). + DatabaseName string `json:"database_name,omitempty"` + + // Command type the connection is executing ("Query", "Execute", etc). + Command string `json:"command,omitempty"` + + // State of the connection/thread (for example "Sending data"). + State string `json:"state,omitempty"` + + // MySQL user name associated with the query. + Username string `json:"username,omitempty"` + + // Number of rows examined by the statement so far. + RowsExamined string `json:"rows_examined,omitempty"` + + // Number of rows sent by the statement so far. + RowsSent string `json:"rows_sent,omitempty"` + + // Indicates whether the statement performed a full table scan. + FullScan bool `json:"full_scan,omitempty"` +} + +// Validate validates this search queries OK body queries items0 my SQL payload +func (o *SearchQueriesOKBodyQueriesItems0MySQLPayload) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this search queries OK body queries items0 my SQL payload based on context it is used +func (o *SearchQueriesOKBodyQueriesItems0MySQLPayload) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *SearchQueriesOKBodyQueriesItems0MySQLPayload) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *SearchQueriesOKBodyQueriesItems0MySQLPayload) UnmarshalBinary(b []byte) error { + var res SearchQueriesOKBodyQueriesItems0MySQLPayload + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/realtimeanalytics/v1/json/v1.json b/api/realtimeanalytics/v1/json/v1.json index d79d757cc40..33c576bf078 100644 --- a/api/realtimeanalytics/v1/json/v1.json +++ b/api/realtimeanalytics/v1/json/v1.json @@ -153,6 +153,60 @@ } }, "x-order": 8 + }, + "my_sql_payload": { + "description": "QueryMySQLData holds MySQL-specific Real-Time Analytics query information.\nThe data is sourced from the sys.processlist view.", + "type": "object", + "properties": { + "db_instance_address": { + "description": "MySQL instance address(host:port) that processing the query.", + "type": "string", + "x-order": 0 + }, + "program_name": { + "description": "Client program name connected to MySQL (program_name from sys.processlist).", + "type": "string", + "x-order": 1 + }, + "database_name": { + "description": "Database name (db from sys.processlist).", + "type": "string", + "x-order": 2 + }, + "command": { + "description": "Command type the connection is executing (\"Query\", \"Execute\", etc).", + "type": "string", + "x-order": 3 + }, + "state": { + "description": "State of the connection/thread (for example \"Sending data\").", + "type": "string", + "x-order": 4 + }, + "username": { + "description": "MySQL user name associated with the query.", + "type": "string", + "x-order": 5 + }, + "rows_examined": { + "description": "Number of rows examined by the statement so far.", + "type": "string", + "format": "int64", + "x-order": 6 + }, + "rows_sent": { + "description": "Number of rows sent by the statement so far.", + "type": "string", + "format": "int64", + "x-order": 7 + }, + "full_scan": { + "description": "Indicates whether the statement performed a full table scan.", + "type": "boolean", + "x-order": 8 + } + }, + "x-order": 9 } } }, @@ -296,6 +350,83 @@ } }, "x-order": 0 + }, + "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 + }, + "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 + }, + "extra_dsn_params": { + "description": "Extra parameters to be added to the DSN.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 11 + } + } + }, + "x-order": 1 } } } diff --git a/api/realtimeanalytics/v1/query.pb.go b/api/realtimeanalytics/v1/query.pb.go index 43c4a1bdd5c..05d021ddbfe 100644 --- a/api/realtimeanalytics/v1/query.pb.go +++ b/api/realtimeanalytics/v1/query.pb.go @@ -7,16 +7,14 @@ package realtimeanalyticsv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - + _ "github.com/percona/pmm/api/extensions/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - _ "github.com/percona/pmm/api/extensions/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -135,6 +133,125 @@ func (x *QueryMongoDBData) GetPlanSummary() string { return "" } +// QueryMySQLData holds MySQL-specific Real-Time Analytics query information. +// The data is sourced from the sys.x$processlist view. +type QueryMySQLData struct { + state protoimpl.MessageState `protogen:"open.v1"` + // MySQL instance address(host:port) that processing the query. + DbInstanceAddress string `protobuf:"bytes,1,opt,name=db_instance_address,json=dbInstanceAddress,proto3" json:"db_instance_address,omitempty"` + // Client program name connected to MySQL (program_name from sys.x$processlist). + ProgramName string `protobuf:"bytes,2,opt,name=program_name,json=programName,proto3" json:"program_name,omitempty"` + // Database name (db from sys.x$processlist). + DatabaseName string `protobuf:"bytes,3,opt,name=database_name,json=databaseName,proto3" json:"database_name,omitempty"` + // Command type the connection is executing ("Query", "Execute", etc). + Command string `protobuf:"bytes,4,opt,name=command,proto3" json:"command,omitempty"` + // State of the connection/thread (for example "Sending data"). + State string `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty"` + // MySQL user name associated with the query. + Username string `protobuf:"bytes,6,opt,name=username,proto3" json:"username,omitempty"` + // Number of rows examined by the statement so far. + RowsExamined int64 `protobuf:"varint,7,opt,name=rows_examined,json=rowsExamined,proto3" json:"rows_examined,omitempty"` + // Number of rows sent by the statement so far. + RowsSent int64 `protobuf:"varint,8,opt,name=rows_sent,json=rowsSent,proto3" json:"rows_sent,omitempty"` + // Indicates whether the statement performed a full table scan. + FullScan bool `protobuf:"varint,9,opt,name=full_scan,json=fullScan,proto3" json:"full_scan,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *QueryMySQLData) Reset() { + *x = QueryMySQLData{} + mi := &file_realtimeanalytics_v1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *QueryMySQLData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryMySQLData) ProtoMessage() {} + +func (x *QueryMySQLData) ProtoReflect() protoreflect.Message { + mi := &file_realtimeanalytics_v1_query_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryMySQLData.ProtoReflect.Descriptor instead. +func (*QueryMySQLData) Descriptor() ([]byte, []int) { + return file_realtimeanalytics_v1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryMySQLData) GetDbInstanceAddress() string { + if x != nil { + return x.DbInstanceAddress + } + return "" +} + +func (x *QueryMySQLData) GetProgramName() string { + if x != nil { + return x.ProgramName + } + return "" +} + +func (x *QueryMySQLData) GetDatabaseName() string { + if x != nil { + return x.DatabaseName + } + return "" +} + +func (x *QueryMySQLData) GetCommand() string { + if x != nil { + return x.Command + } + return "" +} + +func (x *QueryMySQLData) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *QueryMySQLData) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *QueryMySQLData) GetRowsExamined() int64 { + if x != nil { + return x.RowsExamined + } + return 0 +} + +func (x *QueryMySQLData) GetRowsSent() int64 { + if x != nil { + return x.RowsSent + } + return 0 +} + +func (x *QueryMySQLData) GetFullScan() bool { + if x != nil { + return x.FullScan + } + return false +} + // QueryData represents a single Real-Time Analytics query data point. // It includes general query information and a payload for database-specific details. type QueryData struct { @@ -160,6 +277,7 @@ type QueryData struct { // Types that are valid to be assigned to Payload: // // *QueryData_MongoDbPayload + // *QueryData_MySqlPayload Payload isQueryData_Payload `protobuf_oneof:"payload"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -167,7 +285,7 @@ type QueryData struct { func (x *QueryData) Reset() { *x = QueryData{} - mi := &file_realtimeanalytics_v1_query_proto_msgTypes[1] + mi := &file_realtimeanalytics_v1_query_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -179,7 +297,7 @@ func (x *QueryData) String() string { func (*QueryData) ProtoMessage() {} func (x *QueryData) ProtoReflect() protoreflect.Message { - mi := &file_realtimeanalytics_v1_query_proto_msgTypes[1] + mi := &file_realtimeanalytics_v1_query_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -192,7 +310,7 @@ func (x *QueryData) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryData.ProtoReflect.Descriptor instead. func (*QueryData) Descriptor() ([]byte, []int) { - return file_realtimeanalytics_v1_query_proto_rawDescGZIP(), []int{1} + return file_realtimeanalytics_v1_query_proto_rawDescGZIP(), []int{2} } func (x *QueryData) GetServiceId() string { @@ -267,6 +385,15 @@ func (x *QueryData) GetMongoDbPayload() *QueryMongoDBData { return nil } +func (x *QueryData) GetMySqlPayload() *QueryMySQLData { + if x != nil { + if x, ok := x.Payload.(*QueryData_MySqlPayload); ok { + return x.MySqlPayload + } + } + return nil +} + type isQueryData_Payload interface { isQueryData_Payload() } @@ -276,8 +403,15 @@ type QueryData_MongoDbPayload struct { MongoDbPayload *QueryMongoDBData `protobuf:"bytes,9,opt,name=mongo_db_payload,json=mongoDbPayload,proto3,oneof"` } +type QueryData_MySqlPayload struct { + // MySQL-specific query data. + MySqlPayload *QueryMySQLData `protobuf:"bytes,10,opt,name=my_sql_payload,json=mySqlPayload,proto3,oneof"` +} + func (*QueryData_MongoDbPayload) isQueryData_Payload() {} +func (*QueryData_MySqlPayload) isQueryData_Payload() {} + var File_realtimeanalytics_v1_query_proto protoreflect.FileDescriptor const file_realtimeanalytics_v1_query_proto_rawDesc = "" + @@ -293,7 +427,17 @@ const file_realtimeanalytics_v1_query_proto_rawDesc = "" + "\toperation\x18\x05 \x01(\tR\toperation\x12L\n" + "\x14operation_start_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\x12operationStartTime\x12 \n" + "\busername\x18\a \x01(\tB\x04\x88\xb5\x18\x01R\busername\x12!\n" + - "\fplan_summary\x18\b \x01(\tR\vplanSummary\"\xd2\x03\n" + + "\fplan_summary\x18\b \x01(\tR\vplanSummary\"\xb9\x02\n" + + "\x0eQueryMySQLData\x12.\n" + + "\x13db_instance_address\x18\x01 \x01(\tR\x11dbInstanceAddress\x12!\n" + + "\fprogram_name\x18\x02 \x01(\tR\vprogramName\x12#\n" + + "\rdatabase_name\x18\x03 \x01(\tR\fdatabaseName\x12\x18\n" + + "\acommand\x18\x04 \x01(\tR\acommand\x12\x14\n" + + "\x05state\x18\x05 \x01(\tR\x05state\x12 \n" + + "\busername\x18\x06 \x01(\tB\x04\x88\xb5\x18\x01R\busername\x12#\n" + + "\rrows_examined\x18\a \x01(\x03R\frowsExamined\x12\x1b\n" + + "\trows_sent\x18\b \x01(\x03R\browsSent\x12\x1b\n" + + "\tfull_scan\x18\t \x01(\bR\bfullScan\"\xa0\x04\n" + "\tQueryData\x12\x1d\n" + "\n" + "service_id\x18\x01 \x01(\tR\tserviceId\x12!\n" + @@ -305,7 +449,9 @@ const file_realtimeanalytics_v1_query_proto_rawDesc = "" + "\x18query_execution_duration\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\x16queryExecutionDuration\x12H\n" + "\x12query_collect_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\x10queryCollectTime\x12%\n" + "\x0eclient_address\x18\b \x01(\tR\rclientAddress\x12R\n" + - "\x10mongo_db_payload\x18\t \x01(\v2&.realtimeanalytics.v1.QueryMongoDBDataH\x00R\x0emongoDbPayloadB\t\n" + + "\x10mongo_db_payload\x18\t \x01(\v2&.realtimeanalytics.v1.QueryMongoDBDataH\x00R\x0emongoDbPayload\x12L\n" + + "\x0emy_sql_payload\x18\n" + + " \x01(\v2$.realtimeanalytics.v1.QueryMySQLDataH\x00R\fmySqlPayloadB\t\n" + "\apayloadB\xdc\x01\n" + "\x18com.realtimeanalytics.v1B\n" + "QueryProtoP\x01ZCgithub.com/percona/pmm/api/realtimeanalytics/v1;realtimeanalyticsv1\xa2\x02\x03RXX\xaa\x02\x14Realtimeanalytics.V1\xca\x02\x14Realtimeanalytics\\V1\xe2\x02 Realtimeanalytics\\V1\\GPBMetadata\xea\x02\x15Realtimeanalytics::V1b\x06proto3" @@ -322,26 +468,25 @@ func file_realtimeanalytics_v1_query_proto_rawDescGZIP() []byte { return file_realtimeanalytics_v1_query_proto_rawDescData } -var ( - file_realtimeanalytics_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) - file_realtimeanalytics_v1_query_proto_goTypes = []any{ - (*QueryMongoDBData)(nil), // 0: realtimeanalytics.v1.QueryMongoDBData - (*QueryData)(nil), // 1: realtimeanalytics.v1.QueryData - (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 3: google.protobuf.Duration - } -) - +var file_realtimeanalytics_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_realtimeanalytics_v1_query_proto_goTypes = []any{ + (*QueryMongoDBData)(nil), // 0: realtimeanalytics.v1.QueryMongoDBData + (*QueryMySQLData)(nil), // 1: realtimeanalytics.v1.QueryMySQLData + (*QueryData)(nil), // 2: realtimeanalytics.v1.QueryData + (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 4: google.protobuf.Duration +} var file_realtimeanalytics_v1_query_proto_depIdxs = []int32{ - 2, // 0: realtimeanalytics.v1.QueryMongoDBData.operation_start_time:type_name -> google.protobuf.Timestamp - 3, // 1: realtimeanalytics.v1.QueryData.query_execution_duration:type_name -> google.protobuf.Duration - 2, // 2: realtimeanalytics.v1.QueryData.query_collect_time:type_name -> google.protobuf.Timestamp + 3, // 0: realtimeanalytics.v1.QueryMongoDBData.operation_start_time:type_name -> google.protobuf.Timestamp + 4, // 1: realtimeanalytics.v1.QueryData.query_execution_duration:type_name -> google.protobuf.Duration + 3, // 2: realtimeanalytics.v1.QueryData.query_collect_time:type_name -> google.protobuf.Timestamp 0, // 3: realtimeanalytics.v1.QueryData.mongo_db_payload:type_name -> realtimeanalytics.v1.QueryMongoDBData - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 1, // 4: realtimeanalytics.v1.QueryData.my_sql_payload:type_name -> realtimeanalytics.v1.QueryMySQLData + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_realtimeanalytics_v1_query_proto_init() } @@ -349,8 +494,9 @@ func file_realtimeanalytics_v1_query_proto_init() { if File_realtimeanalytics_v1_query_proto != nil { return } - file_realtimeanalytics_v1_query_proto_msgTypes[1].OneofWrappers = []any{ + file_realtimeanalytics_v1_query_proto_msgTypes[2].OneofWrappers = []any{ (*QueryData_MongoDbPayload)(nil), + (*QueryData_MySqlPayload)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -358,7 +504,7 @@ func file_realtimeanalytics_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_realtimeanalytics_v1_query_proto_rawDesc), len(file_realtimeanalytics_v1_query_proto_rawDesc)), NumEnums: 0, - NumMessages: 2, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/api/realtimeanalytics/v1/query.pb.validate.go b/api/realtimeanalytics/v1/query.pb.validate.go index af551461acf..fab2b85c1ef 100644 --- a/api/realtimeanalytics/v1/query.pb.validate.go +++ b/api/realtimeanalytics/v1/query.pb.validate.go @@ -165,8 +165,7 @@ func (e QueryMongoDBDataValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = QueryMongoDBDataValidationError{} @@ -179,6 +178,124 @@ var _ interface { ErrorName() string } = QueryMongoDBDataValidationError{} +// Validate checks the field values on QueryMySQLData with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *QueryMySQLData) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on QueryMySQLData with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in QueryMySQLDataMultiError, +// or nil if none found. +func (m *QueryMySQLData) ValidateAll() error { + return m.validate(true) +} + +func (m *QueryMySQLData) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for DbInstanceAddress + + // no validation rules for ProgramName + + // no validation rules for DatabaseName + + // no validation rules for Command + + // no validation rules for State + + // no validation rules for Username + + // no validation rules for RowsExamined + + // no validation rules for RowsSent + + // no validation rules for FullScan + + if len(errors) > 0 { + return QueryMySQLDataMultiError(errors) + } + + return nil +} + +// QueryMySQLDataMultiError is an error wrapping multiple validation errors +// returned by QueryMySQLData.ValidateAll() if the designated constraints +// aren't met. +type QueryMySQLDataMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m QueryMySQLDataMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m QueryMySQLDataMultiError) AllErrors() []error { return m } + +// QueryMySQLDataValidationError is the validation error returned by +// QueryMySQLData.Validate if the designated constraints aren't met. +type QueryMySQLDataValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e QueryMySQLDataValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e QueryMySQLDataValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e QueryMySQLDataValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e QueryMySQLDataValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e QueryMySQLDataValidationError) ErrorName() string { return "QueryMySQLDataValidationError" } + +// Error satisfies the builtin error interface +func (e QueryMySQLDataValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sQueryMySQLData.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = QueryMySQLDataValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = QueryMySQLDataValidationError{} + // Validate checks the field values on QueryData with the rules defined in the // proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. @@ -313,6 +430,47 @@ func (m *QueryData) validate(all bool) error { } } + case *QueryData_MySqlPayload: + if v == nil { + err := QueryDataValidationError{ + field: "Payload", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetMySqlPayload()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QueryDataValidationError{ + field: "MySqlPayload", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QueryDataValidationError{ + field: "MySqlPayload", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMySqlPayload()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return QueryDataValidationError{ + field: "MySqlPayload", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: _ = v // ensures v is used } @@ -381,8 +539,7 @@ func (e QueryDataValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = QueryDataValidationError{} diff --git a/api/realtimeanalytics/v1/query.proto b/api/realtimeanalytics/v1/query.proto index 7732e321f79..04e018d56ed 100644 --- a/api/realtimeanalytics/v1/query.proto +++ b/api/realtimeanalytics/v1/query.proto @@ -26,6 +26,29 @@ message QueryMongoDBData { string plan_summary = 8; } +// QueryMySQLData holds MySQL-specific Real-Time Analytics query information. +// The data is sourced from the sys.x$processlist view. +message QueryMySQLData { + // MySQL instance address(host:port) that processing the query. + string db_instance_address = 1; + // Client program name connected to MySQL (program_name from sys.x$processlist). + string program_name = 2; + // Database name (db from sys.x$processlist). + string database_name = 3; + // Command type the connection is executing ("Query", "Execute", etc). + string command = 4; + // State of the connection/thread (for example "Sending data"). + string state = 5; + // MySQL user name associated with the query. + string username = 6 [(extensions.v1.sensitive) = REDACT_TYPE_FULL]; + // Number of rows examined by the statement so far. + int64 rows_examined = 7; + // Number of rows sent by the statement so far. + int64 rows_sent = 8; + // Indicates whether the statement performed a full table scan. + bool full_scan = 9; +} + // QueryData represents a single Real-Time Analytics query data point. // It includes general query information and a payload for database-specific details. message QueryData { @@ -49,5 +72,7 @@ message QueryData { oneof payload { // MongoDB-specific query data. QueryMongoDBData mongo_db_payload = 9; + // MySQL-specific query data. + QueryMySQLData my_sql_payload = 10; } } diff --git a/api/realtimeanalytics/v1/realtimeanalytics.pb.go b/api/realtimeanalytics/v1/realtimeanalytics.pb.go index 8dbdbf8ccff..1df54234441 100644 --- a/api/realtimeanalytics/v1/realtimeanalytics.pb.go +++ b/api/realtimeanalytics/v1/realtimeanalytics.pb.go @@ -7,19 +7,17 @@ package realtimeanalyticsv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + v1 "github.com/percona/pmm/api/inventory/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -133,6 +131,7 @@ func (x *ListServicesRequest) GetServiceType() v1.ServiceType { type ListServicesResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Mongodb []*v1.MongoDBService `protobuf:"bytes,1,rep,name=mongodb,proto3" json:"mongodb,omitempty"` + Mysql []*v1.MySQLService `protobuf:"bytes,2,rep,name=mysql,proto3" json:"mysql,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -174,6 +173,13 @@ func (x *ListServicesResponse) GetMongodb() []*v1.MongoDBService { return nil } +func (x *ListServicesResponse) GetMysql() []*v1.MySQLService { + if x != nil { + return x.Mysql + } + return nil +} + // Session represents an active Real-Time Analytics session. type Session struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -638,9 +644,10 @@ const file_realtimeanalytics_v1_realtimeanalytics_proto_rawDesc = "" + "\n" + ",realtimeanalytics/v1/realtimeanalytics.proto\x12\x14realtimeanalytics.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1binventory/v1/services.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a realtimeanalytics/v1/query.proto\x1a\x17validate/validate.proto\"S\n" + "\x13ListServicesRequest\x12<\n" + - "\fservice_type\x18\x01 \x01(\x0e2\x19.inventory.v1.ServiceTypeR\vserviceType\"N\n" + + "\fservice_type\x18\x01 \x01(\x0e2\x19.inventory.v1.ServiceTypeR\vserviceType\"\x80\x01\n" + "\x14ListServicesResponse\x126\n" + - "\amongodb\x18\x01 \x03(\v2\x1c.inventory.v1.MongoDBServiceR\amongodb\"\xac\x02\n" + + "\amongodb\x18\x01 \x03(\v2\x1c.inventory.v1.MongoDBServiceR\amongodb\x120\n" + + "\x05mysql\x18\x02 \x03(\v2\x1a.inventory.v1.MySQLServiceR\x05mysql\"\xac\x02\n" + "\aSession\x12\x1d\n" + "\n" + "service_id\x18\x01 \x01(\tR\tserviceId\x12!\n" + @@ -695,54 +702,53 @@ func file_realtimeanalytics_v1_realtimeanalytics_proto_rawDescGZIP() []byte { return file_realtimeanalytics_v1_realtimeanalytics_proto_rawDescData } -var ( - file_realtimeanalytics_v1_realtimeanalytics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_realtimeanalytics_v1_realtimeanalytics_proto_msgTypes = make([]protoimpl.MessageInfo, 11) - file_realtimeanalytics_v1_realtimeanalytics_proto_goTypes = []any{ - SessionStatus(0), // 0: realtimeanalytics.v1.SessionStatus - (*ListServicesRequest)(nil), // 1: realtimeanalytics.v1.ListServicesRequest - (*ListServicesResponse)(nil), // 2: realtimeanalytics.v1.ListServicesResponse - (*Session)(nil), // 3: realtimeanalytics.v1.Session - (*ListSessionsRequest)(nil), // 4: realtimeanalytics.v1.ListSessionsRequest - (*ListSessionsResponse)(nil), // 5: realtimeanalytics.v1.ListSessionsResponse - (*StartSessionRequest)(nil), // 6: realtimeanalytics.v1.StartSessionRequest - (*StartSessionResponse)(nil), // 7: realtimeanalytics.v1.StartSessionResponse - (*StopSessionRequest)(nil), // 8: realtimeanalytics.v1.StopSessionRequest - (*StopSessionResponse)(nil), // 9: realtimeanalytics.v1.StopSessionResponse - (*SearchQueriesRequest)(nil), // 10: realtimeanalytics.v1.SearchQueriesRequest - (*SearchQueriesResponse)(nil), // 11: realtimeanalytics.v1.SearchQueriesResponse - v1.ServiceType(0), // 12: inventory.v1.ServiceType - (*v1.MongoDBService)(nil), // 13: inventory.v1.MongoDBService - (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 15: google.protobuf.Duration - (*QueryData)(nil), // 16: realtimeanalytics.v1.QueryData - } -) - +var file_realtimeanalytics_v1_realtimeanalytics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_realtimeanalytics_v1_realtimeanalytics_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_realtimeanalytics_v1_realtimeanalytics_proto_goTypes = []any{ + (SessionStatus)(0), // 0: realtimeanalytics.v1.SessionStatus + (*ListServicesRequest)(nil), // 1: realtimeanalytics.v1.ListServicesRequest + (*ListServicesResponse)(nil), // 2: realtimeanalytics.v1.ListServicesResponse + (*Session)(nil), // 3: realtimeanalytics.v1.Session + (*ListSessionsRequest)(nil), // 4: realtimeanalytics.v1.ListSessionsRequest + (*ListSessionsResponse)(nil), // 5: realtimeanalytics.v1.ListSessionsResponse + (*StartSessionRequest)(nil), // 6: realtimeanalytics.v1.StartSessionRequest + (*StartSessionResponse)(nil), // 7: realtimeanalytics.v1.StartSessionResponse + (*StopSessionRequest)(nil), // 8: realtimeanalytics.v1.StopSessionRequest + (*StopSessionResponse)(nil), // 9: realtimeanalytics.v1.StopSessionResponse + (*SearchQueriesRequest)(nil), // 10: realtimeanalytics.v1.SearchQueriesRequest + (*SearchQueriesResponse)(nil), // 11: realtimeanalytics.v1.SearchQueriesResponse + (v1.ServiceType)(0), // 12: inventory.v1.ServiceType + (*v1.MongoDBService)(nil), // 13: inventory.v1.MongoDBService + (*v1.MySQLService)(nil), // 14: inventory.v1.MySQLService + (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 16: google.protobuf.Duration + (*QueryData)(nil), // 17: realtimeanalytics.v1.QueryData +} var file_realtimeanalytics_v1_realtimeanalytics_proto_depIdxs = []int32{ 12, // 0: realtimeanalytics.v1.ListServicesRequest.service_type:type_name -> inventory.v1.ServiceType 13, // 1: realtimeanalytics.v1.ListServicesResponse.mongodb:type_name -> inventory.v1.MongoDBService - 14, // 2: realtimeanalytics.v1.Session.start_time:type_name -> google.protobuf.Timestamp - 15, // 3: realtimeanalytics.v1.Session.collect_interval:type_name -> google.protobuf.Duration - 0, // 4: realtimeanalytics.v1.Session.status:type_name -> realtimeanalytics.v1.SessionStatus - 3, // 5: realtimeanalytics.v1.ListSessionsResponse.sessions:type_name -> realtimeanalytics.v1.Session - 3, // 6: realtimeanalytics.v1.StartSessionResponse.session:type_name -> realtimeanalytics.v1.Session - 16, // 7: realtimeanalytics.v1.SearchQueriesResponse.queries:type_name -> realtimeanalytics.v1.QueryData - 1, // 8: realtimeanalytics.v1.RealtimeAnalyticsService.ListServices:input_type -> realtimeanalytics.v1.ListServicesRequest - 4, // 9: realtimeanalytics.v1.RealtimeAnalyticsService.ListSessions:input_type -> realtimeanalytics.v1.ListSessionsRequest - 6, // 10: realtimeanalytics.v1.RealtimeAnalyticsService.StartSession:input_type -> realtimeanalytics.v1.StartSessionRequest - 8, // 11: realtimeanalytics.v1.RealtimeAnalyticsService.StopSession:input_type -> realtimeanalytics.v1.StopSessionRequest - 10, // 12: realtimeanalytics.v1.RealtimeAnalyticsService.SearchQueries:input_type -> realtimeanalytics.v1.SearchQueriesRequest - 2, // 13: realtimeanalytics.v1.RealtimeAnalyticsService.ListServices:output_type -> realtimeanalytics.v1.ListServicesResponse - 5, // 14: realtimeanalytics.v1.RealtimeAnalyticsService.ListSessions:output_type -> realtimeanalytics.v1.ListSessionsResponse - 7, // 15: realtimeanalytics.v1.RealtimeAnalyticsService.StartSession:output_type -> realtimeanalytics.v1.StartSessionResponse - 9, // 16: realtimeanalytics.v1.RealtimeAnalyticsService.StopSession:output_type -> realtimeanalytics.v1.StopSessionResponse - 11, // 17: realtimeanalytics.v1.RealtimeAnalyticsService.SearchQueries:output_type -> realtimeanalytics.v1.SearchQueriesResponse - 13, // [13:18] is the sub-list for method output_type - 8, // [8:13] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 14, // 2: realtimeanalytics.v1.ListServicesResponse.mysql:type_name -> inventory.v1.MySQLService + 15, // 3: realtimeanalytics.v1.Session.start_time:type_name -> google.protobuf.Timestamp + 16, // 4: realtimeanalytics.v1.Session.collect_interval:type_name -> google.protobuf.Duration + 0, // 5: realtimeanalytics.v1.Session.status:type_name -> realtimeanalytics.v1.SessionStatus + 3, // 6: realtimeanalytics.v1.ListSessionsResponse.sessions:type_name -> realtimeanalytics.v1.Session + 3, // 7: realtimeanalytics.v1.StartSessionResponse.session:type_name -> realtimeanalytics.v1.Session + 17, // 8: realtimeanalytics.v1.SearchQueriesResponse.queries:type_name -> realtimeanalytics.v1.QueryData + 1, // 9: realtimeanalytics.v1.RealtimeAnalyticsService.ListServices:input_type -> realtimeanalytics.v1.ListServicesRequest + 4, // 10: realtimeanalytics.v1.RealtimeAnalyticsService.ListSessions:input_type -> realtimeanalytics.v1.ListSessionsRequest + 6, // 11: realtimeanalytics.v1.RealtimeAnalyticsService.StartSession:input_type -> realtimeanalytics.v1.StartSessionRequest + 8, // 12: realtimeanalytics.v1.RealtimeAnalyticsService.StopSession:input_type -> realtimeanalytics.v1.StopSessionRequest + 10, // 13: realtimeanalytics.v1.RealtimeAnalyticsService.SearchQueries:input_type -> realtimeanalytics.v1.SearchQueriesRequest + 2, // 14: realtimeanalytics.v1.RealtimeAnalyticsService.ListServices:output_type -> realtimeanalytics.v1.ListServicesResponse + 5, // 15: realtimeanalytics.v1.RealtimeAnalyticsService.ListSessions:output_type -> realtimeanalytics.v1.ListSessionsResponse + 7, // 16: realtimeanalytics.v1.RealtimeAnalyticsService.StartSession:output_type -> realtimeanalytics.v1.StartSessionResponse + 9, // 17: realtimeanalytics.v1.RealtimeAnalyticsService.StopSession:output_type -> realtimeanalytics.v1.StopSessionResponse + 11, // 18: realtimeanalytics.v1.RealtimeAnalyticsService.SearchQueries:output_type -> realtimeanalytics.v1.SearchQueriesResponse + 14, // [14:19] is the sub-list for method output_type + 9, // [9:14] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_realtimeanalytics_v1_realtimeanalytics_proto_init() } diff --git a/api/realtimeanalytics/v1/realtimeanalytics.pb.validate.go b/api/realtimeanalytics/v1/realtimeanalytics.pb.validate.go index f392e0a0102..414a2dc8f5a 100644 --- a/api/realtimeanalytics/v1/realtimeanalytics.pb.validate.go +++ b/api/realtimeanalytics/v1/realtimeanalytics.pb.validate.go @@ -130,8 +130,7 @@ func (e ListServicesRequestValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ListServicesRequestValidationError{} @@ -200,6 +199,40 @@ func (m *ListServicesResponse) validate(all bool) error { } + for idx, item := range m.GetMysql() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListServicesResponseValidationError{ + field: fmt.Sprintf("Mysql[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListServicesResponseValidationError{ + field: fmt.Sprintf("Mysql[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListServicesResponseValidationError{ + field: fmt.Sprintf("Mysql[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + if len(errors) > 0 { return ListServicesResponseMultiError(errors) } @@ -267,8 +300,7 @@ func (e ListServicesResponseValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ListServicesResponseValidationError{} @@ -432,8 +464,7 @@ func (e SessionValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = SessionValidationError{} @@ -537,8 +568,7 @@ func (e ListSessionsRequestValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ListSessionsRequestValidationError{} @@ -674,8 +704,7 @@ func (e ListSessionsResponseValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = ListSessionsResponseValidationError{} @@ -788,8 +817,7 @@ func (e StartSessionRequestValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = StartSessionRequestValidationError{} @@ -920,8 +948,7 @@ func (e StartSessionResponseValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = StartSessionResponseValidationError{} @@ -1034,8 +1061,7 @@ func (e StopSessionRequestValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = StopSessionRequestValidationError{} @@ -1137,8 +1163,7 @@ func (e StopSessionResponseValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = StopSessionResponseValidationError{} @@ -1274,8 +1299,7 @@ func (e SearchQueriesRequestValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = SearchQueriesRequestValidationError{} @@ -1411,8 +1435,7 @@ func (e SearchQueriesResponseValidationError) Error() string { key, e.field, e.reason, - cause, - ) + cause) } var _ error = SearchQueriesResponseValidationError{} diff --git a/api/realtimeanalytics/v1/realtimeanalytics.proto b/api/realtimeanalytics/v1/realtimeanalytics.proto index 3926de3f866..822faca1c4f 100644 --- a/api/realtimeanalytics/v1/realtimeanalytics.proto +++ b/api/realtimeanalytics/v1/realtimeanalytics.proto @@ -19,6 +19,7 @@ message ListServicesRequest { message ListServicesResponse { repeated inventory.v1.MongoDBService mongodb = 1; + repeated inventory.v1.MySQLService mysql = 2; } // Session related messages diff --git a/api/swagger/swagger-dev.json b/api/swagger/swagger-dev.json index f521777f744..f01ddff2b91 100644 --- a/api/swagger/swagger-dev.json +++ b/api/swagger/swagger-dev.json @@ -5351,7 +5351,8 @@ "AGENT_TYPE_RDS_EXPORTER", "AGENT_TYPE_AZURE_DATABASE_EXPORTER", "AGENT_TYPE_NOMAD_AGENT", - "AGENT_TYPE_RTA_MONGODB_AGENT" + "AGENT_TYPE_RTA_MONGODB_AGENT", + "AGENT_TYPE_RTA_MYSQL_AGENT" ], "type": "string", "default": "AGENT_TYPE_UNSPECIFIED", @@ -7490,6 +7491,102 @@ } }, "x-order": 18 + }, + "rta_mysql_agent": { + "type": "array", + "items": { + "description": "RTAMySQLAgent runs within pmm-agent and sends MySQL Real-Time Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique agent 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": "MySQL username for getting the currently running queries.", + "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 + }, + "rta_options": { + "description": "RTAOptions holds Real-Time Query Analytics agent options.", + "type": "object", + "properties": { + "collect_interval": { + "description": "Query collect interval (default 2s is set by server).", + "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_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "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": 10 + } + } + }, + "x-order": 19 } } } @@ -9086,6 +9183,97 @@ } }, "x-order": 16 + }, + "rta_mysql_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 queries data.", + "type": "string", + "x-order": 2 + }, + "password": { + "description": "MySQL password for getting queries data.", + "type": "string", + "x-order": 3 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 4 + }, + "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": 5 + }, + "tls": { + "description": "MySQL specific options.\nUse TLS for database connections.", + "type": "boolean", + "x-order": 6 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 7 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 8 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 9 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 10 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 11 + }, + "rta_options": { + "description": "RTAOptions holds Real-Time Query Analytics agent options.", + "type": "object", + "properties": { + "collect_interval": { + "description": "Query collect interval (default 2s is set by server).", + "type": "string", + "x-order": 0 + } + }, + "x-order": 12 + } + }, + "x-order": 17 } } } @@ -11072,6 +11260,99 @@ } }, "x-order": 16 + }, + "rta_mysql_agent": { + "description": "RTAMySQLAgent runs within pmm-agent and sends MySQL Real-Time Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique agent 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": "MySQL username for getting the currently running queries.", + "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 + }, + "rta_options": { + "description": "RTAOptions holds Real-Time Query Analytics agent options.", + "type": "object", + "properties": { + "collect_interval": { + "description": "Query collect interval (default 2s is set by server).", + "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_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "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": 10 + } + }, + "x-order": 17 } } } @@ -13200,6 +13481,99 @@ } }, "x-order": 18 + }, + "rta_mysql_agent": { + "description": "RTAMySQLAgent runs within pmm-agent and sends MySQL Real-Time Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique agent 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": "MySQL username for getting the currently running queries.", + "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 + }, + "rta_options": { + "description": "RTAOptions holds Real-Time Query Analytics agent options.", + "type": "object", + "properties": { + "collect_interval": { + "description": "Query collect interval (default 2s is set by server).", + "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_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "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": 10 + } + }, + "x-order": 19 } } } @@ -15170,17 +15544,121 @@ "LOG_LEVEL_DEBUG" ], "x-nullable": true, - "x-order": 14 + "x-order": 14 + }, + "connection_timeout": { + "description": "Connection timeout for exporter (if set).", + "type": "string", + "x-order": 15 + } + }, + "x-order": 15 + }, + "rta_mongodb_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 + } + }, + "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-nullable": true, + "x-order": 2 + }, + "username": { + "description": "MongoDB username for getting profile data.", + "type": "string", + "x-nullable": true, + "x-order": 3 + }, + "password": { + "description": "MongoDB password for getting profile data.", + "type": "string", + "x-nullable": true, + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-nullable": true, + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-nullable": true, + "x-order": 6 + }, + "tls_certificate_key": { + "description": "Client certificate and key.", + "type": "string", + "x-nullable": true, + "x-order": 7 + }, + "tls_certificate_key_file_password": { + "description": "Password for decrypting tls_certificate_key.", + "type": "string", + "x-nullable": true, + "x-order": 8 }, - "connection_timeout": { - "description": "Connection timeout for exporter (if set).", + "tls_ca": { + "description": "Certificate Authority certificate chain.", "type": "string", - "x-order": 15 + "x-nullable": true, + "x-order": 9 + }, + "authentication_mechanism": { + "description": "Authentication mechanism.", + "type": "string", + "x-nullable": true, + "x-order": 10 + }, + "rta_options": { + "description": "RTAOptions holds Real-Time Query Analytics agent options.", + "type": "object", + "properties": { + "collect_interval": { + "description": "Query collect interval (default 2s is set by server).", + "type": "string", + "x-order": 0 + } + }, + "x-nullable": true, + "x-order": 11 } }, - "x-order": 15 + "x-order": 16 }, - "rta_mongodb_agent": { + "rta_mysql_agent": { "type": "object", "properties": { "enable": { @@ -15221,13 +15699,13 @@ "x-order": 2 }, "username": { - "description": "MongoDB username for getting profile data.", + "description": "MySQL username for getting queries data.", "type": "string", "x-nullable": true, "x-order": 3 }, "password": { - "description": "MongoDB password for getting profile data.", + "description": "MySQL password for getting queries data.", "type": "string", "x-nullable": true, "x-order": 4 @@ -15244,30 +15722,24 @@ "x-nullable": true, "x-order": 6 }, - "tls_certificate_key": { - "description": "Client certificate and key.", + "tls_ca": { + "description": "Certificate Authority certificate chain.", "type": "string", "x-nullable": true, "x-order": 7 }, - "tls_certificate_key_file_password": { - "description": "Password for decrypting tls_certificate_key.", + "tls_cert": { + "description": "Client certificate.", "type": "string", "x-nullable": true, "x-order": 8 }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", + "tls_key": { + "description": "Password for decrypting tls_cert.", "type": "string", "x-nullable": true, "x-order": 9 }, - "authentication_mechanism": { - "description": "Authentication mechanism.", - "type": "string", - "x-nullable": true, - "x-order": 10 - }, "rta_options": { "description": "RTAOptions holds Real-Time Query Analytics agent options.", "type": "object", @@ -15279,10 +15751,10 @@ } }, "x-nullable": true, - "x-order": 11 + "x-order": 10 } }, - "x-order": 16 + "x-order": 17 } } } @@ -17282,6 +17754,99 @@ } }, "x-order": 16 + }, + "rta_mysql_agent": { + "description": "RTAMySQLAgent runs within pmm-agent and sends MySQL Real-Time Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique agent 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": "MySQL username for getting the currently running queries.", + "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 + }, + "rta_options": { + "description": "RTAOptions holds Real-Time Query Analytics agent options.", + "type": "object", + "properties": { + "collect_interval": { + "description": "Query collect interval (default 2s is set by server).", + "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_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "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": 10 + } + }, + "x-order": 17 } } } @@ -31483,6 +32048,60 @@ } }, "x-order": 8 + }, + "my_sql_payload": { + "description": "QueryMySQLData holds MySQL-specific Real-Time Analytics query information.\nThe data is sourced from the sys.processlist view.", + "type": "object", + "properties": { + "db_instance_address": { + "description": "MySQL instance address(host:port) that processing the query.", + "type": "string", + "x-order": 0 + }, + "program_name": { + "description": "Client program name connected to MySQL (program_name from sys.processlist).", + "type": "string", + "x-order": 1 + }, + "database_name": { + "description": "Database name (db from sys.processlist).", + "type": "string", + "x-order": 2 + }, + "command": { + "description": "Command type the connection is executing (\"Query\", \"Execute\", etc).", + "type": "string", + "x-order": 3 + }, + "state": { + "description": "State of the connection/thread (for example \"Sending data\").", + "type": "string", + "x-order": 4 + }, + "username": { + "description": "MySQL user name associated with the query.", + "type": "string", + "x-order": 5 + }, + "rows_examined": { + "description": "Number of rows examined by the statement so far.", + "type": "string", + "format": "int64", + "x-order": 6 + }, + "rows_sent": { + "description": "Number of rows sent by the statement so far.", + "type": "string", + "format": "int64", + "x-order": 7 + }, + "full_scan": { + "description": "Indicates whether the statement performed a full table scan.", + "type": "boolean", + "x-order": 8 + } + }, + "x-order": 9 } } }, @@ -31626,6 +32245,83 @@ } }, "x-order": 0 + }, + "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 + }, + "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 + }, + "extra_dsn_params": { + "description": "Extra parameters to be added to the DSN.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 11 + } + } + }, + "x-order": 1 } } } diff --git a/api/swagger/swagger.json b/api/swagger/swagger.json index ae34b9296a5..06ac3ca9f93 100644 --- a/api/swagger/swagger.json +++ b/api/swagger/swagger.json @@ -4378,7 +4378,8 @@ "AGENT_TYPE_RDS_EXPORTER", "AGENT_TYPE_AZURE_DATABASE_EXPORTER", "AGENT_TYPE_NOMAD_AGENT", - "AGENT_TYPE_RTA_MONGODB_AGENT" + "AGENT_TYPE_RTA_MONGODB_AGENT", + "AGENT_TYPE_RTA_MYSQL_AGENT" ], "type": "string", "default": "AGENT_TYPE_UNSPECIFIED", @@ -6517,6 +6518,102 @@ } }, "x-order": 18 + }, + "rta_mysql_agent": { + "type": "array", + "items": { + "description": "RTAMySQLAgent runs within pmm-agent and sends MySQL Real-Time Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique agent 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": "MySQL username for getting the currently running queries.", + "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 + }, + "rta_options": { + "description": "RTAOptions holds Real-Time Query Analytics agent options.", + "type": "object", + "properties": { + "collect_interval": { + "description": "Query collect interval (default 2s is set by server).", + "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_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "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": 10 + } + } + }, + "x-order": 19 } } } @@ -8113,6 +8210,97 @@ } }, "x-order": 16 + }, + "rta_mysql_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 queries data.", + "type": "string", + "x-order": 2 + }, + "password": { + "description": "MySQL password for getting queries data.", + "type": "string", + "x-order": 3 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 4 + }, + "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": 5 + }, + "tls": { + "description": "MySQL specific options.\nUse TLS for database connections.", + "type": "boolean", + "x-order": 6 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 7 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 8 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 9 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 10 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 11 + }, + "rta_options": { + "description": "RTAOptions holds Real-Time Query Analytics agent options.", + "type": "object", + "properties": { + "collect_interval": { + "description": "Query collect interval (default 2s is set by server).", + "type": "string", + "x-order": 0 + } + }, + "x-order": 12 + } + }, + "x-order": 17 } } } @@ -10099,6 +10287,99 @@ } }, "x-order": 16 + }, + "rta_mysql_agent": { + "description": "RTAMySQLAgent runs within pmm-agent and sends MySQL Real-Time Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique agent 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": "MySQL username for getting the currently running queries.", + "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 + }, + "rta_options": { + "description": "RTAOptions holds Real-Time Query Analytics agent options.", + "type": "object", + "properties": { + "collect_interval": { + "description": "Query collect interval (default 2s is set by server).", + "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_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "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": 10 + } + }, + "x-order": 17 } } } @@ -12227,6 +12508,99 @@ } }, "x-order": 18 + }, + "rta_mysql_agent": { + "description": "RTAMySQLAgent runs within pmm-agent and sends MySQL Real-Time Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique agent 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": "MySQL username for getting the currently running queries.", + "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 + }, + "rta_options": { + "description": "RTAOptions holds Real-Time Query Analytics agent options.", + "type": "object", + "properties": { + "collect_interval": { + "description": "Query collect interval (default 2s is set by server).", + "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_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "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": 10 + } + }, + "x-order": 19 } } } @@ -14197,17 +14571,121 @@ "LOG_LEVEL_DEBUG" ], "x-nullable": true, - "x-order": 14 + "x-order": 14 + }, + "connection_timeout": { + "description": "Connection timeout for exporter (if set).", + "type": "string", + "x-order": 15 + } + }, + "x-order": 15 + }, + "rta_mongodb_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 + } + }, + "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-nullable": true, + "x-order": 2 + }, + "username": { + "description": "MongoDB username for getting profile data.", + "type": "string", + "x-nullable": true, + "x-order": 3 + }, + "password": { + "description": "MongoDB password for getting profile data.", + "type": "string", + "x-nullable": true, + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-nullable": true, + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-nullable": true, + "x-order": 6 + }, + "tls_certificate_key": { + "description": "Client certificate and key.", + "type": "string", + "x-nullable": true, + "x-order": 7 + }, + "tls_certificate_key_file_password": { + "description": "Password for decrypting tls_certificate_key.", + "type": "string", + "x-nullable": true, + "x-order": 8 }, - "connection_timeout": { - "description": "Connection timeout for exporter (if set).", + "tls_ca": { + "description": "Certificate Authority certificate chain.", "type": "string", - "x-order": 15 + "x-nullable": true, + "x-order": 9 + }, + "authentication_mechanism": { + "description": "Authentication mechanism.", + "type": "string", + "x-nullable": true, + "x-order": 10 + }, + "rta_options": { + "description": "RTAOptions holds Real-Time Query Analytics agent options.", + "type": "object", + "properties": { + "collect_interval": { + "description": "Query collect interval (default 2s is set by server).", + "type": "string", + "x-order": 0 + } + }, + "x-nullable": true, + "x-order": 11 } }, - "x-order": 15 + "x-order": 16 }, - "rta_mongodb_agent": { + "rta_mysql_agent": { "type": "object", "properties": { "enable": { @@ -14248,13 +14726,13 @@ "x-order": 2 }, "username": { - "description": "MongoDB username for getting profile data.", + "description": "MySQL username for getting queries data.", "type": "string", "x-nullable": true, "x-order": 3 }, "password": { - "description": "MongoDB password for getting profile data.", + "description": "MySQL password for getting queries data.", "type": "string", "x-nullable": true, "x-order": 4 @@ -14271,30 +14749,24 @@ "x-nullable": true, "x-order": 6 }, - "tls_certificate_key": { - "description": "Client certificate and key.", + "tls_ca": { + "description": "Certificate Authority certificate chain.", "type": "string", "x-nullable": true, "x-order": 7 }, - "tls_certificate_key_file_password": { - "description": "Password for decrypting tls_certificate_key.", + "tls_cert": { + "description": "Client certificate.", "type": "string", "x-nullable": true, "x-order": 8 }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", + "tls_key": { + "description": "Password for decrypting tls_cert.", "type": "string", "x-nullable": true, "x-order": 9 }, - "authentication_mechanism": { - "description": "Authentication mechanism.", - "type": "string", - "x-nullable": true, - "x-order": 10 - }, "rta_options": { "description": "RTAOptions holds Real-Time Query Analytics agent options.", "type": "object", @@ -14306,10 +14778,10 @@ } }, "x-nullable": true, - "x-order": 11 + "x-order": 10 } }, - "x-order": 16 + "x-order": 17 } } } @@ -16309,6 +16781,99 @@ } }, "x-order": 16 + }, + "rta_mysql_agent": { + "description": "RTAMySQLAgent runs within pmm-agent and sends MySQL Real-Time Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique agent 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": "MySQL username for getting the currently running queries.", + "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 + }, + "rta_options": { + "description": "RTAOptions holds Real-Time Query Analytics agent options.", + "type": "object", + "properties": { + "collect_interval": { + "description": "Query collect interval (default 2s is set by server).", + "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_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "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": 10 + } + }, + "x-order": 17 } } } @@ -30510,6 +31075,60 @@ } }, "x-order": 8 + }, + "my_sql_payload": { + "description": "QueryMySQLData holds MySQL-specific Real-Time Analytics query information.\nThe data is sourced from the sys.processlist view.", + "type": "object", + "properties": { + "db_instance_address": { + "description": "MySQL instance address(host:port) that processing the query.", + "type": "string", + "x-order": 0 + }, + "program_name": { + "description": "Client program name connected to MySQL (program_name from sys.processlist).", + "type": "string", + "x-order": 1 + }, + "database_name": { + "description": "Database name (db from sys.processlist).", + "type": "string", + "x-order": 2 + }, + "command": { + "description": "Command type the connection is executing (\"Query\", \"Execute\", etc).", + "type": "string", + "x-order": 3 + }, + "state": { + "description": "State of the connection/thread (for example \"Sending data\").", + "type": "string", + "x-order": 4 + }, + "username": { + "description": "MySQL user name associated with the query.", + "type": "string", + "x-order": 5 + }, + "rows_examined": { + "description": "Number of rows examined by the statement so far.", + "type": "string", + "format": "int64", + "x-order": 6 + }, + "rows_sent": { + "description": "Number of rows sent by the statement so far.", + "type": "string", + "format": "int64", + "x-order": 7 + }, + "full_scan": { + "description": "Indicates whether the statement performed a full table scan.", + "type": "boolean", + "x-order": 8 + } + }, + "x-order": 9 } } }, @@ -30653,6 +31272,83 @@ } }, "x-order": 0 + }, + "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 + }, + "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 + }, + "extra_dsn_params": { + "description": "Extra parameters to be added to the DSN.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 11 + } + } + }, + "x-order": 1 } } } diff --git a/managed/models/agent_helpers.go b/managed/models/agent_helpers.go index 5a422296f26..cbd4503070d 100644 --- a/managed/models/agent_helpers.go +++ b/managed/models/agent_helpers.go @@ -356,6 +356,7 @@ func FindDBConfigForService(q *reform.Querier, serviceID string) (*DBConfig, err MySQLdExporterType, QANMySQLSlowlogAgentType, QANMySQLPerfSchemaAgentType, + RTAMySQLAgentType, } case PostgreSQLServiceType: agentTypes = []AgentType{ @@ -876,6 +877,9 @@ func compatibleServiceAndAgent(serviceType ServiceType, agentType AgentType) boo RTAMongoDBAgentType: { MongoDBServiceType, }, + RTAMySQLAgentType: { + MySQLServiceType, + }, PostgresExporterType: { PostgreSQLServiceType, }, @@ -982,8 +986,8 @@ func CreateAgent(q *reform.Querier, agentType AgentType, params *CreateAgentPara } switch agentType { - // For the time being only RTA MangoDB Agent has RTA options. - case RTAMongoDBAgentType: + // RTA agents collect currently running queries on a fixed interval. + case RTAMongoDBAgentType, RTAMySQLAgentType: row.RTAOptions = RTAOptions{ // default value CollectInterval: new(2 * time.Second), //nolint:mnd diff --git a/managed/models/agent_model.go b/managed/models/agent_model.go index 2b68e2a86f7..57e8cd73b9f 100644 --- a/managed/models/agent_model.go +++ b/managed/models/agent_model.go @@ -82,12 +82,14 @@ const ( NomadAgentType AgentType = "nomad-agent" ValkeyExporterType AgentType = "valkey_exporter" RTAMongoDBAgentType AgentType = "rta-mongodb-agent" + RTAMySQLAgentType AgentType = "rta-mysql-agent" ) // GetRTAAgentTypes returns all Real-Time Analytics Agent types. func GetRTAAgentTypes() []AgentType { return []AgentType{ RTAMongoDBAgentType, + RTAMySQLAgentType, // Add more types here once they are implemented. } } @@ -586,7 +588,7 @@ func (a *Agent) DSN(service *Service, dsnParams DSNParams, tdp *DelimiterPair, p return cfg.FormatDSN() - case QANMySQLPerfSchemaAgentType, QANMySQLSlowlogAgentType: + case QANMySQLPerfSchemaAgentType, QANMySQLSlowlogAgentType, RTAMySQLAgentType: cfg := mysql.NewConfig() cfg.User = username cfg.Passwd = password @@ -898,7 +900,7 @@ func (a *Agent) IsMySQLTablestatsGroupEnabled() bool { // Files returns files map required to connect to DB. func (a Agent) Files() map[string]string { //nolint:gocognit switch a.AgentType { - case MySQLdExporterType, QANMySQLPerfSchemaAgentType, QANMySQLSlowlogAgentType: + case MySQLdExporterType, QANMySQLPerfSchemaAgentType, QANMySQLSlowlogAgentType, RTAMySQLAgentType: files := make(map[string]string) if a.MySQLOptions.TLSCa != "" { files["tlsCa"] = a.MySQLOptions.TLSCa diff --git a/managed/models/dsn_helpers.go b/managed/models/dsn_helpers.go index 3c5e6c8b2e2..a86c5d27e08 100644 --- a/managed/models/dsn_helpers.go +++ b/managed/models/dsn_helpers.go @@ -56,6 +56,7 @@ func FindDSNByServiceIDandPMMAgentID(q *reform.Querier, serviceID, pmmAgentID, d QANMySQLSlowlogAgentType, QANMySQLPerfSchemaAgentType, MySQLdExporterType, + RTAMySQLAgentType, ) case PostgreSQLServiceType: agentTypes = append( diff --git a/managed/services/agents/mysql.go b/managed/services/agents/mysql.go index fb2c833efdf..4342d3e6dd5 100644 --- a/managed/services/agents/mysql.go +++ b/managed/services/agents/mysql.go @@ -24,6 +24,7 @@ import ( "time" "github.com/AlekSi/pointer" + "google.golang.org/protobuf/types/known/durationpb" agentv1 "github.com/percona/pmm/api/agent/v1" inventoryv1 "github.com/percona/pmm/api/inventory/v1" @@ -230,6 +231,30 @@ func qanMySQLSlowlogAgentConfig(service *models.Service, agent *models.Agent, pm } } +// rtaMySQLAgentConfig returns desired configuration of rta-mysql-agent RTA agent. +func rtaMySQLAgentConfig(service *models.Service, agent *models.Agent, pmmAgentVersion *version.Parsed) *agentv1.SetStateRequest_BuiltinAgent { + tdp := agent.TemplateDelimiters(service) + + apiRTAOptions := &inventoryv1.RTAOptions{} + if agent.RTAOptions.CollectInterval != nil { + apiRTAOptions.CollectInterval = durationpb.New(*agent.RTAOptions.CollectInterval) + } + + return &agentv1.SetStateRequest_BuiltinAgent{ + Type: inventoryv1.AgentType_AGENT_TYPE_RTA_MYSQL_AGENT, + Dsn: agent.DSN(service, models.DSNParams{DialTimeout: time.Second, Database: ""}, nil, pmmAgentVersion), + RtaOptions: apiRTAOptions, + ServiceId: service.ServiceID, + ServiceName: service.ServiceName, + TextFiles: &agentv1.TextFiles{ + Files: agent.Files(), + TemplateLeftDelim: tdp.Left, + TemplateRightDelim: tdp.Right, + }, + TlsSkipVerify: agent.TLSSkipVerify, + } +} + // https://dev.mysql.com/doc/refman/8.4/en/mysql-command-options.html // https://dev.mysql.com/doc/refman/8.4/en/connection-options.html#encrypted-connection-options const myCnfTemplate = `[client] diff --git a/managed/services/agents/state.go b/managed/services/agents/state.go index 8dad8d4dc8b..34e9c908af1 100644 --- a/managed/services/agents/state.go +++ b/managed/services/agents/state.go @@ -243,7 +243,7 @@ func (u *StateUpdater) sendSetStateRequest(ctx context.Context, agent *pmmAgentI models.ValkeyExporterType, models.QANMySQLPerfSchemaAgentType, models.QANMySQLSlowlogAgentType, models.QANMongoDBProfilerAgentType, models.QANMongoDBMongologAgentType, models.QANPostgreSQLPgStatementsAgentType, models.QANPostgreSQLPgStatMonitorAgentType, - models.RTAMongoDBAgentType: + models.RTAMongoDBAgentType, models.RTAMySQLAgentType: service, err := models.FindServiceByID(u.db.Querier, pointer.GetString(row.ServiceID)) if err != nil { return err @@ -286,6 +286,8 @@ func (u *StateUpdater) sendSetStateRequest(ctx context.Context, agent *pmmAgentI builtinAgents[row.AgentID] = qanPostgreSQLPgStatMonitorAgentConfig(service, row, pmmAgentVersion) case models.RTAMongoDBAgentType: builtinAgents[row.AgentID] = rtaMongoDBAgentConfig(service, row, pmmAgentVersion) + case models.RTAMySQLAgentType: + builtinAgents[row.AgentID] = rtaMySQLAgentConfig(service, row, pmmAgentVersion) } default: diff --git a/managed/services/converters.go b/managed/services/converters.go index d70acca37cc..003043bd942 100644 --- a/managed/services/converters.go +++ b/managed/services/converters.go @@ -606,6 +606,21 @@ func ToAPIAgent(q *reform.Querier, agent *models.Agent) (inventoryv1.Agent, erro RtaOptions: ToAPIRTAOptions(&agent.RTAOptions), }, nil + case models.RTAMySQLAgentType: + return &inventoryv1.RTAMySQLAgent{ + AgentId: agent.AgentID, + PmmAgentId: pointer.GetString(agent.PMMAgentID), + ServiceId: serviceID, + Username: pointer.GetString(agent.Username), + Disabled: agent.Disabled, + Status: inventoryv1.AgentStatus(inventoryv1.AgentStatus_value[agent.Status]), + CustomLabels: labels, + Tls: agent.TLS, + TlsSkipVerify: agent.TLSSkipVerify, + LogLevel: inventoryv1.LogLevelAPIValue(agent.LogLevel), + RtaOptions: ToAPIRTAOptions(&agent.RTAOptions), + }, nil + default: panic(fmt.Errorf("cannot convert unknown agent type %s", agent.AgentType)) } diff --git a/managed/services/inventory/agents.go b/managed/services/inventory/agents.go index c04358bfda7..af58bb4827e 100644 --- a/managed/services/inventory/agents.go +++ b/managed/services/inventory/agents.go @@ -1918,6 +1918,123 @@ func (as *AgentsService) ChangeRTAMongoDBAgent( return res, nil } +// AddRTAMySQLAgent adds MySQL Real-Time Analytics Agent. +func (as *AgentsService) AddRTAMySQLAgent(ctx context.Context, p *inventoryv1.AddRTAMySQLAgentParams) (*inventoryv1.AddAgentResponse, error) { + var agent *inventoryv1.RTAMySQLAgent + + // Set MySQLOptions + mysqlOptions := models.MySQLOptions{ + TLSCa: p.GetTlsCa(), + TLSCert: p.GetTlsCert(), + TLSKey: p.GetTlsKey(), + } + + e := as.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error { + params := &models.CreateAgentParams{ + PMMAgentID: p.PmmAgentId, + ServiceID: p.ServiceId, + Username: p.Username, + Password: p.Password, + CustomLabels: p.CustomLabels, + TLS: p.Tls, + TLSSkipVerify: p.TlsSkipVerify, + MySQLOptions: mysqlOptions, + LogLevel: services.SpecifyLogLevel(p.LogLevel, inventoryv1.LogLevel_LOG_LEVEL_FATAL), + } + + // Set RTA options if provided + if p.RtaOptions != nil { + params.RTAOptions = *models.RTAOptionsFromRequest(p.RtaOptions) + } + + row, err := models.CreateAgent(tx.Querier, models.RTAMySQLAgentType, params) + if err != nil { + return err + } + + if !p.SkipConnectionCheck { + service, err := models.FindServiceByID(tx.Querier, p.ServiceId) + if err != nil { + return err + } + + err = as.cc.CheckConnectionToService(ctx, tx.Querier, service, row) + if err != nil { + return err + } + + err = as.sib.GetInfoFromService(ctx, tx.Querier, service, row) + if err != nil { + return err + } + } + + aa, err := services.ToAPIAgent(tx.Querier, row) + if err != nil { + return err + } + + agent = aa.(*inventoryv1.RTAMySQLAgent) //nolint:forcetypeassert + + return nil + }) + if e != nil { + return nil, e + } + + as.state.RequestStateUpdate(ctx, p.PmmAgentId) + + res := &inventoryv1.AddAgentResponse{ + Agent: &inventoryv1.AddAgentResponse_RtaMysqlAgent{ + RtaMysqlAgent: agent, + }, + } + + return res, e +} + +// ChangeRTAMySQLAgent updates MySQL Real-Time Analytics Agent with given parameters. +func (as *AgentsService) ChangeRTAMySQLAgent( + ctx context.Context, agentID string, + p *inventoryv1.ChangeRTAMySQLAgentParams, +) (*inventoryv1.ChangeAgentResponse, error) { + changeParams := &models.ChangeAgentParams{ + Enabled: p.Enable, + Username: p.Username, + Password: p.Password, + TLS: p.Tls, + TLSSkipVerify: p.TlsSkipVerify, + LogLevel: convertLogLevel(p.LogLevel), + CustomLabels: convertCustomLabels(p.CustomLabels), + MySQLOptions: &models.ChangeMySQLOptions{ + TLSCa: p.TlsCa, + TLSCert: p.TlsCert, + TLSKey: p.TlsKey, + }, + } + + // Set RTA options if provided + if p.RtaOptions != nil { + changeParams.RTAOptions = models.RTAOptionsFromRequest(p.RtaOptions) + } + + ag, err := as.executeAgentChange(ctx, agentID, changeParams) + if err != nil { + return nil, err + } + + agent := ag.(*inventoryv1.RTAMySQLAgent) //nolint:forcetypeassert + as.state.RequestStateUpdate(ctx, agent.PmmAgentId) + + res := &inventoryv1.ChangeAgentResponse{ + Agent: &inventoryv1.ChangeAgentResponse_RtaMysqlAgent{ + RtaMysqlAgent: agent, + }, + } + + return res, nil +} + // Remove removes Agent, and sends state update to pmm-agent, or kicks it. func (as *AgentsService) Remove(ctx context.Context, id string, force bool) error { var removedAgent *models.Agent diff --git a/managed/services/inventory/grpc/agents_server.go b/managed/services/inventory/grpc/agents_server.go index 7b925623879..abdb4dc2f00 100644 --- a/managed/services/inventory/grpc/agents_server.go +++ b/managed/services/inventory/grpc/agents_server.go @@ -58,6 +58,7 @@ var agentTypes = map[inventoryv1.AgentType]models.AgentType{ inventoryv1.AgentType_AGENT_TYPE_VM_AGENT: models.VMAgentType, inventoryv1.AgentType_AGENT_TYPE_NOMAD_AGENT: models.NomadAgentType, inventoryv1.AgentType_AGENT_TYPE_RTA_MONGODB_AGENT: models.RTAMongoDBAgentType, + inventoryv1.AgentType_AGENT_TYPE_RTA_MYSQL_AGENT: models.RTAMySQLAgentType, } func agentType(req *inventoryv1.ListAgentsRequest) *models.AgentType { @@ -121,6 +122,8 @@ func (s *agentsServer) ListAgents(ctx context.Context, req *inventoryv1.ListAgen res.NomadAgent = append(res.NomadAgent, agent) case *inventoryv1.RTAMongoDBAgent: res.RtaMongodbAgent = append(res.RtaMongodbAgent, agent) + case *inventoryv1.RTAMySQLAgent: + res.RtaMysqlAgent = append(res.RtaMysqlAgent, agent) default: panic(fmt.Errorf("unhandled inventory Agent type %T", agent)) } @@ -175,6 +178,8 @@ func (s *agentsServer) GetAgent(ctx context.Context, req *inventoryv1.GetAgentRe res.Agent = &inventoryv1.GetAgentResponse_NomadAgent{NomadAgent: agent} case *inventoryv1.RTAMongoDBAgent: res.Agent = &inventoryv1.GetAgentResponse_RtaMongodbAgent{RtaMongodbAgent: agent} + case *inventoryv1.RTAMySQLAgent: + res.Agent = &inventoryv1.GetAgentResponse_RtaMysqlAgent{RtaMysqlAgent: agent} default: panic(fmt.Errorf("unhandled inventory Agent type %T", agent)) } @@ -231,6 +236,8 @@ func (s *agentsServer) AddAgent(ctx context.Context, req *inventoryv1.AddAgentRe return s.s.AddQANPostgreSQLPgStatMonitorAgent(ctx, req.GetQanPostgresqlPgstatmonitorAgent()) case *inventoryv1.AddAgentRequest_RtaMongodbAgent: return s.s.AddRTAMongoDBAgent(ctx, req.GetRtaMongodbAgent()) + case *inventoryv1.AddAgentRequest_RtaMysqlAgent: + return s.s.AddRTAMySQLAgent(ctx, req.GetRtaMysqlAgent()) default: return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("invalid agent type %T", req.Agent)) } @@ -275,6 +282,8 @@ func (s *agentsServer) ChangeAgent(ctx context.Context, req *inventoryv1.ChangeA return s.s.ChangeNomadAgent(ctx, agentID, req.GetNomadAgent()) case *inventoryv1.ChangeAgentRequest_RtaMongodbAgent: return s.s.ChangeRTAMongoDBAgent(ctx, agentID, req.GetRtaMongodbAgent()) + case *inventoryv1.ChangeAgentRequest_RtaMysqlAgent: + return s.s.ChangeRTAMySQLAgent(ctx, agentID, req.GetRtaMysqlAgent()) default: return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("invalid agent type %T", req.Agent)) } diff --git a/managed/services/management/agent.go b/managed/services/management/agent.go index e94c55a9936..657924884a6 100644 --- a/managed/services/management/agent.go +++ b/managed/services/management/agent.go @@ -210,7 +210,7 @@ func (s *ManagementService) agentToAPI(agent *models.Agent) (*managementv1.Unive IsTlsCertificateKeySet: agent.MongoDBOptions.TLSCertificateKey != "", IsTlsCertificateKeyFilePasswordSet: agent.MongoDBOptions.TLSCertificateKeyFilePassword != "", } - case models.MySQLdExporterType, models.QANMySQLSlowlogAgentType, models.QANMySQLPerfSchemaAgentType: + case models.MySQLdExporterType, models.QANMySQLSlowlogAgentType, models.QANMySQLPerfSchemaAgentType, models.RTAMySQLAgentType: ua.MysqlOptions = &managementv1.UniversalAgent_MySQLOptions{ IsTlsKeySet: agent.MySQLOptions.TLSKey != "", } diff --git a/managed/services/realtimeanalytics/gate_test.go b/managed/services/realtimeanalytics/gate_test.go new file mode 100644 index 00000000000..2bd43ca6142 --- /dev/null +++ b/managed/services/realtimeanalytics/gate_test.go @@ -0,0 +1,49 @@ +// Copyright (C) 2023 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package realtimeanalytics + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/percona/pmm/managed/models" +) + +func TestIsRtaFeatureSupported(t *testing.T) { + t.Parallel() + + // MongoDB RTA shipped in 3.7.0. + assert.True(t, isRtaFeatureSupported("3.7.0", models.MongoDBServiceType)) + assert.True(t, isRtaFeatureSupported("3.8.0", models.MongoDBServiceType)) + assert.False(t, isRtaFeatureSupported("3.6.0", models.MongoDBServiceType)) + + // MySQL RTA shipped in 3.9.0 — an agent in [3.7.0, 3.9.0) supports MongoDB RTA but + // would not understand the MySQL builtin, so it must be reported as unsupported. + assert.False(t, isRtaFeatureSupported("3.7.0", models.MySQLServiceType)) + assert.False(t, isRtaFeatureSupported("3.8.0", models.MySQLServiceType)) + assert.False(t, isRtaFeatureSupported("3.8.99", models.MySQLServiceType)) + assert.True(t, isRtaFeatureSupported("3.9.0", models.MySQLServiceType)) + assert.True(t, isRtaFeatureSupported("3.10.0", models.MySQLServiceType)) + + // Service types that do not support RTA are never reported as supported, + // regardless of agent version. + assert.False(t, isRtaFeatureSupported("3.9.0", models.ValkeyServiceType)) + assert.False(t, isRtaFeatureSupported("3.9.0", models.PostgreSQLServiceType)) + + // Unparsable version is never supported. + assert.False(t, isRtaFeatureSupported("not-a-version", models.MySQLServiceType)) +} diff --git a/managed/services/realtimeanalytics/service.go b/managed/services/realtimeanalytics/service.go index da40f081b18..5b562ecd6d3 100644 --- a/managed/services/realtimeanalytics/service.go +++ b/managed/services/realtimeanalytics/service.go @@ -91,8 +91,8 @@ func (s *Service) ListServices(ctx context.Context, req *rtav1.ListServicesReque return nil, err } } else { - // No service type filter specified - return all services that support RTA. - // For the time being we only support MongoDB, so we can just filter by service type here. + // No service type filter specified - return all services that support RTA + // (currently MongoDB and MySQL), filtered by service type. for _, modelServiceType := range services.ServiceTypes { _, err := getRTAAgentTypeForServiceType(modelServiceType) if err != nil { @@ -137,7 +137,7 @@ func (s *Service) ListServices(ctx context.Context, req *rtav1.ListServicesReque // PMM Agent that is linked to the requested service may be outdated and doesn't support RTA. // In this case we cannot start RTA session for this service and should return an error. - if !isRtaFeatureSupported(*pmmAgents[0].Version) { + if !isRtaFeatureSupported(*pmmAgents[0].Version, svc.ServiceType) { continue // skip services with unsupported pmm-agent version } @@ -150,6 +150,8 @@ func (s *Service) ListServices(ctx context.Context, req *rtav1.ListServicesReque switch apiSvc := apiSvc.(type) { case *inventoryv1.MongoDBService: res.Mongodb = append(res.Mongodb, apiSvc) + case *inventoryv1.MySQLService: + res.Mysql = append(res.Mysql, apiSvc) // Add other service types once RTA is supported for them default: return nil, fmt.Errorf("unhandled inventory Service type %T", apiSvc) @@ -160,6 +162,10 @@ func (s *Service) ListServices(ctx context.Context, req *rtav1.ListServicesReque return strings.Compare(a.ServiceName, b.ServiceName) }) + slices.SortStableFunc(res.Mysql, func(a, b *inventoryv1.MySQLService) int { + return strings.Compare(a.ServiceName, b.ServiceName) + }) + return res, nil } @@ -310,6 +316,12 @@ func (s *Service) StartSession(ctx context.Context, req *rtav1.StartSessionReque models.QANMongoDBProfilerAgentType, models.QANMongoDBMongologAgentType, } + case models.MySQLServiceType: + agentTypes = []models.AgentType{ + models.MySQLdExporterType, + models.QANMySQLPerfSchemaAgentType, + models.QANMySQLSlowlogAgentType, + } // Add other service types once RTA is supported for them default: return nil, status.Errorf(codes.InvalidArgument, @@ -352,7 +364,7 @@ func (s *Service) StartSession(ctx context.Context, req *rtav1.StartSessionReque // PMM Agent that is linked to the requested service may be outdated and doesn't support RTA. // In this case we cannot start RTA session for this service and should return an error. - if !isRtaFeatureSupported(*pmmAgent.Version) { + if !isRtaFeatureSupported(*pmmAgent.Version, service.ServiceType) { return nil, status.Errorf(codes.FailedPrecondition, "Service %s has pmm-agent with version not supporting Real-Time Analytics.", service.ServiceID) } @@ -615,19 +627,43 @@ func getRTAAgentTypeForServiceType(serviceType models.ServiceType) (models.Agent switch serviceType { case models.MongoDBServiceType: return models.RTAMongoDBAgentType, nil + case models.MySQLServiceType: + return models.RTAMySQLAgentType, nil default: return "", fmt.Errorf("service of type %s does not support Real-Time Analytics", serviceType) } } -// isRtaFeatureSupported checks if the passed pmm-agent's version supporting RTA. -func isRtaFeatureSupported(pmmAgentVersion string) bool { +// rtaMinAgentVersion returns the minimum pmm-agent version that ships the RTA +// collector for the given service type, and whether RTA is supported for that +// type at all. Different database collectors landed in different releases, so +// the gate must be per-service-type; unsupported types return ok=false. +func rtaMinAgentVersion(serviceType models.ServiceType) (version.FeatureVersion, bool) { + switch serviceType { + case models.MongoDBServiceType: + return version.MongoDBRtaAgentSupportVersion, true + case models.MySQLServiceType: + return version.MySQLRtaAgentSupportVersion, true + default: + return nil, false + } +} + +// isRtaFeatureSupported checks if the passed pmm-agent's version supports RTA for +// the given service type. It returns false for service types that do not support +// RTA at all, rather than assuming a default version. +func isRtaFeatureSupported(pmmAgentVersion string, serviceType models.ServiceType) bool { + minVersion, ok := rtaMinAgentVersion(serviceType) + if !ok { + return false + } + versionParsed, versionParseErr := version.Parse(pmmAgentVersion) if versionParseErr != nil { return false } - return versionParsed.IsFeatureSupported(version.MongoDBRtaAgentSupportVersion) + return versionParsed.IsFeatureSupported(minVersion) } // check interfaces. diff --git a/managed/services/victoriametrics/prometheus.go b/managed/services/victoriametrics/prometheus.go index df635de059e..ddc4e6a93bf 100644 --- a/managed/services/victoriametrics/prometheus.go +++ b/managed/services/victoriametrics/prometheus.go @@ -196,7 +196,7 @@ func AddScrapeConfigs(l *logrus.Entry, cfg *config.Config, q *reform.Querier, // continue case models.QANPostgreSQLPgStatementsAgentType, models.QANPostgreSQLPgStatMonitorAgentType: continue - case models.RTAMongoDBAgentType: + case models.RTAMongoDBAgentType, models.RTAMySQLAgentType: continue case models.RDSExporterType: if skipExternalAgents && pointer.GetString(agent.RunsOnNodeID) == models.PMMServerNodeID { diff --git a/ui/apps/pmm/src/components/syntax-highlighter/SyntaxHighlighter.tsx b/ui/apps/pmm/src/components/syntax-highlighter/SyntaxHighlighter.tsx index f8ee01b9756..6d0f8fa0d98 100644 --- a/ui/apps/pmm/src/components/syntax-highlighter/SyntaxHighlighter.tsx +++ b/ui/apps/pmm/src/components/syntax-highlighter/SyntaxHighlighter.tsx @@ -12,10 +12,13 @@ import { getSyntaxHighlighterStyle } from './SyntaxHighlighter.utils'; // @ts-ignore import mongodb from 'react-syntax-highlighter/dist/esm/languages/prism/mongodb'; import json from 'react-syntax-highlighter/dist/esm/languages/prism/json'; +// @ts-ignore +import sql from 'react-syntax-highlighter/dist/esm/languages/prism/sql'; import { SyntaxHighlighterProps } from './SyntaxHighlighter.types'; ReactSyntaxHighlighter.registerLanguage('mongodb', mongodb); ReactSyntaxHighlighter.registerLanguage('json', json); +ReactSyntaxHighlighter.registerLanguage('sql', sql); const SyntaxHighlighter: FC = ({ language, diff --git a/ui/apps/pmm/src/hooks/api/useRealtime.ts b/ui/apps/pmm/src/hooks/api/useRealtime.ts index 6e87afe2597..1b568ede618 100644 --- a/ui/apps/pmm/src/hooks/api/useRealtime.ts +++ b/ui/apps/pmm/src/hooks/api/useRealtime.ts @@ -117,13 +117,16 @@ export const useStopSessions = ( }; /** - * Hook to get MongoDB services that don't have running RTA agents + * Hook to get services (MongoDB, MySQL, ...) that don't have running RTA agents */ export const useAvailableServices = (serviceTypes?: ServiceType[]) => { const { user } = useUser(); const { data: sessions, isLoading: isLoadingSessions } = useRealtimeSessions(); - const { data: services = { mongodb: [] }, isLoading: isLoadingServices } = + const { + data: services = { mongodb: [], mysql: [] }, + isLoading: isLoadingServices, + } = useQuery({ queryKey: [KEYS.AVAILABLE_SERVICES], queryFn: () => getAvailableServices(serviceTypes), diff --git a/ui/apps/pmm/src/pages/rta/messages.ts b/ui/apps/pmm/src/pages/rta/messages.ts index 35cb3ef77db..7fd380a70c2 100644 --- a/ui/apps/pmm/src/pages/rta/messages.ts +++ b/ui/apps/pmm/src/pages/rta/messages.ts @@ -1,4 +1,4 @@ export const Messages = { disclaimer: - 'Currently available for MongoDB only connected through PMM Client 3.7.0 or newer. More databases coming soon.', + 'Currently available for MongoDB (PMM Client 3.7.0+) and MySQL (PMM Client 3.9.0+). More databases coming soon.', }; diff --git a/ui/apps/pmm/src/pages/rta/overview/RealtimeOverview.messages.ts b/ui/apps/pmm/src/pages/rta/overview/RealtimeOverview.messages.ts index 5736670fe9c..2cd7b66c16f 100644 --- a/ui/apps/pmm/src/pages/rta/overview/RealtimeOverview.messages.ts +++ b/ui/apps/pmm/src/pages/rta/overview/RealtimeOverview.messages.ts @@ -3,4 +3,7 @@ export const Messages = { pause: 'Pause', resume: 'Resume', refresh: 'Refresh', + hideCommit: 'Hide COMMIT', + hideCommitTooltip: + 'Hide transaction-control statements (COMMIT, ROLLBACK, BEGIN, START TRANSACTION) from the list.', }; diff --git a/ui/apps/pmm/src/pages/rta/overview/RealtimeOverview.tsx b/ui/apps/pmm/src/pages/rta/overview/RealtimeOverview.tsx index 38c8329f91f..6a48fec452d 100644 --- a/ui/apps/pmm/src/pages/rta/overview/RealtimeOverview.tsx +++ b/ui/apps/pmm/src/pages/rta/overview/RealtimeOverview.tsx @@ -1,4 +1,4 @@ -import { FC, useRef, useState } from 'react'; +import { FC, useMemo, useRef, useState } from 'react'; import { Navigate, Link as RouterLink, @@ -7,6 +7,7 @@ import { import { RealtimePage } from '../components/rta-page'; import { useRealtimeQueries, useRealtimeSessions } from 'hooks/api/useRealtime'; import OverviewTable from './table/OverviewTable'; +import { isTransactionControl } from './table/OverviewTable.utils'; import { DetailsPane } from './details-pane'; import { QueryData } from 'types/rta.types'; import { Icon } from 'components/icon'; @@ -14,6 +15,9 @@ import { Messages } from './RealtimeOverview.messages'; import { createRealtimeSessionsUrl } from 'utils/link.utils'; import Stack from '@mui/material/Stack'; import Button from '@mui/material/Button'; +import FormControlLabel from '@mui/material/FormControlLabel'; +import Switch from '@mui/material/Switch'; +import Tooltip from '@mui/material/Tooltip'; import { ServicesAutocompleteInput } from '../components/services-autocomplete-input'; import { AutoRefreshSelect } from './auto-refresh-select'; @@ -31,7 +35,13 @@ const RealtimeOverviewPage: FC = () => { refetchInterval: refreshInterval, } ); - const tableQueries = queries ?? EMPTY_QUERIES; + const [hideCommit, setHideCommit] = useState(false); + const tableQueries = useMemo(() => { + const allQueries = queries ?? EMPTY_QUERIES; + return hideCommit + ? allQueries.filter((query) => !isTransactionControl(query)) + : allQueries; + }, [queries, hideCommit]); // Synced from the table after filters; details-pane arrows use this list, not the full API result. const [navigableQueries, setNavigableQueries] = useState([]); const [selectedQuery, setSelectedQuery] = useState(); @@ -126,6 +136,20 @@ const RealtimeOverviewPage: FC = () => { refreshInterval={refreshInterval} onRefreshIntervalChange={setRefreshInterval} /> + + setHideCommit(event.target.checked)} + /> + } + label={Messages.hideCommit} + sx={{ whiteSpace: 'nowrap', mr: 0 }} + /> +