diff --git a/admin/cmd/bootstrap.go b/admin/cmd/bootstrap.go index 592c6c61ea3..1e620b79462 100644 --- a/admin/cmd/bootstrap.go +++ b/admin/cmd/bootstrap.go @@ -143,6 +143,7 @@ func getDefaultKongOptions(appName string) []kong.Option { mongoDBQuerySources := []string{ management.MongodbQuerySourceProfiler, + management.MongodbQuerySourceMongolog, management.MongodbQuerySourceNone, } @@ -159,13 +160,13 @@ func getDefaultKongOptions(appName string) []kong.Option { "nodeIp": nodeinfo.PublicAddress, "nodeTypeDefault": nodeTypeDefault, "hostname": hostname, - "serviceTypesEnum": strings.Join(management.AllServiceTypesKeys, ","), + "serviceTypesEnum": strings.Join(management.AllServiceTypesKeys, ", "), "defaultMachineID": defaultMachineID, "distro": nodeinfo.Distro, - "metricsModesEnum": strings.Join(management.MetricsModes, ","), - "mysqlQuerySourcesEnum": strings.Join(mysqlQuerySources, ","), + "metricsModesEnum": strings.Join(management.MetricsModes, ", "), + "mysqlQuerySourcesEnum": strings.Join(mysqlQuerySources, ", "), "mysqlQuerySourceDefault": mysqlQuerySources[0], - "mongoDbQuerySourcesEnum": strings.Join(mongoDBQuerySources, ","), + "mongoDbQuerySourcesEnum": strings.Join(mongoDBQuerySources, ", "), "mongoDbQuerySourceDefault": mongoDBQuerySources[0], "externalDefaultServiceName": management.DefaultServiceNameSuffix, "externalDefaultGroupExporter": management.DefaultGroupExternalExporter, diff --git a/admin/commands/inventory/add_agent_qan_mongodb_mongolog_agent.go b/admin/commands/inventory/add_agent_qan_mongodb_mongolog_agent.go new file mode 100644 index 00000000000..b5ad345686e --- /dev/null +++ b/admin/commands/inventory/add_agent_qan_mongodb_mongolog_agent.go @@ -0,0 +1,110 @@ +// Copyright (C) 2023 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 ( + "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 addAgentQANMongoDBMongologAgentResultT = commands.ParseTemplate(` +QAN MongoDB Mongolog 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 }} + +Status : {{ .Agent.Status }} +Disabled : {{ .Agent.Disabled }} +Custom labels : {{ .Agent.CustomLabels }} +`) + +type addAgentQANMongoDBMongologAgentResult struct { + Agent *agents.AddAgentOKBodyQANMongodbMongologAgent `json:"qan_mongodb_mongolog_agent"` +} + +func (res *addAgentQANMongoDBMongologAgentResult) Result() {} + +func (res *addAgentQANMongoDBMongologAgentResult) String() string { + return commands.RenderTemplate(addAgentQANMongoDBMongologAgentResultT, res) +} + +// AddAgentQANMongoDBMongologAgentCommand is used by Kong for CLI flags and commands. +type AddAgentQANMongoDBMongologAgentCommand struct { + PMMAgentID string `arg:"" help:"The pmm-agent identifier which runs this instance"` + ServiceID string `arg:"" help:"Service identifier"` + Username string `arg:"" optional:"" help:"MongoDB username for scraping metrics"` + Password string `help:"MongoDB password for scraping metrics"` + CustomLabels map[string]string `mapsep:"," help:"Custom user-assigned labels"` + SkipConnectionCheck bool `help:"Skip connection check"` + MaxQueryLength int32 `placeholder:"NUMBER" help:"Limit query length in QAN (default: server-defined; -1: no limit)"` + DisableQueryExamples bool `name:"disable-queryexamples" help:"Disable collection of query examples"` + TLS bool `help:"Use TLS to connect to the database"` + TLSSkipVerify bool `help:"Skip TLS certificates validation"` + TLSCertificateKeyFile string `help:"Path to TLS certificate PEM file"` + TLSCertificateKeyFilePassword string `help:"Password for certificate"` + TLSCaFile string `help:"Path to certificate authority file"` + AuthenticationMechanism string `help:"Authentication mechanism. Default is empty. Use MONGODB-X509 for ssl certificates"` + + flags.LogLevelFatalFlags +} + +// RunCmd executes the AddAgentQANMongoDBMongologAgentCommand and returns the result. +func (cmd *AddAgentQANMongoDBMongologAgentCommand) RunCmd() (commands.Result, error) { + customLabels := commands.ParseCustomLabels(cmd.CustomLabels) + + tlsCertificateKey, err := commands.ReadFile(cmd.TLSCertificateKeyFile) + if err != nil { + return nil, err + } + tlsCa, err := commands.ReadFile(cmd.TLSCaFile) + if err != nil { + return nil, err + } + + params := &agents.AddAgentParams{ + Body: agents.AddAgentBody{ + QANMongodbMongologAgent: &agents.AddAgentParamsBodyQANMongodbMongologAgent{ + PMMAgentID: cmd.PMMAgentID, + ServiceID: cmd.ServiceID, + Username: cmd.Username, + Password: cmd.Password, + CustomLabels: customLabels, + SkipConnectionCheck: cmd.SkipConnectionCheck, + MaxQueryLength: cmd.MaxQueryLength, + TLS: cmd.TLS, + TLSSkipVerify: cmd.TLSSkipVerify, + TLSCertificateKey: tlsCertificateKey, + TLSCertificateKeyFilePassword: cmd.TLSCertificateKeyFilePassword, + TLSCa: tlsCa, + AuthenticationMechanism: cmd.AuthenticationMechanism, + LogLevel: cmd.LogLevelFatalFlags.LogLevel.EnumValue(), + }, + }, + Context: commands.Ctx, + } + + resp, err := client.Default.AgentsService.AddAgent(params) + if err != nil { + return nil, err + } + return &addAgentQANMongoDBMongologAgentResult{ + Agent: resp.Payload.QANMongodbMongologAgent, + }, nil +} diff --git a/admin/commands/inventory/inventory.go b/admin/commands/inventory/inventory.go index 0870bbb8baf..d506ad5894c 100644 --- a/admin/commands/inventory/inventory.go +++ b/admin/commands/inventory/inventory.go @@ -55,6 +55,7 @@ type AddAgentCommand struct { ProxysqlExporter AddAgentProxysqlExporterCommand `cmd:"" help:"Add proxysql_exporter to inventory"` QANMongoDBProfilerAgent AddAgentQANMongoDBProfilerAgentCommand `cmd:"" name:"qan-mongodb-profiler-agent" help:"Add QAN MongoDB profiler agent to inventory"` + QANMongoDBMongologAgent AddAgentQANMongoDBMongologAgentCommand `cmd:"" name:"qan-mongodb-mongolog-agent" help:"Add QAN MongoDB mongolog agent to inventory"` QANMySQLPerfSchemaAgent AddAgentQANMySQLPerfSchemaAgentCommand `cmd:"" name:"qan-mysql-perfschema-agent" help:"Add QAN MySQL perf schema agent to inventory"` QANMySQLSlowlogAgent AddAgentQANMySQLSlowlogAgentCommand `cmd:"" name:"qan-mysql-slowlog-agent" help:"Add QAN MySQL slowlog agent to inventory"` QANPostgreSQLPgStatementsAgent AddAgentQANPostgreSQLPgStatementsAgentCommand `cmd:"" name:"qan-postgresql-pgstatements-agent" help:"Add QAN PostgreSQL Stat Statements Agent to inventory"` diff --git a/admin/commands/inventory/list_agents.go b/admin/commands/inventory/list_agents.go index dca5ef59506..329ab62c3b2 100644 --- a/admin/commands/inventory/list_agents.go +++ b/admin/commands/inventory/list_agents.go @@ -47,6 +47,7 @@ var acceptableAgentTypes = map[string][]string{ types.AgentTypeQANMySQLPerfSchemaAgent: {types.AgentTypeName(types.AgentTypeQANMySQLPerfSchemaAgent), "qan-mysql-perfschema-agent"}, types.AgentTypeQANMySQLSlowlogAgent: {types.AgentTypeName(types.AgentTypeQANMySQLSlowlogAgent), "qan-mysql-slowlog-agent"}, types.AgentTypeQANMongoDBProfilerAgent: {types.AgentTypeName(types.AgentTypeQANMongoDBProfilerAgent), "qan-mongodb-profiler-agent"}, + types.AgentTypeQANMongoDBMongologAgent: {types.AgentTypeName(types.AgentTypeQANMongoDBMongologAgent), "qan-mongodb-mongolog-agent"}, types.AgentTypeQANPostgreSQLPgStatementsAgent: {types.AgentTypeName(types.AgentTypeQANPostgreSQLPgStatementsAgent), "qan-postgresql-pgstatements-agent"}, types.AgentTypeQANPostgreSQLPgStatMonitorAgent: {types.AgentTypeName(types.AgentTypeQANPostgreSQLPgStatMonitorAgent), "qan-postgresql-pgstatmonitor-agent"}, types.AgentTypeRDSExporter: {types.AgentTypeName(types.AgentTypeRDSExporter), "rds-exporter"}, diff --git a/admin/commands/list.go b/admin/commands/list.go index 16f4b8e0540..5fa3f709908 100644 --- a/admin/commands/list.go +++ b/admin/commands/list.go @@ -286,6 +286,7 @@ func agentsList(agentsRes *agents.ListAgentsOK, nodeID string) []listResultAgent agentsList = append(agentsList, qanMysqlPerfschemaAgents(agentsRes, pmmAgentIDs)...) agentsList = append(agentsList, qanMysqlSlowlogAgents(agentsRes, pmmAgentIDs)...) agentsList = append(agentsList, qanMongodbProfilerAgents(agentsRes, pmmAgentIDs)...) + agentsList = append(agentsList, qanMongodbMongologAgents(agentsRes, pmmAgentIDs)...) agentsList = append(agentsList, qanPostgresqlPgstatementsAgents(agentsRes, pmmAgentIDs)...) agentsList = append(agentsList, qanPostgresqlPgstatmonitorAgents(agentsRes, pmmAgentIDs)...) agentsList = append(agentsList, externalExporters(agentsRes, nodeID)...) @@ -434,6 +435,22 @@ func qanMongodbProfilerAgents(agentsRes *agents.ListAgentsOK, pmmAgentIDs map[st return agentsList } +func qanMongodbMongologAgents(agentsRes *agents.ListAgentsOK, pmmAgentIDs map[string]struct{}) []listResultAgent { + var agentsList []listResultAgent + for _, a := range agentsRes.Payload.QANMongodbMongologAgent { + if _, ok := pmmAgentIDs[a.PMMAgentID]; ok { + agentsList = append(agentsList, listResultAgent{ + AgentType: types.AgentTypeQANMongoDBMongologAgent, + AgentID: a.AgentID, + ServiceID: a.ServiceID, + Status: getStatus(a.Status), + Disabled: a.Disabled, + }) + } + } + return agentsList +} + func qanPostgresqlPgstatementsAgents(agentsRes *agents.ListAgentsOK, pmmAgentIDs map[string]struct{}) []listResultAgent { var agentsList []listResultAgent for _, a := range agentsRes.Payload.QANPostgresqlPgstatementsAgent { diff --git a/admin/commands/list_test.go b/admin/commands/list_test.go index b1e55aa05dd..932e52bc9b1 100644 --- a/admin/commands/list_test.go +++ b/admin/commands/list_test.go @@ -714,6 +714,32 @@ func TestQanMongodbProfilerAgents(t *testing.T) { assert.Equal(t, types.AgentTypeQANMongoDBProfilerAgent, result[0].AgentType) } +func TestQanMongodbMongologAgents(t *testing.T) { + t.Parallel() + + pmmAgentIDs := map[string]struct{}{ + "pmm-agent-1": {}, + } + + agentsRes := &agents_service.ListAgentsOK{ + Payload: &agents_service.ListAgentsOKBody{ + QANMongodbMongologAgent: []*agents_service.ListAgentsOKBodyQANMongodbMongologAgentItems0{ + { + AgentID: "qan-mongodb-monoglog-1", + PMMAgentID: "pmm-agent-1", + ServiceID: "mongodb-service-1", + Status: pointer.ToString("AGENT_STATUS_RUNNING"), + }, + }, + }, + } + + result := qanMongodbMongologAgents(agentsRes, pmmAgentIDs) + + assert.Len(t, result, 1) + assert.Equal(t, types.AgentTypeQANMongoDBMongologAgent, result[0].AgentType) +} + func TestQanPostgresqlPgstatementsAgents(t *testing.T) { t.Parallel() diff --git a/admin/commands/management/add_mongodb.go b/admin/commands/management/add_mongodb.go index f33c2080047..260bc4f6ac7 100644 --- a/admin/commands/management/add_mongodb.go +++ b/admin/commands/management/add_mongodb.go @@ -27,6 +27,8 @@ import ( const ( // MongodbQuerySourceProfiler defines available source name for profiler. MongodbQuerySourceProfiler = "profiler" + // MongodbQuerySourceMongolog defines available source name for profiler. + MongodbQuerySourceMongolog = "mongolog" // MongodbQuerySourceNone defines available source name for profiler. MongodbQuerySourceNone = "none" ) @@ -175,6 +177,7 @@ func (cmd *AddMongoDBCommand) RunCmd() (commands.Result, error) { AgentPassword: cmd.AgentPassword, QANMongodbProfiler: cmd.QuerySource == MongodbQuerySourceProfiler, + QANMongodbMongolog: cmd.QuerySource == MongodbQuerySourceMongolog, CustomLabels: customLabels, SkipConnectionCheck: cmd.SkipConnectionCheck, diff --git a/agent/Makefile b/agent/Makefile index a1d1655b1bc..1079ed03511 100644 --- a/agent/Makefile +++ b/agent/Makefile @@ -105,9 +105,12 @@ _run: ENV_UP_FLAGS ?= --force-recreate --renew-anon-volumes --remove-orphans env-up: ## Start development environment - # to make slowlog rotation tests work rm -fr testdata + # to make slowlog rotation tests work mkdir -p testdata/mysql/slowlogs + # to make mongolog tests work + mkdir -p testdata/mongo/var/log/mongodb + touch testdata/mongo/var/log/mongodb/mongo.log testdata/mongo/var/log/mongodb/mongo_tls.log chmod -R 0777 testdata docker compose up $(ENV_UP_FLAGS) diff --git a/agent/agents/mongodb/mongolog/internal/mongolog.go b/agent/agents/mongodb/mongolog/internal/mongolog.go new file mode 100644 index 00000000000..66426d20eef --- /dev/null +++ b/agent/agents/mongodb/mongolog/internal/mongolog.go @@ -0,0 +1,267 @@ +// Copyright (C) 2023 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 mongolog runs built-in QAN Agent for MongoDB Mongolog. +package mongolog + +import ( + "context" + "errors" + "fmt" + "path" + "runtime/pprof" + "sync" + "time" + + "github.com/percona/percona-toolkit/src/go/mongolib/proto" + "github.com/sirupsen/logrus" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/readpref" + "gopkg.in/mgo.v2/bson" + + "github.com/percona/pmm/agent/agents/mongodb/shared/aggregator" + "github.com/percona/pmm/agent/agents/mongodb/shared/sender" + "github.com/percona/pmm/agent/utils/filereader" + "github.com/percona/pmm/agent/utils/mongo_fix" +) + +const ( + mgoTimeoutDialInfo = 5 * time.Second + mgoTimeoutSessionSocket = 5 * time.Second + collectorChanCapacity = 100 +) + +// New creates new mongolog. +func New(mongoDSN string, logger *logrus.Entry, w sender.Writer, agentID string, logFilePrefix string, maxQueryLength int32) *Mongolog { + return &Mongolog{ + mongoDSN: mongoDSN, + logFilePrefix: logFilePrefix, + maxQueryLength: maxQueryLength, + logger: logger, + w: w, + agentID: agentID, + } +} + +// Mongolog represents mongolog agent helpers and properties. +type Mongolog struct { + // dependencies + mongoDSN string + w sender.Writer + logger *logrus.Entry + agentID string + + // internal deps + monitor *Monitor + aggregator *aggregator.Aggregator + sender *sender.Sender + + // state + m sync.Mutex // Lock() to protect internal consistency of the service + running bool // Is this service running? + doneChan chan struct{} // close(doneChan) to notify goroutines that they should shutdown + wg *sync.WaitGroup // Wait() for goroutines to stop after being notified they should shutdown + + // others + logFilePrefix string + maxQueryLength int32 +} + +// Start starts analyzer but doesn't wait until it exits. +func (l *Mongolog) Start(ctx context.Context) error { + l.m.Lock() + defer l.m.Unlock() + if l.running { + return nil + } + + // create new session + client, err := createSession(ctx, l.mongoDSN, l.agentID) + if err != nil { + return err + } + logsPath, err := getLogFilePath(ctx, client) + if err != nil { + return err + } + err = client.Disconnect(ctx) + if err != nil { + l.logger.Warningln(err) + } + + // create aggregator which collects documents and aggregates them into qan report + l.aggregator = aggregator.New(time.Now(), l.agentID, l.logger, l.maxQueryLength) + reportChan := l.aggregator.Start() //nolint:contextcheck // PMM-13947 + + // create sender which sends qan reports and start it + l.sender = sender.New(reportChan, l.w, l.logger) + err = l.sender.Start() //nolint:contextcheck // PMM-13947 + if err != nil { + return err + } + + // create new channel over which + // we will tell goroutine it should close + l.doneChan = make(chan struct{}) + + // start a goroutine and Add() it to WaitGroup + // so we could later Wait() for it to finish + l.wg = &sync.WaitGroup{} + l.wg.Add(2) + + // create ready sync.Cond so we could know when goroutine actually started getting data from db + ready := sync.NewCond(&sync.Mutex{}) + ready.L.Lock() + defer ready.L.Unlock() + + logsPathWithPrefix := path.Join(l.logFilePrefix, logsPath) + reader, err := filereader.NewContinuousFileReader(logsPathWithPrefix, l.logger) + if err != nil { + return err + } + // create monitors service which we use to periodically scan server for new/removed databases + l.monitor = NewMonitor(logsPathWithPrefix, reader, l.logger) + + labels := pprof.Labels("component", "mongodb.mongolog") + go pprof.Do(ctx, labels, func(ctx context.Context) { + start(ctx, l.monitor, l.aggregator, l.wg, l.doneChan, ready, l.logger) + }) + + // wait until we actually fetch data from db + ready.Wait() + + l.running = true + return nil +} + +// Stop stops running mongolog, waits until it stops. +func (l *Mongolog) Stop() error { + l.m.Lock() + defer l.m.Unlock() + if !l.running { + return nil + } + + // notify goroutine to close + close(l.doneChan) + l.monitor.Stop() + + // wait for goroutine to exit + l.wg.Wait() + + // set state to "not running" + l.running = false + return nil +} + +func start(ctx context.Context, monitor *Monitor, aggregator *aggregator.Aggregator, wg *sync.WaitGroup, + doneChan <-chan struct{}, ready *sync.Cond, logger *logrus.Entry, +) { + // signal WaitGroup when goroutine finished + defer wg.Done() + defer monitor.Stop() + + docsChan := make(chan proto.SystemProfile, collectorChanCapacity) + defer close(docsChan) + + // monitor log file + monitor.Start(ctx, docsChan, doneChan, wg) + + // signal we started monitoring + signalReady(ready) + + for { + select { + case <-ctx.Done(): + return + case <-doneChan: + return + default: + } + + select { + case doc, ok := <-docsChan: + if !ok { + return + } + + logger.Debugf("added to aggregator %v", doc.Query) + err := aggregator.Add(ctx, doc) + if err != nil { + logger.Warnf("couldn't add document to aggregator: %s", err) + } + case <-ctx.Done(): + return + case <-doneChan: + return + } + } +} + +func signalReady(ready *sync.Cond) { + ready.L.Lock() + defer ready.L.Unlock() + ready.Broadcast() +} + +func createSession(ctx context.Context, dsn string, agentID string) (*mongo.Client, error) { + ctxWithTimeout, cancel := context.WithTimeout(ctx, mgoTimeoutDialInfo) + defer cancel() + + opts, err := mongo_fix.ClientOptionsForDSN(dsn) + if err != nil { + return nil, err + } + + opts = opts. + SetDirect(true). + SetReadPreference(readpref.Nearest()). + SetSocketTimeout(mgoTimeoutSessionSocket). + SetAppName(fmt.Sprintf("QAN-mongodb-mongolog-%s", agentID)) + + client, err := mongo.Connect(ctxWithTimeout, opts) + if err != nil { + return nil, err + } + + return client, nil +} + +func getLogFilePath(ctx context.Context, client *mongo.Client) (string, error) { + var result bson.M + err := client.Database("admin").RunCommand(ctx, bson.M{"getCmdLineOpts": 1}).Decode(&result) + if err != nil { + return "", fmt.Errorf("failed to run command getCmdLineOpts %w", err) + } + + if parsed, ok := result["parsed"].(bson.M); ok { + if systemLog, ok := parsed["systemLog"].(bson.M); ok { + if logPath, ok := systemLog["path"].(string); ok { + return logPath, nil + } + } + } + + if argv, ok := result["argv"].([]any); ok { + for i := 0; i < len(argv); i++ { + if arg, ok := argv[i].(string); ok && arg == "--logpath" && i+1 < len(argv) { + if value, ok := argv[i+1].(string); ok { + return value, nil + } + } + } + } + + return "", errors.New("no log path found, logs may go to stdout") +} diff --git a/agent/agents/mongodb/mongolog/internal/monitor.go b/agent/agents/mongodb/mongolog/internal/monitor.go new file mode 100644 index 00000000000..8d7b50a5c4b --- /dev/null +++ b/agent/agents/mongodb/mongolog/internal/monitor.go @@ -0,0 +1,223 @@ +// Copyright (C) 2023 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 mongolog + +import ( + "context" + "encoding/json" + "strings" + "sync" + "time" + + "github.com/percona/percona-toolkit/src/go/mongolib/proto" + "github.com/sirupsen/logrus" + "go.mongodb.org/mongo-driver/bson" + + "github.com/percona/pmm/agent/utils/filereader" +) + +const ( + slowQuery = "Slow query" + authQuery = "Successfully authenticated" + disconnectQuery = "Connection ended" +) + +// NewMonitor creates new monitor. +func NewMonitor(logPath string, reader *filereader.ContinuousFileReader, logger *logrus.Entry) *Monitor { + return &Monitor{ + logPath: logPath, + reader: reader, + logger: logger, + } +} + +// Monitor represents mongolog aggregator and helpers. +type Monitor struct { + // dependencies + logPath string + reader *filereader.ContinuousFileReader + logger *logrus.Entry + + // state + m sync.Mutex + running bool +} + +// Start starts monitor to collect and parse data. +func (m *Monitor) Start(ctx context.Context, docsChan chan proto.SystemProfile, doneChan <-chan struct{}, wg *sync.WaitGroup) { + m.m.Lock() + defer m.m.Unlock() + + if m.running { + return + } + + go func() { + readFile(ctx, m.reader, docsChan, doneChan, wg, m.logger) + m.logger.Debugln("done reading the log file") + + m.m.Lock() + defer m.m.Unlock() + m.running = false + }() + + m.running = true +} + +// row is a helper structure to unmarshall Monglog row to system.Profile metrics. +type row struct { + T struct { + Date time.Time `json:"$date"` + } `json:"t"` + Msg string `json:"msg"` + Attr json.RawMessage +} + +type systemProfile struct { + proto.SystemProfile + Command bson.M `json:"command"` + Type string `json:"type"` + Remote string `json:"remote"` +} + +type auth struct { + // Connect + Client string `json:"client"` + User string `json:"user"` + // Disconnect + Remote string `json:"remote"` +} + +// readFile continuously read new lines from file, until it is canceled or considered as done. +func readFile(ctx context.Context, reader *filereader.ContinuousFileReader, docsChan chan proto.SystemProfile, + doneChan <-chan struct{}, wg *sync.WaitGroup, logger *logrus.Entry, +) { + defer wg.Done() + logger.Debugln("reader started") + + connections := make(map[string]string) + for { + select { + case <-ctx.Done(): + logger.Debugln("context done") + return + case <-doneChan: + logger.Debugln("reader done") + return + default: + logger.Debugln("reading a line") + line, err := reader.NextLine() + if err != nil { + logger.Error(err) + return + } + logger.Debugf("read line: %s", line) + + var l row + if line == "" || !json.Valid([]byte(line)) { + continue + } + err = json.Unmarshal([]byte(line), &l) //nolint:musttag + if err != nil { + logger.Error(err) + continue + } + + switch l.Msg { + case slowQuery: + sendQuery(l, logger, docsChan, connections) + case authQuery: + // There are two types of message: + // Connection accepted: logged on connection open, with IP and port in the "remote" field. + // Successfully authenticated: logged on successful login, with IP and port in the "client" field. + // We are adding connection to pool only after user is successfully authenticated. + if connection, ok := getConnection(l.Attr, logger); ok { + connections[connection.Client] = connection.User + } + logger.Debugf("connections: %+v", connections) + case disconnectQuery: + if connection, ok := getConnection(l.Attr, logger); ok { + delete(connections, connection.Remote) + } + logger.Debugf("connections: %+v", connections) + } + } + } +} + +func getConnection(attr json.RawMessage, logger *logrus.Entry) (auth, bool) { + var connection auth + err := json.Unmarshal(attr, &connection) + if err != nil { + logger.Debugln("not valid system.profile structure") + return connection, false + } + + return connection, true +} + +func sendQuery(l row, logger *logrus.Entry, docsChan chan proto.SystemProfile, connections map[string]string) { + var stats systemProfile + err := json.Unmarshal(l.Attr, &stats) + if err != nil { + logger.Debugln("not valid system.profile structure") + return + } + + if strings.Contains(stats.Ns, ".$cmd") { + logger.Debugln("skipping line with Ns .$cmd") + return + } + + if stats.Type != "" { + stats.Op = stats.Type + } + + doc := stats.SystemProfile + if user, ok := connections[stats.Remote]; ok { + doc.User = user + } + doc.Client = strings.Split(stats.Remote, ":")[0] + doc.Ts = l.T.Date + + var command bson.D + for key, value := range stats.Command { + if key == "$clusterTime" || key == "lsid" { + continue + } + + command = append(command, bson.E{Key: key, Value: value}) + } + + doc.Command = command + docsChan <- doc +} + +// Stop stops monitor. +func (m *Monitor) Stop() { + m.m.Lock() + defer m.m.Unlock() + + if !m.running { + return + } + + err := m.reader.Close() + if err != nil { + m.logger.Error(err) + } + + m.running = false +} diff --git a/agent/agents/mongodb/mongolog/internal/monitor_test.go b/agent/agents/mongodb/mongolog/internal/monitor_test.go new file mode 100644 index 00000000000..f1ab0bf470c --- /dev/null +++ b/agent/agents/mongodb/mongolog/internal/monitor_test.go @@ -0,0 +1,317 @@ +// Copyright (C) 2023 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 mongolog + +import ( + "bufio" + "context" + "crypto/rand" + "crypto/sha256" + "encoding/hex" + "encoding/json" + "fmt" + "os" + "path/filepath" + "sort" + "strings" + "sync" + "testing" + "time" + + "github.com/percona/percona-toolkit/src/go/mongolib/proto" + "github.com/sirupsen/logrus" + "github.com/stretchr/testify/require" + "go.mongodb.org/mongo-driver/bson" + + "github.com/percona/pmm/agent/utils/filereader" +) + +const ( + delay = 5 * time.Millisecond + timeout = 30 * time.Second + timeToCollect = 10 * time.Second +) + +func TestCollector(t *testing.T) { + t.Parallel() + + logrus.SetLevel(logrus.TraceLevel) + t.Cleanup(func() { + logrus.SetLevel(logrus.InfoLevel) + }) + + tests, err := testFileNames(t) + require.NoError(t, err) + for _, test := range tests { + t.Run(test, func(t *testing.T) { + t.Parallel() + ctx, cancel := context.WithTimeout(t.Context(), timeout) + t.Cleanup(cancel) + + hash, err := generateRandomHash(t) + require.NoError(t, err) + destination := fmt.Sprintf("./testdata/mongo_%s.log", hash) + + l := logrus.WithField("test", t.Name()) + + file, err := os.Create(destination) //nolint:gosec + require.NoError(t, err) + file.Close() //nolint:errcheck + t.Cleanup(func() { + os.Remove(destination) //nolint:errcheck + }) + + reader, err := filereader.NewContinuousFileReader(destination, l) + require.NoError(t, err) + + monitor := NewMonitor(destination, reader, l) + + docsChan := make(chan proto.SystemProfile, collectorChanCapacity) + t.Cleanup(func() { + close(docsChan) + }) + + doneChan := make(chan struct{}) + t.Cleanup(func() { + close(doneChan) + }) + + errChan := make(chan error, 1) + go readSourceWriteDestination(ctx, t, errChan, fmt.Sprintf("./testdata/logs/%s.log", test), destination, delay) + + var wg sync.WaitGroup + wg.Add(2) + monitor.Start(ctx, docsChan, doneChan, &wg) + + var data []proto.SystemProfile + go func() { + defer wg.Done() + for { + select { + case <-ctx.Done(): + return + case <-doneChan: + return + case row, ok := <-docsChan: + if !ok { + return + } + data = append(data, row) + } + } + }() + + err = <-errChan + require.NoError(t, err) + + // All data are written right now, lets wait + // several more seconds to ensure all data are collected. + <-time.After(timeToCollect) + doneChan <- struct{}{} + monitor.Stop() + wg.Wait() + + expectedFile := fmt.Sprintf("./testdata/expected/%s", test) + if os.Getenv("REFRESH_TEST_DATA") != "" { + writeData(t, data, expectedFile) + return + } + + expectedData, err := readData(t, expectedFile) + require.NoError(t, err) + + require.Equal(t, reorderData(t, expectedData), reorderData(t, data)) + }) + } +} + +func generateRandomHash(t *testing.T) (string, error) { + t.Helper() + + randomBytes := make([]byte, 32) + _, err := rand.Read(randomBytes) + if err != nil { + return "", err + } + + hash := sha256.Sum256(randomBytes) + return hex.EncodeToString(hash[:]), nil +} + +func testFileNames(t *testing.T) ([]string, error) { + t.Helper() + + files, err := os.ReadDir("./testdata/logs") + if err != nil { + return nil, err + } + + var names []string //nolint:prealloc + for _, file := range files { + if file.IsDir() { + continue + } + + name := file.Name() + ext := filepath.Ext(name) + names = append(names, strings.TrimSuffix(name, ext)) + } + + return names, nil +} + +func reorderData(t *testing.T, data []proto.SystemProfile) []proto.SystemProfile { + t.Helper() + + var res []proto.SystemProfile //nolint:prealloc + for _, d := range data { + d.Ts = d.Ts.UTC() + + // all bson.D needs to be reordered + d.Command = reorderBSOND(t, d.Command) + d.OriginatingCommand = reorderBSOND(t, d.OriginatingCommand) + d.UpdateObj = reorderBSOND(t, d.UpdateObj) + + res = append(res, d) + } + + return res +} + +func reorderBSOND(t *testing.T, data bson.D) bson.D { + t.Helper() + + var res []bson.E //nolint:prealloc + for _, d := range data { + res = append(res, d) + } + + sort.SliceStable(res, func(i, j int) bool { + return res[i].Key < res[j].Key + }) + + return res +} + +func dataToJSON(t *testing.T, data []proto.SystemProfile) ([]byte, error) { + t.Helper() + + jsonData, err := json.MarshalIndent(data, "", " ") + if err != nil { + return nil, err + } + + return jsonData, nil +} + +func writeData(t *testing.T, data []proto.SystemProfile, name string) error { + t.Helper() + + file, err := os.Create(fmt.Sprintf("%s.json", name)) + if err != nil { + return err + } + defer file.Close() //nolint:errcheck + + jsonData, err := dataToJSON(t, data) + if err != nil { + return err + } + _, err = file.Write(jsonData) + if err != nil { + return err + } + + return nil +} + +func readData(t *testing.T, name string) ([]proto.SystemProfile, error) { + t.Helper() + + file, err := os.Open(fmt.Sprintf("%s.json", name)) + if err != nil { + return nil, err + } + defer file.Close() //nolint:errcheck + + var data []proto.SystemProfile + err = json.NewDecoder(file).Decode(&data) + if err != nil { + return nil, err + } + + return data, nil +} + +func readSourceWriteDestination(ctx context.Context, t *testing.T, errChan chan error, source, destination string, delay time.Duration) { + t.Helper() + + srcFile, err := os.Open(source) //nolint:gosec + if err != nil { + errChan <- err + return + } + scanner := bufio.NewScanner(srcFile) + var lines []string + for scanner.Scan() { + select { + case <-ctx.Done(): + errChan <- ctx.Err() + return + default: + } + lines = append(lines, scanner.Text()) + } + if err := scanner.Err(); err != nil { + errChan <- err + return + } + srcFile.Close() //nolint:errcheck + + dstFile, err := os.Create(destination) //nolint:gosec + if err != nil { + errChan <- err + return + } + defer dstFile.Close() //nolint:errcheck + + writer := bufio.NewWriter(dstFile) + for _, line := range lines { + select { + case <-ctx.Done(): + errChan <- ctx.Err() + return + default: + } + _, err := writer.WriteString(line + "\n") + if err != nil { + errChan <- err + return + } + err = writer.Flush() + if err != nil { + errChan <- err + return + } + time.Sleep(delay) + } + + if err := scanner.Err(); err != nil { + errChan <- err + return + } + + errChan <- nil +} diff --git a/agent/agents/mongodb/mongolog/internal/testdata/expected/many_slow_queries.json b/agent/agents/mongodb/mongolog/internal/testdata/expected/many_slow_queries.json new file mode 100644 index 00000000000..f15b2b339fa --- /dev/null +++ b/agent/agents/mongodb/mongolog/internal/testdata/expected/many_slow_queries.json @@ -0,0 +1,2809 @@ +[ + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 1 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 1, + "w": 3 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 10, + "nreturned": 0, + "ns": "test.users", + "numYield": 0, + "op": "command", + "planSummary": "", + "protocol": "op_msg", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "$db", + "Value": "test" + }, + { + "Key": "insert", + "Value": "users" + }, + { + "Key": "documents", + "Value": [ + { + "_id": { + "$oid": "681360d523567705faa00aa1" + }, + "age": 30, + "name": "Alice" + } + ] + }, + { + "Key": "ordered", + "Value": true + } + ], + "originatingCommand": null, + "reslen": 45, + "ts": "2025-05-01T11:53:57.82Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 0, + "queryHash": "", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 0, + "w": 1 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 0, + "nreturned": 0, + "ns": "test.users", + "numYield": 0, + "op": "command", + "planSummary": "", + "protocol": "op_msg", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "insert", + "Value": "users" + }, + { + "Key": "documents", + "Value": 2 + }, + { + "Key": "ordered", + "Value": true + }, + { + "Key": "$db", + "Value": "test" + } + ], + "originatingCommand": null, + "reslen": 45, + "ts": "2025-05-01T11:53:57.876Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 0, + "queryHash": "", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 1 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 1, + "w": 1 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 72, + "nreturned": 0, + "ns": "test.logs", + "numYield": 0, + "op": "command", + "planSummary": "", + "protocol": "op_msg", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "create", + "Value": "logs" + }, + { + "Key": "$db", + "Value": "test" + } + ], + "originatingCommand": null, + "reslen": 38, + "ts": "2025-05-01T11:54:00.064Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 0, + "queryHash": "", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": true, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 1, + "w": 0 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 8, + "nreturned": 1, + "ns": "test.users", + "numYield": 0, + "op": "command", + "planSummary": "COLLSCAN", + "protocol": "op_msg", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "find", + "Value": "users" + }, + { + "Key": "filter", + "Value": { + "age": { + "$gt": 25 + } + } + }, + { + "Key": "$db", + "Value": "test" + } + ], + "originatingCommand": null, + "reslen": 149, + "ts": "2025-05-01T11:54:06.871Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 3, + "queryHash": "4BB283C4", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": true, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 1, + "w": 0 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 2, + "nreturned": 1, + "ns": "test.users", + "numYield": 0, + "op": "command", + "planSummary": "COLLSCAN", + "protocol": "op_msg", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "$db", + "Value": "test" + }, + { + "Key": "find", + "Value": "users" + }, + { + "Key": "filter", + "Value": { + "name": { + "$regularExpression": { + "options": "", + "pattern": "A" + } + } + } + }, + { + "Key": "sort", + "Value": { + "age": -1 + } + }, + { + "Key": "limit", + "Value": 5 + } + ], + "originatingCommand": null, + "reslen": 149, + "ts": "2025-05-01T11:54:06.912Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 3, + "queryHash": "647CE906", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": true, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 1, + "w": 0 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 0, + "nreturned": 1, + "ns": "test.users", + "numYield": 0, + "op": "command", + "planSummary": "COLLSCAN", + "protocol": "op_msg", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "$db", + "Value": "test" + }, + { + "Key": "find", + "Value": "users" + }, + { + "Key": "filter", + "Value": { + "name": "Alice" + } + }, + { + "Key": "limit", + "Value": 1 + } + ], + "originatingCommand": null, + "reslen": 149, + "ts": "2025-05-01T11:54:07.541Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 1, + "queryHash": "01AEE5EC", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": true, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 2, + "w": 0 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 4, + "nreturned": 0, + "ns": "test.orders", + "numYield": 0, + "op": "command", + "planSummary": "EOF", + "protocol": "op_msg", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "aggregate", + "Value": "orders" + }, + { + "Key": "pipeline", + "Value": [ + { + "$match": { + "status": "delivered" + } + }, + { + "$group": { + "_id": "$customerId", + "total": { + "$sum": "$amount" + } + } + }, + { + "$sort": { + "total": -1 + } + } + ] + }, + { + "Key": "cursor", + "Value": {} + }, + { + "Key": "$db", + "Value": "test" + } + ], + "originatingCommand": null, + "reslen": 100, + "ts": "2025-05-01T11:54:13.628Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 0, + "queryHash": "", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 0, + "w": 1 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 2, + "nreturned": 0, + "ns": "test.users", + "numYield": 0, + "op": "update", + "planSummary": "COLLSCAN", + "protocol": "", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "q", + "Value": { + "name": "Alice" + } + }, + { + "Key": "u", + "Value": { + "$set": { + "age": 31 + } + } + }, + { + "Key": "multi", + "Value": false + }, + { + "Key": "upsert", + "Value": false + } + ], + "originatingCommand": null, + "reslen": 0, + "ts": "2025-05-01T11:54:20.55Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 1, + "queryHash": "01AEE5EC", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 0, + "w": 1 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 0, + "nreturned": 0, + "ns": "test.users", + "numYield": 0, + "op": "update", + "planSummary": "COLLSCAN", + "protocol": "", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "u", + "Value": { + "$inc": { + "visits": 1 + } + } + }, + { + "Key": "multi", + "Value": true + }, + { + "Key": "upsert", + "Value": false + }, + { + "Key": "q", + "Value": {} + } + ], + "originatingCommand": null, + "reslen": 0, + "ts": "2025-05-01T11:54:20.606Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 3, + "queryHash": "", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 0, + "w": 1 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 0, + "nreturned": 0, + "ns": "test.users", + "numYield": 0, + "op": "update", + "planSummary": "COLLSCAN", + "protocol": "", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "q", + "Value": { + "name": "Bob" + } + }, + { + "Key": "u", + "Value": { + "age": 28, + "name": "Bobby" + } + }, + { + "Key": "multi", + "Value": false + }, + { + "Key": "upsert", + "Value": false + } + ], + "originatingCommand": null, + "reslen": 0, + "ts": "2025-05-01T11:54:21.324Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 2, + "queryHash": "01AEE5EC", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 0, + "w": 1 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 2, + "nreturned": 0, + "ns": "test.users", + "numYield": 0, + "op": "remove", + "planSummary": "COLLSCAN", + "protocol": "", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "q", + "Value": { + "name": "Charlie" + } + }, + { + "Key": "limit", + "Value": 1 + } + ], + "originatingCommand": null, + "reslen": 0, + "ts": "2025-05-01T11:54:25.602Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 3, + "queryHash": "01AEE5EC", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 0, + "w": 1 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 0, + "nreturned": 0, + "ns": "test.users", + "numYield": 0, + "op": "remove", + "planSummary": "COLLSCAN", + "protocol": "", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "q", + "Value": { + "inactive": true + } + }, + { + "Key": "limit", + "Value": 0 + } + ], + "originatingCommand": null, + "reslen": 0, + "ts": "2025-05-01T11:54:26.239Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 2, + "queryHash": "11C8EF83", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 0, + "w": 1 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 0, + "nreturned": 0, + "ns": "test.users", + "numYield": 0, + "op": "command", + "planSummary": "", + "protocol": "op_msg", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "$db", + "Value": "test" + }, + { + "Key": "insert", + "Value": "users" + }, + { + "Key": "documents", + "Value": [ + { + "_id": { + "$oid": "681360f723567705faa00aa4" + }, + "name": "Dana" + } + ] + }, + { + "Key": "ordered", + "Value": true + } + ], + "originatingCommand": null, + "reslen": 45, + "ts": "2025-05-01T11:54:31.305Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 0, + "queryHash": "", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 0, + "w": 1 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 0, + "nreturned": 0, + "ns": "test.users", + "numYield": 0, + "op": "update", + "planSummary": "COLLSCAN", + "protocol": "", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "upsert", + "Value": false + }, + { + "Key": "q", + "Value": { + "name": "Alice" + } + }, + { + "Key": "u", + "Value": { + "$set": { + "age": 32 + } + } + }, + { + "Key": "multi", + "Value": false + } + ], + "originatingCommand": null, + "reslen": 0, + "ts": "2025-05-01T11:54:31.308Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 1, + "queryHash": "01AEE5EC", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 0, + "w": 1 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 0, + "nreturned": 0, + "ns": "test.users", + "numYield": 0, + "op": "remove", + "planSummary": "COLLSCAN", + "protocol": "", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "q", + "Value": { + "name": "Bob" + } + }, + { + "Key": "limit", + "Value": 1 + } + ], + "originatingCommand": null, + "reslen": 0, + "ts": "2025-05-01T11:54:31.309Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 3, + "queryHash": "01AEE5EC", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 1, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 0, + "w": 5 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 3, + "nreturned": 0, + "ns": "test.users", + "numYield": 0, + "op": "none", + "planSummary": "", + "protocol": "", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "$db", + "Value": "test" + }, + { + "Key": "createIndexes", + "Value": "users" + }, + { + "Key": "indexes", + "Value": [ + { + "key": { + "name": 1 + }, + "name": "name_1", + "v": 2 + } + ] + } + ], + "originatingCommand": null, + "reslen": 0, + "ts": "2025-05-01T11:54:36.751Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 0, + "queryHash": "", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 2 + } + }, + "Database": { + "acquireCount": { + "r": 2 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 2, + "w": 2 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 20, + "nreturned": 0, + "ns": "test.users", + "numYield": 0, + "op": "command", + "planSummary": "", + "protocol": "op_msg", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "createIndexes", + "Value": "users" + }, + { + "Key": "indexes", + "Value": [ + { + "key": { + "name": 1 + }, + "name": "name_1" + } + ] + }, + { + "Key": "$db", + "Value": "test" + } + ], + "originatingCommand": null, + "reslen": 114, + "ts": "2025-05-01T11:54:36.751Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 0, + "queryHash": "", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 0, + "w": 2 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 1, + "nreturned": 0, + "ns": "test.users", + "numYield": 0, + "op": "command", + "planSummary": "", + "protocol": "op_msg", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "index", + "Value": "name_1" + }, + { + "Key": "$db", + "Value": "test" + }, + { + "Key": "dropIndexes", + "Value": "users" + } + ], + "originatingCommand": null, + "reslen": 55, + "ts": "2025-05-01T11:54:37.321Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 0, + "queryHash": "", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 1 + } + }, + "Database": { + "acquireCount": { + "r": 1 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 1, + "w": 0 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 3, + "nreturned": 0, + "ns": "test.users", + "numYield": 0, + "op": "command", + "planSummary": "", + "protocol": "op_msg", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "$db", + "Value": "test" + }, + { + "Key": "collStats", + "Value": "users" + } + ], + "originatingCommand": null, + "reslen": 25365, + "ts": "2025-05-01T11:54:42.125Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 0, + "queryHash": "", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 0, + "w": 1 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 2, + "nreturned": 0, + "ns": "test.users", + "numYield": 0, + "op": "command", + "planSummary": "COLLSCAN", + "protocol": "op_msg", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "upsert", + "Value": false + }, + { + "Key": "update", + "Value": { + "$set": { + "city": "Paris" + } + } + }, + { + "Key": "$db", + "Value": "test" + }, + { + "Key": "findAndModify", + "Value": "users" + }, + { + "Key": "query", + "Value": { + "name": "Alice" + } + }, + { + "Key": "remove", + "Value": false + }, + { + "Key": "new", + "Value": false + } + ], + "originatingCommand": null, + "reslen": 151, + "ts": "2025-05-01T11:54:55.333Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 1, + "queryHash": "01AEE5EC", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 0, + "w": 1 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 0, + "nreturned": 0, + "ns": "test.users", + "numYield": 0, + "op": "command", + "planSummary": "COLLSCAN", + "protocol": "op_msg", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "$db", + "Value": "test" + }, + { + "Key": "findAndModify", + "Value": "users" + }, + { + "Key": "query", + "Value": { + "name": "Dana" + } + }, + { + "Key": "remove", + "Value": true + }, + { + "Key": "new", + "Value": false + }, + { + "Key": "upsert", + "Value": false + } + ], + "originatingCommand": null, + "reslen": 111, + "ts": "2025-05-01T11:54:55.878Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 3, + "queryHash": "01AEE5EC", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": true, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 1, + "w": 0 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 0, + "nreturned": 0, + "ns": "test.nonexistent", + "numYield": 0, + "op": "command", + "planSummary": "EOF", + "protocol": "op_msg", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "filter", + "Value": {} + }, + { + "Key": "$db", + "Value": "test" + }, + { + "Key": "find", + "Value": "nonexistent" + } + ], + "originatingCommand": null, + "reslen": 105, + "ts": "2025-05-01T11:55:01.403Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 0, + "queryHash": "", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 0, + "w": 1 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 0, + "nreturned": 0, + "ns": "test.users", + "numYield": 0, + "op": "command", + "planSummary": "", + "protocol": "op_msg", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "insert", + "Value": "users" + }, + { + "Key": "documents", + "Value": [ + { + "_id": 1 + } + ] + }, + { + "Key": "ordered", + "Value": true + }, + { + "Key": "$db", + "Value": "test" + } + ], + "originatingCommand": null, + "reslen": 45, + "ts": "2025-05-01T11:55:01.439Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 0, + "queryHash": "", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + }, + { + "allUsers": null, + "client": "127.0.0.1", + "cursorExhausted": false, + "execStats": { + "advanced": 0, + "executionTimeMillisEstimate": 0, + "inputStage": { + "advanced": 0, + "direction": "", + "docsExamined": 0, + "executionTimeMillisEstimate": 0, + "filter": { + "date": { + "$eq": "" + } + }, + "invalidates": 0, + "isEOF": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0 + }, + "invalidates": 0, + "isEOF": 0, + "limitAmount": 0, + "nReturned": 0, + "needTime": 0, + "needYield": 0, + "restoreState": 0, + "saveState": 0, + "stage": "", + "works": 0, + "docsExamined": 0 + }, + "keyUpdates": 0, + "keysExamined": 0, + "locks": { + "Collection": { + "acquireCount": { + "R": 0, + "r": 0 + } + }, + "Database": { + "acquireCount": { + "r": 0 + }, + "acquireWaitCount": { + "r": 0 + }, + "timeAcquiringMicros": { + "r": 0 + } + }, + "Global": { + "acquireCount": { + "r": 0, + "w": 1 + } + }, + "MMAPV1Journal": { + "acquireCount": { + "r": 0 + } + } + }, + "durationMillis": 5, + "nreturned": 0, + "ns": "test.users", + "numYield": 0, + "op": "command", + "planSummary": "", + "protocol": "op_msg", + "query": null, + "updateobj": null, + "command": [ + { + "Key": "insert", + "Value": "users" + }, + { + "Key": "documents", + "Value": [ + { + "_id": 1 + } + ] + }, + { + "Key": "ordered", + "Value": true + }, + { + "Key": "$db", + "Value": "test" + } + ], + "originatingCommand": null, + "reslen": 236, + "ts": "2025-05-01T11:55:02.08Z", + "user": "", + "writeConflicts": 0, + "docsExamined": 0, + "queryHash": "", + "storage": { + "data": { + "bytesRead": 0, + "timeReadingMicros": 0 + } + }, + "appName": "mongosh 2.3.8", + "comments": "" + } +] \ No newline at end of file diff --git a/agent/agents/mongodb/mongolog/internal/testdata/expected/no_slow_query.json b/agent/agents/mongodb/mongolog/internal/testdata/expected/no_slow_query.json new file mode 100644 index 00000000000..ec747fa47dd --- /dev/null +++ b/agent/agents/mongodb/mongolog/internal/testdata/expected/no_slow_query.json @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/agent/agents/mongodb/mongolog/internal/testdata/expected/slow_query_with_$cmd.json b/agent/agents/mongodb/mongolog/internal/testdata/expected/slow_query_with_$cmd.json new file mode 100644 index 00000000000..ec747fa47dd --- /dev/null +++ b/agent/agents/mongodb/mongolog/internal/testdata/expected/slow_query_with_$cmd.json @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/agent/agents/mongodb/mongolog/internal/testdata/logs/many_slow_queries.log b/agent/agents/mongodb/mongolog/internal/testdata/logs/many_slow_queries.log new file mode 100644 index 00000000000..46df6b65fb0 --- /dev/null +++ b/agent/agents/mongodb/mongolog/internal/testdata/logs/many_slow_queries.log @@ -0,0 +1,196 @@ +{"t":{"$date":"2025-05-01T11:53:14.855+00:00"},"s":"I", "c":"CONTROL", "id":23285, "ctx":"-","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"} +{"t":{"$date":"2025-05-01T11:53:14.857+00:00"},"s":"I", "c":"NETWORK", "id":4915701, "ctx":"-","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":13},"outgoing":{"minWireVersion":0,"maxWireVersion":13},"isInternalClient":true}}} +{"t":{"$date":"2025-05-01T11:53:14.866+00:00"},"s":"W", "c":"ASIO", "id":22601, "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"} +{"t":{"$date":"2025-05-01T11:53:14.868+00:00"},"s":"I", "c":"NETWORK", "id":4648601, "ctx":"main","msg":"Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize."} +{"t":{"$date":"2025-05-01T11:53:14.878+00:00"},"s":"W", "c":"ASIO", "id":22601, "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"} +{"t":{"$date":"2025-05-01T11:53:14.880+00:00"},"s":"I", "c":"REPL", "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","ns":"config.tenantMigrationDonors"}} +{"t":{"$date":"2025-05-01T11:53:14.880+00:00"},"s":"I", "c":"REPL", "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","ns":"config.tenantMigrationRecipients"}} +{"t":{"$date":"2025-05-01T11:53:14.880+00:00"},"s":"I", "c":"CONTROL", "id":5945603, "ctx":"main","msg":"Multi threading initialized"} +{"t":{"$date":"2025-05-01T11:53:14.881+00:00"},"s":"I", "c":"CONTROL", "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":1,"port":27017,"dbPath":"/data/db","architecture":"64-bit","host":"615ba7249fa7"}} +{"t":{"$date":"2025-05-01T11:53:14.881+00:00"},"s":"I", "c":"CONTROL", "id":23403, "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"5.0.31","gitVersion":"973237567d45610d6976d5d489dfaaef6a52c2f9","openSSLVersion":"OpenSSL 1.1.1f 31 Mar 2020","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu2004","distarch":"aarch64","target_arch":"aarch64"}}}} +{"t":{"$date":"2025-05-01T11:53:14.881+00:00"},"s":"I", "c":"CONTROL", "id":51765, "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Ubuntu","version":"20.04"}}} +{"t":{"$date":"2025-05-01T11:53:14.881+00:00"},"s":"I", "c":"CONTROL", "id":21951, "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"bindIp":"*"},"operationProfiling":{"mode":"all"},"security":{"authorization":"enabled"},"systemLog":{"destination":"file","path":"/var/log/mongodb/mongo.log"}}}} +{"t":{"$date":"2025-05-01T11:53:14.888+00:00"},"s":"I", "c":"STORAGE", "id":22270, "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"/data/db","storageEngine":"wiredTiger"}} +{"t":{"$date":"2025-05-01T11:53:14.889+00:00"},"s":"I", "c":"STORAGE", "id":22297, "ctx":"initandlisten","msg":"Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem","tags":["startupWarnings"]} +{"t":{"$date":"2025-05-01T11:53:14.889+00:00"},"s":"I", "c":"STORAGE", "id":22315, "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=6468M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),builtin_extension_config=(zstd=(compression_level=6)),file_manager=(close_idle_time=600,close_scan_interval=10,close_handle_minimum=2000),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress,compact_progress],"}} +{"t":{"$date":"2025-05-01T11:53:15.628+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1746100395:627989][1:0xffffb0a54040], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 3 through 4"}} +{"t":{"$date":"2025-05-01T11:53:15.846+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1746100395:846929][1:0xffffb0a54040], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 4 through 4"}} +{"t":{"$date":"2025-05-01T11:53:15.977+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1746100395:977297][1:0xffffb0a54040], txn-recover: [WT_VERB_RECOVERY_ALL] Main recovery loop: starting at 3/5248 to 4/256"}} +{"t":{"$date":"2025-05-01T11:53:16.056+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1746100396:56253][1:0xffffb0a54040], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 3 through 4"}} +{"t":{"$date":"2025-05-01T11:53:16.110+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1746100396:110080][1:0xffffb0a54040], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 4 through 4"}} +{"t":{"$date":"2025-05-01T11:53:16.138+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1746100396:138924][1:0xffffb0a54040], txn-recover: [WT_VERB_RECOVERY_PROGRESS] recovery log replay has successfully finished and ran for 512 milliseconds"}} +{"t":{"$date":"2025-05-01T11:53:16.139+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1746100396:139522][1:0xffffb0a54040], txn-recover: [WT_VERB_RECOVERY_ALL] Set global recovery timestamp: (0, 0)"}} +{"t":{"$date":"2025-05-01T11:53:16.139+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1746100396:139547][1:0xffffb0a54040], txn-recover: [WT_VERB_RECOVERY_ALL] Set global oldest timestamp: (0, 0)"}} +{"t":{"$date":"2025-05-01T11:53:16.141+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1746100396:141088][1:0xffffb0a54040], txn-recover: [WT_VERB_RECOVERY_PROGRESS] recovery rollback to stable has successfully finished and ran for 1 milliseconds"}} +{"t":{"$date":"2025-05-01T11:53:16.144+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1746100396:144305][1:0xffffb0a54040], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 1, snapshot max: 1 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 2903"}} +{"t":{"$date":"2025-05-01T11:53:16.147+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1746100396:147323][1:0xffffb0a54040], txn-recover: [WT_VERB_RECOVERY_PROGRESS] recovery checkpoint has successfully finished and ran for 6 milliseconds"}} +{"t":{"$date":"2025-05-01T11:53:16.147+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1746100396:147366][1:0xffffb0a54040], txn-recover: [WT_VERB_RECOVERY_PROGRESS] recovery was completed successfully and took 520ms, including 512ms for the log replay, 1ms for the rollback to stable, and 6ms for the checkpoint."}} +{"t":{"$date":"2025-05-01T11:53:16.148+00:00"},"s":"I", "c":"STORAGE", "id":4795906, "ctx":"initandlisten","msg":"WiredTiger opened","attr":{"durationMillis":1259}} +{"t":{"$date":"2025-05-01T11:53:16.148+00:00"},"s":"I", "c":"RECOVERY", "id":23987, "ctx":"initandlisten","msg":"WiredTiger recoveryTimestamp","attr":{"recoveryTimestamp":{"$timestamp":{"t":0,"i":0}}}} +{"t":{"$date":"2025-05-01T11:53:16.159+00:00"},"s":"I", "c":"STORAGE", "id":22262, "ctx":"initandlisten","msg":"Timestamp monitor starting"} +{"t":{"$date":"2025-05-01T11:53:16.160+00:00"},"s":"W", "c":"CONTROL", "id":22178, "ctx":"initandlisten","msg":"/sys/kernel/mm/transparent_hugepage/enabled is 'always'. We suggest setting it to 'never' in this binary version","tags":["startupWarnings"]} +{"t":{"$date":"2025-05-01T11:53:16.176+00:00"},"s":"I", "c":"NETWORK", "id":4915702, "ctx":"initandlisten","msg":"Updated wire specification","attr":{"oldSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":13},"outgoing":{"minWireVersion":0,"maxWireVersion":13},"isInternalClient":true},"newSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":13,"maxWireVersion":13},"outgoing":{"minWireVersion":13,"maxWireVersion":13},"isInternalClient":true}}} +{"t":{"$date":"2025-05-01T11:53:16.176+00:00"},"s":"I", "c":"STORAGE", "id":5071100, "ctx":"initandlisten","msg":"Clearing temp directory"} +{"t":{"$date":"2025-05-01T11:53:16.178+00:00"},"s":"I", "c":"CONTROL", "id":20536, "ctx":"initandlisten","msg":"Flow Control is enabled on this deployment"} +{"t":{"$date":"2025-05-01T11:53:16.182+00:00"},"s":"I", "c":"FTDC", "id":20625, "ctx":"initandlisten","msg":"Initializing full-time diagnostic data capture","attr":{"dataDirectory":"/data/db/diagnostic.data"}} +{"t":{"$date":"2025-05-01T11:53:16.186+00:00"},"s":"I", "c":"REPL", "id":6015317, "ctx":"initandlisten","msg":"Setting new configuration state","attr":{"newState":"ConfigReplicationDisabled","oldState":"ConfigPreStart"}} +{"t":{"$date":"2025-05-01T11:53:16.188+00:00"},"s":"I", "c":"NETWORK", "id":23015, "ctx":"listener","msg":"Listening on","attr":{"address":"/tmp/mongodb-27017.sock"}} +{"t":{"$date":"2025-05-01T11:53:16.188+00:00"},"s":"I", "c":"NETWORK", "id":23015, "ctx":"listener","msg":"Listening on","attr":{"address":"0.0.0.0"}} +{"t":{"$date":"2025-05-01T11:53:16.188+00:00"},"s":"I", "c":"NETWORK", "id":23016, "ctx":"listener","msg":"Waiting for connections","attr":{"port":27017,"ssl":"off"}} +{"t":{"$date":"2025-05-01T11:53:30.720+00:00"},"s":"I", "c":"NETWORK", "id":22943, "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:38232","uuid":"93bd374c-7cac-404a-9a45-3c6645b8770f","connectionId":1,"connectionCount":1}} +{"t":{"$date":"2025-05-01T11:53:30.726+00:00"},"s":"I", "c":"NETWORK", "id":51800, "ctx":"conn1","msg":"client metadata","attr":{"remote":"127.0.0.1:38232","client":"conn1","negotiatedCompressors":[],"doc":{"application":{"name":"mongosh 2.3.8"},"driver":{"name":"nodejs|mongosh","version":"6.12.0|2.3.8"},"platform":"Node.js v20.18.1, LE","os":{"name":"linux","architecture":"arm64","version":"4.14.209-160.339.amzn2.aarch64","type":"Linux"},"env":{"container":{"runtime":"docker"}}}}} +{"t":{"$date":"2025-05-01T11:53:30.731+00:00"},"s":"I", "c":"NETWORK", "id":22943, "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:38246","uuid":"f4f80142-65bd-476f-826f-d90c541f2cc6","connectionId":2,"connectionCount":2}} +{"t":{"$date":"2025-05-01T11:53:30.733+00:00"},"s":"I", "c":"NETWORK", "id":51800, "ctx":"conn2","msg":"client metadata","attr":{"remote":"127.0.0.1:38246","client":"conn2","negotiatedCompressors":[],"doc":{"application":{"name":"mongosh 2.3.8"},"driver":{"name":"nodejs|mongosh","version":"6.12.0|2.3.8"},"platform":"Node.js v20.18.1, LE","os":{"name":"linux","architecture":"arm64","version":"4.14.209-160.339.amzn2.aarch64","type":"Linux"},"env":{"container":{"runtime":"docker"}}}}} +{"t":{"$date":"2025-05-01T11:53:30.744+00:00"},"s":"I", "c":"ACCESS", "id":20250, "ctx":"conn2","msg":"Authentication succeeded","attr":{"mechanism":"SCRAM-SHA-256","speculative":true,"principalName":"root","authenticationDatabase":"admin","remote":"127.0.0.1:38246","extraInfo":{}}} +{"t":{"$date":"2025-05-01T11:53:30.752+00:00"},"s":"I", "c":"NETWORK", "id":22943, "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:38256","uuid":"04afa990-fd7a-4423-940e-a37edd85c3f9","connectionId":3,"connectionCount":3}} +{"t":{"$date":"2025-05-01T11:53:30.753+00:00"},"s":"I", "c":"NETWORK", "id":22943, "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:38260","uuid":"9be89593-cace-4079-88c0-1a5ee781df3d","connectionId":4,"connectionCount":4}} +{"t":{"$date":"2025-05-01T11:53:30.753+00:00"},"s":"I", "c":"NETWORK", "id":51800, "ctx":"conn3","msg":"client metadata","attr":{"remote":"127.0.0.1:38256","client":"conn3","negotiatedCompressors":[],"doc":{"application":{"name":"mongosh 2.3.8"},"driver":{"name":"nodejs|mongosh","version":"6.12.0|2.3.8"},"platform":"Node.js v20.18.1, LE","os":{"name":"linux","architecture":"arm64","version":"4.14.209-160.339.amzn2.aarch64","type":"Linux"},"env":{"container":{"runtime":"docker"}}}}} +{"t":{"$date":"2025-05-01T11:53:30.755+00:00"},"s":"I", "c":"NETWORK", "id":51800, "ctx":"conn4","msg":"client metadata","attr":{"remote":"127.0.0.1:38260","client":"conn4","negotiatedCompressors":[],"doc":{"application":{"name":"mongosh 2.3.8"},"driver":{"name":"nodejs|mongosh","version":"6.12.0|2.3.8"},"platform":"Node.js v20.18.1, LE","os":{"name":"linux","architecture":"arm64","version":"4.14.209-160.339.amzn2.aarch64","type":"Linux"},"env":{"container":{"runtime":"docker"}}}}} +{"t":{"$date":"2025-05-01T11:53:30.756+00:00"},"s":"I", "c":"ACCESS", "id":20250, "ctx":"conn3","msg":"Authentication succeeded","attr":{"mechanism":"SCRAM-SHA-256","speculative":true,"principalName":"root","authenticationDatabase":"admin","remote":"127.0.0.1:38256","extraInfo":{}}} +{"t":{"$date":"2025-05-01T11:53:30.756+00:00"},"s":"I", "c":"ACCESS", "id":20250, "ctx":"conn4","msg":"Authentication succeeded","attr":{"mechanism":"SCRAM-SHA-256","speculative":true,"principalName":"root","authenticationDatabase":"admin","remote":"127.0.0.1:38260","extraInfo":{}}} +{"t":{"$date":"2025-05-01T11:53:32.818+00:00"},"s":"I", "c":"COMMAND", "id":48742, "ctx":"conn4","msg":"Profiler settings changed","attr":{"from":{"level":2,"slowms":100,"sampleRate":1},"to":{"level":2,"slowms":0,"sampleRate":1}}} +{"t":{"$date":"2025-05-01T11:53:32.819+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.$cmd","appName":"mongosh 2.3.8","command":{"profile":2,"slowms":0,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"numYields":0,"reslen":79,"locks":{"FeatureCompatibilityVersion":{"acquireCount":{"w":1}},"ReplicationStateTransition":{"acquireCount":{"w":1}},"Global":{"acquireCount":{"w":1}},"Database":{"acquireCount":{"w":1}},"Collection":{"acquireCount":{"r":1}},"Mutex":{"acquireCount":{"r":1}}},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":1}} +{"t":{"$date":"2025-05-01T11:53:41.239+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn1","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"maxAwaitTimeMS":10000,"topologyVersion":{"processId":{"$oid":"681360aa06fdf4c41296de5b"},"counter":0},"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:38232","protocol":"op_msg","durationMillis":1}} +{"t":{"$date":"2025-05-01T11:53:41.240+00:00"},"s":"I", "c":"NETWORK", "id":22943, "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:53724","uuid":"c4b0e3ab-f3ae-408d-8e31-5caa1133a91b","connectionId":5,"connectionCount":5}} +{"t":{"$date":"2025-05-01T11:53:41.241+00:00"},"s":"I", "c":"NETWORK", "id":51800, "ctx":"conn5","msg":"client metadata","attr":{"remote":"127.0.0.1:53724","client":"conn5","negotiatedCompressors":[],"doc":{"application":{"name":"mongosh 2.3.8"},"driver":{"name":"nodejs|mongosh","version":"6.12.0|2.3.8"},"platform":"Node.js v20.18.1, LE","os":{"name":"linux","architecture":"arm64","version":"4.14.209-160.339.amzn2.aarch64","type":"Linux"},"env":{"container":{"runtime":"docker"}}}}} +{"t":{"$date":"2025-05-01T11:53:41.241+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn5","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"ismaster":1,"helloOk":true,"client":{"application":{"name":"mongosh 2.3.8"},"driver":{"name":"nodejs|mongosh","version":"6.12.0|2.3.8"},"platform":"Node.js v20.18.1, LE","os":{"name":"linux","architecture":"arm64","version":"4.14.209-160.339.amzn2.aarch64","type":"Linux"},"env":{"container":{"runtime":"docker"}}},"compression":["none"],"$db":"admin"},"numYields":0,"reslen":329,"locks":{},"remote":"127.0.0.1:53724","protocol":"op_query","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:53:51.248+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn1","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"maxAwaitTimeMS":10000,"topologyVersion":{"processId":{"$oid":"681360aa06fdf4c41296de5b"},"counter":0},"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:38232","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:53:51.250+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn5","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:53724","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:53:57.810+00:00"},"s":"I", "c":"STORAGE", "id":20320, "ctx":"conn4","msg":"createCollection","attr":{"namespace":"test.users","uuidDisposition":"generated","uuid":{"uuid":{"$uuid":"a960a493-a058-488c-abd7-8651cefe9be0"}},"options":{}}} +{"t":{"$date":"2025-05-01T11:53:57.819+00:00"},"s":"I", "c":"INDEX", "id":20345, "ctx":"conn4","msg":"Index build: done building","attr":{"buildUUID":null,"namespace":"test.users","index":"_id_","commitTimestamp":null}} +{"t":{"$date":"2025-05-01T11:53:57.820+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.users","appName":"mongosh 2.3.8","command":{"insert":"users","documents":[{"name":"Alice","age":30,"_id":{"$oid":"681360d523567705faa00aa1"}}],"ordered":true,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"ninserted":1,"keysInserted":1,"numYields":0,"reslen":45,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":4}},"FeatureCompatibilityVersion":{"acquireCount":{"r":1,"w":3}},"ReplicationStateTransition":{"acquireCount":{"w":4}},"Global":{"acquireCount":{"r":1,"w":3}},"Database":{"acquireCount":{"r":1,"w":3}},"Collection":{"acquireCount":{"w":3}},"Mutex":{"acquireCount":{"r":4}}},"flowControl":{"acquireCount":3,"timeAcquiringMicros":2},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":10}} +{"t":{"$date":"2025-05-01T11:53:57.820+00:00"},"s":"I", "c":"-", "id":20701, "ctx":"conn4","msg":"Creating profile collection","attr":{"namespace":"test.system.profile"}} +{"t":{"$date":"2025-05-01T11:53:57.820+00:00"},"s":"I", "c":"STORAGE", "id":20320, "ctx":"conn4","msg":"createCollection","attr":{"namespace":"test.system.profile","uuidDisposition":"generated","uuid":{"uuid":{"$uuid":"20986dde-41a7-4d48-ab98-b39c84c99aab"}},"options":{"capped":true,"size":1048576}}} +{"t":{"$date":"2025-05-01T11:53:57.876+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.users","appName":"mongosh 2.3.8","command":{"insert":"users","documents":2,"ordered":true,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"ninserted":2,"keysInserted":2,"numYields":0,"reslen":45,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":1}},"FeatureCompatibilityVersion":{"acquireCount":{"w":1}},"ReplicationStateTransition":{"acquireCount":{"w":1}},"Global":{"acquireCount":{"w":1}},"Database":{"acquireCount":{"w":1}},"Collection":{"acquireCount":{"w":1}},"Mutex":{"acquireCount":{"r":1}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":1},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:53:59.994+00:00"},"s":"I", "c":"STORAGE", "id":20320, "ctx":"conn4","msg":"createCollection","attr":{"namespace":"test.logs","uuidDisposition":"generated","uuid":{"uuid":{"$uuid":"313f47e2-e817-413d-9ef2-d46449b0d411"}},"options":{}}} +{"t":{"$date":"2025-05-01T11:54:00.064+00:00"},"s":"I", "c":"INDEX", "id":20345, "ctx":"conn4","msg":"Index build: done building","attr":{"buildUUID":null,"namespace":"test.logs","index":"_id_","commitTimestamp":null}} +{"t":{"$date":"2025-05-01T11:54:00.064+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.logs","appName":"mongosh 2.3.8","command":{"create":"logs","lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"numYields":0,"reslen":38,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":2}},"FeatureCompatibilityVersion":{"acquireCount":{"r":1,"w":1}},"ReplicationStateTransition":{"acquireCount":{"w":2}},"Global":{"acquireCount":{"r":1,"w":1}},"Database":{"acquireCount":{"r":1,"w":1}},"Collection":{"acquireCount":{"w":1}},"Mutex":{"acquireCount":{"r":2}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":2},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":72}} +{"t":{"$date":"2025-05-01T11:54:01.254+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn1","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"maxAwaitTimeMS":10000,"topologyVersion":{"processId":{"$oid":"681360aa06fdf4c41296de5b"},"counter":0},"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:38232","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:01.255+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn5","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:53724","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:06.871+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.users","appName":"mongosh 2.3.8","command":{"find":"users","filter":{"age":{"$gt":25}},"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"planSummary":"COLLSCAN","keysExamined":0,"docsExamined":3,"cursorExhausted":true,"numYields":0,"nreturned":1,"queryHash":"4BB283C4","planCacheKey":"5C3F837A","reslen":149,"locks":{"FeatureCompatibilityVersion":{"acquireCount":{"r":1}},"Global":{"acquireCount":{"r":1}},"Mutex":{"acquireCount":{"r":1}}},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":8}} +{"t":{"$date":"2025-05-01T11:54:06.912+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.users","appName":"mongosh 2.3.8","command":{"find":"users","filter":{"name":{"$regularExpression":{"pattern":"A","options":""}}},"sort":{"age":-1},"limit":5,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"planSummary":"COLLSCAN","keysExamined":0,"docsExamined":3,"hasSortStage":true,"cursorExhausted":true,"numYields":0,"nreturned":1,"queryHash":"647CE906","planCacheKey":"A39EE0CF","reslen":149,"locks":{"FeatureCompatibilityVersion":{"acquireCount":{"r":1}},"Global":{"acquireCount":{"r":1}},"Mutex":{"acquireCount":{"r":1}}},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":2}} +{"t":{"$date":"2025-05-01T11:54:07.541+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.users","appName":"mongosh 2.3.8","command":{"find":"users","filter":{"name":"Alice"},"limit":1,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"planSummary":"COLLSCAN","keysExamined":0,"docsExamined":1,"cursorExhausted":true,"numYields":0,"nreturned":1,"queryHash":"01AEE5EC","planCacheKey":"C04BB947","reslen":149,"locks":{"FeatureCompatibilityVersion":{"acquireCount":{"r":1}},"Global":{"acquireCount":{"r":1}},"Mutex":{"acquireCount":{"r":1}}},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:11.259+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn1","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"maxAwaitTimeMS":10000,"topologyVersion":{"processId":{"$oid":"681360aa06fdf4c41296de5b"},"counter":0},"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:38232","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:11.262+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn5","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:53724","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:13.628+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.orders","appName":"mongosh 2.3.8","command":{"aggregate":"orders","pipeline":[{"$match":{"status":"delivered"}},{"$group":{"_id":"$customerId","total":{"$sum":"$amount"}}},{"$sort":{"total":-1}}],"cursor":{},"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"planSummary":"EOF","keysExamined":0,"docsExamined":0,"hasSortStage":true,"cursorExhausted":true,"numYields":0,"nreturned":0,"reslen":100,"locks":{"FeatureCompatibilityVersion":{"acquireCount":{"r":2}},"Global":{"acquireCount":{"r":2}},"Mutex":{"acquireCount":{"r":2}}},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":4}} +{"t":{"$date":"2025-05-01T11:54:16.191+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"Checkpointer","msg":"WiredTiger message","attr":{"message":"[1746100456:191832][1:0xffffa5fffc80], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 32, snapshot max: 32 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 2903"}} +{"t":{"$date":"2025-05-01T11:54:16.192+00:00"},"s":"I", "c":"INDEX", "id":5479200, "ctx":"TTLMonitor","msg":"Deleted expired documents using index","attr":{"namespace":"config.system.sessions","index":"lsidTTLIndex","numDeleted":0,"durationMillis":1}} +{"t":{"$date":"2025-05-01T11:54:20.550+00:00"},"s":"I", "c":"WRITE", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"update","ns":"test.users","appName":"mongosh 2.3.8","command":{"q":{"name":"Alice"},"u":{"$set":{"age":31}},"multi":false,"upsert":false},"planSummary":"COLLSCAN","keysExamined":0,"docsExamined":1,"nMatched":1,"nModified":1,"nUpserted":0,"numYields":0,"queryHash":"01AEE5EC","planCacheKey":"C04BB947","locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":1}},"FeatureCompatibilityVersion":{"acquireCount":{"w":1}},"ReplicationStateTransition":{"acquireCount":{"w":1}},"Global":{"acquireCount":{"w":1}},"Database":{"acquireCount":{"w":1}},"Collection":{"acquireCount":{"w":1}},"Mutex":{"acquireCount":{"r":1}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":1},"storage":{},"remote":"127.0.0.1:38260","durationMillis":2}} +{"t":{"$date":"2025-05-01T11:54:20.553+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.$cmd","appName":"mongosh 2.3.8","command":{"update":"users","updates":[{"q":{"name":"Alice"},"u":{"$set":{"age":31}}}],"ordered":true,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"numYields":0,"reslen":60,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":2}},"FeatureCompatibilityVersion":{"acquireCount":{"r":1,"w":2}},"ReplicationStateTransition":{"acquireCount":{"w":2}},"Global":{"acquireCount":{"r":1,"w":2}},"Database":{"acquireCount":{"w":2}},"Collection":{"acquireCount":{"w":2}},"Metadata":{"acquireCount":{"W":1}},"Mutex":{"acquireCount":{"r":2}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":1},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":5}} +{"t":{"$date":"2025-05-01T11:54:20.606+00:00"},"s":"I", "c":"WRITE", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"update","ns":"test.users","appName":"mongosh 2.3.8","command":{"q":{},"u":{"$inc":{"visits":1}},"multi":true,"upsert":false},"planSummary":"COLLSCAN","keysExamined":0,"docsExamined":3,"nMatched":3,"nModified":3,"nUpserted":0,"numYields":0,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":1}},"FeatureCompatibilityVersion":{"acquireCount":{"w":1}},"ReplicationStateTransition":{"acquireCount":{"w":1}},"Global":{"acquireCount":{"w":1}},"Database":{"acquireCount":{"w":1}},"Collection":{"acquireCount":{"w":1}},"Mutex":{"acquireCount":{"r":1}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":2},"storage":{},"remote":"127.0.0.1:38260","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:20.607+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.$cmd","appName":"mongosh 2.3.8","command":{"update":"users","updates":[{"q":{},"u":{"$inc":{"visits":1}},"multi":true}],"ordered":true,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"numYields":0,"reslen":60,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":2}},"FeatureCompatibilityVersion":{"acquireCount":{"r":1,"w":2}},"ReplicationStateTransition":{"acquireCount":{"w":2}},"Global":{"acquireCount":{"r":1,"w":2}},"Database":{"acquireCount":{"w":2}},"Collection":{"acquireCount":{"w":2}},"Metadata":{"acquireCount":{"W":1}},"Mutex":{"acquireCount":{"r":2}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":2},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:21.261+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn1","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"maxAwaitTimeMS":10000,"topologyVersion":{"processId":{"$oid":"681360aa06fdf4c41296de5b"},"counter":0},"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:38232","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:21.266+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn5","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:53724","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:21.324+00:00"},"s":"I", "c":"WRITE", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"update","ns":"test.users","appName":"mongosh 2.3.8","command":{"q":{"name":"Bob"},"u":{"name":"Bobby","age":28},"multi":false,"upsert":false},"planSummary":"COLLSCAN","keysExamined":0,"docsExamined":2,"nMatched":1,"nModified":1,"nUpserted":0,"keysInserted":0,"keysDeleted":0,"numYields":0,"queryHash":"01AEE5EC","planCacheKey":"C04BB947","locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":1}},"FeatureCompatibilityVersion":{"acquireCount":{"w":1}},"ReplicationStateTransition":{"acquireCount":{"w":1}},"Global":{"acquireCount":{"w":1}},"Database":{"acquireCount":{"w":1}},"Collection":{"acquireCount":{"w":1}},"Mutex":{"acquireCount":{"r":1}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":1},"storage":{},"remote":"127.0.0.1:38260","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:21.324+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.$cmd","appName":"mongosh 2.3.8","command":{"update":"users","updates":[{"q":{"name":"Bob"},"u":{"name":"Bobby","age":28}}],"ordered":true,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"numYields":0,"reslen":60,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":2}},"FeatureCompatibilityVersion":{"acquireCount":{"r":1,"w":2}},"ReplicationStateTransition":{"acquireCount":{"w":2}},"Global":{"acquireCount":{"r":1,"w":2}},"Database":{"acquireCount":{"w":2}},"Collection":{"acquireCount":{"w":2}},"Metadata":{"acquireCount":{"W":1}},"Mutex":{"acquireCount":{"r":2}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":1},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:25.602+00:00"},"s":"I", "c":"WRITE", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"remove","ns":"test.users","appName":"mongosh 2.3.8","command":{"q":{"name":"Charlie"},"limit":1},"planSummary":"COLLSCAN","keysExamined":0,"docsExamined":3,"ndeleted":1,"keysDeleted":1,"numYields":0,"queryHash":"01AEE5EC","planCacheKey":"C04BB947","locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":1}},"FeatureCompatibilityVersion":{"acquireCount":{"w":1}},"ReplicationStateTransition":{"acquireCount":{"w":1}},"Global":{"acquireCount":{"w":1}},"Database":{"acquireCount":{"w":1}},"Collection":{"acquireCount":{"w":1}},"Mutex":{"acquireCount":{"r":1}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":2},"storage":{},"remote":"127.0.0.1:38260","durationMillis":2}} +{"t":{"$date":"2025-05-01T11:54:25.603+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.$cmd","appName":"mongosh 2.3.8","command":{"delete":"users","deletes":[{"q":{"name":"Charlie"},"limit":1}],"ordered":true,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"numYields":0,"reslen":45,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":2}},"FeatureCompatibilityVersion":{"acquireCount":{"r":1,"w":2}},"ReplicationStateTransition":{"acquireCount":{"w":2}},"Global":{"acquireCount":{"r":1,"w":2}},"Database":{"acquireCount":{"w":2}},"Collection":{"acquireCount":{"w":2}},"Metadata":{"acquireCount":{"W":1}},"Mutex":{"acquireCount":{"r":2}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":2},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":3}} +{"t":{"$date":"2025-05-01T11:54:26.239+00:00"},"s":"I", "c":"WRITE", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"remove","ns":"test.users","appName":"mongosh 2.3.8","command":{"q":{"inactive":true},"limit":0},"planSummary":"COLLSCAN","keysExamined":0,"docsExamined":2,"ndeleted":0,"numYields":0,"queryHash":"11C8EF83","planCacheKey":"7D10A227","locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":1}},"FeatureCompatibilityVersion":{"acquireCount":{"w":1}},"ReplicationStateTransition":{"acquireCount":{"w":1}},"Global":{"acquireCount":{"w":1}},"Database":{"acquireCount":{"w":1}},"Collection":{"acquireCount":{"w":1}},"Mutex":{"acquireCount":{"r":1}}},"flowControl":{"acquireCount":1},"storage":{},"remote":"127.0.0.1:38260","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:26.240+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.$cmd","appName":"mongosh 2.3.8","command":{"delete":"users","deletes":[{"q":{"inactive":true},"limit":0}],"ordered":true,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"numYields":0,"reslen":45,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":2}},"FeatureCompatibilityVersion":{"acquireCount":{"r":1,"w":2}},"ReplicationStateTransition":{"acquireCount":{"w":2}},"Global":{"acquireCount":{"r":1,"w":2}},"Database":{"acquireCount":{"w":2}},"Collection":{"acquireCount":{"w":2}},"Metadata":{"acquireCount":{"W":1}},"Mutex":{"acquireCount":{"r":2}}},"flowControl":{"acquireCount":1},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:31.264+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn1","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"maxAwaitTimeMS":10000,"topologyVersion":{"processId":{"$oid":"681360aa06fdf4c41296de5b"},"counter":0},"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:38232","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:31.268+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn5","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:53724","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:31.305+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.users","appName":"mongosh 2.3.8","command":{"insert":"users","documents":[{"name":"Dana","_id":{"$oid":"681360f723567705faa00aa4"}}],"ordered":true,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"ninserted":1,"keysInserted":1,"numYields":0,"reslen":45,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":1}},"FeatureCompatibilityVersion":{"acquireCount":{"w":1}},"ReplicationStateTransition":{"acquireCount":{"w":1}},"Global":{"acquireCount":{"w":1}},"Database":{"acquireCount":{"w":1}},"Collection":{"acquireCount":{"w":1}},"Mutex":{"acquireCount":{"r":1}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":1},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:31.308+00:00"},"s":"I", "c":"WRITE", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"update","ns":"test.users","appName":"mongosh 2.3.8","command":{"q":{"name":"Alice"},"u":{"$set":{"age":32}},"multi":false,"upsert":false},"planSummary":"COLLSCAN","keysExamined":0,"docsExamined":1,"nMatched":1,"nModified":1,"nUpserted":0,"numYields":0,"queryHash":"01AEE5EC","planCacheKey":"C04BB947","locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":1}},"FeatureCompatibilityVersion":{"acquireCount":{"w":1}},"ReplicationStateTransition":{"acquireCount":{"w":1}},"Global":{"acquireCount":{"w":1}},"Database":{"acquireCount":{"w":1}},"Collection":{"acquireCount":{"w":1}},"Mutex":{"acquireCount":{"r":1}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":1},"storage":{},"remote":"127.0.0.1:38260","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:31.308+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.$cmd","appName":"mongosh 2.3.8","command":{"update":"users","updates":[{"q":{"name":"Alice"},"u":{"$set":{"age":32}}}],"ordered":true,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"numYields":0,"reslen":60,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":2}},"FeatureCompatibilityVersion":{"acquireCount":{"r":1,"w":2}},"ReplicationStateTransition":{"acquireCount":{"w":2}},"Global":{"acquireCount":{"r":1,"w":2}},"Database":{"acquireCount":{"w":2}},"Collection":{"acquireCount":{"w":2}},"Metadata":{"acquireCount":{"W":1}},"Mutex":{"acquireCount":{"r":2}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":1},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":1}} +{"t":{"$date":"2025-05-01T11:54:31.309+00:00"},"s":"I", "c":"WRITE", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"remove","ns":"test.users","appName":"mongosh 2.3.8","command":{"q":{"name":"Bob"},"limit":1},"planSummary":"COLLSCAN","keysExamined":0,"docsExamined":3,"ndeleted":0,"numYields":0,"queryHash":"01AEE5EC","planCacheKey":"C04BB947","locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":1}},"FeatureCompatibilityVersion":{"acquireCount":{"w":1}},"ReplicationStateTransition":{"acquireCount":{"w":1}},"Global":{"acquireCount":{"w":1}},"Database":{"acquireCount":{"w":1}},"Collection":{"acquireCount":{"w":1}},"Mutex":{"acquireCount":{"r":1}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":1},"storage":{},"remote":"127.0.0.1:38260","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:31.309+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.$cmd","appName":"mongosh 2.3.8","command":{"delete":"users","deletes":[{"q":{"name":"Bob"},"limit":1}],"ordered":true,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"numYields":0,"reslen":45,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":2}},"FeatureCompatibilityVersion":{"acquireCount":{"r":1,"w":2}},"ReplicationStateTransition":{"acquireCount":{"w":2}},"Global":{"acquireCount":{"r":1,"w":2}},"Database":{"acquireCount":{"w":2}},"Collection":{"acquireCount":{"w":2}},"Metadata":{"acquireCount":{"W":1}},"Mutex":{"acquireCount":{"r":2}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":1},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:36.731+00:00"},"s":"I", "c":"INDEX", "id":20438, "ctx":"conn4","msg":"Index build: registering","attr":{"buildUUID":{"uuid":{"$uuid":"a5733de5-0c45-47de-9254-18827017ad1d"}},"namespace":"test.users","collectionUUID":{"uuid":{"$uuid":"a960a493-a058-488c-abd7-8651cefe9be0"}},"indexes":1,"firstIndex":{"name":"name_1"}}} +{"t":{"$date":"2025-05-01T11:54:36.747+00:00"},"s":"I", "c":"INDEX", "id":20384, "ctx":"IndexBuildsCoordinatorMongod-0","msg":"Index build: starting","attr":{"buildUUID":null,"collectionUUID":{"uuid":{"$uuid":"a960a493-a058-488c-abd7-8651cefe9be0"}},"namespace":"test.users","properties":{"v":2,"key":{"name":1},"name":"name_1"},"method":"Hybrid","maxTemporaryMemoryUsageMB":200}} +{"t":{"$date":"2025-05-01T11:54:36.747+00:00"},"s":"I", "c":"INDEX", "id":20440, "ctx":"conn4","msg":"Index build: waiting for index build to complete","attr":{"buildUUID":{"uuid":{"$uuid":"a5733de5-0c45-47de-9254-18827017ad1d"}},"deadline":{"$date":{"$numberLong":"9223372036854775807"}}}} +{"t":{"$date":"2025-05-01T11:54:36.747+00:00"},"s":"I", "c":"INDEX", "id":20391, "ctx":"IndexBuildsCoordinatorMongod-0","msg":"Index build: collection scan done","attr":{"buildUUID":null,"collectionUUID":{"uuid":{"$uuid":"a960a493-a058-488c-abd7-8651cefe9be0"}},"namespace":"test.users","totalRecords":3,"readSource":"kNoTimestamp","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:36.749+00:00"},"s":"I", "c":"INDEX", "id":20685, "ctx":"IndexBuildsCoordinatorMongod-0","msg":"Index build: inserted keys from external sorter into index","attr":{"namespace":"test.users","index":"name_1","keysInserted":3,"durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:36.750+00:00"},"s":"I", "c":"STORAGE", "id":3856203, "ctx":"IndexBuildsCoordinatorMongod-0","msg":"Index build: waiting for next action before completing final phase","attr":{"buildUUID":{"uuid":{"$uuid":"a5733de5-0c45-47de-9254-18827017ad1d"}}}} +{"t":{"$date":"2025-05-01T11:54:36.750+00:00"},"s":"I", "c":"STORAGE", "id":3856204, "ctx":"IndexBuildsCoordinatorMongod-0","msg":"Index build: received signal","attr":{"buildUUID":{"uuid":{"$uuid":"a5733de5-0c45-47de-9254-18827017ad1d"}},"action":"Single-phase commit"}} +{"t":{"$date":"2025-05-01T11:54:36.750+00:00"},"s":"I", "c":"INDEX", "id":20345, "ctx":"IndexBuildsCoordinatorMongod-0","msg":"Index build: done building","attr":{"buildUUID":null,"namespace":"test.users","index":"name_1","commitTimestamp":null}} +{"t":{"$date":"2025-05-01T11:54:36.751+00:00"},"s":"I", "c":"STORAGE", "id":20663, "ctx":"IndexBuildsCoordinatorMongod-0","msg":"Index build: completed successfully","attr":{"buildUUID":{"uuid":{"$uuid":"a5733de5-0c45-47de-9254-18827017ad1d"}},"collectionUUID":{"uuid":{"$uuid":"a960a493-a058-488c-abd7-8651cefe9be0"}},"namespace":"test.users","indexesBuilt":["name_1"],"numIndexesBefore":1,"numIndexesAfter":2}} +{"t":{"$date":"2025-05-01T11:54:36.751+00:00"},"s":"I", "c":"INDEX", "id":20447, "ctx":"conn4","msg":"Index build: completed","attr":{"buildUUID":{"uuid":{"$uuid":"a5733de5-0c45-47de-9254-18827017ad1d"}}}} +{"t":{"$date":"2025-05-01T11:54:36.751+00:00"},"s":"I", "c":"STORAGE", "id":51803, "ctx":"IndexBuildsCoordinatorMongod-0","msg":"Slow query","attr":{"type":"none","ns":"test.users","command":{"createIndexes":"users","indexes":[{"v":2,"key":{"name":1},"name":"name_1"}],"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"numYields":0,"locks":{"FeatureCompatibilityVersion":{"acquireCount":{"w":5}},"ReplicationStateTransition":{"acquireCount":{"w":7}},"Global":{"acquireCount":{"w":5}},"Database":{"acquireCount":{"w":5}},"Collection":{"acquireCount":{"w":2,"R":1,"W":2}},"Mutex":{"acquireCount":{"r":1}}},"flowControl":{"acquireCount":5,"timeAcquiringMicros":34},"storage":{},"durationMillis":3}} +{"t":{"$date":"2025-05-01T11:54:36.751+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.users","appName":"mongosh 2.3.8","command":{"createIndexes":"users","indexes":[{"name":"name_1","key":{"name":1}}],"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"numYields":0,"reslen":114,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":3}},"FeatureCompatibilityVersion":{"acquireCount":{"r":2,"w":2}},"ReplicationStateTransition":{"acquireCount":{"w":4}},"Global":{"acquireCount":{"r":2,"w":2}},"Database":{"acquireCount":{"r":2,"w":1}},"Collection":{"acquireCount":{"r":2,"W":1}},"Mutex":{"acquireCount":{"r":3}}},"flowControl":{"acquireCount":2,"timeAcquiringMicros":3},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":20}} +{"t":{"$date":"2025-05-01T11:54:37.319+00:00"},"s":"I", "c":"COMMAND", "id":51806, "ctx":"conn4","msg":"CMD: dropIndexes","attr":{"namespace":"test.users","uuid":{"uuid":{"$uuid":"a960a493-a058-488c-abd7-8651cefe9be0"}},"indexes":"name_1"}} +{"t":{"$date":"2025-05-01T11:54:37.320+00:00"},"s":"I", "c":"STORAGE", "id":22206, "ctx":"conn4","msg":"Deferring table drop for index","attr":{"index":"name_1","namespace":"test.users","uuid":{"uuid":{"$uuid":"a960a493-a058-488c-abd7-8651cefe9be0"}},"ident":"index-5-3003708726935841534","dropTime":{"checkpointIteration":"1"}}} +{"t":{"$date":"2025-05-01T11:54:37.321+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.users","appName":"mongosh 2.3.8","command":{"dropIndexes":"users","index":"name_1","lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"numYields":0,"reslen":55,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":2}},"FeatureCompatibilityVersion":{"acquireCount":{"w":2}},"ReplicationStateTransition":{"acquireCount":{"w":2}},"Global":{"acquireCount":{"w":2}},"Database":{"acquireCount":{"w":2}},"Collection":{"acquireCount":{"w":1,"W":1}},"Mutex":{"acquireCount":{"r":3}}},"flowControl":{"acquireCount":2,"timeAcquiringMicros":4},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":1}} +{"t":{"$date":"2025-05-01T11:54:41.266+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn1","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"maxAwaitTimeMS":10000,"topologyVersion":{"processId":{"$oid":"681360aa06fdf4c41296de5b"},"counter":0},"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:38232","protocol":"op_msg","durationMillis":1}} +{"t":{"$date":"2025-05-01T11:54:41.270+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn5","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:53724","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:42.105+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.$cmd","appName":"mongosh 2.3.8","command":{"ping":1,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"numYields":0,"reslen":38,"locks":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:42.125+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.users","appName":"mongosh 2.3.8","command":{"collStats":"users","lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"numYields":0,"reslen":25365,"locks":{"FeatureCompatibilityVersion":{"acquireCount":{"r":1}},"ReplicationStateTransition":{"acquireCount":{"w":1}},"Global":{"acquireCount":{"r":1}},"Database":{"acquireCount":{"r":1}},"Collection":{"acquireCount":{"r":1}},"Mutex":{"acquireCount":{"r":1}}},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":3}} +{"t":{"$date":"2025-05-01T11:54:42.631+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.$cmd","appName":"mongosh 2.3.8","command":{"serverStatus":1,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"numYields":0,"reslen":58933,"locks":{"FeatureCompatibilityVersion":{"acquireCount":{"r":1}},"Global":{"acquireCount":{"r":1}}},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:48.191+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.$cmd","appName":"mongosh 2.3.8","command":{"connectionStatus":1,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"numYields":0,"reslen":181,"locks":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:48.926+00:00"},"s":"W", "c":"ACCESS", "id":5626600, "ctx":"conn4","msg":"The logout command has been deprecated, clients should end their session instead"} +{"t":{"$date":"2025-05-01T11:54:48.926+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.$cmd","appName":"mongosh 2.3.8","command":{"logout":1,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"numYields":0,"reslen":38,"locks":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:51.276+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn1","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"maxAwaitTimeMS":10000,"topologyVersion":{"processId":{"$oid":"681360aa06fdf4c41296de5b"},"counter":0},"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:38232","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:51.277+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn5","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:53724","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:54:55.333+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.users","appName":"mongosh 2.3.8","command":{"findAndModify":"users","query":{"name":"Alice"},"remove":false,"new":false,"upsert":false,"update":{"$set":{"city":"Paris"}},"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"planSummary":"COLLSCAN","keysExamined":0,"docsExamined":1,"nMatched":1,"nModified":1,"nUpserted":0,"numYields":0,"queryHash":"01AEE5EC","planCacheKey":"C04BB947","reslen":151,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":1}},"FeatureCompatibilityVersion":{"acquireCount":{"w":1}},"ReplicationStateTransition":{"acquireCount":{"w":1}},"Global":{"acquireCount":{"w":1}},"Database":{"acquireCount":{"w":1}},"Collection":{"acquireCount":{"w":1}},"Mutex":{"acquireCount":{"r":1}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":2},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":2}} +{"t":{"$date":"2025-05-01T11:54:55.878+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.users","appName":"mongosh 2.3.8","command":{"findAndModify":"users","query":{"name":"Dana"},"remove":true,"new":false,"upsert":false,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"planSummary":"COLLSCAN","keysExamined":0,"docsExamined":3,"ndeleted":1,"keysDeleted":1,"numYields":0,"queryHash":"01AEE5EC","planCacheKey":"C04BB947","reslen":111,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":1}},"FeatureCompatibilityVersion":{"acquireCount":{"w":1}},"ReplicationStateTransition":{"acquireCount":{"w":1}},"Global":{"acquireCount":{"w":1}},"Database":{"acquireCount":{"w":1}},"Collection":{"acquireCount":{"w":1}},"Mutex":{"acquireCount":{"r":1}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":1},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:55:01.285+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn1","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"maxAwaitTimeMS":10000,"topologyVersion":{"processId":{"$oid":"681360aa06fdf4c41296de5b"},"counter":0},"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:38232","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:55:01.286+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn5","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:53724","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:55:01.403+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.nonexistent","appName":"mongosh 2.3.8","command":{"find":"nonexistent","filter":{},"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"planSummary":"EOF","keysExamined":0,"docsExamined":0,"cursorExhausted":true,"numYields":0,"nreturned":0,"reslen":105,"locks":{"FeatureCompatibilityVersion":{"acquireCount":{"r":1}},"Global":{"acquireCount":{"r":1}},"Mutex":{"acquireCount":{"r":1}}},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:55:01.439+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.users","appName":"mongosh 2.3.8","command":{"insert":"users","documents":[{"_id":1}],"ordered":true,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"ninserted":1,"keysInserted":1,"numYields":0,"reslen":45,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":1}},"FeatureCompatibilityVersion":{"acquireCount":{"w":1}},"ReplicationStateTransition":{"acquireCount":{"w":1}},"Global":{"acquireCount":{"w":1}},"Database":{"acquireCount":{"w":1}},"Collection":{"acquireCount":{"w":1}},"Mutex":{"acquireCount":{"r":1}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":1},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:55:02.080+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn4","msg":"Slow query","attr":{"type":"command","ns":"test.users","appName":"mongosh 2.3.8","command":{"insert":"users","documents":[{"_id":1}],"ordered":true,"lsid":{"id":{"$uuid":"9f944398-68b7-4781-9cad-ac2fb5c41bf7"}},"$db":"test"},"ninserted":0,"numYields":0,"reslen":236,"locks":{"ParallelBatchWriterMode":{"acquireCount":{"r":1}},"FeatureCompatibilityVersion":{"acquireCount":{"w":1}},"ReplicationStateTransition":{"acquireCount":{"w":1}},"Global":{"acquireCount":{"w":1}},"Database":{"acquireCount":{"w":1}},"Collection":{"acquireCount":{"w":1}},"Mutex":{"acquireCount":{"r":1}}},"flowControl":{"acquireCount":1,"timeAcquiringMicros":1},"storage":{},"remote":"127.0.0.1:38260","protocol":"op_msg","durationMillis":5}} +{"t":{"$date":"2025-05-01T11:55:11.291+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn1","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"maxAwaitTimeMS":10000,"topologyVersion":{"processId":{"$oid":"681360aa06fdf4c41296de5b"},"counter":0},"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:38232","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:55:11.300+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn5","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:53724","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:55:16.198+00:00"},"s":"I", "c":"INDEX", "id":5479200, "ctx":"TTLMonitor","msg":"Deleted expired documents using index","attr":{"namespace":"config.system.sessions","index":"lsidTTLIndex","numDeleted":0,"durationMillis":1}} +{"t":{"$date":"2025-05-01T11:55:16.207+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"Checkpointer","msg":"WiredTiger message","attr":{"message":"[1746100516:207459][1:0xffffa5fffc80], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 77, snapshot max: 77 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 2903"}} +{"t":{"$date":"2025-05-01T11:55:16.276+00:00"},"s":"I", "c":"STORAGE", "id":22260, "ctx":"TimestampMonitor","msg":"Removing drop-pending idents with drop timestamps before timestamp","attr":{"timestamp":{"$timestamp":{"t":0,"i":0}}}} +{"t":{"$date":"2025-05-01T11:55:16.276+00:00"},"s":"I", "c":"STORAGE", "id":22237, "ctx":"TimestampMonitor","msg":"Completing drop for ident","attr":{"ident":"index-5-3003708726935841534","dropTimestamp":{"$timestamp":{"t":0,"i":0}}}} +{"t":{"$date":"2025-05-01T11:55:16.277+00:00"},"s":"I", "c":"STORAGE", "id":6776600, "ctx":"TimestampMonitor","msg":"The ident was successfully dropped","attr":{"ident":"index-5-3003708726935841534","dropTimestamp":{"$timestamp":{"t":0,"i":0}}}} +{"t":{"$date":"2025-05-01T11:55:21.296+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn1","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"maxAwaitTimeMS":10000,"topologyVersion":{"processId":{"$oid":"681360aa06fdf4c41296de5b"},"counter":0},"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:38232","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:55:21.306+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn5","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:53724","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:55:31.307+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn1","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"maxAwaitTimeMS":10000,"topologyVersion":{"processId":{"$oid":"681360aa06fdf4c41296de5b"},"counter":0},"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:38232","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:55:31.309+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn5","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"$db":"admin"},"numYields":0,"reslen":313,"locks":{},"remote":"127.0.0.1:53724","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:55:38.064+00:00"},"s":"I", "c":"CONTROL", "id":23377, "ctx":"SignalHandler","msg":"Received signal","attr":{"signal":15,"error":"Terminated"}} +{"t":{"$date":"2025-05-01T11:55:38.064+00:00"},"s":"I", "c":"CONTROL", "id":23378, "ctx":"SignalHandler","msg":"Signal was sent by kill(2)","attr":{"pid":0,"uid":0}} +{"t":{"$date":"2025-05-01T11:55:38.064+00:00"},"s":"I", "c":"CONTROL", "id":23381, "ctx":"SignalHandler","msg":"will terminate after current cmd ends"} +{"t":{"$date":"2025-05-01T11:55:38.065+00:00"},"s":"I", "c":"REPL", "id":4784900, "ctx":"SignalHandler","msg":"Stepping down the ReplicationCoordinator for shutdown","attr":{"waitTimeMillis":15000}} +{"t":{"$date":"2025-05-01T11:55:38.067+00:00"},"s":"I", "c":"REPL", "id":4794602, "ctx":"SignalHandler","msg":"Attempting to enter quiesce mode"} +{"t":{"$date":"2025-05-01T11:55:38.067+00:00"},"s":"I", "c":"COMMAND", "id":4784901, "ctx":"SignalHandler","msg":"Shutting down the MirrorMaestro"} +{"t":{"$date":"2025-05-01T11:55:38.067+00:00"},"s":"I", "c":"SHARDING", "id":4784902, "ctx":"SignalHandler","msg":"Shutting down the WaitForMajorityService"} +{"t":{"$date":"2025-05-01T11:55:38.067+00:00"},"s":"I", "c":"CONTROL", "id":4784903, "ctx":"SignalHandler","msg":"Shutting down the LogicalSessionCache"} +{"t":{"$date":"2025-05-01T11:55:38.069+00:00"},"s":"I", "c":"NETWORK", "id":20562, "ctx":"SignalHandler","msg":"Shutdown: going to close listening sockets"} +{"t":{"$date":"2025-05-01T11:55:38.069+00:00"},"s":"I", "c":"NETWORK", "id":23017, "ctx":"listener","msg":"removing socket file","attr":{"path":"/tmp/mongodb-27017.sock"}} +{"t":{"$date":"2025-05-01T11:55:38.070+00:00"},"s":"I", "c":"NETWORK", "id":4784905, "ctx":"SignalHandler","msg":"Shutting down the global connection pool"} +{"t":{"$date":"2025-05-01T11:55:38.070+00:00"},"s":"I", "c":"CONTROL", "id":4784906, "ctx":"SignalHandler","msg":"Shutting down the FlowControlTicketholder"} +{"t":{"$date":"2025-05-01T11:55:38.070+00:00"},"s":"I", "c":"-", "id":20520, "ctx":"SignalHandler","msg":"Stopping further Flow Control ticket acquisitions."} +{"t":{"$date":"2025-05-01T11:55:38.070+00:00"},"s":"I", "c":"CONTROL", "id":4784908, "ctx":"SignalHandler","msg":"Shutting down the PeriodicThreadToAbortExpiredTransactions"} +{"t":{"$date":"2025-05-01T11:55:38.070+00:00"},"s":"I", "c":"REPL", "id":4784909, "ctx":"SignalHandler","msg":"Shutting down the ReplicationCoordinator"} +{"t":{"$date":"2025-05-01T11:55:38.070+00:00"},"s":"I", "c":"SHARDING", "id":4784910, "ctx":"SignalHandler","msg":"Shutting down the ShardingInitializationMongoD"} +{"t":{"$date":"2025-05-01T11:55:38.070+00:00"},"s":"I", "c":"REPL", "id":4784911, "ctx":"SignalHandler","msg":"Enqueuing the ReplicationStateTransitionLock for shutdown"} +{"t":{"$date":"2025-05-01T11:55:38.070+00:00"},"s":"I", "c":"-", "id":4784912, "ctx":"SignalHandler","msg":"Killing all operations for shutdown"} +{"t":{"$date":"2025-05-01T11:55:38.070+00:00"},"s":"I", "c":"-", "id":4695300, "ctx":"SignalHandler","msg":"Interrupted all currently running operations","attr":{"opsKilled":4}} +{"t":{"$date":"2025-05-01T11:55:38.070+00:00"},"s":"I", "c":"TENANT_M", "id":5093807, "ctx":"SignalHandler","msg":"Shutting down all TenantMigrationAccessBlockers on global shutdown"} +{"t":{"$date":"2025-05-01T11:55:38.070+00:00"},"s":"I", "c":"COMMAND", "id":4784913, "ctx":"SignalHandler","msg":"Shutting down all open transactions"} +{"t":{"$date":"2025-05-01T11:55:38.070+00:00"},"s":"I", "c":"REPL", "id":4784914, "ctx":"SignalHandler","msg":"Acquiring the ReplicationStateTransitionLock for shutdown"} +{"t":{"$date":"2025-05-01T11:55:38.070+00:00"},"s":"I", "c":"INDEX", "id":4784915, "ctx":"SignalHandler","msg":"Shutting down the IndexBuildsCoordinator"} +{"t":{"$date":"2025-05-01T11:55:38.070+00:00"},"s":"I", "c":"REPL", "id":4784916, "ctx":"SignalHandler","msg":"Reacquiring the ReplicationStateTransitionLock for shutdown"} +{"t":{"$date":"2025-05-01T11:55:38.070+00:00"},"s":"I", "c":"REPL", "id":4784917, "ctx":"SignalHandler","msg":"Attempting to mark clean shutdown"} +{"t":{"$date":"2025-05-01T11:55:38.071+00:00"},"s":"I", "c":"NETWORK", "id":4784918, "ctx":"SignalHandler","msg":"Shutting down the ReplicaSetMonitor"} +{"t":{"$date":"2025-05-01T11:55:38.071+00:00"},"s":"I", "c":"SHARDING", "id":4784921, "ctx":"SignalHandler","msg":"Shutting down the MigrationUtilExecutor"} +{"t":{"$date":"2025-05-01T11:55:38.071+00:00"},"s":"I", "c":"ASIO", "id":22582, "ctx":"MigrationUtil-TaskExecutor","msg":"Killing all outstanding egress activity."} +{"t":{"$date":"2025-05-01T11:55:38.071+00:00"},"s":"I", "c":"COMMAND", "id":4784923, "ctx":"SignalHandler","msg":"Shutting down the ServiceEntryPoint"} +{"t":{"$date":"2025-05-01T11:55:38.071+00:00"},"s":"I", "c":"CONTROL", "id":4784927, "ctx":"SignalHandler","msg":"Shutting down the HealthLog"} +{"t":{"$date":"2025-05-01T11:55:38.071+00:00"},"s":"I", "c":"CONTROL", "id":4784928, "ctx":"SignalHandler","msg":"Shutting down the TTL monitor"} +{"t":{"$date":"2025-05-01T11:55:38.071+00:00"},"s":"I", "c":"INDEX", "id":3684100, "ctx":"SignalHandler","msg":"Shutting down TTL collection monitor thread"} +{"t":{"$date":"2025-05-01T11:55:38.071+00:00"},"s":"I", "c":"INDEX", "id":3684101, "ctx":"SignalHandler","msg":"Finished shutting down TTL collection monitor thread"} +{"t":{"$date":"2025-05-01T11:55:38.071+00:00"},"s":"I", "c":"CONTROL", "id":4784929, "ctx":"SignalHandler","msg":"Acquiring the global lock for shutdown"} +{"t":{"$date":"2025-05-01T11:55:38.071+00:00"},"s":"I", "c":"CONTROL", "id":4784930, "ctx":"SignalHandler","msg":"Shutting down the storage engine"} +{"t":{"$date":"2025-05-01T11:55:38.071+00:00"},"s":"I", "c":"STORAGE", "id":22320, "ctx":"SignalHandler","msg":"Shutting down journal flusher thread"} +{"t":{"$date":"2025-05-01T11:55:38.071+00:00"},"s":"I", "c":"STORAGE", "id":22321, "ctx":"SignalHandler","msg":"Finished shutting down journal flusher thread"} +{"t":{"$date":"2025-05-01T11:55:38.071+00:00"},"s":"I", "c":"STORAGE", "id":22322, "ctx":"SignalHandler","msg":"Shutting down checkpoint thread"} +{"t":{"$date":"2025-05-01T11:55:38.072+00:00"},"s":"I", "c":"STORAGE", "id":22323, "ctx":"SignalHandler","msg":"Finished shutting down checkpoint thread"} +{"t":{"$date":"2025-05-01T11:55:38.072+00:00"},"s":"I", "c":"STORAGE", "id":22261, "ctx":"SignalHandler","msg":"Timestamp monitor shutting down"} +{"t":{"$date":"2025-05-01T11:55:38.072+00:00"},"s":"I", "c":"STORAGE", "id":20282, "ctx":"SignalHandler","msg":"Deregistering all the collections"} +{"t":{"$date":"2025-05-01T11:55:38.073+00:00"},"s":"I", "c":"STORAGE", "id":22317, "ctx":"SignalHandler","msg":"WiredTigerKVEngine shutting down"} +{"t":{"$date":"2025-05-01T11:55:38.073+00:00"},"s":"I", "c":"STORAGE", "id":22318, "ctx":"SignalHandler","msg":"Shutting down session sweeper thread"} +{"t":{"$date":"2025-05-01T11:55:38.073+00:00"},"s":"I", "c":"STORAGE", "id":22319, "ctx":"SignalHandler","msg":"Finished shutting down session sweeper thread"} +{"t":{"$date":"2025-05-01T11:55:38.073+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn1","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"maxAwaitTimeMS":10000,"topologyVersion":{"processId":{"$oid":"681360aa06fdf4c41296de5b"},"counter":0},"$db":"admin"},"numYields":0,"ok":0,"errMsg":"interrupted at shutdown","errName":"InterruptedAtShutdown","errCode":11600,"reslen":120,"locks":{},"remote":"127.0.0.1:38232","protocol":"op_msg","durationMillis":0}} +{"t":{"$date":"2025-05-01T11:55:38.073+00:00"},"s":"I", "c":"STORAGE", "id":4795902, "ctx":"SignalHandler","msg":"Closing WiredTiger","attr":{"closeConfig":"leak_memory=true,"}} +{"t":{"$date":"2025-05-01T11:55:38.075+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"SignalHandler","msg":"WiredTiger message","attr":{"message":"[1746100538:75233][1:0xffffb09ffc80], close_ckpt: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 82, snapshot max: 82 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 2903"}} +{"t":{"$date":"2025-05-01T11:55:38.076+00:00"},"s":"I", "c":"NETWORK", "id":22944, "ctx":"conn1","msg":"Connection ended","attr":{"remote":"127.0.0.1:38232","uuid":"93bd374c-7cac-404a-9a45-3c6645b8770f","connectionId":1,"connectionCount":4}} +{"t":{"$date":"2025-05-01T11:55:38.079+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"SignalHandler","msg":"WiredTiger message","attr":{"message":"[1746100538:79437][1:0xffffb09ffc80], WT_CONNECTION.close: [WT_VERB_RECOVERY_PROGRESS] shutdown checkpoint has successfully finished and ran for 5 milliseconds"}} +{"t":{"$date":"2025-05-01T11:55:38.079+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"SignalHandler","msg":"WiredTiger message","attr":{"message":"[1746100538:79466][1:0xffffb09ffc80], WT_CONNECTION.close: [WT_VERB_RECOVERY_PROGRESS] shutdown was completed successfully and took 5ms, including 0ms for the rollback to stable, and 5ms for the checkpoint."}} +{"t":{"$date":"2025-05-01T11:55:38.084+00:00"},"s":"I", "c":"STORAGE", "id":4795901, "ctx":"SignalHandler","msg":"WiredTiger closed","attr":{"durationMillis":11}} +{"t":{"$date":"2025-05-01T11:55:38.084+00:00"},"s":"I", "c":"STORAGE", "id":22279, "ctx":"SignalHandler","msg":"shutdown: removing fs lock..."} +{"t":{"$date":"2025-05-01T11:55:38.084+00:00"},"s":"I", "c":"-", "id":4784931, "ctx":"SignalHandler","msg":"Dropping the scope cache for shutdown"} +{"t":{"$date":"2025-05-01T11:55:38.084+00:00"},"s":"I", "c":"FTDC", "id":4784926, "ctx":"SignalHandler","msg":"Shutting down full-time data capture"} +{"t":{"$date":"2025-05-01T11:55:38.084+00:00"},"s":"I", "c":"FTDC", "id":20626, "ctx":"SignalHandler","msg":"Shutting down full-time diagnostic data capture"} +{"t":{"$date":"2025-05-01T11:55:38.089+00:00"},"s":"I", "c":"CONTROL", "id":20565, "ctx":"SignalHandler","msg":"Now exiting"} +{"t":{"$date":"2025-05-01T11:55:38.090+00:00"},"s":"I", "c":"CONTROL", "id":23138, "ctx":"SignalHandler","msg":"Shutting down","attr":{"exitCode":0}} diff --git a/agent/agents/mongodb/mongolog/internal/testdata/logs/no_slow_query.log b/agent/agents/mongodb/mongolog/internal/testdata/logs/no_slow_query.log new file mode 100644 index 00000000000..54737680207 --- /dev/null +++ b/agent/agents/mongodb/mongolog/internal/testdata/logs/no_slow_query.log @@ -0,0 +1,39 @@ +{"t":{"$date":"2025-04-29T12:00:51.845+00:00"},"s":"I", "c":"CONTROL", "id":23285, "ctx":"-","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"} +{"t":{"$date":"2025-04-29T12:00:51.856+00:00"},"s":"I", "c":"NETWORK", "id":4913010, "ctx":"-","msg":"Certificate information","attr":{"subject":"OU=nurlan@nurlan-XPS-15-9570 (Nurlan),O=mkcert development certificate","issuer":"CN=mkcert nurlan@nurlan-XPS-15-9570 (Nurlan),OU=nurlan@nurlan-XPS-15-9570 (Nurlan),O=mkcert development CA","thumbprint":"DA05DE75E1972C47F4107602A27619AE35D74D26","notValidBefore":{"$date":"2019-06-01T00:00:00.000Z"},"notValidAfter":{"$date":"2030-12-25T14:56:16.000Z"},"keyFile":"/etc/tls/certificates/server.pem","type":"Server"}} +{"t":{"$date":"2025-04-29T12:00:51.857+00:00"},"s":"I", "c":"NETWORK", "id":4915701, "ctx":"-","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":13},"outgoing":{"minWireVersion":0,"maxWireVersion":13},"isInternalClient":true}}} +{"t":{"$date":"2025-04-29T12:00:51.859+00:00"},"s":"W", "c":"ASIO", "id":22601, "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"} +{"t":{"$date":"2025-04-29T12:00:51.859+00:00"},"s":"I", "c":"NETWORK", "id":4648601, "ctx":"main","msg":"Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize."} +{"t":{"$date":"2025-04-29T12:00:51.860+00:00"},"s":"W", "c":"ASIO", "id":22601, "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"} +{"t":{"$date":"2025-04-29T12:00:51.861+00:00"},"s":"I", "c":"REPL", "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","ns":"config.tenantMigrationDonors"}} +{"t":{"$date":"2025-04-29T12:00:51.861+00:00"},"s":"I", "c":"REPL", "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","ns":"config.tenantMigrationRecipients"}} +{"t":{"$date":"2025-04-29T12:00:51.861+00:00"},"s":"I", "c":"CONTROL", "id":5945603, "ctx":"main","msg":"Multi threading initialized"} +{"t":{"$date":"2025-04-29T12:00:51.862+00:00"},"s":"I", "c":"CONTROL", "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":1,"port":27017,"dbPath":"/data/db","architecture":"64-bit","host":"1fa2c5caf876"}} +{"t":{"$date":"2025-04-29T12:00:51.862+00:00"},"s":"I", "c":"CONTROL", "id":23403, "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"5.0.31","gitVersion":"973237567d45610d6976d5d489dfaaef6a52c2f9","openSSLVersion":"OpenSSL 1.1.1f 31 Mar 2020","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu2004","distarch":"aarch64","target_arch":"aarch64"}}}} +{"t":{"$date":"2025-04-29T12:00:51.862+00:00"},"s":"I", "c":"CONTROL", "id":51765, "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Ubuntu","version":"20.04"}}} +{"t":{"$date":"2025-04-29T12:00:51.862+00:00"},"s":"I", "c":"CONTROL", "id":21951, "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"bindIp":"0.0.0.0","tls":{"CAFile":"/etc/tls/certificates/ca.crt","allowInvalidCertificates":true,"certificateKeyFile":"/etc/tls/certificates/server.pem","mode":"requireTLS"}},"operationProfiling":{"mode":"all"},"systemLog":{"destination":"file","path":"/var/log/mongodb/mongo_tls.log"}}}} +{"t":{"$date":"2025-04-29T12:00:51.893+00:00"},"s":"I", "c":"STORAGE", "id":22297, "ctx":"initandlisten","msg":"Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem","tags":["startupWarnings"]} +{"t":{"$date":"2025-04-29T12:00:51.893+00:00"},"s":"I", "c":"STORAGE", "id":22315, "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=6468M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),builtin_extension_config=(zstd=(compression_level=6)),file_manager=(close_idle_time=600,close_scan_interval=10,close_handle_minimum=2000),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress,compact_progress],"}} +{"t":{"$date":"2025-04-29T12:00:52.909+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1745928052:908994][1:0xffff9f1f3040], txn-recover: [WT_VERB_RECOVERY_PROGRESS] recovery log replay has successfully finished and ran for 0 milliseconds"}} +{"t":{"$date":"2025-04-29T12:00:52.909+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1745928052:909115][1:0xffff9f1f3040], txn-recover: [WT_VERB_RECOVERY_ALL] Set global recovery timestamp: (0, 0)"}} +{"t":{"$date":"2025-04-29T12:00:52.909+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1745928052:909131][1:0xffff9f1f3040], txn-recover: [WT_VERB_RECOVERY_ALL] Set global oldest timestamp: (0, 0)"}} +{"t":{"$date":"2025-04-29T12:00:52.909+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1745928052:909173][1:0xffff9f1f3040], txn-recover: [WT_VERB_RECOVERY_PROGRESS] recovery was completed successfully and took 0ms, including 0ms for the log replay, 0ms for the rollback to stable, and 0ms for the checkpoint."}} +{"t":{"$date":"2025-04-29T12:00:52.912+00:00"},"s":"I", "c":"STORAGE", "id":4795906, "ctx":"initandlisten","msg":"WiredTiger opened","attr":{"durationMillis":1019}} +{"t":{"$date":"2025-04-29T12:00:52.912+00:00"},"s":"I", "c":"RECOVERY", "id":23987, "ctx":"initandlisten","msg":"WiredTiger recoveryTimestamp","attr":{"recoveryTimestamp":{"$timestamp":{"t":0,"i":0}}}} +{"t":{"$date":"2025-04-29T12:00:52.935+00:00"},"s":"I", "c":"STORAGE", "id":22262, "ctx":"initandlisten","msg":"Timestamp monitor starting"} +{"t":{"$date":"2025-04-29T12:00:52.942+00:00"},"s":"W", "c":"CONTROL", "id":22120, "ctx":"initandlisten","msg":"Access control is not enabled for the database. Read and write access to data and configuration is unrestricted","tags":["startupWarnings"]} +{"t":{"$date":"2025-04-29T12:00:52.942+00:00"},"s":"W", "c":"CONTROL", "id":22124, "ctx":"initandlisten","msg":"While invalid X509 certificates may be used to connect to this server, they will not be considered permissible for authentication","tags":["startupWarnings"]} +{"t":{"$date":"2025-04-29T12:00:52.943+00:00"},"s":"W", "c":"CONTROL", "id":22178, "ctx":"initandlisten","msg":"/sys/kernel/mm/transparent_hugepage/enabled is 'always'. We suggest setting it to 'never' in this binary version","tags":["startupWarnings"]} +{"t":{"$date":"2025-04-29T12:00:52.946+00:00"},"s":"I", "c":"STORAGE", "id":20320, "ctx":"initandlisten","msg":"createCollection","attr":{"namespace":"admin.system.version","uuidDisposition":"provided","uuid":{"uuid":{"$uuid":"b4424252-be2d-49c0-9d05-753a87c75a61"}},"options":{"uuid":{"$uuid":"b4424252-be2d-49c0-9d05-753a87c75a61"}}}} +{"t":{"$date":"2025-04-29T12:00:52.958+00:00"},"s":"I", "c":"INDEX", "id":20345, "ctx":"initandlisten","msg":"Index build: done building","attr":{"buildUUID":null,"namespace":"admin.system.version","index":"_id_","commitTimestamp":null}} +{"t":{"$date":"2025-04-29T12:00:52.959+00:00"},"s":"I", "c":"REPL", "id":20459, "ctx":"initandlisten","msg":"Setting featureCompatibilityVersion","attr":{"newVersion":"5.0"}} +{"t":{"$date":"2025-04-29T12:00:52.959+00:00"},"s":"I", "c":"NETWORK", "id":4915702, "ctx":"initandlisten","msg":"Updated wire specification","attr":{"oldSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":13},"outgoing":{"minWireVersion":0,"maxWireVersion":13},"isInternalClient":true},"newSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":13,"maxWireVersion":13},"outgoing":{"minWireVersion":13,"maxWireVersion":13},"isInternalClient":true}}} +{"t":{"$date":"2025-04-29T12:00:52.959+00:00"},"s":"I", "c":"NETWORK", "id":4915702, "ctx":"initandlisten","msg":"Updated wire specification","attr":{"oldSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":13,"maxWireVersion":13},"outgoing":{"minWireVersion":13,"maxWireVersion":13},"isInternalClient":true},"newSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":13,"maxWireVersion":13},"outgoing":{"minWireVersion":13,"maxWireVersion":13},"isInternalClient":true}}} +{"t":{"$date":"2025-04-29T12:00:52.960+00:00"},"s":"I", "c":"STORAGE", "id":5071100, "ctx":"initandlisten","msg":"Clearing temp directory"} +{"t":{"$date":"2025-04-29T12:00:52.961+00:00"},"s":"I", "c":"CONTROL", "id":20536, "ctx":"initandlisten","msg":"Flow Control is enabled on this deployment"} +{"t":{"$date":"2025-04-29T12:00:52.965+00:00"},"s":"I", "c":"FTDC", "id":20625, "ctx":"initandlisten","msg":"Initializing full-time diagnostic data capture","attr":{"dataDirectory":"/data/db/diagnostic.data"}} +{"t":{"$date":"2025-04-29T12:00:52.966+00:00"},"s":"I", "c":"STORAGE", "id":20320, "ctx":"initandlisten","msg":"createCollection","attr":{"namespace":"local.startup_log","uuidDisposition":"generated","uuid":{"uuid":{"$uuid":"dc33c8a2-0b5e-4c61-b8c9-442c0506f8f1"}},"options":{"capped":true,"size":10485760}}} +{"t":{"$date":"2025-04-29T12:00:52.973+00:00"},"s":"I", "c":"INDEX", "id":20345, "ctx":"initandlisten","msg":"Index build: done building","attr":{"buildUUID":null,"namespace":"local.startup_log","index":"_id_","commitTimestamp":null}} +{"t":{"$date":"2025-04-29T12:00:52.973+00:00"},"s":"I", "c":"REPL", "id":6015317, "ctx":"initandlisten","msg":"Setting new configuration state","attr":{"newState":"ConfigReplicationDisabled","oldState":"ConfigPreStart"}} +{"t":{"$date":"2025-04-29T12:00:52.975+00:00"},"s":"I", "c":"NETWORK", "id":23015, "ctx":"listener","msg":"Listening on","attr":{"address":"/tmp/mongodb-27017.sock"}} +{"t":{"$date":"2025-04-29T12:00:52.975+00:00"},"s":"I", "c":"NETWORK", "id":23015, "ctx":"listener","msg":"Listening on","attr":{"address":"0.0.0.0"}} +{"t":{"$date":"2025-04-29T12:00:52.975+00:00"},"s":"I", "c":"NETWORK", "id":23016, "ctx":"listener","msg":"Waiting for connections","attr":{"port":27017,"ssl":"on"}} diff --git a/agent/agents/mongodb/mongolog/internal/testdata/logs/slow_query_with_$cmd.log b/agent/agents/mongodb/mongolog/internal/testdata/logs/slow_query_with_$cmd.log new file mode 100644 index 00000000000..1b8024e0ca1 --- /dev/null +++ b/agent/agents/mongodb/mongolog/internal/testdata/logs/slow_query_with_$cmd.log @@ -0,0 +1 @@ +{"t":{"$date":"2025-04-30T08:56:32.702+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn1","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","appName":"mongosh 2.3.8","command":{"hello":1,"maxAwaitTimeMS":10000,"topologyVersion":{"processId":{"$oid":"6811dc4e0aa9d69a6f72f912"},"counter":0},"$db":"admin"},"numYields":0,"ok":0,"errMsg":"interrupted at shutdown","errName":"InterruptedAtShutdown","errCode":11600,"reslen":120,"locks":{},"remote":"127.0.0.1:44756","protocol":"op_msg","durationMillis":0}} diff --git a/agent/agents/mongodb/mongolog/mongodb.go b/agent/agents/mongodb/mongolog/mongodb.go new file mode 100644 index 00000000000..81863a51425 --- /dev/null +++ b/agent/agents/mongodb/mongolog/mongodb.go @@ -0,0 +1,127 @@ +// Copyright (C) 2023 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 mongolog runs built-in QAN Agent for MongoDB Mongolog. +package mongolog + +import ( + "context" + + "github.com/prometheus/client_golang/prometheus" + "github.com/sirupsen/logrus" + "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" + + "github.com/percona/pmm/agent/agents" + mongolog "github.com/percona/pmm/agent/agents/mongodb/mongolog/internal" + "github.com/percona/pmm/agent/agents/mongodb/shared/report" + inventoryv1 "github.com/percona/pmm/api/inventory/v1" +) + +// MongoDB extracts performance data from Mongo op log. +type MongoDB struct { + agentID string + l *logrus.Entry + changes chan agents.Change + + mongoDSN string + logFilePrefix string + maxQueryLength int32 +} + +// Params represent Agent parameters. +type Params struct { + DSN string + AgentID string + LogFilePrefix string // for development and testing + MaxQueryLength int32 +} + +// New creates new MongoDB QAN service. +func New(params *Params, l *logrus.Entry) (*MongoDB, error) { + // if dsn is incorrect we should exit immediately as this is not gonna correct itself + _, err := connstring.Parse(params.DSN) + if err != nil { + return nil, err + } + + return newMongo(params.DSN, l, params), nil +} + +func newMongo(mongoDSN string, l *logrus.Entry, params *Params) *MongoDB { + return &MongoDB{ + agentID: params.AgentID, + mongoDSN: mongoDSN, + logFilePrefix: params.LogFilePrefix, + maxQueryLength: params.MaxQueryLength, + l: l, + changes: make(chan agents.Change, 10), + } +} + +// Run extracts performance data and sends it to the channel until ctx is canceled. +func (m *MongoDB) Run(ctx context.Context) { + var log Mongolog + + defer func() { + log.Stop() //nolint:errcheck + log = nil + m.changes <- agents.Change{Status: inventoryv1.AgentStatus_AGENT_STATUS_DONE} + close(m.changes) + }() + + m.changes <- agents.Change{Status: inventoryv1.AgentStatus_AGENT_STATUS_STARTING} + + log = mongolog.New(m.mongoDSN, m.l, m, m.agentID, m.logFilePrefix, m.maxQueryLength) + if err := log.Start(ctx); err != nil { + m.l.Errorf("can't run mongolog, reason: %v", err) + m.changes <- agents.Change{Status: inventoryv1.AgentStatus_AGENT_STATUS_STOPPING} + return + } + + m.changes <- agents.Change{Status: inventoryv1.AgentStatus_AGENT_STATUS_RUNNING} + + <-ctx.Done() + m.changes <- agents.Change{Status: inventoryv1.AgentStatus_AGENT_STATUS_STOPPING} +} + +// Changes returns channel that should be read until it is closed. +func (m *MongoDB) Changes() <-chan agents.Change { + return m.changes +} + +// Write writes MetricsBuckets to pmm-managed +func (m *MongoDB) Write(r *report.Report) error { + m.changes <- agents.Change{MetricsBucket: r.Buckets} + return nil +} + +type Mongolog interface { //nolint:revive + Start(ctx context.Context) error + Stop() error +} + +// Describe implements prometheus.Collector. +func (m *MongoDB) Describe(ch chan<- *prometheus.Desc) { //nolint:revive + // This method is needed to satisfy interface. +} + +// Collect implement prometheus.Collector. +func (m *MongoDB) Collect(ch chan<- prometheus.Metric) { //nolint:revive + // This method is needed to satisfy interface. +} + +// check interfaces. +var ( + _ prometheus.Collector = (*MongoDB)(nil) +) diff --git a/agent/agents/mongodb/mongolog/mongodb_test.go b/agent/agents/mongodb/mongolog/mongodb_test.go new file mode 100644 index 00000000000..052d34c0397 --- /dev/null +++ b/agent/agents/mongodb/mongolog/mongodb_test.go @@ -0,0 +1,74 @@ +// Copyright (C) 2023 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 mongolog + +import ( + "context" + "path/filepath" + "testing" + "time" + + "github.com/sirupsen/logrus" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/percona/pmm/agent/utils/templates" + "github.com/percona/pmm/agent/utils/tests" + inventoryv1 "github.com/percona/pmm/api/inventory/v1" +) + +func TestMongoRun(t *testing.T) { + testdata, err := filepath.Abs("../../../testdata/mongo") + require.NoError(t, err) + sslDSNTemplate, files := tests.GetTestMongoDBWithSSLDSN(t, "../../..") + tempDir := t.TempDir() + sslDSN, err := templates.RenderDSN(sslDSNTemplate, files, tempDir) + require.NoError(t, err) + for _, params := range []*Params{ + { + DSN: "mongodb://root:root-password@127.0.0.1:27017/admin", + AgentID: "test", + LogFilePrefix: testdata, + }, + { + DSN: sslDSN, + AgentID: "test", + LogFilePrefix: testdata, + }, + } { + m, err := New(params, logrus.WithField("test", t.Name())) + require.NoError(t, err) + + ctx, cancel := context.WithTimeout(t.Context(), 3*time.Second) + defer cancel() + go m.Run(ctx) + + // collect only status changes, skip QAN data + var actual []inventoryv1.AgentStatus + for c := range m.Changes() { + if c.Status != inventoryv1.AgentStatus_AGENT_STATUS_UNSPECIFIED { + actual = append(actual, c.Status) + } + } + + expected := []inventoryv1.AgentStatus{ + inventoryv1.AgentStatus_AGENT_STATUS_STARTING, + inventoryv1.AgentStatus_AGENT_STATUS_RUNNING, + inventoryv1.AgentStatus_AGENT_STATUS_STOPPING, + inventoryv1.AgentStatus_AGENT_STATUS_DONE, + } + assert.Equal(t, expected, actual) + } +} diff --git a/agent/agents/mongodb/internal/profiler/collector/collector.go b/agent/agents/mongodb/profiler/internal/collector/collector.go similarity index 96% rename from agent/agents/mongodb/internal/profiler/collector/collector.go rename to agent/agents/mongodb/profiler/internal/collector/collector.go index 1ac997d3e9b..b333d8e4ccb 100644 --- a/agent/agents/mongodb/internal/profiler/collector/collector.go +++ b/agent/agents/mongodb/profiler/internal/collector/collector.go @@ -28,7 +28,7 @@ import ( ) const ( - MgoTimeoutTail = 1 * time.Second + collectorChanCapacity = 100 ) var cursorTimeout = 3 * time.Second @@ -42,6 +42,7 @@ func New(client *mongo.Client, dbName string, logger *logrus.Entry) *Collector { } } +// Collector is used by Profiler agent. type Collector struct { // dependencies client *mongo.Client @@ -58,7 +59,7 @@ type Collector struct { wg *sync.WaitGroup // Wait() for goroutines to stop after being notified they should shutdown } -// Start starts but doesn't wait until it exits +// Start starts but doesn't wait until it exits. func (c *Collector) Start(context.Context) (<-chan proto.SystemProfile, error) { c.m.Lock() defer c.m.Unlock() @@ -68,7 +69,7 @@ func (c *Collector) Start(context.Context) (<-chan proto.SystemProfile, error) { // create new channels over which we will communicate to... // ... outside world by sending collected docs - c.docsChan = make(chan proto.SystemProfile, 100) + c.docsChan = make(chan proto.SystemProfile, collectorChanCapacity) // ... inside goroutine to close it c.doneChan = make(chan struct{}) @@ -104,7 +105,7 @@ func (c *Collector) Start(context.Context) (<-chan proto.SystemProfile, error) { return c.docsChan, nil } -// Stop stops running +// Stop stops running collector. func (c *Collector) Stop() { c.m.Lock() defer c.m.Unlock() diff --git a/agent/agents/mongodb/internal/profiler/collector/collector_test.go b/agent/agents/mongodb/profiler/internal/collector/collector_test.go similarity index 96% rename from agent/agents/mongodb/internal/profiler/collector/collector_test.go rename to agent/agents/mongodb/profiler/internal/collector/collector_test.go index ba3b22eeedf..853d55d59a8 100644 --- a/agent/agents/mongodb/internal/profiler/collector/collector_test.go +++ b/agent/agents/mongodb/profiler/internal/collector/collector_test.go @@ -35,9 +35,9 @@ import ( ) const ( - MgoTimeoutDialInfo = 5 * time.Second - MgoTimeoutSessionSync = 5 * time.Second - MgoTimeoutSessionSocket = 5 * time.Second + mgoTimeoutDialInfo = 5 * time.Second + mgoTimeoutSessionSync = 5 * time.Second + mgoTimeoutSessionSocket = 5 * time.Second ) type ProfilerStatus struct { @@ -199,7 +199,7 @@ func genData(ctx context.Context, client *mongo.Client, maxLoops, maxDocs int) { } func createSession(dsn string, agentID string) (*mongo.Client, error) { - ctx, cancel := context.WithTimeout(context.Background(), MgoTimeoutDialInfo) + ctx, cancel := context.WithTimeout(context.Background(), mgoTimeoutDialInfo) defer cancel() opts, err := mongo_fix.ClientOptionsForDSN(dsn) @@ -210,7 +210,7 @@ func createSession(dsn string, agentID string) (*mongo.Client, error) { opts = opts. SetDirect(true). SetReadPreference(readpref.Nearest()). - SetSocketTimeout(MgoTimeoutSessionSocket). + SetSocketTimeout(mgoTimeoutSessionSocket). SetAppName(fmt.Sprintf("QAN-mongodb-profiler-%s", agentID)) client, err := mongo.Connect(ctx, opts) diff --git a/agent/agents/mongodb/internal/profiler/monitor.go b/agent/agents/mongodb/profiler/internal/monitor.go similarity index 89% rename from agent/agents/mongodb/internal/profiler/monitor.go rename to agent/agents/mongodb/profiler/internal/monitor.go index 0dfe03b99b4..2f3f64e0247 100644 --- a/agent/agents/mongodb/internal/profiler/monitor.go +++ b/agent/agents/mongodb/profiler/internal/monitor.go @@ -21,9 +21,9 @@ import ( "github.com/sirupsen/logrus" "go.mongodb.org/mongo-driver/mongo" - "github.com/percona/pmm/agent/agents/mongodb/internal/profiler/aggregator" - "github.com/percona/pmm/agent/agents/mongodb/internal/profiler/collector" - "github.com/percona/pmm/agent/agents/mongodb/internal/profiler/parser" + "github.com/percona/pmm/agent/agents/mongodb/profiler/internal/collector" + "github.com/percona/pmm/agent/agents/mongodb/profiler/internal/parser" + "github.com/percona/pmm/agent/agents/mongodb/shared/aggregator" ) // NewMonitor creates new monitor. @@ -51,6 +51,7 @@ type monitor struct { running bool // Is this service running? } +// Start starts monitor to collect and parse data. func (m *monitor) Start(ctx context.Context) error { m.m.Lock() defer m.m.Unlock() @@ -90,6 +91,7 @@ func (m *monitor) Start(ctx context.Context) error { return nil } +// Stop stops monitor. func (m *monitor) Stop() { m.m.Lock() defer m.m.Unlock() diff --git a/agent/agents/mongodb/internal/profiler/monitors.go b/agent/agents/mongodb/profiler/internal/monitors.go similarity index 96% rename from agent/agents/mongodb/internal/profiler/monitors.go rename to agent/agents/mongodb/profiler/internal/monitors.go index 1ad90db4bd0..512318d6ea2 100644 --- a/agent/agents/mongodb/internal/profiler/monitors.go +++ b/agent/agents/mongodb/profiler/internal/monitors.go @@ -25,9 +25,9 @@ import ( ) const ( - MgoTimeoutDialInfo = 5 * time.Second - MgoTimeoutSessionSync = 5 * time.Second - MgoTimeoutSessionSocket = 5 * time.Second + mgoTimeoutDialInfo = 5 * time.Second + mgoTimeoutSessionSync = 5 * time.Second + mgoTimeoutSessionSocket = 5 * time.Second ) type newMonitor func(client *mongo.Client, logger *logrus.Entry, dbName string) *monitor diff --git a/agent/agents/mongodb/internal/profiler/parser/parser.go b/agent/agents/mongodb/profiler/internal/parser/parser.go similarity index 92% rename from agent/agents/mongodb/internal/profiler/parser/parser.go rename to agent/agents/mongodb/profiler/internal/parser/parser.go index f56285350f5..4b3b7c652f0 100644 --- a/agent/agents/mongodb/internal/profiler/parser/parser.go +++ b/agent/agents/mongodb/profiler/internal/parser/parser.go @@ -22,9 +22,10 @@ import ( "github.com/percona/percona-toolkit/src/go/mongolib/proto" "github.com/sirupsen/logrus" - "github.com/percona/pmm/agent/agents/mongodb/internal/profiler/aggregator" + "github.com/percona/pmm/agent/agents/mongodb/shared/aggregator" ) +// New creates new parser. func New(docsChan <-chan proto.SystemProfile, aggregator *aggregator.Aggregator, logger *logrus.Entry) *Parser { return &Parser{ docsChan: docsChan, @@ -33,6 +34,7 @@ func New(docsChan <-chan proto.SystemProfile, aggregator *aggregator.Aggregator, } } +// Parser represents docs channel, aggregator and helpers. type Parser struct { // dependencies docsChan <-chan proto.SystemProfile @@ -47,7 +49,7 @@ type Parser struct { wg *sync.WaitGroup // Wait() for goroutines to stop after being notified they should shutdown } -// Start starts but doesn't wait until it exits +// Start starts but doesn't wait until it exits. func (p *Parser) Start(context.Context) error { p.m.Lock() defer p.m.Unlock() @@ -80,7 +82,7 @@ func (p *Parser) Start(context.Context) error { return nil } -// Stop stops running +// Stop stops running parser. func (p *Parser) Stop() { p.m.Lock() defer p.m.Unlock() @@ -94,7 +96,6 @@ func (p *Parser) Stop() { // wait for goroutines to exit p.wg.Wait() - return } func (p *Parser) Name() string { @@ -109,6 +110,7 @@ func start(ctx context.Context, wg *sync.WaitGroup, docsChan <-chan proto.System for { // check if we should shutdown select { + // PMM-13947 case <-doneChan: return default: @@ -117,6 +119,7 @@ func start(ctx context.Context, wg *sync.WaitGroup, docsChan <-chan proto.System // aggregate documents and create report select { + // PMM-13947 case doc, ok := <-docsChan: // if channel got closed we should exit as there is nothing we can listen to if !ok { diff --git a/agent/agents/mongodb/internal/profiler/parser/parser_test.go b/agent/agents/mongodb/profiler/internal/parser/parser_test.go similarity index 91% rename from agent/agents/mongodb/internal/profiler/parser/parser_test.go rename to agent/agents/mongodb/profiler/internal/parser/parser_test.go index e7490c139da..c6c8dd00c2c 100644 --- a/agent/agents/mongodb/internal/profiler/parser/parser_test.go +++ b/agent/agents/mongodb/profiler/internal/parser/parser_test.go @@ -26,8 +26,8 @@ import ( "github.com/stretchr/testify/require" "go.mongodb.org/mongo-driver/bson" - "github.com/percona/pmm/agent/agents/mongodb/internal/profiler/aggregator" - "github.com/percona/pmm/agent/agents/mongodb/internal/report" + "github.com/percona/pmm/agent/agents/mongodb/shared/aggregator" + "github.com/percona/pmm/agent/agents/mongodb/shared/report" "github.com/percona/pmm/agent/utils/truncate" ) @@ -129,14 +129,14 @@ func TestParserRunning(t *testing.T) { select { case actual := <-reportChan: expected := report.Report{ - StartTs: timeStart, - EndTs: timeEnd, + StartTS: timeStart, + EndTS: timeEnd, } - assert.Equal(t, expected.StartTs, actual.StartTs) - assert.Equal(t, expected.EndTs, actual.EndTs) + assert.Equal(t, expected.StartTS, actual.StartTS) + assert.Equal(t, expected.EndTS, actual.EndTS) assert.Len(t, actual.Buckets, 1) - assert.EqualValues(t, actual.Buckets[0].Common.NumQueries, 1) + assert.InEpsilon(t, 1, actual.Buckets[0].Common.NumQueries, 0.001) case <-time.After(d + 5*time.Second): t.Error("test timeout") diff --git a/agent/agents/mongodb/internal/profiler/profiler.go b/agent/agents/mongodb/profiler/internal/profiler.go similarity index 93% rename from agent/agents/mongodb/internal/profiler/profiler.go rename to agent/agents/mongodb/profiler/internal/profiler.go index 66a6c6a967b..2d5121371e5 100644 --- a/agent/agents/mongodb/internal/profiler/profiler.go +++ b/agent/agents/mongodb/profiler/internal/profiler.go @@ -25,8 +25,8 @@ import ( "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/readpref" - "github.com/percona/pmm/agent/agents/mongodb/internal/profiler/aggregator" - "github.com/percona/pmm/agent/agents/mongodb/internal/profiler/sender" + "github.com/percona/pmm/agent/agents/mongodb/shared/aggregator" + "github.com/percona/pmm/agent/agents/mongodb/shared/sender" "github.com/percona/pmm/agent/utils/mongo_fix" ) @@ -64,7 +64,7 @@ type profiler struct { maxQueryLength int32 } -// Start starts analyzer but doesn't wait until it exits +// Start starts analyzer but doesn't wait until it exits. func (p *profiler) Start() error { p.m.Lock() defer p.m.Unlock() @@ -124,7 +124,7 @@ func (p *profiler) Start() error { return nil } -// Stop stops running analyzer, waits until it stops +// Stop stops running analyzer, waits until it stops. func (p *profiler) Stop() error { p.m.Lock() defer p.m.Unlock() @@ -172,6 +172,7 @@ func start(ctx context.Context, monitors *monitors, wg *sync.WaitGroup, doneChan for { // check if we should shutdown select { + // PMM-13947 case <-doneChan: return case <-time.After(1 * time.Minute): @@ -193,7 +194,7 @@ func signalReady(ready *sync.Cond) { } func createSession(dsn string, agentID string) (*mongo.Client, error) { - ctx, cancel := context.WithTimeout(context.Background(), MgoTimeoutDialInfo) + ctx, cancel := context.WithTimeout(context.Background(), mgoTimeoutDialInfo) defer cancel() opts, err := mongo_fix.ClientOptionsForDSN(dsn) @@ -204,7 +205,7 @@ func createSession(dsn string, agentID string) (*mongo.Client, error) { opts = opts. SetDirect(true). SetReadPreference(readpref.Nearest()). - SetSocketTimeout(MgoTimeoutSessionSocket). + SetSocketTimeout(mgoTimeoutSessionSocket). SetAppName(fmt.Sprintf("QAN-mongodb-profiler-%s", agentID)) client, err := mongo.Connect(ctx, opts) diff --git a/agent/agents/mongodb/internal/profiler/profiler_test.go b/agent/agents/mongodb/profiler/internal/profiler_test.go similarity index 98% rename from agent/agents/mongodb/internal/profiler/profiler_test.go rename to agent/agents/mongodb/profiler/internal/profiler_test.go index 2d84c52cd60..ef5009019e5 100644 --- a/agent/agents/mongodb/internal/profiler/profiler_test.go +++ b/agent/agents/mongodb/profiler/internal/profiler_test.go @@ -28,8 +28,8 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/mongo" - "github.com/percona/pmm/agent/agents/mongodb/internal/profiler/aggregator" - "github.com/percona/pmm/agent/agents/mongodb/internal/report" + "github.com/percona/pmm/agent/agents/mongodb/shared/aggregator" + "github.com/percona/pmm/agent/agents/mongodb/shared/report" "github.com/percona/pmm/agent/utils/templates" "github.com/percona/pmm/agent/utils/tests" "github.com/percona/pmm/agent/utils/truncate" diff --git a/agent/agents/mongodb/mongodb.go b/agent/agents/mongodb/profiler/mongodb.go similarity index 93% rename from agent/agents/mongodb/mongodb.go rename to agent/agents/mongodb/profiler/mongodb.go index 1de04fc73c7..ead0a5e397b 100644 --- a/agent/agents/mongodb/mongodb.go +++ b/agent/agents/mongodb/profiler/mongodb.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package mongodb runs built-in QAN Agent for MongoDB profiler. -package mongodb +// Package profiler runs built-in QAN Agent for MongoDB profiler. +package profiler import ( "context" @@ -23,8 +23,8 @@ import ( "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" "github.com/percona/pmm/agent/agents" - "github.com/percona/pmm/agent/agents/mongodb/internal/profiler" - "github.com/percona/pmm/agent/agents/mongodb/internal/report" + profiler "github.com/percona/pmm/agent/agents/mongodb/profiler/internal" + "github.com/percona/pmm/agent/agents/mongodb/shared/report" inventoryv1 "github.com/percona/pmm/api/inventory/v1" ) diff --git a/agent/agents/mongodb/mongodb_test.go b/agent/agents/mongodb/profiler/mongodb_test.go similarity index 98% rename from agent/agents/mongodb/mongodb_test.go rename to agent/agents/mongodb/profiler/mongodb_test.go index b6556d3940c..3b2eded3da4 100644 --- a/agent/agents/mongodb/mongodb_test.go +++ b/agent/agents/mongodb/profiler/mongodb_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package mongodb +package profiler import ( "context" @@ -29,7 +29,7 @@ import ( ) func TestMongoRun(t *testing.T) { - sslDSNTemplate, files := tests.GetTestMongoDBWithSSLDSN(t, "../../") + sslDSNTemplate, files := tests.GetTestMongoDBWithSSLDSN(t, "../../../") tempDir := t.TempDir() sslDSN, err := templates.RenderDSN(sslDSNTemplate, files, tempDir) require.NoError(t, err) diff --git a/agent/agents/mongodb/internal/profiler/aggregator/aggregator.go b/agent/agents/mongodb/shared/aggregator/aggregator.go similarity index 94% rename from agent/agents/mongodb/internal/profiler/aggregator/aggregator.go rename to agent/agents/mongodb/shared/aggregator/aggregator.go index 6caf581bbc9..82387f60390 100644 --- a/agent/agents/mongodb/internal/profiler/aggregator/aggregator.go +++ b/agent/agents/mongodb/shared/aggregator/aggregator.go @@ -26,14 +26,15 @@ import ( mongostats "github.com/percona/percona-toolkit/src/go/mongolib/stats" "github.com/sirupsen/logrus" - "github.com/percona/pmm/agent/agents/mongodb/internal/profiler/fingerprinter" - "github.com/percona/pmm/agent/agents/mongodb/internal/report" + "github.com/percona/pmm/agent/agents/mongodb/shared/fingerprinter" + "github.com/percona/pmm/agent/agents/mongodb/shared/report" "github.com/percona/pmm/agent/utils/truncate" agentv1 "github.com/percona/pmm/api/agent/v1" inventoryv1 "github.com/percona/pmm/api/inventory/v1" ) -var DefaultInterval = time.Duration(time.Minute) +// DefaultInterval is interval for aggregator tick. +var DefaultInterval = time.Minute const ( reportChanBuffer = 1000 @@ -41,7 +42,7 @@ const ( microsecondsToSeconds = 1000000 ) -// New returns configured *Aggregator +// New returns configured *Aggregator. func New(timeStart time.Time, agentID string, logger *logrus.Entry, maxQueryLength int32) *Aggregator { aggregator := &Aggregator{ agentID: agentID, @@ -62,7 +63,7 @@ func New(timeStart time.Time, agentID string, logger *logrus.Entry, maxQueryLeng return aggregator } -// Aggregator aggregates system.profile document +// Aggregator aggregates system.profile document. type Aggregator struct { agentID string maxQueryLength int32 @@ -86,7 +87,7 @@ type Aggregator struct { wg *sync.WaitGroup // Wait() for goroutines to stop after being notified they should shutdown } -// Add aggregates new system.profile document +// Add aggregates new system.profile document. func (a *Aggregator) Add(ctx context.Context, doc proto.SystemProfile) error { a.m.Lock() defer a.m.Unlock() @@ -107,7 +108,8 @@ func (a *Aggregator) Add(ctx context.Context, doc proto.SystemProfile) error { return a.mongostats.Add(doc) } -func (a *Aggregator) Start() <-chan *report.Report { +// Start run aggregator timer. +func (a *Aggregator) Start() <-chan *report.Report { //nolint:unparam a.m.Lock() defer a.m.Unlock() if a.running { @@ -139,6 +141,7 @@ func (a *Aggregator) Start() <-chan *report.Report { return a.reportChan } +// Stop stops aggregator timer. func (a *Aggregator) Stop() { a.m.Lock() defer a.m.Unlock() @@ -162,6 +165,7 @@ func start(ctx context.Context, wg *sync.WaitGroup, aggregator *Aggregator, done defer wg.Done() for { select { + // PMM-13947 case <-aggregator.t.C: // When Tail()ing system.profile collection you don't know if sample // is last sample in the collection until you get sample with higher timestamp than interval. @@ -181,6 +185,7 @@ func start(ctx context.Context, wg *sync.WaitGroup, aggregator *Aggregator, done } } +// Flush sends data to report chan. func (a *Aggregator) Flush(ctx context.Context) { a.m.Lock() defer a.m.Unlock() @@ -209,20 +214,22 @@ func (a *Aggregator) interval(ctx context.Context, ts time.Time) *report.Report } // create result + // PMM-13965 result := a.createResult(ctx) // translate result into report and return it + // PMM-13965 return report.MakeReport(ctx, a.timeStart, a.timeEnd, result) } -// TimeStart returns start time for current interval +// TimeStart returns start time for current interval. func (a *Aggregator) TimeStart() time.Time { a.mx.RLock() defer a.mx.RUnlock() return a.timeStart } -// TimeEnd returns end time for current interval +// TimeEnd returns end time for current interval. func (a *Aggregator) TimeEnd() time.Time { a.mx.RLock() defer a.mx.RUnlock() @@ -244,7 +251,7 @@ func (a *Aggregator) newInterval(ts time.Time) { func (a *Aggregator) createResult(_ context.Context) *report.Result { queries := a.mongostats.Queries() queryStats := queries.CalcQueriesStats(int64(DefaultInterval)) - var buckets []*agentv1.MetricsBucket + var buckets []*agentv1.MetricsBucket //nolint:prealloc a.logger.Tracef("Queries: %#v", queries) a.logger.Tracef("Query Stats: %#v", queryStats) diff --git a/agent/agents/mongodb/internal/profiler/aggregator/aggregator_test.go b/agent/agents/mongodb/shared/aggregator/aggregator_test.go similarity index 97% rename from agent/agents/mongodb/internal/profiler/aggregator/aggregator_test.go rename to agent/agents/mongodb/shared/aggregator/aggregator_test.go index c9dc3941638..53713c4c8db 100644 --- a/agent/agents/mongodb/internal/profiler/aggregator/aggregator_test.go +++ b/agent/agents/mongodb/shared/aggregator/aggregator_test.go @@ -27,7 +27,7 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" - "github.com/percona/pmm/agent/agents/mongodb/internal/report" + "github.com/percona/pmm/agent/agents/mongodb/shared/report" "github.com/percona/pmm/agent/utils/truncate" agentv1 "github.com/percona/pmm/api/agent/v1" inventoryv1 "github.com/percona/pmm/api/inventory/v1" @@ -61,7 +61,7 @@ func TestAggregator(t *testing.T) { result := aggregator.createResult(ctx) - require.Equal(t, 1, len(result.Buckets)) + require.Len(t, result.Buckets, 1) assert.Equal(t, report.Result{ Buckets: []*agentv1.MetricsBucket{ { @@ -129,7 +129,7 @@ func TestAggregator(t *testing.T) { result := aggregator.createResult(ctx) - require.Equal(t, 1, len(result.Buckets)) + require.Len(t, result.Buckets, 1) assert.True(t, utf8.ValidString(result.Buckets[0].Common.Example)) assert.Equal(t, report.Result{ Buckets: []*agentv1.MetricsBucket{ diff --git a/agent/agents/mongodb/internal/profiler/fingerprinter/fingerprinter.go b/agent/agents/mongodb/shared/fingerprinter/fingerprinter.go similarity index 89% rename from agent/agents/mongodb/internal/profiler/fingerprinter/fingerprinter.go rename to agent/agents/mongodb/shared/fingerprinter/fingerprinter.go index ef3569c4abb..d7a7e79eaf2 100644 --- a/agent/agents/mongodb/internal/profiler/fingerprinter/fingerprinter.go +++ b/agent/agents/mongodb/shared/fingerprinter/fingerprinter.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package fingerprinter is used to get fingerprint for queries. package fingerprinter import ( @@ -71,7 +72,7 @@ func (pf *ProfilerFingerprinter) Fingerprint(doc proto.SystemProfile) (fingerpri // Helper for find operations with optional parameters. func (pf *ProfilerFingerprinter) fingerprintFind(fp fingerprinter.Fingerprint, doc proto.SystemProfile) (fingerprinter.Fingerprint, error) { filter := "" - command := doc.Command.Map() + command := doc.Command.Map() //nolint:staticcheck // PMM-13964 if f, ok := command["filter"]; ok { values := maskValues(f, make(map[string]maskOption)) filterJSON, _ := json.Marshal(values) @@ -90,8 +91,15 @@ func (pf *ProfilerFingerprinter) fingerprintFind(fp fingerprinter.Fingerprint, d fp.Fingerprint += ")" if sort, ok := command["sort"]; ok { - sortJSON, _ := json.Marshal(sort.(bson.D).Map()) - fp.Fingerprint += fmt.Sprintf(`.sort(%s)`, sortJSON) + switch s := sort.(type) { + case bson.D: + sortJSON, _ := json.Marshal(s.Map()) //nolint:errchkjson,staticcheck // PMM-13964 + fp.Fingerprint += fmt.Sprintf(`.sort(%s)`, sortJSON) + case map[string]interface{}: + sortJSON, _ := json.Marshal(s) //nolint:errchkjson // PMM-13964 + fp.Fingerprint += fmt.Sprintf(`.sort(%s)`, sortJSON) + default: + } } if _, ok := command["limit"]; ok { fp.Fingerprint += `.limit(?)` @@ -106,15 +114,15 @@ func (pf *ProfilerFingerprinter) fingerprintFind(fp fingerprinter.Fingerprint, d return fp, nil } -// Helper for insert operations +// Helper for insert operations. func (pf *ProfilerFingerprinter) fingerprintInsert(fp fingerprinter.Fingerprint) (fingerprinter.Fingerprint, error) { fp.Fingerprint = fmt.Sprintf(`db.%s.insert(?)`, fp.Collection) return fp, nil } -// Helper for update operations +// Helper for update operations. func (pf *ProfilerFingerprinter) fingerprintUpdate(fp fingerprinter.Fingerprint, doc proto.SystemProfile) (fingerprinter.Fingerprint, error) { - command := doc.Command.Map() + command := doc.Command.Map() //nolint:staticcheck // PMM-13964 filterJSON, _ := json.Marshal(maskValues(command["q"], make(map[string]maskOption))) updateJSON, _ := json.Marshal(maskValues(command["u"], make(map[string]maskOption))) @@ -137,9 +145,9 @@ func (pf *ProfilerFingerprinter) fingerprintUpdate(fp fingerprinter.Fingerprint, return fp, nil } -// Helper for delete operations +// Helper for delete operations. func (pf *ProfilerFingerprinter) fingerprintDelete(fp fingerprinter.Fingerprint, doc proto.SystemProfile) (fingerprinter.Fingerprint, error) { - command := doc.Command.Map() + command := doc.Command.Map() //nolint:staticcheck // PMM-13964 method := "deleteMany" if limit, ok := command["limit"]; ok && limit == int32(1) { method = "deleteOne" @@ -150,10 +158,10 @@ func (pf *ProfilerFingerprinter) fingerprintDelete(fp fingerprinter.Fingerprint, return fp, nil } -// Helper for general command operations, including support for "aggregate" commands +// Helper for general command operations, including support for "aggregate" commands. func (pf *ProfilerFingerprinter) fingerprintCommand(fp fingerprinter.Fingerprint, doc proto.SystemProfile) (fingerprinter.Fingerprint, error) { // Unmarshal the command into a map for easy access and manipulation - command := doc.Command.Map() + command := doc.Command.Map() //nolint:staticcheck // PMM-13964 maskOptions := map[string]maskOption{ "$db": {remove: true}, @@ -178,7 +186,7 @@ func (pf *ProfilerFingerprinter) fingerprintCommand(fp fingerprinter.Fingerprint pipelineStages, _ := pipeline.(bson.A) for _, stage := range pipelineStages { - stageMap := stage.(bson.D).Map() + stageMap := stage.(bson.D).Map() //nolint:forcetypeassert,staticcheck // PMM-13964 var stageJSON []byte switch { case stageMap["$match"] != nil: @@ -256,6 +264,7 @@ func maskValues(data interface{}, options map[string]maskOption) interface{} { } } +// DefaultKeyFilters returns default keys used for filtering. func DefaultKeyFilters() []string { return []string{} } diff --git a/agent/agents/mongodb/internal/profiler/fingerprinter/fingerprinter_test.go b/agent/agents/mongodb/shared/fingerprinter/fingerprinter_test.go similarity index 95% rename from agent/agents/mongodb/internal/profiler/fingerprinter/fingerprinter_test.go rename to agent/agents/mongodb/shared/fingerprinter/fingerprinter_test.go index 86e3386eb17..c7da832944a 100644 --- a/agent/agents/mongodb/internal/profiler/fingerprinter/fingerprinter_test.go +++ b/agent/agents/mongodb/shared/fingerprinter/fingerprinter_test.go @@ -36,9 +36,9 @@ import ( ) const ( - MgoTimeoutDialInfo = 5 * time.Second - MgoTimeoutSessionSync = 5 * time.Second - MgoTimeoutSessionSocket = 5 * time.Second + mgoTimeoutDialInfo = 5 * time.Second + mgoTimeoutSessionSync = 5 * time.Second + mgoTimeoutSessionSocket = 5 * time.Second ) func createQuery(dbName string, startTime time.Time) bson.M { @@ -63,7 +63,7 @@ type ProfilerStatus struct { } func createSession(dsn string, agentID string) (*mongo.Client, error) { - ctx, cancel := context.WithTimeout(context.Background(), MgoTimeoutDialInfo) + ctx, cancel := context.WithTimeout(context.Background(), mgoTimeoutDialInfo) defer cancel() opts, err := mongo_fix.ClientOptionsForDSN(dsn) @@ -74,7 +74,7 @@ func createSession(dsn string, agentID string) (*mongo.Client, error) { opts = opts. SetDirect(true). SetReadPreference(readpref.Nearest()). - SetSocketTimeout(MgoTimeoutSessionSocket). + SetSocketTimeout(mgoTimeoutSessionSocket). SetAppName(fmt.Sprintf("QAN-mongodb-profiler-%s", agentID)) client, err := mongo.Connect(ctx, opts) @@ -95,7 +95,7 @@ func TestProfilerFingerprinter(t *testing.T) { return } - ctx, cancel := context.WithTimeout(context.Background(), MgoTimeoutSessionSync) + ctx, cancel := context.WithTimeout(t.Context(), mgoTimeoutSessionSync) defer cancel() _ = client.Database(dbName).Drop(ctx) defer client.Database(dbName).Drop(context.TODO()) //nolint:errcheck @@ -121,8 +121,8 @@ func TestProfilerFingerprinter(t *testing.T) { database.Collection("test").FindOne(ctx, bson.M{"id": 1, "name": "test", "time": time.Now()}) database.Collection("test").FindOneAndUpdate(ctx, bson.M{"id": 0}, bson.M{"$set": bson.M{"name": "new"}}) database.Collection("test").FindOneAndDelete(ctx, bson.M{"id": 1}) - database.Collection("secondcollection").Find(ctx, bson.M{"name": "sec"}, options.Find().SetLimit(1).SetSort(bson.M{"id": -1})) - database.Collection("test").Aggregate(ctx, + database.Collection("secondcollection").Find(ctx, bson.M{"name": "sec"}, options.Find().SetLimit(1).SetSort(bson.M{"id": -1})) //nolint:errcheck + database.Collection("test").Aggregate(ctx, //nolint:errcheck []bson.M{ { "$match": bson.M{"id": 0, "time": bson.M{"$gt": time.Now().Add(-time.Hour)}}, @@ -135,7 +135,7 @@ func TestProfilerFingerprinter(t *testing.T) { }, }, ) - database.Collection("secondcollection").Aggregate(ctx, mongo.Pipeline{ + database.Collection("secondcollection").Aggregate(ctx, mongo.Pipeline{ //nolint:errcheck bson.D{ { Key: "$collStats", @@ -155,8 +155,8 @@ func TestProfilerFingerprinter(t *testing.T) { }, }, }) - database.Collection("secondcollection").DeleteOne(ctx, bson.M{"id": 0}) - database.Collection("test").DeleteMany(ctx, bson.M{"name": "test"}) + database.Collection("secondcollection").DeleteOne(ctx, bson.M{"id": 0}) //nolint:errcheck + database.Collection("test").DeleteMany(ctx, bson.M{"name": "test"}) //nolint:errcheck profilerCollection := database.Collection("system.profile") query := createQuery(dbName, time.Now().Add(-10*time.Minute)) diff --git a/agent/agents/mongodb/internal/report/report.go b/agent/agents/mongodb/shared/report/report.go similarity index 66% rename from agent/agents/mongodb/internal/report/report.go rename to agent/agents/mongodb/shared/report/report.go index 63480965e9a..e3fd5d45c90 100644 --- a/agent/agents/mongodb/internal/report/report.go +++ b/agent/agents/mongodb/shared/report/report.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package report prepares report for QAN. package report import ( @@ -22,38 +23,43 @@ import ( agentv1 "github.com/percona/pmm/api/agent/v1" ) +// Report represents buckets and timestamps for qan.Report. type Report struct { - StartTs time.Time // Start time of interval, UTC - EndTs time.Time // Stop time of interval, UTC + StartTS time.Time // Start time of interval, UTC + EndTS time.Time // Stop time of interval, UTC Buckets []*agentv1.MetricsBucket // per-class metrics } -func MakeReport(ctx context.Context, startTime, endTime time.Time, result *Result) *Report { +// MakeReport prepare report for QAN from given data. +func MakeReport(_ context.Context, startTime, endTime time.Time, result *Result) *Report { // Sort classes by Query_time_sum, descending. sort.Sort(ByQueryTime(result.Buckets)) // Make qan.Report from Result and other metadata (e.g. Interval). report := &Report{ - StartTs: startTime, - EndTs: endTime, + StartTS: startTime, + EndTS: endTime, Buckets: result.Buckets, } return report } -// mongodb-profiler --> Result --> qan.Report --> data.Spooler - -// Data for an interval from slow log or performance schema (pfs) parser, -// passed to MakeReport() which transforms into a qan.Report{}. +// Result is passed to MakeReport() which transforms into a qan.Report{}. type Result struct { Buckets []*agentv1.MetricsBucket } +// ByQueryTime is sorted array of metrics buckets. type ByQueryTime []*agentv1.MetricsBucket -func (a ByQueryTime) Len() int { return len(a) } +// Len returns count of metrics buckets. +func (a ByQueryTime) Len() int { return len(a) } + +// Swap switch two buckets. func (a ByQueryTime) Swap(i, j int) { a[i], a[j] = a[j], a[i] } + +// Less compares two buckets. func (a ByQueryTime) Less(i, j int) bool { if a == nil || a[i] == nil || a[j] == nil { return false diff --git a/agent/agents/mongodb/internal/report/report_test.go b/agent/agents/mongodb/shared/report/report_test.go similarity index 95% rename from agent/agents/mongodb/internal/report/report_test.go rename to agent/agents/mongodb/shared/report/report_test.go index 534f8455214..2bf1bcaa3db 100644 --- a/agent/agents/mongodb/internal/report/report_test.go +++ b/agent/agents/mongodb/shared/report/report_test.go @@ -16,6 +16,6 @@ package report import "testing" -func TestReport(t *testing.T) { +func TestReport(_ *testing.T) { // we need at least one test per package to correctly calculate coverage } diff --git a/agent/agents/mongodb/internal/profiler/sender/sender.go b/agent/agents/mongodb/shared/sender/sender.go similarity index 92% rename from agent/agents/mongodb/internal/profiler/sender/sender.go rename to agent/agents/mongodb/shared/sender/sender.go index abfe1f8d62f..0f96fb23e34 100644 --- a/agent/agents/mongodb/internal/profiler/sender/sender.go +++ b/agent/agents/mongodb/shared/sender/sender.go @@ -21,9 +21,10 @@ import ( "github.com/sirupsen/logrus" - "github.com/percona/pmm/agent/agents/mongodb/internal/report" + "github.com/percona/pmm/agent/agents/mongodb/shared/report" ) +// New creates new sender. func New(reportChan <-chan *report.Report, w Writer, logger *logrus.Entry) *Sender { return &Sender{ reportChan: reportChan, @@ -32,6 +33,7 @@ func New(reportChan <-chan *report.Report, w Writer, logger *logrus.Entry) *Send } } +// Sender represents report channel and writer. type Sender struct { // dependencies reportChan <-chan *report.Report @@ -45,7 +47,7 @@ type Sender struct { wg *sync.WaitGroup // Wait() for goroutines to stop after being notified they should shutdown } -// Start starts but doesn't wait until it exits +// Start starts but doesn't wait until it exits. func (s *Sender) Start() error { s.m.Lock() defer s.m.Unlock() @@ -72,7 +74,7 @@ func (s *Sender) Start() error { return nil } -// Stop stops running +// Stop stops running sender. func (s *Sender) Stop() { s.m.Lock() defer s.m.Unlock() @@ -89,16 +91,13 @@ func (s *Sender) Stop() { return } -func (s *Sender) Name() string { - return "sender" -} - func start(ctx context.Context, wg *sync.WaitGroup, reportChan <-chan *report.Report, w Writer, logger *logrus.Entry, doneChan <-chan struct{}) { // signal WaitGroup when goroutine finished defer wg.Done() for { select { + // PMM-13947 case report, ok := <-reportChan: // if channel got closed we should exit as there is nothing we can listen to if !ok { diff --git a/agent/agents/mongodb/internal/profiler/sender/senter_test.go b/agent/agents/mongodb/shared/sender/sender_test.go similarity index 91% rename from agent/agents/mongodb/internal/profiler/sender/senter_test.go rename to agent/agents/mongodb/shared/sender/sender_test.go index 05402eac2b8..5dbea158fa0 100644 --- a/agent/agents/mongodb/internal/profiler/sender/senter_test.go +++ b/agent/agents/mongodb/shared/sender/sender_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/percona/pmm/agent/agents/mongodb/internal/report" + "github.com/percona/pmm/agent/agents/mongodb/shared/report" agentv1 "github.com/percona/pmm/api/agent/v1" ) @@ -39,8 +39,8 @@ func (w *testWriter) Write(actual *report.Report) error { func TestSender(t *testing.T) { expected := &report.Report{ - StartTs: time.Now(), - EndTs: time.Now().Add(time.Second * 10), + StartTS: time.Now(), + EndTS: time.Now().Add(time.Second * 10), Buckets: []*agentv1.MetricsBucket{{Common: &agentv1.MetricsBucket_Common{Queryid: "test"}}}, } diff --git a/agent/agents/mysql/slowlog/parser/parser.go b/agent/agents/mysql/slowlog/parser/parser.go index 900f5d22a83..867f26d1483 100644 --- a/agent/agents/mysql/slowlog/parser/parser.go +++ b/agent/agents/mysql/slowlog/parser/parser.go @@ -23,6 +23,8 @@ import ( "time" "github.com/percona/go-mysql/log" + + "github.com/percona/pmm/agent/utils/filereader" ) // Regular expressions to match important lines in slow log. @@ -47,7 +49,7 @@ func isHeader(s string) bool { // A SlowLogParser parses a MySQL slow log. type SlowLogParser struct { - r Reader + r filereader.Reader opts log.Options stopErr error @@ -63,7 +65,7 @@ type SlowLogParser struct { } // NewSlowLogParser returns a new SlowLogParser that reads from the given reader. -func NewSlowLogParser(r Reader, opts log.Options) *SlowLogParser { +func NewSlowLogParser(r filereader.Reader, opts log.Options) *SlowLogParser { if opts.StartOffset != 0 { panic("StartOffset is not supported") } diff --git a/agent/agents/mysql/slowlog/parser/parser_bench_test.go b/agent/agents/mysql/slowlog/parser/parser_bench_test.go index c8b5b66532b..a2dd3c4e7f8 100644 --- a/agent/agents/mysql/slowlog/parser/parser_bench_test.go +++ b/agent/agents/mysql/slowlog/parser/parser_bench_test.go @@ -23,6 +23,8 @@ import ( "github.com/percona/go-mysql/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/percona/pmm/agent/utils/filereader" ) func BenchmarkParser(b *testing.B) { @@ -47,8 +49,8 @@ func benchmarkFile(b *testing.B, name string) { for i := 0; i < b.N; i++ { b.StopTimer() - r, err := NewSimpleFileReader(name) - require.NoError(b, err) + r, err := filereader.NewSimpleFileReader(name) + assert.NoError(b, err) p := NewSlowLogParser(r, log.Options{}) b.StartTimer() diff --git a/agent/agents/mysql/slowlog/parser/parser_test.go b/agent/agents/mysql/slowlog/parser/parser_test.go index 1e030c908f6..2e675cf8c6c 100644 --- a/agent/agents/mysql/slowlog/parser/parser_test.go +++ b/agent/agents/mysql/slowlog/parser/parser_test.go @@ -28,6 +28,8 @@ import ( "github.com/percona/go-mysql/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/percona/pmm/agent/utils/filereader" ) var updateF = flag.Bool("update", false, "update golden .json files") @@ -35,7 +37,7 @@ var updateF = flag.Bool("update", false, "update golden .json files") func parseSlowLog(t *testing.T, filepath string, opts log.Options) []log.Event { t.Helper() - r, err := NewSimpleFileReader(filepath) + r, err := filereader.NewSimpleFileReader(filepath) require.NoError(t, err) defer func() { assert.NoError(t, r.Close()) @@ -330,7 +332,7 @@ func TestParserSpecial(t *testing.T) { t.Run("slow023", func(t *testing.T) { t.Parallel() - r, err := NewSimpleFileReader(filepath.Join("testdata", "slow023.log")) + r, err := filereader.NewSimpleFileReader(filepath.Join("testdata", "slow023.log")) require.NoError(t, err) defer func() { assert.NoError(t, r.Close()) diff --git a/agent/agents/mysql/slowlog/slowlog.go b/agent/agents/mysql/slowlog/slowlog.go index 136c7193b2b..3199007cf1f 100644 --- a/agent/agents/mysql/slowlog/slowlog.go +++ b/agent/agents/mysql/slowlog/slowlog.go @@ -41,6 +41,7 @@ import ( "github.com/percona/pmm/agent/queryparser" "github.com/percona/pmm/agent/tlshelpers" "github.com/percona/pmm/agent/utils/backoff" + "github.com/percona/pmm/agent/utils/filereader" "github.com/percona/pmm/agent/utils/truncate" agentv1 "github.com/percona/pmm/api/agent/v1" inventoryv1 "github.com/percona/pmm/api/inventory/v1" @@ -308,7 +309,7 @@ func (s *SlowLog) rotateSlowLog(ctx context.Context, slowLogPath string) error { // processFile extracts performance data from given file and sends it to the channel until ctx is canceled. func (s *SlowLog) processFile(ctx context.Context, file string, outlierTime float64) error { rl := s.l.WithField("component", "slowlog/reader").WithField("file", file) - reader, err := parser.NewContinuousFileReader(file, rl) + reader, err := filereader.NewContinuousFileReader(file, rl) if err != nil { s.l.Errorf("Failed to start reader for file %s: %s.", file, err) return err diff --git a/agent/agents/supervisor/supervisor.go b/agent/agents/supervisor/supervisor.go index feb5c48f413..6f8b4848086 100644 --- a/agent/agents/supervisor/supervisor.go +++ b/agent/agents/supervisor/supervisor.go @@ -33,7 +33,8 @@ import ( "google.golang.org/protobuf/proto" "github.com/percona/pmm/agent/agents" - "github.com/percona/pmm/agent/agents/mongodb" + "github.com/percona/pmm/agent/agents/mongodb/mongolog" + mongoprofiler "github.com/percona/pmm/agent/agents/mongodb/profiler" "github.com/percona/pmm/agent/agents/mysql/perfschema" "github.com/percona/pmm/agent/agents/mysql/slowlog" "github.com/percona/pmm/agent/agents/noop" @@ -581,12 +582,20 @@ func (s *Supervisor) startBuiltin(agentID string, builtinAgent *agentv1.SetState agent, err = perfschema.New(params, l) case inventoryv1.AgentType_AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT: - params := &mongodb.Params{ + params := &mongoprofiler.Params{ DSN: dsn, AgentID: agentID, MaxQueryLength: builtinAgent.MaxQueryLength, } - agent, err = mongodb.New(params, l) + agent, err = mongoprofiler.New(params, l) + + case inventoryv1.AgentType_AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT: + params := &mongolog.Params{ + DSN: dsn, + AgentID: agentID, + MaxQueryLength: builtinAgent.MaxQueryLength, + } + agent, err = mongolog.New(params, l) case inventoryv1.AgentType_AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT: params := &slowlog.Params{ diff --git a/agent/docker-compose.yml b/agent/docker-compose.yml index 792ab66b583..4ffb1777141 100644 --- a/agent/docker-compose.yml +++ b/agent/docker-compose.yml @@ -50,27 +50,35 @@ services: mongo: image: ${MONGO_IMAGE:-percona/percona-server-mongodb:5.0} container_name: pmm-agent_mongo - command: --profile=2 + command: + - --profile=2 + - --logpath=/var/log/mongodb/mongo.log + - --logappend ports: - "127.0.0.1:27017:27017" environment: - MONGO_INITDB_ROOT_USERNAME=root - MONGO_INITDB_ROOT_PASSWORD=root-password + volumes: + - ./testdata/mongo/var/log/mongodb:/var/log/mongodb - mongo_with_ssl: + mongo_with_tls: image: ${MONGO_IMAGE:-percona/percona-server-mongodb:5.0} - container_name: pmm-agent_mongo_with_ssl + container_name: pmm-agent_mongo_with_tls command: - --profile=2 - - --sslMode=requireSSL - - --sslPEMKeyFile=/etc/ssl/certificates/server.pem - - --sslCAFile=/etc/ssl/certificates/ca.crt - - --sslWeakCertificateValidation - - -bind_ip=0.0.0.0 + - --tlsMode=requireTLS + - --tlsCertificateKeyFile=/etc/tls/certificates/server.pem + - --tlsCAFile=/etc/tls/certificates/ca.crt + - --tlsAllowInvalidCertificates + - --bind_ip=0.0.0.0 + - --logpath=/var/log/mongodb/mongo_tls.log + - --logappend ports: - "127.0.0.1:27018:27017" volumes: - - ${PWD}/utils/tests/testdata/mongodb:/etc/ssl/certificates + - ${PWD}/utils/tests/testdata/mongodb:/etc/tls/certificates + - ./testdata/mongo/var/log/mongodb:/var/log/mongodb mongonoauth: image: ${MONGO_IMAGE:-percona/percona-server-mongodb:5.0} @@ -91,10 +99,10 @@ services: - "127.0.0.1:27020:27020" - "127.0.0.1:27021:27021" - mongo_repl_with_ssl: + mongo_repl_with_tls: image: ${MONGO_IMAGE:-percona/percona-server-mongodb:5.0} - container_name: pmm-agent_mongorepl_with_ssl - command: /scripts/mongo_repl_with_ssl.sh + container_name: pmm-agent_mongorepl_with_tls + command: /scripts/mongo_repl_with_tls.sh environment: - MONGO_IMAGE=${MONGO_IMAGE:-percona/percona-server-mongodb:5.0} ports: @@ -102,7 +110,7 @@ services: - "127.0.0.1:27023:27023" volumes: - ./testscripts/:/scripts - - ${PWD}/utils/tests/testdata/mongodb:/etc/ssl/certificates + - ${PWD}/utils/tests/testdata/mongodb:/etc/tls/certificates postgres: image: ${POSTGRES_IMAGE:-postgres:11} diff --git a/agent/main_test.go b/agent/main_test.go index 38f95d797e6..801d561dfc6 100644 --- a/agent/main_test.go +++ b/agent/main_test.go @@ -139,13 +139,6 @@ func TestImports(t *testing.T) { constraints[a] = c } - // slowlog parser should be fully independent - constraints["github.com/percona/pmm/agent/agents/mysql/slowlog/parser"] = constraint{ - denyPrefixes: []string{ - "github.com/percona/pmm/agent", - }, - } - // those packages should be independent from each other packs := []string{ // TODO https://jira.percona.com/browse/PMM-7206 diff --git a/agent/packages.dot b/agent/packages.dot index 74d45da9a12..951ec1366d0 100644 --- a/agent/packages.dot +++ b/agent/packages.dot @@ -3,10 +3,6 @@ digraph packages { "/agentlocal" -> "/tailog"; "/agentlocal.test" -> "/agentlocal"; "/agents/cache.test" -> "/agents/cache"; - "/agents/mongodb" -> "/agents"; - "/agents/mongodb" -> "/agents/mongodb/internal/profiler"; - "/agents/mongodb" -> "/agents/mongodb/internal/report"; - "/agents/mongodb.test" -> "/agents/mongodb"; "/agents/mysql/perfschema" -> "/agents"; "/agents/mysql/perfschema" -> "/agents/cache"; "/agents/mysql/perfschema" -> "/queryparser"; @@ -17,7 +13,6 @@ digraph packages { "/agents/mysql/slowlog" -> "/queryparser"; "/agents/mysql/slowlog" -> "/tlshelpers"; "/agents/mysql/slowlog.test" -> "/agents/mysql/slowlog"; - "/agents/mysql/slowlog/parser.test" -> "/agents/mysql/slowlog/parser"; "/agents/noop" -> "/agents"; "/agents/noop.test" -> "/agents/noop"; "/agents/postgres/pgstatmonitor" -> "/agents"; @@ -30,7 +25,8 @@ digraph packages { "/agents/postgres/pgstatstatements.test" -> "/agents/postgres/pgstatstatements"; "/agents/process.test" -> "/agents/process"; "/agents/supervisor" -> "/agents"; - "/agents/supervisor" -> "/agents/mongodb"; + "/agents/supervisor" -> "/agents/mongodb/mongolog"; + "/agents/supervisor" -> "/agents/mongodb/profiler"; "/agents/supervisor" -> "/agents/mysql/perfschema"; "/agents/supervisor" -> "/agents/mysql/slowlog"; "/agents/supervisor" -> "/agents/noop"; diff --git a/agent/runner/actions/mongodb_explain_action.go b/agent/runner/actions/mongodb_explain_action.go index afb2b383282..1e4775c2a15 100644 --- a/agent/runner/actions/mongodb_explain_action.go +++ b/agent/runner/actions/mongodb_explain_action.go @@ -164,21 +164,19 @@ func (e explain) prepareCommand() (bson.D, error) { return dropDBField(command), nil case "command": command = dropDBField(command) - if len(command) == 0 { return command, nil } + if command[0].Key == "group" { + return fixReduceField(command), nil + } - switch command[0].Key { - // Not supported commands. - case "dbStats": + // https://www.mongodb.com/docs/manual/tutorial/use-database-commands/?utm_source=chatgpt.com#database-command-form + res, isExplainable := reorderToCommandFirst(command) + if !isExplainable { return nil, errors.Errorf("command %s is not supported for explain", command[0].Key) - case "group": - default: - return command, nil } - - return fixReduceField(command), nil + return res, nil // Not supported operations. case "insert", "drop": return nil, errors.Errorf("operation %s is not supported for explain", e.Op) @@ -187,6 +185,40 @@ func (e explain) prepareCommand() (bson.D, error) { return command, nil } +func reorderToCommandFirst(doc bson.D) (bson.D, bool) { + recognized := map[string]struct{}{ + "find": {}, "findandmodify": {}, "insert": {}, "update": {}, "delete": {}, + "aggregate": {}, "count": {}, "distinct": {}, "mapReduce": {}, "dbStats": {}, + "collStats": {}, "listIndexes": {}, "currentOp": {}, "explain": {}, + "getMore": {}, "killCursors": {}, "create": {}, "drop": {}, + "listCollections": {}, "listDatabases": {}, "validate": {}, + } + + explainable := map[string]struct{}{ + "find": {}, "findandmodify": {}, "update": {}, "aggregate": {}, + "count": {}, "distinct": {}, "mapReduce": {}, "getMore": {}, + } + + var first bson.E + rest := []bson.E{} + for _, e := range doc { + if _, ok := recognized[e.Key]; ok && first.Key == "" { + first = e + continue + } + + rest = append(rest, e) + } + + if first.Key != "" { + reordered := append(bson.D{first}, rest...) + _, isExplainable := explainable[first.Key] + return reordered, isExplainable + } + + return doc, false +} + func (e explain) getDB() string { s := strings.SplitN(e.Ns, ".", 2) if len(s) == 2 { diff --git a/agent/runner/actions/mongodb_query_admincommand_action_test.go b/agent/runner/actions/mongodb_query_admincommand_action_test.go index 91e9c6b3854..27e448b91b5 100644 --- a/agent/runner/actions/mongodb_query_admincommand_action_test.go +++ b/agent/runner/actions/mongodb_query_admincommand_action_test.go @@ -16,7 +16,6 @@ package actions import ( "context" - "strings" "testing" "time" @@ -284,19 +283,6 @@ func getCmdLineOptsAssertionsWithSSL(t *testing.T, b []byte) { //nolint:thelper assert.Empty(t, security) argv := objxM.Get("argv").InterSlice() - expected := []interface{}{"mongod", "--sslMode=requireSSL", "--sslPEMKeyFile=/etc/ssl/certificates/server.pem"} - - var tlsMode bool - for _, arg := range argv { - argStr, ok := arg.(string) - assert.True(t, ok) - if strings.Contains(argStr, "tlsMode") { - tlsMode = true - break - } - } - if tlsMode { - expected = []interface{}{"mongod", "--tlsMode", "requireTLS", "--tlsCertificateKeyFile", "/etc/ssl/certificates/server.pem"} - } + expected := []interface{}{"mongod", "--tlsMode=requireTLS", "--tlsCertificateKeyFile=/etc/tls/certificates/server.pem"} assert.Subset(t, argv, expected) } diff --git a/agent/testscripts/mongo_repl_with_ssl.sh b/agent/testscripts/mongo_repl_with_ssl.sh deleted file mode 100755 index 21e47075f02..00000000000 --- a/agent/testscripts/mongo_repl_with_ssl.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -MONGODB_CLIENT="mongosh" -PARSED=(${MONGO_IMAGE//:/ }) -MONGODB_VERSION=${PARSED[1]} -MONGODB_VENDOR=${PARSED[0]} - -if [ "`echo ${MONGODB_VERSION} | cut -c 1`" = "4" ]; then - MONGODB_CLIENT="mongo" -fi -if [ "`echo ${MONGODB_VERSION} | cut -c 1`" = "5" ] && [ ${MONGODB_VENDOR} == "percona/percona-server-mongodb" ]; then - MONGODB_CLIENT="mongo" -fi - -mkdir /tmp/mongodb1 /tmp/mongodb2 -mongod --fork --logpath=/dev/null --profile=2 --replSet=rs0 --sslMode=requireSSL --sslPEMKeyFile=/etc/ssl/certificates/server.pem --sslCAFile=/etc/ssl/certificates/ca.crt --sslClusterFile=/etc/ssl/certificates/client.pem --bind_ip=0.0.0.0 --dbpath=/tmp/mongodb1 --port=27022 -mongod --fork --logpath=/dev/null --profile=2 --replSet=rs0 --sslMode=requireSSL --sslPEMKeyFile=/etc/ssl/certificates/server.pem --sslCAFile=/etc/ssl/certificates/ca.crt --sslClusterFile=/etc/ssl/certificates/client.pem --bind_ip=0.0.0.0 --dbpath=/tmp/mongodb2 --port=27023 -$MONGODB_CLIENT --port 27022 --ssl --sslCAFile=/etc/ssl/certificates/ca.crt --sslPEMKeyFile=/etc/ssl/certificates/client.pem --sslAllowInvalidHostnames --eval "rs.initiate( { _id : 'rs0', members: [{ _id: 0, host: 'localhost:27022' }, { _id: 1, host: 'localhost:27023', priority: 0 }]})" -tail -f /dev/null \ No newline at end of file diff --git a/agent/testscripts/mongo_repl_with_tls.sh b/agent/testscripts/mongo_repl_with_tls.sh new file mode 100755 index 00000000000..8bef66300b3 --- /dev/null +++ b/agent/testscripts/mongo_repl_with_tls.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +MONGODB_CLIENT="mongosh" +PARSED=(${MONGO_IMAGE//:/ }) +MONGODB_VERSION=${PARSED[1]} +MONGODB_VENDOR=${PARSED[0]} + +if [ "`echo ${MONGODB_VERSION} | cut -c 1`" = "4" ]; then + MONGODB_CLIENT="mongo" +fi +if [ "`echo ${MONGODB_VERSION} | cut -c 1`" = "5" ] && [ ${MONGODB_VENDOR} == "percona/percona-server-mongodb" ]; then + MONGODB_CLIENT="mongo" +fi + +mkdir /tmp/mongodb1 /tmp/mongodb2 +mongod --fork --logpath=/dev/null --profile=2 --replSet=rs0 --tlsMode=requireTLS --tlsCertificateKeyFile=/etc/tls/certificates/server.pem --tlsCAFile=/etc/tls/certificates/ca.crt --tlsClusterFile=/etc/tls/certificates/client.pem --bind_ip=0.0.0.0 --dbpath=/tmp/mongodb1 --port=27022 +mongod --fork --logpath=/dev/null --profile=2 --replSet=rs0 --tlsMode=requireTLS --tlsCertificateKeyFile=/etc/tls/certificates/server.pem --tlsCAFile=/etc/tls/certificates/ca.crt --tlsClusterFile=/etc/tls/certificates/client.pem --bind_ip=0.0.0.0 --dbpath=/tmp/mongodb2 --port=27023 +$MONGODB_CLIENT --port 27022 --tls --tlsCAFile=/etc/tls/certificates/ca.crt --tlsCertificateKeyFile=/etc/tls/certificates/client.pem --tlsAllowInvalidHostnames --eval "rs.initiate( { _id : 'rs0', members: [{ _id: 0, host: 'localhost:27022' }, { _id: 1, host: 'localhost:27023', priority: 0 }]})" +tail -f /dev/null diff --git a/agent/agents/mysql/slowlog/parser/continuous_file_reader.go b/agent/utils/filereader/continuous_file_reader.go similarity index 97% rename from agent/agents/mysql/slowlog/parser/continuous_file_reader.go rename to agent/utils/filereader/continuous_file_reader.go index 04be72e5726..c294b098a7c 100644 --- a/agent/agents/mysql/slowlog/parser/continuous_file_reader.go +++ b/agent/utils/filereader/continuous_file_reader.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +// Package filereader provides ability to read and watch file. +package filereader import ( "bufio" @@ -130,7 +131,7 @@ func (r *ContinuousFileReader) needsReopen() bool { return false } -// reopen reopens slowlog file. +// reopen reopens log file. func (r *ContinuousFileReader) reopen() { if err := r.f.Close(); err != nil { r.l.Warnf("Failed to close file %s: %s.", r.f.Name(), err) diff --git a/agent/agents/mysql/slowlog/parser/continuous_file_reader_test.go b/agent/utils/filereader/continuous_file_reader_test.go similarity index 94% rename from agent/agents/mysql/slowlog/parser/continuous_file_reader_test.go rename to agent/utils/filereader/continuous_file_reader_test.go index f07dfb10d74..a194ee80710 100644 --- a/agent/agents/mysql/slowlog/parser/continuous_file_reader_test.go +++ b/agent/utils/filereader/continuous_file_reader_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package filereader import ( "io" @@ -41,7 +41,7 @@ func TestContinuousFileReader(t *testing.T) { cleanup(t, files) }() - f, err := os.CreateTemp("", "pmm-agent-test-slowlog-reader-normal") + f, err := os.CreateTemp("", "pmm-agent-test-reader-normal") require.NoError(t, err) files = append(files, f.Name()) @@ -122,11 +122,11 @@ func TestContinuousFileReader(t *testing.T) { cleanup(t, files) }() - f, err := os.CreateTemp("", "pmm-agent-test-slowlog-reader-symlink-file1") + f, err := os.CreateTemp("", "pmm-agent-test-reader-symlink-file1") require.NoError(t, err) files = append(files, f.Name()) - symlink, err := os.CreateTemp("", "pmm-agent-test-slowlog-reader-symlink") + symlink, err := os.CreateTemp("", "pmm-agent-test-reader-symlink") require.NoError(t, err) require.NoError(t, symlink.Close()) symlinkName := symlink.Name() @@ -195,7 +195,7 @@ func TestContinuousFileReader(t *testing.T) { assert.Equal(t, &ReaderMetrics{InputSize: 3, InputPos: 3}, r.Metrics()) // test symlink change - f, err = os.CreateTemp("", "pmm-agent-test-slowlog-reader-symlink-file2") + f, err = os.CreateTemp("", "pmm-agent-test-reader-symlink-file2") require.NoError(t, err) files = append(files, f.Name()) require.NoError(t, os.Remove(symlinkName)) diff --git a/agent/agents/mysql/slowlog/parser/logger.go b/agent/utils/filereader/logger.go similarity index 97% rename from agent/agents/mysql/slowlog/parser/logger.go rename to agent/utils/filereader/logger.go index 5bad26ed6b8..4d1d78a8e08 100644 --- a/agent/agents/mysql/slowlog/parser/logger.go +++ b/agent/utils/filereader/logger.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package filereader // Logger defines the interface for a MySQL slow log parser logger. type Logger interface { diff --git a/agent/agents/mysql/slowlog/parser/logger_test.go b/agent/utils/filereader/logger_test.go similarity index 98% rename from agent/agents/mysql/slowlog/parser/logger_test.go rename to agent/utils/filereader/logger_test.go index 40e9b79f08f..5b322f2af3c 100644 --- a/agent/agents/mysql/slowlog/parser/logger_test.go +++ b/agent/utils/filereader/logger_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package filereader import "testing" diff --git a/agent/agents/mysql/slowlog/parser/reader.go b/agent/utils/filereader/reader.go similarity index 98% rename from agent/agents/mysql/slowlog/parser/reader.go rename to agent/utils/filereader/reader.go index ae47a979d55..a794d7048c0 100644 --- a/agent/agents/mysql/slowlog/parser/reader.go +++ b/agent/utils/filereader/reader.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package filereader // ReaderMetrics contains Reader metrics. type ReaderMetrics struct { diff --git a/agent/agents/mysql/slowlog/parser/simple_file_reader.go b/agent/utils/filereader/simple_file_reader.go similarity index 98% rename from agent/agents/mysql/slowlog/parser/simple_file_reader.go rename to agent/utils/filereader/simple_file_reader.go index 0d32fdad18e..b00847e10eb 100644 --- a/agent/agents/mysql/slowlog/parser/simple_file_reader.go +++ b/agent/utils/filereader/simple_file_reader.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package filereader import ( "bufio" diff --git a/agent/utils/tests/mongodb.go b/agent/utils/tests/mongodb.go index dd1c6d678e8..ac54594b594 100644 --- a/agent/utils/tests/mongodb.go +++ b/agent/utils/tests/mongodb.go @@ -56,7 +56,7 @@ func GetTestMongoDBWithSSLDSN(tb testing.TB, pathToRoot string) (string, *agentv tb.Skip("-short flag is passed, skipping test with real database.") } - dsn := "mongodb://localhost:27018/admin/?ssl=true&tlsCaFile={{.TextFiles.caFilePlaceholder}}&tlsCertificateKeyFile={{.TextFiles.certificateKeyFilePlaceholder}}" + dsn := "mongodb://localhost:27018/admin/?tls=true&tlsCaFile={{.TextFiles.caFilePlaceholder}}&tlsCertificateKeyFile={{.TextFiles.certificateKeyFilePlaceholder}}" caFile, err := os.ReadFile(filepath.Join(pathToRoot, "utils/tests/testdata/", "mongodb/", "ca.crt")) //nolint:gosec require.NoError(tb, err) @@ -82,7 +82,7 @@ func GetTestMongoDBReplicatedWithSSLDSN(tb testing.TB, pathToRoot string) (strin tb.Skip("-short flag is passed, skipping test with real database.") } - dsn := "mongodb://localhost:27022,localhost:27023/admin/?ssl=true&tlsCaFile=" + + dsn := "mongodb://localhost:27022,localhost:27023/admin/?tls=true&tlsCaFile=" + "{{.TextFiles.caFilePlaceholder}}&tlsCertificateKeyFile={{.TextFiles.certificateKeyFilePlaceholder}}" caFile, err := os.ReadFile(filepath.Join(filepath.Clean(pathToRoot), "utils/tests/testdata/", "mongodb/", "ca.crt")) diff --git a/api-tests/management/helpers.go b/api-tests/management/helpers.go index fb054e8ef60..55a44422d4c 100644 --- a/api-tests/management/helpers.go +++ b/api-tests/management/helpers.go @@ -176,6 +176,9 @@ func removeAllAgentsInList(t pmmapitests.TestingT, listAgentsOK *agents.ListAgen for _, agent := range listAgentsOK.Payload.QANMongodbProfilerAgent { agentIDs = append(agentIDs, agent.AgentID) } + for _, agent := range listAgentsOK.Payload.QANMongodbMongologAgent { + agentIDs = append(agentIDs, agent.AgentID) + } for _, agent := range listAgentsOK.Payload.QANMysqlSlowlogAgent { agentIDs = append(agentIDs, agent.AgentID) } diff --git a/api-tests/management/mongodb_test.go b/api-tests/management/mongodb_test.go index 38a663960ba..a71303f456a 100644 --- a/api-tests/management/mongodb_test.go +++ b/api-tests/management/mongodb_test.go @@ -129,6 +129,7 @@ func TestAddMongoDB(t *testing.T) { Username: "username", Password: "password", QANMongodbProfiler: true, + QANMongodbMongolog: true, SkipConnectionCheck: true, }, @@ -170,6 +171,7 @@ func TestAddMongoDB(t *testing.T) { require.Len(t, listAgents.Payload.MongodbExporter, 1) require.Len(t, listAgents.Payload.QANMongodbProfilerAgent, 1) + require.Len(t, listAgents.Payload.QANMongodbMongologAgent, 1) assert.Equal(t, []*agents.ListAgentsOKBodyMongodbExporterItems0{ { AgentID: listAgents.Payload.MongodbExporter[0].AgentID, @@ -195,6 +197,17 @@ func TestAddMongoDB(t *testing.T) { LogLevel: pointer.ToString("LOG_LEVEL_UNSPECIFIED"), }, }, listAgents.Payload.QANMongodbProfilerAgent) + assert.Equal(t, []*agents.ListAgentsOKBodyQANMongodbMongologAgentItems0{ + { + AgentID: listAgents.Payload.QANMongodbMongologAgent[0].AgentID, + ServiceID: serviceID, + PMMAgentID: pmmAgentID, + Username: "username", + Status: &AgentStatusUnknown, + CustomLabels: map[string]string{}, + LogLevel: pointer.ToString("LOG_LEVEL_UNSPECIFIED"), + }, + }, listAgents.Payload.QANMongodbMongologAgent) }) t.Run("With labels", func(t *testing.T) { @@ -898,6 +911,7 @@ func TestRemoveMongoDB(t *testing.T) { Username: "username", Password: "password", QANMongodbProfiler: withAgents, + QANMongodbMongolog: withAgents, SkipConnectionCheck: true, }, diff --git a/api/agentlocal/v1/json/client/agent_local_service/status2_responses.go b/api/agentlocal/v1/json/client/agent_local_service/status2_responses.go index 089e8424e6e..099ee73dea4 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/status2_responses.go +++ b/api/agentlocal/v1/json/client/agent_local_service/status2_responses.go @@ -587,7 +587,7 @@ type Status2OKBodyAgentsInfoItems0 struct { AgentID string `json:"agent_id,omitempty"` // AgentType describes supported Agent types. - // Enum: ["AGENT_TYPE_UNSPECIFIED","AGENT_TYPE_PMM_AGENT","AGENT_TYPE_VM_AGENT","AGENT_TYPE_NODE_EXPORTER","AGENT_TYPE_MYSQLD_EXPORTER","AGENT_TYPE_MONGODB_EXPORTER","AGENT_TYPE_POSTGRES_EXPORTER","AGENT_TYPE_PROXYSQL_EXPORTER","AGENT_TYPE_VALKEY_EXPORTER","AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT","AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT","AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT","AGENT_TYPE_EXTERNAL_EXPORTER","AGENT_TYPE_RDS_EXPORTER","AGENT_TYPE_AZURE_DATABASE_EXPORTER","AGENT_TYPE_NOMAD_AGENT"] + // Enum: ["AGENT_TYPE_UNSPECIFIED","AGENT_TYPE_PMM_AGENT","AGENT_TYPE_VM_AGENT","AGENT_TYPE_NODE_EXPORTER","AGENT_TYPE_MYSQLD_EXPORTER","AGENT_TYPE_MONGODB_EXPORTER","AGENT_TYPE_POSTGRES_EXPORTER","AGENT_TYPE_PROXYSQL_EXPORTER","AGENT_TYPE_VALKEY_EXPORTER","AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT","AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT","AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT","AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT","AGENT_TYPE_EXTERNAL_EXPORTER","AGENT_TYPE_RDS_EXPORTER","AGENT_TYPE_AZURE_DATABASE_EXPORTER","AGENT_TYPE_NOMAD_AGENT"] AgentType *string `json:"agent_type,omitempty"` // AgentStatus represents actual Agent status. @@ -632,7 +632,7 @@ var status2OkBodyAgentsInfoItems0TypeAgentTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["AGENT_TYPE_UNSPECIFIED","AGENT_TYPE_PMM_AGENT","AGENT_TYPE_VM_AGENT","AGENT_TYPE_NODE_EXPORTER","AGENT_TYPE_MYSQLD_EXPORTER","AGENT_TYPE_MONGODB_EXPORTER","AGENT_TYPE_POSTGRES_EXPORTER","AGENT_TYPE_PROXYSQL_EXPORTER","AGENT_TYPE_VALKEY_EXPORTER","AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT","AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT","AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT","AGENT_TYPE_EXTERNAL_EXPORTER","AGENT_TYPE_RDS_EXPORTER","AGENT_TYPE_AZURE_DATABASE_EXPORTER","AGENT_TYPE_NOMAD_AGENT"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["AGENT_TYPE_UNSPECIFIED","AGENT_TYPE_PMM_AGENT","AGENT_TYPE_VM_AGENT","AGENT_TYPE_NODE_EXPORTER","AGENT_TYPE_MYSQLD_EXPORTER","AGENT_TYPE_MONGODB_EXPORTER","AGENT_TYPE_POSTGRES_EXPORTER","AGENT_TYPE_PROXYSQL_EXPORTER","AGENT_TYPE_VALKEY_EXPORTER","AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT","AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT","AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT","AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT","AGENT_TYPE_EXTERNAL_EXPORTER","AGENT_TYPE_RDS_EXPORTER","AGENT_TYPE_AZURE_DATABASE_EXPORTER","AGENT_TYPE_NOMAD_AGENT"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -678,6 +678,9 @@ const ( // Status2OKBodyAgentsInfoItems0AgentTypeAGENTTYPEQANMONGODBPROFILERAGENT captures enum value "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT" Status2OKBodyAgentsInfoItems0AgentTypeAGENTTYPEQANMONGODBPROFILERAGENT string = "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT" + // Status2OKBodyAgentsInfoItems0AgentTypeAGENTTYPEQANMONGODBMONGOLOGAGENT captures enum value "AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT" + Status2OKBodyAgentsInfoItems0AgentTypeAGENTTYPEQANMONGODBMONGOLOGAGENT string = "AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT" + // Status2OKBodyAgentsInfoItems0AgentTypeAGENTTYPEQANPOSTGRESQLPGSTATEMENTSAGENT captures enum value "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT" Status2OKBodyAgentsInfoItems0AgentTypeAGENTTYPEQANPOSTGRESQLPGSTATEMENTSAGENT string = "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT" diff --git a/api/agentlocal/v1/json/client/agent_local_service/status_responses.go b/api/agentlocal/v1/json/client/agent_local_service/status_responses.go index d27e6ce44d6..43bc1443457 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/status_responses.go +++ b/api/agentlocal/v1/json/client/agent_local_service/status_responses.go @@ -624,7 +624,7 @@ type StatusOKBodyAgentsInfoItems0 struct { AgentID string `json:"agent_id,omitempty"` // AgentType describes supported Agent types. - // Enum: ["AGENT_TYPE_UNSPECIFIED","AGENT_TYPE_PMM_AGENT","AGENT_TYPE_VM_AGENT","AGENT_TYPE_NODE_EXPORTER","AGENT_TYPE_MYSQLD_EXPORTER","AGENT_TYPE_MONGODB_EXPORTER","AGENT_TYPE_POSTGRES_EXPORTER","AGENT_TYPE_PROXYSQL_EXPORTER","AGENT_TYPE_VALKEY_EXPORTER","AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT","AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT","AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT","AGENT_TYPE_EXTERNAL_EXPORTER","AGENT_TYPE_RDS_EXPORTER","AGENT_TYPE_AZURE_DATABASE_EXPORTER","AGENT_TYPE_NOMAD_AGENT"] + // Enum: ["AGENT_TYPE_UNSPECIFIED","AGENT_TYPE_PMM_AGENT","AGENT_TYPE_VM_AGENT","AGENT_TYPE_NODE_EXPORTER","AGENT_TYPE_MYSQLD_EXPORTER","AGENT_TYPE_MONGODB_EXPORTER","AGENT_TYPE_POSTGRES_EXPORTER","AGENT_TYPE_PROXYSQL_EXPORTER","AGENT_TYPE_VALKEY_EXPORTER","AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT","AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT","AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT","AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT","AGENT_TYPE_EXTERNAL_EXPORTER","AGENT_TYPE_RDS_EXPORTER","AGENT_TYPE_AZURE_DATABASE_EXPORTER","AGENT_TYPE_NOMAD_AGENT"] AgentType *string `json:"agent_type,omitempty"` // AgentStatus represents actual Agent status. @@ -669,7 +669,7 @@ var statusOkBodyAgentsInfoItems0TypeAgentTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["AGENT_TYPE_UNSPECIFIED","AGENT_TYPE_PMM_AGENT","AGENT_TYPE_VM_AGENT","AGENT_TYPE_NODE_EXPORTER","AGENT_TYPE_MYSQLD_EXPORTER","AGENT_TYPE_MONGODB_EXPORTER","AGENT_TYPE_POSTGRES_EXPORTER","AGENT_TYPE_PROXYSQL_EXPORTER","AGENT_TYPE_VALKEY_EXPORTER","AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT","AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT","AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT","AGENT_TYPE_EXTERNAL_EXPORTER","AGENT_TYPE_RDS_EXPORTER","AGENT_TYPE_AZURE_DATABASE_EXPORTER","AGENT_TYPE_NOMAD_AGENT"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["AGENT_TYPE_UNSPECIFIED","AGENT_TYPE_PMM_AGENT","AGENT_TYPE_VM_AGENT","AGENT_TYPE_NODE_EXPORTER","AGENT_TYPE_MYSQLD_EXPORTER","AGENT_TYPE_MONGODB_EXPORTER","AGENT_TYPE_POSTGRES_EXPORTER","AGENT_TYPE_PROXYSQL_EXPORTER","AGENT_TYPE_VALKEY_EXPORTER","AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT","AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT","AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT","AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT","AGENT_TYPE_EXTERNAL_EXPORTER","AGENT_TYPE_RDS_EXPORTER","AGENT_TYPE_AZURE_DATABASE_EXPORTER","AGENT_TYPE_NOMAD_AGENT"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -715,6 +715,9 @@ const ( // StatusOKBodyAgentsInfoItems0AgentTypeAGENTTYPEQANMONGODBPROFILERAGENT captures enum value "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT" StatusOKBodyAgentsInfoItems0AgentTypeAGENTTYPEQANMONGODBPROFILERAGENT string = "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT" + // StatusOKBodyAgentsInfoItems0AgentTypeAGENTTYPEQANMONGODBMONGOLOGAGENT captures enum value "AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT" + StatusOKBodyAgentsInfoItems0AgentTypeAGENTTYPEQANMONGODBMONGOLOGAGENT string = "AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT" + // StatusOKBodyAgentsInfoItems0AgentTypeAGENTTYPEQANPOSTGRESQLPGSTATEMENTSAGENT captures enum value "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT" StatusOKBodyAgentsInfoItems0AgentTypeAGENTTYPEQANPOSTGRESQLPGSTATEMENTSAGENT string = "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT" diff --git a/api/agentlocal/v1/json/v1.json b/api/agentlocal/v1/json/v1.json index dcaadca72e2..36067eae219 100644 --- a/api/agentlocal/v1/json/v1.json +++ b/api/agentlocal/v1/json/v1.json @@ -172,6 +172,7 @@ "AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT", "AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT", "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT", + "AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT", "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT", "AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT", "AGENT_TYPE_EXTERNAL_EXPORTER", @@ -369,6 +370,7 @@ "AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT", "AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT", "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT", + "AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT", "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT", "AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT", "AGENT_TYPE_EXTERNAL_EXPORTER", diff --git a/api/inventory/v1/agents.go b/api/inventory/v1/agents.go index e0156fb1b24..01899ea9e31 100644 --- a/api/inventory/v1/agents.go +++ b/api/inventory/v1/agents.go @@ -36,6 +36,7 @@ func (*ProxySQLExporter) sealedAgent() {} func (*QANMySQLPerfSchemaAgent) sealedAgent() {} func (*QANMySQLSlowlogAgent) sealedAgent() {} func (*QANMongoDBProfilerAgent) sealedAgent() {} +func (*QANMongoDBMongologAgent) sealedAgent() {} func (*QANPostgreSQLPgStatementsAgent) sealedAgent() {} func (*QANPostgreSQLPgStatMonitorAgent) sealedAgent() {} func (*RDSExporter) sealedAgent() {} diff --git a/api/inventory/v1/agents.pb.go b/api/inventory/v1/agents.pb.go index 97c8486a230..c5e0174217f 100644 --- a/api/inventory/v1/agents.pb.go +++ b/api/inventory/v1/agents.pb.go @@ -43,6 +43,7 @@ const ( AgentType_AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT AgentType = 7 AgentType_AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT AgentType = 8 AgentType_AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT AgentType = 9 + AgentType_AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT AgentType = 18 AgentType_AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT AgentType = 10 AgentType_AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT AgentType = 13 AgentType_AGENT_TYPE_EXTERNAL_EXPORTER AgentType = 12 @@ -66,6 +67,7 @@ var ( 7: "AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT", 8: "AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT", 9: "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT", + 18: "AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT", 10: "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT", 13: "AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT", 12: "AGENT_TYPE_EXTERNAL_EXPORTER", @@ -86,6 +88,7 @@ var ( "AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT": 7, "AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT": 8, "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT": 9, + "AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT": 18, "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT": 10, "AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT": 13, "AGENT_TYPE_EXTERNAL_EXPORTER": 12, @@ -2064,6 +2067,151 @@ func (x *QANMongoDBProfilerAgent) GetLogLevel() LogLevel { return LogLevel_LOG_LEVEL_UNSPECIFIED } +// QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server. +type QANMongoDBMongologAgent struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Unique randomly generated instance 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"` + // MongoDB username for getting profiler data. + 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"` + // Limit query length in QAN (default: server-defined; -1: no limit). + MaxQueryLength int32 `protobuf:"varint,9,opt,name=max_query_length,json=maxQueryLength,proto3" json:"max_query_length,omitempty"` + // Custom user-assigned labels. + CustomLabels map[string]string `protobuf:"bytes,10,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"` + // Actual Agent status. + Status AgentStatus `protobuf:"varint,20,opt,name=status,proto3,enum=inventory.v1.AgentStatus" json:"status,omitempty"` + // Path to exec process. + ProcessExecPath string `protobuf:"bytes,21,opt,name=process_exec_path,json=processExecPath,proto3" json:"process_exec_path,omitempty"` + // Log level for exporter. + LogLevel LogLevel `protobuf:"varint,22,opt,name=log_level,json=logLevel,proto3,enum=inventory.v1.LogLevel" json:"log_level,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *QANMongoDBMongologAgent) Reset() { + *x = QANMongoDBMongologAgent{} + mi := &file_inventory_v1_agents_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *QANMongoDBMongologAgent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QANMongoDBMongologAgent) ProtoMessage() {} + +func (x *QANMongoDBMongologAgent) ProtoReflect() protoreflect.Message { + mi := &file_inventory_v1_agents_proto_msgTypes[12] + 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 QANMongoDBMongologAgent.ProtoReflect.Descriptor instead. +func (*QANMongoDBMongologAgent) Descriptor() ([]byte, []int) { + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{12} +} + +func (x *QANMongoDBMongologAgent) GetAgentId() string { + if x != nil { + return x.AgentId + } + return "" +} + +func (x *QANMongoDBMongologAgent) GetPmmAgentId() string { + if x != nil { + return x.PmmAgentId + } + return "" +} + +func (x *QANMongoDBMongologAgent) GetDisabled() bool { + if x != nil { + return x.Disabled + } + return false +} + +func (x *QANMongoDBMongologAgent) GetServiceId() string { + if x != nil { + return x.ServiceId + } + return "" +} + +func (x *QANMongoDBMongologAgent) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *QANMongoDBMongologAgent) GetTls() bool { + if x != nil { + return x.Tls + } + return false +} + +func (x *QANMongoDBMongologAgent) GetTlsSkipVerify() bool { + if x != nil { + return x.TlsSkipVerify + } + return false +} + +func (x *QANMongoDBMongologAgent) GetMaxQueryLength() int32 { + if x != nil { + return x.MaxQueryLength + } + return 0 +} + +func (x *QANMongoDBMongologAgent) GetCustomLabels() map[string]string { + if x != nil { + return x.CustomLabels + } + return nil +} + +func (x *QANMongoDBMongologAgent) GetStatus() AgentStatus { + if x != nil { + return x.Status + } + return AgentStatus_AGENT_STATUS_UNSPECIFIED +} + +func (x *QANMongoDBMongologAgent) GetProcessExecPath() string { + if x != nil { + return x.ProcessExecPath + } + return "" +} + +func (x *QANMongoDBMongologAgent) 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"` @@ -2099,7 +2247,7 @@ type QANPostgreSQLPgStatementsAgent struct { func (x *QANPostgreSQLPgStatementsAgent) Reset() { *x = QANPostgreSQLPgStatementsAgent{} - mi := &file_inventory_v1_agents_proto_msgTypes[12] + mi := &file_inventory_v1_agents_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2111,7 +2259,7 @@ func (x *QANPostgreSQLPgStatementsAgent) String() string { func (*QANPostgreSQLPgStatementsAgent) ProtoMessage() {} func (x *QANPostgreSQLPgStatementsAgent) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[12] + mi := &file_inventory_v1_agents_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2124,7 +2272,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{12} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{13} } func (x *QANPostgreSQLPgStatementsAgent) GetAgentId() string { @@ -2255,7 +2403,7 @@ type QANPostgreSQLPgStatMonitorAgent struct { func (x *QANPostgreSQLPgStatMonitorAgent) Reset() { *x = QANPostgreSQLPgStatMonitorAgent{} - mi := &file_inventory_v1_agents_proto_msgTypes[13] + mi := &file_inventory_v1_agents_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2267,7 +2415,7 @@ func (x *QANPostgreSQLPgStatMonitorAgent) String() string { func (*QANPostgreSQLPgStatMonitorAgent) ProtoMessage() {} func (x *QANPostgreSQLPgStatMonitorAgent) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[13] + mi := &file_inventory_v1_agents_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2280,7 +2428,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{13} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{14} } func (x *QANPostgreSQLPgStatMonitorAgent) GetAgentId() string { @@ -2420,7 +2568,7 @@ type RDSExporter struct { func (x *RDSExporter) Reset() { *x = RDSExporter{} - mi := &file_inventory_v1_agents_proto_msgTypes[14] + mi := &file_inventory_v1_agents_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2432,7 +2580,7 @@ func (x *RDSExporter) String() string { func (*RDSExporter) ProtoMessage() {} func (x *RDSExporter) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[14] + mi := &file_inventory_v1_agents_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2445,7 +2593,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{14} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{15} } func (x *RDSExporter) GetAgentId() string { @@ -2588,7 +2736,7 @@ type ExternalExporter struct { func (x *ExternalExporter) Reset() { *x = ExternalExporter{} - 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) } @@ -2600,7 +2748,7 @@ func (x *ExternalExporter) String() string { func (*ExternalExporter) ProtoMessage() {} func (x *ExternalExporter) 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 { @@ -2613,7 +2761,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{15} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{16} } func (x *ExternalExporter) GetAgentId() string { @@ -2742,7 +2890,7 @@ type AzureDatabaseExporter struct { func (x *AzureDatabaseExporter) Reset() { *x = AzureDatabaseExporter{} - 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) } @@ -2754,7 +2902,7 @@ func (x *AzureDatabaseExporter) String() string { func (*AzureDatabaseExporter) ProtoMessage() {} func (x *AzureDatabaseExporter) 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 { @@ -2767,7 +2915,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{16} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{17} } func (x *AzureDatabaseExporter) GetAgentId() string { @@ -2878,7 +3026,7 @@ type ChangeCommonAgentParams struct { func (x *ChangeCommonAgentParams) Reset() { *x = ChangeCommonAgentParams{} - 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) } @@ -2890,7 +3038,7 @@ func (x *ChangeCommonAgentParams) String() string { func (*ChangeCommonAgentParams) ProtoMessage() {} func (x *ChangeCommonAgentParams) 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 { @@ -2903,7 +3051,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{17} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{18} } func (x *ChangeCommonAgentParams) GetEnable() bool { @@ -2953,7 +3101,7 @@ type ListAgentsRequest struct { func (x *ListAgentsRequest) Reset() { *x = ListAgentsRequest{} - 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) } @@ -2965,7 +3113,7 @@ func (x *ListAgentsRequest) String() string { func (*ListAgentsRequest) ProtoMessage() {} func (x *ListAgentsRequest) 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 { @@ -2978,7 +3126,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{18} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{19} } func (x *ListAgentsRequest) GetPmmAgentId() string { @@ -3021,6 +3169,7 @@ type ListAgentsResponse struct { QanMysqlPerfschemaAgent []*QANMySQLPerfSchemaAgent `protobuf:"bytes,8,rep,name=qan_mysql_perfschema_agent,json=qanMysqlPerfschemaAgent,proto3" json:"qan_mysql_perfschema_agent,omitempty"` QanMysqlSlowlogAgent []*QANMySQLSlowlogAgent `protobuf:"bytes,9,rep,name=qan_mysql_slowlog_agent,json=qanMysqlSlowlogAgent,proto3" json:"qan_mysql_slowlog_agent,omitempty"` QanMongodbProfilerAgent []*QANMongoDBProfilerAgent `protobuf:"bytes,10,rep,name=qan_mongodb_profiler_agent,json=qanMongodbProfilerAgent,proto3" json:"qan_mongodb_profiler_agent,omitempty"` + QanMongodbMongologAgent []*QANMongoDBMongologAgent `protobuf:"bytes,18,rep,name=qan_mongodb_mongolog_agent,json=qanMongodbMongologAgent,proto3" json:"qan_mongodb_mongolog_agent,omitempty"` QanPostgresqlPgstatementsAgent []*QANPostgreSQLPgStatementsAgent `protobuf:"bytes,11,rep,name=qan_postgresql_pgstatements_agent,json=qanPostgresqlPgstatementsAgent,proto3" json:"qan_postgresql_pgstatements_agent,omitempty"` QanPostgresqlPgstatmonitorAgent []*QANPostgreSQLPgStatMonitorAgent `protobuf:"bytes,12,rep,name=qan_postgresql_pgstatmonitor_agent,json=qanPostgresqlPgstatmonitorAgent,proto3" json:"qan_postgresql_pgstatmonitor_agent,omitempty"` ExternalExporter []*ExternalExporter `protobuf:"bytes,13,rep,name=external_exporter,json=externalExporter,proto3" json:"external_exporter,omitempty"` @@ -3034,7 +3183,7 @@ type ListAgentsResponse struct { func (x *ListAgentsResponse) Reset() { *x = ListAgentsResponse{} - 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) } @@ -3046,7 +3195,7 @@ func (x *ListAgentsResponse) String() string { func (*ListAgentsResponse) ProtoMessage() {} func (x *ListAgentsResponse) 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 { @@ -3059,7 +3208,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{19} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{20} } func (x *ListAgentsResponse) GetPmmAgent() []*PMMAgent { @@ -3132,6 +3281,13 @@ func (x *ListAgentsResponse) GetQanMongodbProfilerAgent() []*QANMongoDBProfilerA return nil } +func (x *ListAgentsResponse) GetQanMongodbMongologAgent() []*QANMongoDBMongologAgent { + if x != nil { + return x.QanMongodbMongologAgent + } + return nil +} + func (x *ListAgentsResponse) GetQanPostgresqlPgstatementsAgent() []*QANPostgreSQLPgStatementsAgent { if x != nil { return x.QanPostgresqlPgstatementsAgent @@ -3191,7 +3347,7 @@ type GetAgentRequest struct { func (x *GetAgentRequest) Reset() { *x = GetAgentRequest{} - 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) } @@ -3203,7 +3359,7 @@ func (x *GetAgentRequest) String() string { func (*GetAgentRequest) ProtoMessage() {} func (x *GetAgentRequest) 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 { @@ -3216,7 +3372,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{20} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{21} } func (x *GetAgentRequest) GetAgentId() string { @@ -3240,6 +3396,7 @@ type GetAgentResponse struct { // *GetAgentResponse_QanMysqlPerfschemaAgent // *GetAgentResponse_QanMysqlSlowlogAgent // *GetAgentResponse_QanMongodbProfilerAgent + // *GetAgentResponse_QanMongodbMongologAgent // *GetAgentResponse_QanPostgresqlPgstatementsAgent // *GetAgentResponse_QanPostgresqlPgstatmonitorAgent // *GetAgentResponse_ExternalExporter @@ -3254,7 +3411,7 @@ type GetAgentResponse struct { func (x *GetAgentResponse) Reset() { *x = GetAgentResponse{} - 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) } @@ -3266,7 +3423,7 @@ func (x *GetAgentResponse) String() string { func (*GetAgentResponse) ProtoMessage() {} func (x *GetAgentResponse) 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 { @@ -3279,7 +3436,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{21} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{22} } func (x *GetAgentResponse) GetAgent() isGetAgentResponse_Agent { @@ -3379,6 +3536,15 @@ func (x *GetAgentResponse) GetQanMongodbProfilerAgent() *QANMongoDBProfilerAgent return nil } +func (x *GetAgentResponse) GetQanMongodbMongologAgent() *QANMongoDBMongologAgent { + if x != nil { + if x, ok := x.Agent.(*GetAgentResponse_QanMongodbMongologAgent); ok { + return x.QanMongodbMongologAgent + } + } + return nil +} + func (x *GetAgentResponse) GetQanPostgresqlPgstatementsAgent() *QANPostgreSQLPgStatementsAgent { if x != nil { if x, ok := x.Agent.(*GetAgentResponse_QanPostgresqlPgstatementsAgent); ok { @@ -3486,6 +3652,10 @@ type GetAgentResponse_QanMongodbProfilerAgent struct { QanMongodbProfilerAgent *QANMongoDBProfilerAgent `protobuf:"bytes,10,opt,name=qan_mongodb_profiler_agent,json=qanMongodbProfilerAgent,proto3,oneof"` } +type GetAgentResponse_QanMongodbMongologAgent struct { + QanMongodbMongologAgent *QANMongoDBMongologAgent `protobuf:"bytes,18,opt,name=qan_mongodb_mongolog_agent,json=qanMongodbMongologAgent,proto3,oneof"` +} + type GetAgentResponse_QanPostgresqlPgstatementsAgent struct { QanPostgresqlPgstatementsAgent *QANPostgreSQLPgStatementsAgent `protobuf:"bytes,11,opt,name=qan_postgresql_pgstatements_agent,json=qanPostgresqlPgstatementsAgent,proto3,oneof"` } @@ -3534,6 +3704,8 @@ func (*GetAgentResponse_QanMysqlSlowlogAgent) isGetAgentResponse_Agent() {} func (*GetAgentResponse_QanMongodbProfilerAgent) isGetAgentResponse_Agent() {} +func (*GetAgentResponse_QanMongodbMongologAgent) isGetAgentResponse_Agent() {} + func (*GetAgentResponse_QanPostgresqlPgstatementsAgent) isGetAgentResponse_Agent() {} func (*GetAgentResponse_QanPostgresqlPgstatmonitorAgent) isGetAgentResponse_Agent() {} @@ -3560,7 +3732,7 @@ type GetAgentLogsRequest struct { func (x *GetAgentLogsRequest) Reset() { *x = GetAgentLogsRequest{} - 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) } @@ -3572,7 +3744,7 @@ func (x *GetAgentLogsRequest) String() string { func (*GetAgentLogsRequest) ProtoMessage() {} func (x *GetAgentLogsRequest) 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 { @@ -3585,7 +3757,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{22} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{23} } func (x *GetAgentLogsRequest) GetAgentId() string { @@ -3612,7 +3784,7 @@ type GetAgentLogsResponse struct { func (x *GetAgentLogsResponse) Reset() { *x = GetAgentLogsResponse{} - 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) } @@ -3624,7 +3796,7 @@ func (x *GetAgentLogsResponse) String() string { func (*GetAgentLogsResponse) ProtoMessage() {} func (x *GetAgentLogsResponse) 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 { @@ -3637,7 +3809,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{23} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{24} } func (x *GetAgentLogsResponse) GetLogs() []string { @@ -3670,6 +3842,7 @@ type AddAgentRequest struct { // *AddAgentRequest_QanMysqlPerfschemaAgent // *AddAgentRequest_QanMysqlSlowlogAgent // *AddAgentRequest_QanMongodbProfilerAgent + // *AddAgentRequest_QanMongodbMongologAgent // *AddAgentRequest_QanPostgresqlPgstatementsAgent // *AddAgentRequest_QanPostgresqlPgstatmonitorAgent // *AddAgentRequest_ValkeyExporter @@ -3680,7 +3853,7 @@ type AddAgentRequest struct { func (x *AddAgentRequest) Reset() { *x = AddAgentRequest{} - 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) } @@ -3692,7 +3865,7 @@ func (x *AddAgentRequest) String() string { func (*AddAgentRequest) ProtoMessage() {} func (x *AddAgentRequest) 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 { @@ -3705,7 +3878,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{24} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{25} } func (x *AddAgentRequest) GetAgent() isAddAgentRequest_Agent { @@ -3823,6 +3996,15 @@ func (x *AddAgentRequest) GetQanMongodbProfilerAgent() *AddQANMongoDBProfilerAge return nil } +func (x *AddAgentRequest) GetQanMongodbMongologAgent() *AddQANMongoDBMongologAgentParams { + if x != nil { + if x, ok := x.Agent.(*AddAgentRequest_QanMongodbMongologAgent); ok { + return x.QanMongodbMongologAgent + } + } + return nil +} + func (x *AddAgentRequest) GetQanPostgresqlPgstatementsAgent() *AddQANPostgreSQLPgStatementsAgentParams { if x != nil { if x, ok := x.Agent.(*AddAgentRequest_QanPostgresqlPgstatementsAgent); ok { @@ -3902,6 +4084,10 @@ type AddAgentRequest_QanMongodbProfilerAgent struct { QanMongodbProfilerAgent *AddQANMongoDBProfilerAgentParams `protobuf:"bytes,12,opt,name=qan_mongodb_profiler_agent,json=qanMongodbProfilerAgent,proto3,oneof"` } +type AddAgentRequest_QanMongodbMongologAgent struct { + QanMongodbMongologAgent *AddQANMongoDBMongologAgentParams `protobuf:"bytes,16,opt,name=qan_mongodb_mongolog_agent,json=qanMongodbMongologAgent,proto3,oneof"` +} + type AddAgentRequest_QanPostgresqlPgstatementsAgent struct { QanPostgresqlPgstatementsAgent *AddQANPostgreSQLPgStatementsAgentParams `protobuf:"bytes,13,opt,name=qan_postgresql_pgstatements_agent,json=qanPostgresqlPgstatementsAgent,proto3,oneof"` } @@ -3938,6 +4124,8 @@ func (*AddAgentRequest_QanMysqlSlowlogAgent) isAddAgentRequest_Agent() {} func (*AddAgentRequest_QanMongodbProfilerAgent) isAddAgentRequest_Agent() {} +func (*AddAgentRequest_QanMongodbMongologAgent) isAddAgentRequest_Agent() {} + func (*AddAgentRequest_QanPostgresqlPgstatementsAgent) isAddAgentRequest_Agent() {} func (*AddAgentRequest_QanPostgresqlPgstatmonitorAgent) isAddAgentRequest_Agent() {} @@ -3960,6 +4148,7 @@ type AddAgentResponse struct { // *AddAgentResponse_QanMysqlPerfschemaAgent // *AddAgentResponse_QanMysqlSlowlogAgent // *AddAgentResponse_QanMongodbProfilerAgent + // *AddAgentResponse_QanMongodbMongologAgent // *AddAgentResponse_QanPostgresqlPgstatementsAgent // *AddAgentResponse_QanPostgresqlPgstatmonitorAgent // *AddAgentResponse_ValkeyExporter @@ -3970,7 +4159,7 @@ type AddAgentResponse struct { func (x *AddAgentResponse) Reset() { *x = AddAgentResponse{} - 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) } @@ -3982,7 +4171,7 @@ func (x *AddAgentResponse) String() string { func (*AddAgentResponse) ProtoMessage() {} func (x *AddAgentResponse) 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 { @@ -3995,7 +4184,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{25} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{26} } func (x *AddAgentResponse) GetAgent() isAddAgentResponse_Agent { @@ -4113,6 +4302,15 @@ func (x *AddAgentResponse) GetQanMongodbProfilerAgent() *QANMongoDBProfilerAgent return nil } +func (x *AddAgentResponse) GetQanMongodbMongologAgent() *QANMongoDBMongologAgent { + if x != nil { + if x, ok := x.Agent.(*AddAgentResponse_QanMongodbMongologAgent); ok { + return x.QanMongodbMongologAgent + } + } + return nil +} + func (x *AddAgentResponse) GetQanPostgresqlPgstatementsAgent() *QANPostgreSQLPgStatementsAgent { if x != nil { if x, ok := x.Agent.(*AddAgentResponse_QanPostgresqlPgstatementsAgent); ok { @@ -4192,6 +4390,10 @@ type AddAgentResponse_QanMongodbProfilerAgent struct { QanMongodbProfilerAgent *QANMongoDBProfilerAgent `protobuf:"bytes,12,opt,name=qan_mongodb_profiler_agent,json=qanMongodbProfilerAgent,proto3,oneof"` } +type AddAgentResponse_QanMongodbMongologAgent struct { + QanMongodbMongologAgent *QANMongoDBMongologAgent `protobuf:"bytes,16,opt,name=qan_mongodb_mongolog_agent,json=qanMongodbMongologAgent,proto3,oneof"` +} + type AddAgentResponse_QanPostgresqlPgstatementsAgent struct { QanPostgresqlPgstatementsAgent *QANPostgreSQLPgStatementsAgent `protobuf:"bytes,13,opt,name=qan_postgresql_pgstatements_agent,json=qanPostgresqlPgstatementsAgent,proto3,oneof"` } @@ -4228,6 +4430,8 @@ func (*AddAgentResponse_QanMysqlSlowlogAgent) isAddAgentResponse_Agent() {} func (*AddAgentResponse_QanMongodbProfilerAgent) isAddAgentResponse_Agent() {} +func (*AddAgentResponse_QanMongodbMongologAgent) isAddAgentResponse_Agent() {} + func (*AddAgentResponse_QanPostgresqlPgstatementsAgent) isAddAgentResponse_Agent() {} func (*AddAgentResponse_QanPostgresqlPgstatmonitorAgent) isAddAgentResponse_Agent() {} @@ -4250,6 +4454,7 @@ type ChangeAgentRequest struct { // *ChangeAgentRequest_QanMysqlPerfschemaAgent // *ChangeAgentRequest_QanMysqlSlowlogAgent // *ChangeAgentRequest_QanMongodbProfilerAgent + // *ChangeAgentRequest_QanMongodbMongologAgent // *ChangeAgentRequest_QanPostgresqlPgstatementsAgent // *ChangeAgentRequest_QanPostgresqlPgstatmonitorAgent // *ChangeAgentRequest_NomadAgent @@ -4261,7 +4466,7 @@ type ChangeAgentRequest struct { func (x *ChangeAgentRequest) Reset() { *x = ChangeAgentRequest{} - 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) } @@ -4273,7 +4478,7 @@ func (x *ChangeAgentRequest) String() string { func (*ChangeAgentRequest) ProtoMessage() {} func (x *ChangeAgentRequest) 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 { @@ -4286,7 +4491,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{26} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{27} } func (x *ChangeAgentRequest) GetAgentId() string { @@ -4402,6 +4607,15 @@ func (x *ChangeAgentRequest) GetQanMongodbProfilerAgent() *ChangeQANMongoDBProfi return nil } +func (x *ChangeAgentRequest) GetQanMongodbMongologAgent() *ChangeQANMongoDBMongologAgentParams { + if x != nil { + if x, ok := x.Agent.(*ChangeAgentRequest_QanMongodbMongologAgent); ok { + return x.QanMongodbMongologAgent + } + } + return nil +} + func (x *ChangeAgentRequest) GetQanPostgresqlPgstatementsAgent() *ChangeQANPostgreSQLPgStatementsAgentParams { if x != nil { if x, ok := x.Agent.(*ChangeAgentRequest_QanPostgresqlPgstatementsAgent); ok { @@ -4486,6 +4700,10 @@ type ChangeAgentRequest_QanMongodbProfilerAgent struct { QanMongodbProfilerAgent *ChangeQANMongoDBProfilerAgentParams `protobuf:"bytes,12,opt,name=qan_mongodb_profiler_agent,json=qanMongodbProfilerAgent,proto3,oneof"` } +type ChangeAgentRequest_QanMongodbMongologAgent struct { + QanMongodbMongologAgent *ChangeQANMongoDBMongologAgentParams `protobuf:"bytes,17,opt,name=qan_mongodb_mongolog_agent,json=qanMongodbMongologAgent,proto3,oneof"` +} + type ChangeAgentRequest_QanPostgresqlPgstatementsAgent struct { QanPostgresqlPgstatementsAgent *ChangeQANPostgreSQLPgStatementsAgentParams `protobuf:"bytes,13,opt,name=qan_postgresql_pgstatements_agent,json=qanPostgresqlPgstatementsAgent,proto3,oneof"` } @@ -4524,6 +4742,8 @@ func (*ChangeAgentRequest_QanMysqlSlowlogAgent) isChangeAgentRequest_Agent() {} func (*ChangeAgentRequest_QanMongodbProfilerAgent) isChangeAgentRequest_Agent() {} +func (*ChangeAgentRequest_QanMongodbMongologAgent) isChangeAgentRequest_Agent() {} + func (*ChangeAgentRequest_QanPostgresqlPgstatementsAgent) isChangeAgentRequest_Agent() {} func (*ChangeAgentRequest_QanPostgresqlPgstatmonitorAgent) isChangeAgentRequest_Agent() {} @@ -4547,6 +4767,7 @@ type ChangeAgentResponse struct { // *ChangeAgentResponse_QanMysqlPerfschemaAgent // *ChangeAgentResponse_QanMysqlSlowlogAgent // *ChangeAgentResponse_QanMongodbProfilerAgent + // *ChangeAgentResponse_QanMongodbMongologAgent // *ChangeAgentResponse_QanPostgresqlPgstatementsAgent // *ChangeAgentResponse_QanPostgresqlPgstatmonitorAgent // *ChangeAgentResponse_NomadAgent @@ -4558,7 +4779,7 @@ type ChangeAgentResponse struct { func (x *ChangeAgentResponse) Reset() { *x = ChangeAgentResponse{} - 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) } @@ -4570,7 +4791,7 @@ func (x *ChangeAgentResponse) String() string { func (*ChangeAgentResponse) ProtoMessage() {} func (x *ChangeAgentResponse) 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 { @@ -4583,7 +4804,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{27} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{28} } func (x *ChangeAgentResponse) GetAgent() isChangeAgentResponse_Agent { @@ -4692,6 +4913,15 @@ func (x *ChangeAgentResponse) GetQanMongodbProfilerAgent() *QANMongoDBProfilerAg return nil } +func (x *ChangeAgentResponse) GetQanMongodbMongologAgent() *QANMongoDBMongologAgent { + if x != nil { + if x, ok := x.Agent.(*ChangeAgentResponse_QanMongodbMongologAgent); ok { + return x.QanMongodbMongologAgent + } + } + return nil +} + func (x *ChangeAgentResponse) GetQanPostgresqlPgstatementsAgent() *QANPostgreSQLPgStatementsAgent { if x != nil { if x, ok := x.Agent.(*ChangeAgentResponse_QanPostgresqlPgstatementsAgent); ok { @@ -4776,6 +5006,10 @@ type ChangeAgentResponse_QanMongodbProfilerAgent struct { QanMongodbProfilerAgent *QANMongoDBProfilerAgent `protobuf:"bytes,12,opt,name=qan_mongodb_profiler_agent,json=qanMongodbProfilerAgent,proto3,oneof"` } +type ChangeAgentResponse_QanMongodbMongologAgent struct { + QanMongodbMongologAgent *QANMongoDBMongologAgent `protobuf:"bytes,17,opt,name=qan_mongodb_mongolog_agent,json=qanMongodbMongologAgent,proto3,oneof"` +} + type ChangeAgentResponse_QanPostgresqlPgstatementsAgent struct { QanPostgresqlPgstatementsAgent *QANPostgreSQLPgStatementsAgent `protobuf:"bytes,13,opt,name=qan_postgresql_pgstatements_agent,json=qanPostgresqlPgstatementsAgent,proto3,oneof"` } @@ -4814,6 +5048,8 @@ func (*ChangeAgentResponse_QanMysqlSlowlogAgent) isChangeAgentResponse_Agent() { func (*ChangeAgentResponse_QanMongodbProfilerAgent) isChangeAgentResponse_Agent() {} +func (*ChangeAgentResponse_QanMongodbMongologAgent) isChangeAgentResponse_Agent() {} + func (*ChangeAgentResponse_QanPostgresqlPgstatementsAgent) isChangeAgentResponse_Agent() {} func (*ChangeAgentResponse_QanPostgresqlPgstatmonitorAgent) isChangeAgentResponse_Agent() {} @@ -4834,7 +5070,7 @@ type AddPMMAgentParams struct { func (x *AddPMMAgentParams) Reset() { *x = AddPMMAgentParams{} - 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) } @@ -4846,7 +5082,7 @@ func (x *AddPMMAgentParams) String() string { func (*AddPMMAgentParams) ProtoMessage() {} func (x *AddPMMAgentParams) 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 { @@ -4859,7 +5095,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{28} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{29} } func (x *AddPMMAgentParams) GetRunsOnNodeId() string { @@ -4896,7 +5132,7 @@ type AddNodeExporterParams struct { func (x *AddNodeExporterParams) Reset() { *x = AddNodeExporterParams{} - 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) } @@ -4908,7 +5144,7 @@ func (x *AddNodeExporterParams) String() string { func (*AddNodeExporterParams) ProtoMessage() {} func (x *AddNodeExporterParams) 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 { @@ -4921,7 +5157,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{29} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{30} } func (x *AddNodeExporterParams) GetPmmAgentId() string { @@ -4982,7 +5218,7 @@ type ChangeNodeExporterParams struct { func (x *ChangeNodeExporterParams) Reset() { *x = ChangeNodeExporterParams{} - 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) } @@ -4994,7 +5230,7 @@ func (x *ChangeNodeExporterParams) String() string { func (*ChangeNodeExporterParams) ProtoMessage() {} func (x *ChangeNodeExporterParams) 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 { @@ -5007,7 +5243,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{30} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{31} } func (x *ChangeNodeExporterParams) GetEnable() bool { @@ -5082,7 +5318,7 @@ type AddMySQLdExporterParams struct { func (x *AddMySQLdExporterParams) Reset() { *x = AddMySQLdExporterParams{} - 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) } @@ -5094,7 +5330,7 @@ func (x *AddMySQLdExporterParams) String() string { func (*AddMySQLdExporterParams) ProtoMessage() {} func (x *AddMySQLdExporterParams) 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 { @@ -5107,7 +5343,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{31} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{32} } func (x *AddMySQLdExporterParams) GetPmmAgentId() string { @@ -5245,7 +5481,7 @@ type ChangeMySQLdExporterParams struct { func (x *ChangeMySQLdExporterParams) Reset() { *x = ChangeMySQLdExporterParams{} - 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) } @@ -5257,7 +5493,7 @@ func (x *ChangeMySQLdExporterParams) String() string { func (*ChangeMySQLdExporterParams) ProtoMessage() {} func (x *ChangeMySQLdExporterParams) 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 { @@ -5270,7 +5506,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{32} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{33} } func (x *ChangeMySQLdExporterParams) GetEnable() bool { @@ -5352,7 +5588,7 @@ type AddMongoDBExporterParams struct { func (x *AddMongoDBExporterParams) Reset() { *x = AddMongoDBExporterParams{} - 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) } @@ -5364,7 +5600,7 @@ func (x *AddMongoDBExporterParams) String() string { func (*AddMongoDBExporterParams) ProtoMessage() {} func (x *AddMongoDBExporterParams) 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 { @@ -5377,7 +5613,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{33} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{34} } func (x *AddMongoDBExporterParams) GetPmmAgentId() string { @@ -5536,7 +5772,7 @@ type ChangeMongoDBExporterParams struct { func (x *ChangeMongoDBExporterParams) Reset() { *x = ChangeMongoDBExporterParams{} - 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) } @@ -5548,7 +5784,7 @@ func (x *ChangeMongoDBExporterParams) String() string { func (*ChangeMongoDBExporterParams) ProtoMessage() {} func (x *ChangeMongoDBExporterParams) 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 { @@ -5561,7 +5797,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{34} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{35} } func (x *ChangeMongoDBExporterParams) GetEnable() bool { @@ -5636,7 +5872,7 @@ type AddPostgresExporterParams struct { func (x *AddPostgresExporterParams) Reset() { *x = AddPostgresExporterParams{} - 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) } @@ -5648,7 +5884,7 @@ func (x *AddPostgresExporterParams) String() string { func (*AddPostgresExporterParams) ProtoMessage() {} func (x *AddPostgresExporterParams) 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 { @@ -5661,7 +5897,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{35} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{36} } func (x *AddPostgresExporterParams) GetPmmAgentId() string { @@ -5806,7 +6042,7 @@ type ChangePostgresExporterParams struct { func (x *ChangePostgresExporterParams) Reset() { *x = ChangePostgresExporterParams{} - 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) } @@ -5818,7 +6054,7 @@ func (x *ChangePostgresExporterParams) String() string { func (*ChangePostgresExporterParams) ProtoMessage() {} func (x *ChangePostgresExporterParams) 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 { @@ -5831,7 +6067,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{36} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{37} } func (x *ChangePostgresExporterParams) GetEnable() bool { @@ -5896,7 +6132,7 @@ type AddProxySQLExporterParams struct { func (x *AddProxySQLExporterParams) Reset() { *x = AddProxySQLExporterParams{} - 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) } @@ -5908,7 +6144,7 @@ func (x *AddProxySQLExporterParams) String() string { func (*AddProxySQLExporterParams) ProtoMessage() {} func (x *AddProxySQLExporterParams) 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 { @@ -5921,7 +6157,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{37} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{38} } func (x *AddProxySQLExporterParams) GetPmmAgentId() string { @@ -6031,7 +6267,7 @@ type ChangeProxySQLExporterParams struct { func (x *ChangeProxySQLExporterParams) Reset() { *x = ChangeProxySQLExporterParams{} - 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) } @@ -6043,7 +6279,7 @@ func (x *ChangeProxySQLExporterParams) String() string { func (*ChangeProxySQLExporterParams) ProtoMessage() {} func (x *ChangeProxySQLExporterParams) 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 { @@ -6056,7 +6292,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{38} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{39} } func (x *ChangeProxySQLExporterParams) GetEnable() bool { @@ -6125,7 +6361,7 @@ type AddQANMySQLPerfSchemaAgentParams struct { func (x *AddQANMySQLPerfSchemaAgentParams) Reset() { *x = AddQANMySQLPerfSchemaAgentParams{} - 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) } @@ -6137,7 +6373,7 @@ func (x *AddQANMySQLPerfSchemaAgentParams) String() string { func (*AddQANMySQLPerfSchemaAgentParams) ProtoMessage() {} func (x *AddQANMySQLPerfSchemaAgentParams) 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 { @@ -6150,7 +6386,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{39} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{40} } func (x *AddQANMySQLPerfSchemaAgentParams) GetPmmAgentId() string { @@ -6274,7 +6510,7 @@ type ChangeQANMySQLPerfSchemaAgentParams struct { func (x *ChangeQANMySQLPerfSchemaAgentParams) Reset() { *x = ChangeQANMySQLPerfSchemaAgentParams{} - 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) } @@ -6286,7 +6522,7 @@ func (x *ChangeQANMySQLPerfSchemaAgentParams) String() string { func (*ChangeQANMySQLPerfSchemaAgentParams) ProtoMessage() {} func (x *ChangeQANMySQLPerfSchemaAgentParams) 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 { @@ -6299,7 +6535,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{40} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{41} } func (x *ChangeQANMySQLPerfSchemaAgentParams) GetEnable() bool { @@ -6371,7 +6607,7 @@ type AddQANMySQLSlowlogAgentParams struct { func (x *AddQANMySQLSlowlogAgentParams) Reset() { *x = AddQANMySQLSlowlogAgentParams{} - 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) } @@ -6383,7 +6619,7 @@ func (x *AddQANMySQLSlowlogAgentParams) String() string { func (*AddQANMySQLSlowlogAgentParams) ProtoMessage() {} func (x *AddQANMySQLSlowlogAgentParams) 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 { @@ -6396,7 +6632,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{41} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{42} } func (x *AddQANMySQLSlowlogAgentParams) GetPmmAgentId() string { @@ -6448,70 +6684,315 @@ func (x *AddQANMySQLSlowlogAgentParams) GetTlsCa() string { return "" } -func (x *AddQANMySQLSlowlogAgentParams) GetTlsCert() string { +func (x *AddQANMySQLSlowlogAgentParams) GetTlsCert() string { + if x != nil { + return x.TlsCert + } + return "" +} + +func (x *AddQANMySQLSlowlogAgentParams) GetTlsKey() string { + if x != nil { + return x.TlsKey + } + return "" +} + +func (x *AddQANMySQLSlowlogAgentParams) GetMaxQueryLength() int32 { + if x != nil { + return x.MaxQueryLength + } + return 0 +} + +func (x *AddQANMySQLSlowlogAgentParams) GetDisableQueryExamples() bool { + if x != nil { + return x.DisableQueryExamples + } + return false +} + +func (x *AddQANMySQLSlowlogAgentParams) GetMaxSlowlogFileSize() int64 { + if x != nil { + return x.MaxSlowlogFileSize + } + return 0 +} + +func (x *AddQANMySQLSlowlogAgentParams) GetCustomLabels() map[string]string { + if x != nil { + return x.CustomLabels + } + return nil +} + +func (x *AddQANMySQLSlowlogAgentParams) GetSkipConnectionCheck() bool { + if x != nil { + return x.SkipConnectionCheck + } + return false +} + +func (x *AddQANMySQLSlowlogAgentParams) GetDisableCommentsParsing() bool { + if x != nil { + return x.DisableCommentsParsing + } + return false +} + +func (x *AddQANMySQLSlowlogAgentParams) GetLogLevel() LogLevel { + if x != nil { + return x.LogLevel + } + return LogLevel_LOG_LEVEL_UNSPECIFIED +} + +type ChangeQANMySQLSlowlogAgentParams 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"` + // Enables push metrics with vmagent. + EnablePushMetrics *bool `protobuf:"varint,3,opt,name=enable_push_metrics,json=enablePushMetrics,proto3,oneof" json:"enable_push_metrics,omitempty"` + // Metrics resolution for this agent. + MetricsResolutions *common.MetricsResolutions `protobuf:"bytes,4,opt,name=metrics_resolutions,json=metricsResolutions,proto3" json:"metrics_resolutions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChangeQANMySQLSlowlogAgentParams) Reset() { + *x = ChangeQANMySQLSlowlogAgentParams{} + mi := &file_inventory_v1_agents_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChangeQANMySQLSlowlogAgentParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeQANMySQLSlowlogAgentParams) ProtoMessage() {} + +func (x *ChangeQANMySQLSlowlogAgentParams) ProtoReflect() protoreflect.Message { + mi := &file_inventory_v1_agents_proto_msgTypes[43] + 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 ChangeQANMySQLSlowlogAgentParams.ProtoReflect.Descriptor instead. +func (*ChangeQANMySQLSlowlogAgentParams) Descriptor() ([]byte, []int) { + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{43} +} + +func (x *ChangeQANMySQLSlowlogAgentParams) GetEnable() bool { + if x != nil && x.Enable != nil { + return *x.Enable + } + return false +} + +func (x *ChangeQANMySQLSlowlogAgentParams) GetCustomLabels() *common.StringMap { + if x != nil { + return x.CustomLabels + } + return nil +} + +func (x *ChangeQANMySQLSlowlogAgentParams) GetEnablePushMetrics() bool { + if x != nil && x.EnablePushMetrics != nil { + return *x.EnablePushMetrics + } + return false +} + +func (x *ChangeQANMySQLSlowlogAgentParams) GetMetricsResolutions() *common.MetricsResolutions { + if x != nil { + return x.MetricsResolutions + } + return nil +} + +type AddQANMongoDBProfilerAgentParams 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"` + // MongoDB username for getting profile data. + Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` + // MongoDB password for getting profile data. + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` + // Use TLS for database connections. + Tls bool `protobuf:"varint,5,opt,name=tls,proto3" json:"tls,omitempty"` + // Skip TLS certificate and hostname validation. + TlsSkipVerify bool `protobuf:"varint,6,opt,name=tls_skip_verify,json=tlsSkipVerify,proto3" json:"tls_skip_verify,omitempty"` + // Client certificate and key. + TlsCertificateKey string `protobuf:"bytes,7,opt,name=tls_certificate_key,json=tlsCertificateKey,proto3" json:"tls_certificate_key,omitempty"` + // Password for decrypting tls_certificate_key. + TlsCertificateKeyFilePassword string `protobuf:"bytes,8,opt,name=tls_certificate_key_file_password,json=tlsCertificateKeyFilePassword,proto3" json:"tls_certificate_key_file_password,omitempty"` + // Certificate Authority certificate chain. + TlsCa string `protobuf:"bytes,9,opt,name=tls_ca,json=tlsCa,proto3" json:"tls_ca,omitempty"` + // Limit query length in QAN (default: server-defined; -1: no limit). + MaxQueryLength int32 `protobuf:"varint,10,opt,name=max_query_length,json=maxQueryLength,proto3" json:"max_query_length,omitempty"` + // Custom user-assigned labels. + CustomLabels map[string]string `protobuf:"bytes,11,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"` + // Skip connection check. + SkipConnectionCheck bool `protobuf:"varint,12,opt,name=skip_connection_check,json=skipConnectionCheck,proto3" json:"skip_connection_check,omitempty"` + // Authentication mechanism. + // See https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism + // for details. + AuthenticationMechanism string `protobuf:"bytes,13,opt,name=authentication_mechanism,json=authenticationMechanism,proto3" json:"authentication_mechanism,omitempty"` + // Authentication database. + AuthenticationDatabase string `protobuf:"bytes,14,opt,name=authentication_database,json=authenticationDatabase,proto3" json:"authentication_database,omitempty"` + // Log level for exporter. + LogLevel LogLevel `protobuf:"varint,15,opt,name=log_level,json=logLevel,proto3,enum=inventory.v1.LogLevel" json:"log_level,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddQANMongoDBProfilerAgentParams) Reset() { + *x = AddQANMongoDBProfilerAgentParams{} + mi := &file_inventory_v1_agents_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddQANMongoDBProfilerAgentParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddQANMongoDBProfilerAgentParams) ProtoMessage() {} + +func (x *AddQANMongoDBProfilerAgentParams) ProtoReflect() protoreflect.Message { + mi := &file_inventory_v1_agents_proto_msgTypes[44] + 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 AddQANMongoDBProfilerAgentParams.ProtoReflect.Descriptor instead. +func (*AddQANMongoDBProfilerAgentParams) Descriptor() ([]byte, []int) { + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{44} +} + +func (x *AddQANMongoDBProfilerAgentParams) GetPmmAgentId() string { + if x != nil { + return x.PmmAgentId + } + return "" +} + +func (x *AddQANMongoDBProfilerAgentParams) GetServiceId() string { + if x != nil { + return x.ServiceId + } + return "" +} + +func (x *AddQANMongoDBProfilerAgentParams) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *AddQANMongoDBProfilerAgentParams) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *AddQANMongoDBProfilerAgentParams) GetTls() bool { + if x != nil { + return x.Tls + } + return false +} + +func (x *AddQANMongoDBProfilerAgentParams) GetTlsSkipVerify() bool { if x != nil { - return x.TlsCert + return x.TlsSkipVerify } - return "" + return false } -func (x *AddQANMySQLSlowlogAgentParams) GetTlsKey() string { +func (x *AddQANMongoDBProfilerAgentParams) GetTlsCertificateKey() string { if x != nil { - return x.TlsKey + return x.TlsCertificateKey } return "" } -func (x *AddQANMySQLSlowlogAgentParams) GetMaxQueryLength() int32 { +func (x *AddQANMongoDBProfilerAgentParams) GetTlsCertificateKeyFilePassword() string { if x != nil { - return x.MaxQueryLength + return x.TlsCertificateKeyFilePassword } - return 0 + return "" } -func (x *AddQANMySQLSlowlogAgentParams) GetDisableQueryExamples() bool { +func (x *AddQANMongoDBProfilerAgentParams) GetTlsCa() string { if x != nil { - return x.DisableQueryExamples + return x.TlsCa } - return false + return "" } -func (x *AddQANMySQLSlowlogAgentParams) GetMaxSlowlogFileSize() int64 { +func (x *AddQANMongoDBProfilerAgentParams) GetMaxQueryLength() int32 { if x != nil { - return x.MaxSlowlogFileSize + return x.MaxQueryLength } return 0 } -func (x *AddQANMySQLSlowlogAgentParams) GetCustomLabels() map[string]string { +func (x *AddQANMongoDBProfilerAgentParams) GetCustomLabels() map[string]string { if x != nil { return x.CustomLabels } return nil } -func (x *AddQANMySQLSlowlogAgentParams) GetSkipConnectionCheck() bool { +func (x *AddQANMongoDBProfilerAgentParams) GetSkipConnectionCheck() bool { if x != nil { return x.SkipConnectionCheck } return false } -func (x *AddQANMySQLSlowlogAgentParams) GetDisableCommentsParsing() bool { +func (x *AddQANMongoDBProfilerAgentParams) GetAuthenticationMechanism() string { if x != nil { - return x.DisableCommentsParsing + return x.AuthenticationMechanism } - return false + return "" } -func (x *AddQANMySQLSlowlogAgentParams) GetLogLevel() LogLevel { +func (x *AddQANMongoDBProfilerAgentParams) GetAuthenticationDatabase() string { + if x != nil { + return x.AuthenticationDatabase + } + return "" +} + +func (x *AddQANMongoDBProfilerAgentParams) GetLogLevel() LogLevel { if x != nil { return x.LogLevel } return LogLevel_LOG_LEVEL_UNSPECIFIED } -type ChangeQANMySQLSlowlogAgentParams struct { +type ChangeQANMongoDBProfilerAgentParams 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"` @@ -6525,21 +7006,21 @@ type ChangeQANMySQLSlowlogAgentParams struct { sizeCache protoimpl.SizeCache } -func (x *ChangeQANMySQLSlowlogAgentParams) Reset() { - *x = ChangeQANMySQLSlowlogAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[42] +func (x *ChangeQANMongoDBProfilerAgentParams) Reset() { + *x = ChangeQANMongoDBProfilerAgentParams{} + mi := &file_inventory_v1_agents_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ChangeQANMySQLSlowlogAgentParams) String() string { +func (x *ChangeQANMongoDBProfilerAgentParams) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ChangeQANMySQLSlowlogAgentParams) ProtoMessage() {} +func (*ChangeQANMongoDBProfilerAgentParams) ProtoMessage() {} -func (x *ChangeQANMySQLSlowlogAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[42] +func (x *ChangeQANMongoDBProfilerAgentParams) ProtoReflect() protoreflect.Message { + mi := &file_inventory_v1_agents_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6550,40 +7031,40 @@ func (x *ChangeQANMySQLSlowlogAgentParams) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ChangeQANMySQLSlowlogAgentParams.ProtoReflect.Descriptor instead. -func (*ChangeQANMySQLSlowlogAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{42} +// Deprecated: Use ChangeQANMongoDBProfilerAgentParams.ProtoReflect.Descriptor instead. +func (*ChangeQANMongoDBProfilerAgentParams) Descriptor() ([]byte, []int) { + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{45} } -func (x *ChangeQANMySQLSlowlogAgentParams) GetEnable() bool { +func (x *ChangeQANMongoDBProfilerAgentParams) GetEnable() bool { if x != nil && x.Enable != nil { return *x.Enable } return false } -func (x *ChangeQANMySQLSlowlogAgentParams) GetCustomLabels() *common.StringMap { +func (x *ChangeQANMongoDBProfilerAgentParams) GetCustomLabels() *common.StringMap { if x != nil { return x.CustomLabels } return nil } -func (x *ChangeQANMySQLSlowlogAgentParams) GetEnablePushMetrics() bool { +func (x *ChangeQANMongoDBProfilerAgentParams) GetEnablePushMetrics() bool { if x != nil && x.EnablePushMetrics != nil { return *x.EnablePushMetrics } return false } -func (x *ChangeQANMySQLSlowlogAgentParams) GetMetricsResolutions() *common.MetricsResolutions { +func (x *ChangeQANMongoDBProfilerAgentParams) GetMetricsResolutions() *common.MetricsResolutions { if x != nil { return x.MetricsResolutions } return nil } -type AddQANMongoDBProfilerAgentParams struct { +type AddQANMongoDBMongologAgentParams 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"` @@ -6621,21 +7102,21 @@ type AddQANMongoDBProfilerAgentParams struct { sizeCache protoimpl.SizeCache } -func (x *AddQANMongoDBProfilerAgentParams) Reset() { - *x = AddQANMongoDBProfilerAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[43] +func (x *AddQANMongoDBMongologAgentParams) Reset() { + *x = AddQANMongoDBMongologAgentParams{} + mi := &file_inventory_v1_agents_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AddQANMongoDBProfilerAgentParams) String() string { +func (x *AddQANMongoDBMongologAgentParams) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AddQANMongoDBProfilerAgentParams) ProtoMessage() {} +func (*AddQANMongoDBMongologAgentParams) ProtoMessage() {} -func (x *AddQANMongoDBProfilerAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[43] +func (x *AddQANMongoDBMongologAgentParams) ProtoReflect() protoreflect.Message { + mi := &file_inventory_v1_agents_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6646,117 +7127,117 @@ func (x *AddQANMongoDBProfilerAgentParams) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AddQANMongoDBProfilerAgentParams.ProtoReflect.Descriptor instead. -func (*AddQANMongoDBProfilerAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{43} +// Deprecated: Use AddQANMongoDBMongologAgentParams.ProtoReflect.Descriptor instead. +func (*AddQANMongoDBMongologAgentParams) Descriptor() ([]byte, []int) { + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{46} } -func (x *AddQANMongoDBProfilerAgentParams) GetPmmAgentId() string { +func (x *AddQANMongoDBMongologAgentParams) GetPmmAgentId() string { if x != nil { return x.PmmAgentId } return "" } -func (x *AddQANMongoDBProfilerAgentParams) GetServiceId() string { +func (x *AddQANMongoDBMongologAgentParams) GetServiceId() string { if x != nil { return x.ServiceId } return "" } -func (x *AddQANMongoDBProfilerAgentParams) GetUsername() string { +func (x *AddQANMongoDBMongologAgentParams) GetUsername() string { if x != nil { return x.Username } return "" } -func (x *AddQANMongoDBProfilerAgentParams) GetPassword() string { +func (x *AddQANMongoDBMongologAgentParams) GetPassword() string { if x != nil { return x.Password } return "" } -func (x *AddQANMongoDBProfilerAgentParams) GetTls() bool { +func (x *AddQANMongoDBMongologAgentParams) GetTls() bool { if x != nil { return x.Tls } return false } -func (x *AddQANMongoDBProfilerAgentParams) GetTlsSkipVerify() bool { +func (x *AddQANMongoDBMongologAgentParams) GetTlsSkipVerify() bool { if x != nil { return x.TlsSkipVerify } return false } -func (x *AddQANMongoDBProfilerAgentParams) GetTlsCertificateKey() string { +func (x *AddQANMongoDBMongologAgentParams) GetTlsCertificateKey() string { if x != nil { return x.TlsCertificateKey } return "" } -func (x *AddQANMongoDBProfilerAgentParams) GetTlsCertificateKeyFilePassword() string { +func (x *AddQANMongoDBMongologAgentParams) GetTlsCertificateKeyFilePassword() string { if x != nil { return x.TlsCertificateKeyFilePassword } return "" } -func (x *AddQANMongoDBProfilerAgentParams) GetTlsCa() string { +func (x *AddQANMongoDBMongologAgentParams) GetTlsCa() string { if x != nil { return x.TlsCa } return "" } -func (x *AddQANMongoDBProfilerAgentParams) GetMaxQueryLength() int32 { +func (x *AddQANMongoDBMongologAgentParams) GetMaxQueryLength() int32 { if x != nil { return x.MaxQueryLength } return 0 } -func (x *AddQANMongoDBProfilerAgentParams) GetCustomLabels() map[string]string { +func (x *AddQANMongoDBMongologAgentParams) GetCustomLabels() map[string]string { if x != nil { return x.CustomLabels } return nil } -func (x *AddQANMongoDBProfilerAgentParams) GetSkipConnectionCheck() bool { +func (x *AddQANMongoDBMongologAgentParams) GetSkipConnectionCheck() bool { if x != nil { return x.SkipConnectionCheck } return false } -func (x *AddQANMongoDBProfilerAgentParams) GetAuthenticationMechanism() string { +func (x *AddQANMongoDBMongologAgentParams) GetAuthenticationMechanism() string { if x != nil { return x.AuthenticationMechanism } return "" } -func (x *AddQANMongoDBProfilerAgentParams) GetAuthenticationDatabase() string { +func (x *AddQANMongoDBMongologAgentParams) GetAuthenticationDatabase() string { if x != nil { return x.AuthenticationDatabase } return "" } -func (x *AddQANMongoDBProfilerAgentParams) GetLogLevel() LogLevel { +func (x *AddQANMongoDBMongologAgentParams) GetLogLevel() LogLevel { if x != nil { return x.LogLevel } return LogLevel_LOG_LEVEL_UNSPECIFIED } -type ChangeQANMongoDBProfilerAgentParams struct { +type ChangeQANMongoDBMongologAgentParams 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"` @@ -6770,21 +7251,21 @@ type ChangeQANMongoDBProfilerAgentParams struct { sizeCache protoimpl.SizeCache } -func (x *ChangeQANMongoDBProfilerAgentParams) Reset() { - *x = ChangeQANMongoDBProfilerAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[44] +func (x *ChangeQANMongoDBMongologAgentParams) Reset() { + *x = ChangeQANMongoDBMongologAgentParams{} + mi := &file_inventory_v1_agents_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ChangeQANMongoDBProfilerAgentParams) String() string { +func (x *ChangeQANMongoDBMongologAgentParams) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ChangeQANMongoDBProfilerAgentParams) ProtoMessage() {} +func (*ChangeQANMongoDBMongologAgentParams) ProtoMessage() {} -func (x *ChangeQANMongoDBProfilerAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[44] +func (x *ChangeQANMongoDBMongologAgentParams) ProtoReflect() protoreflect.Message { + mi := &file_inventory_v1_agents_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6795,33 +7276,33 @@ func (x *ChangeQANMongoDBProfilerAgentParams) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use ChangeQANMongoDBProfilerAgentParams.ProtoReflect.Descriptor instead. -func (*ChangeQANMongoDBProfilerAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{44} +// Deprecated: Use ChangeQANMongoDBMongologAgentParams.ProtoReflect.Descriptor instead. +func (*ChangeQANMongoDBMongologAgentParams) Descriptor() ([]byte, []int) { + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{47} } -func (x *ChangeQANMongoDBProfilerAgentParams) GetEnable() bool { +func (x *ChangeQANMongoDBMongologAgentParams) GetEnable() bool { if x != nil && x.Enable != nil { return *x.Enable } return false } -func (x *ChangeQANMongoDBProfilerAgentParams) GetCustomLabels() *common.StringMap { +func (x *ChangeQANMongoDBMongologAgentParams) GetCustomLabels() *common.StringMap { if x != nil { return x.CustomLabels } return nil } -func (x *ChangeQANMongoDBProfilerAgentParams) GetEnablePushMetrics() bool { +func (x *ChangeQANMongoDBMongologAgentParams) GetEnablePushMetrics() bool { if x != nil && x.EnablePushMetrics != nil { return *x.EnablePushMetrics } return false } -func (x *ChangeQANMongoDBProfilerAgentParams) GetMetricsResolutions() *common.MetricsResolutions { +func (x *ChangeQANMongoDBMongologAgentParams) GetMetricsResolutions() *common.MetricsResolutions { if x != nil { return x.MetricsResolutions } @@ -6864,7 +7345,7 @@ type AddQANPostgreSQLPgStatementsAgentParams struct { func (x *AddQANPostgreSQLPgStatementsAgentParams) Reset() { *x = AddQANPostgreSQLPgStatementsAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[45] + mi := &file_inventory_v1_agents_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6876,7 +7357,7 @@ func (x *AddQANPostgreSQLPgStatementsAgentParams) String() string { func (*AddQANPostgreSQLPgStatementsAgentParams) ProtoMessage() {} func (x *AddQANPostgreSQLPgStatementsAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[45] + mi := &file_inventory_v1_agents_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6889,7 +7370,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{45} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{48} } func (x *AddQANPostgreSQLPgStatementsAgentParams) GetPmmAgentId() string { @@ -7006,7 +7487,7 @@ type ChangeQANPostgreSQLPgStatementsAgentParams struct { func (x *ChangeQANPostgreSQLPgStatementsAgentParams) Reset() { *x = ChangeQANPostgreSQLPgStatementsAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[46] + mi := &file_inventory_v1_agents_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7018,7 +7499,7 @@ func (x *ChangeQANPostgreSQLPgStatementsAgentParams) String() string { func (*ChangeQANPostgreSQLPgStatementsAgentParams) ProtoMessage() {} func (x *ChangeQANPostgreSQLPgStatementsAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[46] + mi := &file_inventory_v1_agents_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7031,7 +7512,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{46} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{49} } func (x *ChangeQANPostgreSQLPgStatementsAgentParams) GetEnable() bool { @@ -7100,7 +7581,7 @@ type AddQANPostgreSQLPgStatMonitorAgentParams struct { func (x *AddQANPostgreSQLPgStatMonitorAgentParams) Reset() { *x = AddQANPostgreSQLPgStatMonitorAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[47] + mi := &file_inventory_v1_agents_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7112,7 +7593,7 @@ func (x *AddQANPostgreSQLPgStatMonitorAgentParams) String() string { func (*AddQANPostgreSQLPgStatMonitorAgentParams) ProtoMessage() {} func (x *AddQANPostgreSQLPgStatMonitorAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[47] + mi := &file_inventory_v1_agents_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7125,7 +7606,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{47} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{50} } func (x *AddQANPostgreSQLPgStatMonitorAgentParams) GetPmmAgentId() string { @@ -7249,7 +7730,7 @@ type ChangeQANPostgreSQLPgStatMonitorAgentParams struct { func (x *ChangeQANPostgreSQLPgStatMonitorAgentParams) Reset() { *x = ChangeQANPostgreSQLPgStatMonitorAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[48] + mi := &file_inventory_v1_agents_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7261,7 +7742,7 @@ func (x *ChangeQANPostgreSQLPgStatMonitorAgentParams) String() string { func (*ChangeQANPostgreSQLPgStatMonitorAgentParams) ProtoMessage() {} func (x *ChangeQANPostgreSQLPgStatMonitorAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[48] + mi := &file_inventory_v1_agents_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7274,7 +7755,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{48} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{51} } func (x *ChangeQANPostgreSQLPgStatMonitorAgentParams) GetEnable() bool { @@ -7333,7 +7814,7 @@ type AddRDSExporterParams struct { func (x *AddRDSExporterParams) Reset() { *x = AddRDSExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[49] + mi := &file_inventory_v1_agents_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7345,7 +7826,7 @@ func (x *AddRDSExporterParams) String() string { func (*AddRDSExporterParams) ProtoMessage() {} func (x *AddRDSExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[49] + mi := &file_inventory_v1_agents_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7358,7 +7839,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{49} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{52} } func (x *AddRDSExporterParams) GetPmmAgentId() string { @@ -7447,7 +7928,7 @@ type ChangeRDSExporterParams struct { func (x *ChangeRDSExporterParams) Reset() { *x = ChangeRDSExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[50] + mi := &file_inventory_v1_agents_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7459,7 +7940,7 @@ func (x *ChangeRDSExporterParams) String() string { func (*ChangeRDSExporterParams) ProtoMessage() {} func (x *ChangeRDSExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[50] + mi := &file_inventory_v1_agents_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7472,7 +7953,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{50} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{53} } func (x *ChangeRDSExporterParams) GetEnable() bool { @@ -7531,7 +8012,7 @@ type AddExternalExporterParams struct { func (x *AddExternalExporterParams) Reset() { *x = AddExternalExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[51] + mi := &file_inventory_v1_agents_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7543,7 +8024,7 @@ func (x *AddExternalExporterParams) String() string { func (*AddExternalExporterParams) ProtoMessage() {} func (x *AddExternalExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[51] + mi := &file_inventory_v1_agents_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7556,7 +8037,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{51} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{54} } func (x *AddExternalExporterParams) GetRunsOnNodeId() string { @@ -7645,7 +8126,7 @@ type ChangeExternalExporterParams struct { func (x *ChangeExternalExporterParams) Reset() { *x = ChangeExternalExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[52] + mi := &file_inventory_v1_agents_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7657,7 +8138,7 @@ func (x *ChangeExternalExporterParams) String() string { func (*ChangeExternalExporterParams) ProtoMessage() {} func (x *ChangeExternalExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[52] + mi := &file_inventory_v1_agents_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7670,7 +8151,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{52} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{55} } func (x *ChangeExternalExporterParams) GetEnable() bool { @@ -7733,7 +8214,7 @@ type AddAzureDatabaseExporterParams struct { func (x *AddAzureDatabaseExporterParams) Reset() { *x = AddAzureDatabaseExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[53] + mi := &file_inventory_v1_agents_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7745,7 +8226,7 @@ func (x *AddAzureDatabaseExporterParams) String() string { func (*AddAzureDatabaseExporterParams) ProtoMessage() {} func (x *AddAzureDatabaseExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[53] + mi := &file_inventory_v1_agents_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7758,7 +8239,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{53} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{56} } func (x *AddAzureDatabaseExporterParams) GetPmmAgentId() string { @@ -7861,7 +8342,7 @@ type ChangeAzureDatabaseExporterParams struct { func (x *ChangeAzureDatabaseExporterParams) Reset() { *x = ChangeAzureDatabaseExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[54] + mi := &file_inventory_v1_agents_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7873,7 +8354,7 @@ func (x *ChangeAzureDatabaseExporterParams) String() string { func (*ChangeAzureDatabaseExporterParams) ProtoMessage() {} func (x *ChangeAzureDatabaseExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[54] + mi := &file_inventory_v1_agents_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7886,7 +8367,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{54} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{57} } func (x *ChangeAzureDatabaseExporterParams) GetEnable() bool { @@ -7927,7 +8408,7 @@ type ChangeNomadAgentParams struct { func (x *ChangeNomadAgentParams) Reset() { *x = ChangeNomadAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[55] + mi := &file_inventory_v1_agents_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7939,7 +8420,7 @@ func (x *ChangeNomadAgentParams) String() string { func (*ChangeNomadAgentParams) ProtoMessage() {} func (x *ChangeNomadAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[55] + mi := &file_inventory_v1_agents_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7952,7 +8433,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{55} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{58} } func (x *ChangeNomadAgentParams) GetEnable() bool { @@ -8002,7 +8483,7 @@ type AddValkeyExporterParams struct { func (x *AddValkeyExporterParams) Reset() { *x = AddValkeyExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[56] + mi := &file_inventory_v1_agents_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8014,7 +8495,7 @@ func (x *AddValkeyExporterParams) String() string { func (*AddValkeyExporterParams) ProtoMessage() {} func (x *AddValkeyExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[56] + mi := &file_inventory_v1_agents_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8027,7 +8508,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{56} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{59} } func (x *AddValkeyExporterParams) GetPmmAgentId() string { @@ -8158,7 +8639,7 @@ type ChangeValkeyExporterParams struct { func (x *ChangeValkeyExporterParams) Reset() { *x = ChangeValkeyExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[57] + mi := &file_inventory_v1_agents_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8170,7 +8651,7 @@ func (x *ChangeValkeyExporterParams) String() string { func (*ChangeValkeyExporterParams) ProtoMessage() {} func (x *ChangeValkeyExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[57] + mi := &file_inventory_v1_agents_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8183,7 +8664,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{57} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{60} } func (x *ChangeValkeyExporterParams) GetEnable() bool { @@ -8225,7 +8706,7 @@ type RemoveAgentRequest struct { func (x *RemoveAgentRequest) Reset() { *x = RemoveAgentRequest{} - mi := &file_inventory_v1_agents_proto_msgTypes[58] + mi := &file_inventory_v1_agents_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8237,7 +8718,7 @@ func (x *RemoveAgentRequest) String() string { func (*RemoveAgentRequest) ProtoMessage() {} func (x *RemoveAgentRequest) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[58] + mi := &file_inventory_v1_agents_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8250,7 +8731,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{58} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{61} } func (x *RemoveAgentRequest) GetAgentId() string { @@ -8275,7 +8756,7 @@ type RemoveAgentResponse struct { func (x *RemoveAgentResponse) Reset() { *x = RemoveAgentResponse{} - mi := &file_inventory_v1_agents_proto_msgTypes[59] + mi := &file_inventory_v1_agents_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8287,7 +8768,7 @@ func (x *RemoveAgentResponse) String() string { func (*RemoveAgentResponse) ProtoMessage() {} func (x *RemoveAgentResponse) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[59] + mi := &file_inventory_v1_agents_proto_msgTypes[62] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8300,7 +8781,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{59} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{62} } var File_inventory_v1_agents_proto protoreflect.FileDescriptor @@ -8556,6 +9037,25 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\tlog_level\x18\x16 \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\x01J\x04\b\b\x10\tR\x17query_examples_disabled\"\xe3\x04\n" + + "\x17QANMongoDBMongologAgent\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\x1a\n" + + "\busername\x18\x05 \x01(\tR\busername\x12\x10\n" + + "\x03tls\x18\x06 \x01(\bR\x03tls\x12&\n" + + "\x0ftls_skip_verify\x18\a \x01(\bR\rtlsSkipVerify\x12(\n" + + "\x10max_query_length\x18\t \x01(\x05R\x0emaxQueryLength\x12\\\n" + + "\rcustom_labels\x18\n" + + " \x03(\v27.inventory.v1.QANMongoDBMongologAgent.CustomLabelsEntryR\fcustomLabels\x121\n" + + "\x06status\x18\x14 \x01(\x0e2\x19.inventory.v1.AgentStatusR\x06status\x12*\n" + + "\x11process_exec_path\x18\x15 \x01(\tR\x0fprocessExecPath\x123\n" + + "\tlog_level\x18\x16 \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\x01J\x04\b\b\x10\tR\x17query_examples_disabled\"\x8c\x05\n" + "\x1eQANPostgreSQLPgStatementsAgent\x12\x19\n" + "\bagent_id\x18\x01 \x01(\tR\aagentId\x12 \n" + @@ -8675,8 +9175,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\"\xe9\n" + - "\n" + + "agent_type\x18\x04 \x01(\x0e2\x17.inventory.v1.AgentTypeR\tagentType\"\xcd\v\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" + @@ -8688,7 +9187,8 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\x1aqan_mysql_perfschema_agent\x18\b \x03(\v2%.inventory.v1.QANMySQLPerfSchemaAgentR\x17qanMysqlPerfschemaAgent\x12Y\n" + "\x17qan_mysql_slowlog_agent\x18\t \x03(\v2\".inventory.v1.QANMySQLSlowlogAgentR\x14qanMysqlSlowlogAgent\x12b\n" + "\x1aqan_mongodb_profiler_agent\x18\n" + - " \x03(\v2%.inventory.v1.QANMongoDBProfilerAgentR\x17qanMongodbProfilerAgent\x12w\n" + + " \x03(\v2%.inventory.v1.QANMongoDBProfilerAgentR\x17qanMongodbProfilerAgent\x12b\n" + + "\x1aqan_mongodb_mongolog_agent\x18\x12 \x03(\v2%.inventory.v1.QANMongoDBMongologAgentR\x17qanMongodbMongologAgent\x12w\n" + "!qan_postgresql_pgstatements_agent\x18\v \x03(\v2,.inventory.v1.QANPostgreSQLPgStatementsAgentR\x1eqanPostgresqlPgstatementsAgent\x12z\n" + "\"qan_postgresql_pgstatmonitor_agent\x18\f \x03(\v2-.inventory.v1.QANPostgreSQLPgStatMonitorAgentR\x1fqanPostgresqlPgstatmonitorAgent\x12K\n" + "\x11external_exporter\x18\r \x03(\v2\x1e.inventory.v1.ExternalExporterR\x10externalExporter\x12<\n" + @@ -8698,7 +9198,7 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "nomadAgent\x12E\n" + "\x0fvalkey_exporter\x18\x11 \x03(\v2\x1c.inventory.v1.ValkeyExporterR\x0evalkeyExporter\"5\n" + "\x0fGetAgentRequest\x12\"\n" + - "\bagent_id\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10$R\aagentId\"\x91\v\n" + + "\bagent_id\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10$R\aagentId\"\xf7\v\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" + @@ -8710,7 +9210,8 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\x1aqan_mysql_perfschema_agent\x18\b \x01(\v2%.inventory.v1.QANMySQLPerfSchemaAgentH\x00R\x17qanMysqlPerfschemaAgent\x12[\n" + "\x17qan_mysql_slowlog_agent\x18\t \x01(\v2\".inventory.v1.QANMySQLSlowlogAgentH\x00R\x14qanMysqlSlowlogAgent\x12d\n" + "\x1aqan_mongodb_profiler_agent\x18\n" + - " \x01(\v2%.inventory.v1.QANMongoDBProfilerAgentH\x00R\x17qanMongodbProfilerAgent\x12y\n" + + " \x01(\v2%.inventory.v1.QANMongoDBProfilerAgentH\x00R\x17qanMongodbProfilerAgent\x12d\n" + + "\x1aqan_mongodb_mongolog_agent\x18\x12 \x01(\v2%.inventory.v1.QANMongoDBMongologAgentH\x00R\x17qanMongodbMongologAgent\x12y\n" + "!qan_postgresql_pgstatements_agent\x18\v \x01(\v2,.inventory.v1.QANPostgreSQLPgStatementsAgentH\x00R\x1eqanPostgresqlPgstatementsAgent\x12|\n" + "\"qan_postgresql_pgstatmonitor_agent\x18\f \x01(\v2-.inventory.v1.QANPostgreSQLPgStatMonitorAgentH\x00R\x1fqanPostgresqlPgstatmonitorAgent\x12M\n" + "\x11external_exporter\x18\r \x01(\v2\x1e.inventory.v1.ExternalExporterH\x00R\x10externalExporter\x12>\n" + @@ -8725,7 +9226,7 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\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\"\xa9\v\n" + + "\x1cagent_config_log_lines_count\x18\x02 \x01(\rR\x18agentConfigLogLinesCount\"\x98\f\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" + @@ -8739,12 +9240,12 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\x1aqan_mysql_perfschema_agent\x18\n" + " \x01(\v2..inventory.v1.AddQANMySQLPerfSchemaAgentParamsH\x00R\x17qanMysqlPerfschemaAgent\x12d\n" + "\x17qan_mysql_slowlog_agent\x18\v \x01(\v2+.inventory.v1.AddQANMySQLSlowlogAgentParamsH\x00R\x14qanMysqlSlowlogAgent\x12m\n" + - "\x1aqan_mongodb_profiler_agent\x18\f \x01(\v2..inventory.v1.AddQANMongoDBProfilerAgentParamsH\x00R\x17qanMongodbProfilerAgent\x12\x82\x01\n" + + "\x1aqan_mongodb_profiler_agent\x18\f \x01(\v2..inventory.v1.AddQANMongoDBProfilerAgentParamsH\x00R\x17qanMongodbProfilerAgent\x12m\n" + + "\x1aqan_mongodb_mongolog_agent\x18\x10 \x01(\v2..inventory.v1.AddQANMongoDBMongologAgentParamsH\x00R\x17qanMongodbMongologAgent\x12\x82\x01\n" + "!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\x0evalkeyExporterB\a\n" + - "\x05agent\"\xa1\n" + - "\n" + + "\x05agent\"\x87\v\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" + @@ -8758,11 +9259,12 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\x1aqan_mysql_perfschema_agent\x18\n" + " \x01(\v2%.inventory.v1.QANMySQLPerfSchemaAgentH\x00R\x17qanMysqlPerfschemaAgent\x12[\n" + "\x17qan_mysql_slowlog_agent\x18\v \x01(\v2\".inventory.v1.QANMySQLSlowlogAgentH\x00R\x14qanMysqlSlowlogAgent\x12d\n" + - "\x1aqan_mongodb_profiler_agent\x18\f \x01(\v2%.inventory.v1.QANMongoDBProfilerAgentH\x00R\x17qanMongodbProfilerAgent\x12y\n" + + "\x1aqan_mongodb_profiler_agent\x18\f \x01(\v2%.inventory.v1.QANMongoDBProfilerAgentH\x00R\x17qanMongodbProfilerAgent\x12d\n" + + "\x1aqan_mongodb_mongolog_agent\x18\x10 \x01(\v2%.inventory.v1.QANMongoDBMongologAgentH\x00R\x17qanMongodbMongologAgent\x12y\n" + "!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\x0evalkeyExporterB\a\n" + - "\x05agent\"\x83\f\n" + + "\x05agent\"\xf5\f\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" + @@ -8776,14 +9278,14 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\x1aqan_mysql_perfschema_agent\x18\n" + " \x01(\v21.inventory.v1.ChangeQANMySQLPerfSchemaAgentParamsH\x00R\x17qanMysqlPerfschemaAgent\x12g\n" + "\x17qan_mysql_slowlog_agent\x18\v \x01(\v2..inventory.v1.ChangeQANMySQLSlowlogAgentParamsH\x00R\x14qanMysqlSlowlogAgent\x12p\n" + - "\x1aqan_mongodb_profiler_agent\x18\f \x01(\v21.inventory.v1.ChangeQANMongoDBProfilerAgentParamsH\x00R\x17qanMongodbProfilerAgent\x12\x85\x01\n" + + "\x1aqan_mongodb_profiler_agent\x18\f \x01(\v21.inventory.v1.ChangeQANMongoDBProfilerAgentParamsH\x00R\x17qanMongodbProfilerAgent\x12p\n" + + "\x1aqan_mongodb_mongolog_agent\x18\x11 \x01(\v21.inventory.v1.ChangeQANMongoDBMongologAgentParamsH\x00R\x17qanMongodbMongologAgent\x12\x85\x01\n" + "!qan_postgresql_pgstatements_agent\x18\r \x01(\v28.inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParamsH\x00R\x1eqanPostgresqlPgstatementsAgent\x12\x88\x01\n" + "\"qan_postgresql_pgstatmonitor_agent\x18\x0e \x01(\v29.inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParamsH\x00R\x1fqanPostgresqlPgstatmonitorAgent\x12G\n" + "\vnomad_agent\x18\x0f \x01(\v2$.inventory.v1.ChangeNomadAgentParamsH\x00R\n" + "nomadAgent\x12S\n" + "\x0fvalkey_exporter\x18\x10 \x01(\v2(.inventory.v1.ChangeValkeyExporterParamsH\x00R\x0evalkeyExporterB\a\n" + - "\x05agent\"\xaa\n" + - "\n" + + "\x05agent\"\x90\v\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" + @@ -8796,7 +9298,8 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\x1aqan_mysql_perfschema_agent\x18\n" + " \x01(\v2%.inventory.v1.QANMySQLPerfSchemaAgentH\x00R\x17qanMysqlPerfschemaAgent\x12[\n" + "\x17qan_mysql_slowlog_agent\x18\v \x01(\v2\".inventory.v1.QANMySQLSlowlogAgentH\x00R\x14qanMysqlSlowlogAgent\x12d\n" + - "\x1aqan_mongodb_profiler_agent\x18\f \x01(\v2%.inventory.v1.QANMongoDBProfilerAgentH\x00R\x17qanMongodbProfilerAgent\x12y\n" + + "\x1aqan_mongodb_profiler_agent\x18\f \x01(\v2%.inventory.v1.QANMongoDBProfilerAgentH\x00R\x17qanMongodbProfilerAgent\x12d\n" + + "\x1aqan_mongodb_mongolog_agent\x18\x11 \x01(\v2%.inventory.v1.QANMongoDBMongologAgentH\x00R\x17qanMongodbMongologAgent\x12y\n" + "!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\x12;\n" + "\vnomad_agent\x18\x0f \x01(\v2\x18.inventory.v1.NomadAgentH\x00R\n" + @@ -9046,6 +9549,36 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\x13metrics_resolutions\x18\x04 \x01(\v2\x1a.common.MetricsResolutionsR\x12metricsResolutionsB\t\n" + "\a_enableB\x10\n" + "\x0e_custom_labelsB\x16\n" + + "\x14_enable_push_metrics\"\xa7\x06\n" + + " AddQANMongoDBMongologAgentParams\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\x1a\n" + + "\busername\x18\x03 \x01(\tR\busername\x12\x1a\n" + + "\bpassword\x18\x04 \x01(\tR\bpassword\x12\x10\n" + + "\x03tls\x18\x05 \x01(\bR\x03tls\x12&\n" + + "\x0ftls_skip_verify\x18\x06 \x01(\bR\rtlsSkipVerify\x12.\n" + + "\x13tls_certificate_key\x18\a \x01(\tR\x11tlsCertificateKey\x12H\n" + + "!tls_certificate_key_file_password\x18\b \x01(\tR\x1dtlsCertificateKeyFilePassword\x12\x15\n" + + "\x06tls_ca\x18\t \x01(\tR\x05tlsCa\x12(\n" + + "\x10max_query_length\x18\n" + + " \x01(\x05R\x0emaxQueryLength\x12e\n" + + "\rcustom_labels\x18\v \x03(\v2@.inventory.v1.AddQANMongoDBMongologAgentParams.CustomLabelsEntryR\fcustomLabels\x122\n" + + "\x15skip_connection_check\x18\f \x01(\bR\x13skipConnectionCheck\x129\n" + + "\x18authentication_mechanism\x18\r \x01(\tR\x17authenticationMechanism\x127\n" + + "\x17authentication_database\x18\x0e \x01(\tR\x16authenticationDatabase\x123\n" + + "\tlog_level\x18\x0f \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\"\xb6\x02\n" + + "#ChangeQANMongoDBMongologAgentParams\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\x123\n" + + "\x13enable_push_metrics\x18\x03 \x01(\bH\x02R\x11enablePushMetrics\x88\x01\x01\x12K\n" + + "\x13metrics_resolutions\x18\x04 \x01(\v2\x1a.common.MetricsResolutionsR\x12metricsResolutionsB\t\n" + + "\a_enableB\x10\n" + + "\x0e_custom_labelsB\x16\n" + "\x14_enable_push_metrics\"\xbe\x05\n" + "'AddQANPostgreSQLPgStatementsAgentParams\x12)\n" + "\fpmm_agent_id\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\n" + @@ -9218,7 +9751,7 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\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*\x83\x05\n" + + "\x13RemoveAgentResponse*\xae\x05\n" + "\tAgentType\x12\x1a\n" + "\x16AGENT_TYPE_UNSPECIFIED\x10\x00\x12\x18\n" + "\x14AGENT_TYPE_PMM_AGENT\x10\x01\x12\x17\n" + @@ -9231,7 +9764,8 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\x1aAGENT_TYPE_VALKEY_EXPORTER\x10\x11\x12)\n" + "%AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT\x10\a\x12&\n" + "\"AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT\x10\b\x12)\n" + - "%AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT\x10\t\x120\n" + + "%AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT\x10\t\x12)\n" + + "%AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT\x10\x12\x120\n" + ",AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT\x10\n" + "\x121\n" + "-AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT\x10\r\x12 \n" + @@ -9263,7 +9797,7 @@ func file_inventory_v1_agents_proto_rawDescGZIP() []byte { var ( file_inventory_v1_agents_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_inventory_v1_agents_proto_msgTypes = make([]protoimpl.MessageInfo, 90) + file_inventory_v1_agents_proto_msgTypes = make([]protoimpl.MessageInfo, 95) file_inventory_v1_agents_proto_goTypes = []any{ (AgentType)(0), // 0: inventory.v1.AgentType (*PMMAgent)(nil), // 1: inventory.v1.PMMAgent @@ -9278,314 +9812,332 @@ var ( (*QANMySQLPerfSchemaAgent)(nil), // 10: inventory.v1.QANMySQLPerfSchemaAgent (*QANMySQLSlowlogAgent)(nil), // 11: inventory.v1.QANMySQLSlowlogAgent (*QANMongoDBProfilerAgent)(nil), // 12: inventory.v1.QANMongoDBProfilerAgent - (*QANPostgreSQLPgStatementsAgent)(nil), // 13: inventory.v1.QANPostgreSQLPgStatementsAgent - (*QANPostgreSQLPgStatMonitorAgent)(nil), // 14: inventory.v1.QANPostgreSQLPgStatMonitorAgent - (*RDSExporter)(nil), // 15: inventory.v1.RDSExporter - (*ExternalExporter)(nil), // 16: inventory.v1.ExternalExporter - (*AzureDatabaseExporter)(nil), // 17: inventory.v1.AzureDatabaseExporter - (*ChangeCommonAgentParams)(nil), // 18: inventory.v1.ChangeCommonAgentParams - (*ListAgentsRequest)(nil), // 19: inventory.v1.ListAgentsRequest - (*ListAgentsResponse)(nil), // 20: inventory.v1.ListAgentsResponse - (*GetAgentRequest)(nil), // 21: inventory.v1.GetAgentRequest - (*GetAgentResponse)(nil), // 22: inventory.v1.GetAgentResponse - (*GetAgentLogsRequest)(nil), // 23: inventory.v1.GetAgentLogsRequest - (*GetAgentLogsResponse)(nil), // 24: inventory.v1.GetAgentLogsResponse - (*AddAgentRequest)(nil), // 25: inventory.v1.AddAgentRequest - (*AddAgentResponse)(nil), // 26: inventory.v1.AddAgentResponse - (*ChangeAgentRequest)(nil), // 27: inventory.v1.ChangeAgentRequest - (*ChangeAgentResponse)(nil), // 28: inventory.v1.ChangeAgentResponse - (*AddPMMAgentParams)(nil), // 29: inventory.v1.AddPMMAgentParams - (*AddNodeExporterParams)(nil), // 30: inventory.v1.AddNodeExporterParams - (*ChangeNodeExporterParams)(nil), // 31: inventory.v1.ChangeNodeExporterParams - (*AddMySQLdExporterParams)(nil), // 32: inventory.v1.AddMySQLdExporterParams - (*ChangeMySQLdExporterParams)(nil), // 33: inventory.v1.ChangeMySQLdExporterParams - (*AddMongoDBExporterParams)(nil), // 34: inventory.v1.AddMongoDBExporterParams - (*ChangeMongoDBExporterParams)(nil), // 35: inventory.v1.ChangeMongoDBExporterParams - (*AddPostgresExporterParams)(nil), // 36: inventory.v1.AddPostgresExporterParams - (*ChangePostgresExporterParams)(nil), // 37: inventory.v1.ChangePostgresExporterParams - (*AddProxySQLExporterParams)(nil), // 38: inventory.v1.AddProxySQLExporterParams - (*ChangeProxySQLExporterParams)(nil), // 39: inventory.v1.ChangeProxySQLExporterParams - (*AddQANMySQLPerfSchemaAgentParams)(nil), // 40: inventory.v1.AddQANMySQLPerfSchemaAgentParams - (*ChangeQANMySQLPerfSchemaAgentParams)(nil), // 41: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams - (*AddQANMySQLSlowlogAgentParams)(nil), // 42: inventory.v1.AddQANMySQLSlowlogAgentParams - (*ChangeQANMySQLSlowlogAgentParams)(nil), // 43: inventory.v1.ChangeQANMySQLSlowlogAgentParams - (*AddQANMongoDBProfilerAgentParams)(nil), // 44: inventory.v1.AddQANMongoDBProfilerAgentParams - (*ChangeQANMongoDBProfilerAgentParams)(nil), // 45: inventory.v1.ChangeQANMongoDBProfilerAgentParams - (*AddQANPostgreSQLPgStatementsAgentParams)(nil), // 46: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams - (*ChangeQANPostgreSQLPgStatementsAgentParams)(nil), // 47: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams - (*AddQANPostgreSQLPgStatMonitorAgentParams)(nil), // 48: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams - (*ChangeQANPostgreSQLPgStatMonitorAgentParams)(nil), // 49: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams - (*AddRDSExporterParams)(nil), // 50: inventory.v1.AddRDSExporterParams - (*ChangeRDSExporterParams)(nil), // 51: inventory.v1.ChangeRDSExporterParams - (*AddExternalExporterParams)(nil), // 52: inventory.v1.AddExternalExporterParams - (*ChangeExternalExporterParams)(nil), // 53: inventory.v1.ChangeExternalExporterParams - (*AddAzureDatabaseExporterParams)(nil), // 54: inventory.v1.AddAzureDatabaseExporterParams - (*ChangeAzureDatabaseExporterParams)(nil), // 55: inventory.v1.ChangeAzureDatabaseExporterParams - (*ChangeNomadAgentParams)(nil), // 56: inventory.v1.ChangeNomadAgentParams - (*AddValkeyExporterParams)(nil), // 57: inventory.v1.AddValkeyExporterParams - (*ChangeValkeyExporterParams)(nil), // 58: inventory.v1.ChangeValkeyExporterParams - (*RemoveAgentRequest)(nil), // 59: inventory.v1.RemoveAgentRequest - (*RemoveAgentResponse)(nil), // 60: inventory.v1.RemoveAgentResponse - nil, // 61: inventory.v1.PMMAgent.CustomLabelsEntry - nil, // 62: inventory.v1.NodeExporter.CustomLabelsEntry - nil, // 63: inventory.v1.MySQLdExporter.CustomLabelsEntry - nil, // 64: inventory.v1.MongoDBExporter.CustomLabelsEntry - nil, // 65: inventory.v1.PostgresExporter.CustomLabelsEntry - nil, // 66: inventory.v1.ProxySQLExporter.CustomLabelsEntry - nil, // 67: inventory.v1.ValkeyExporter.CustomLabelsEntry - nil, // 68: inventory.v1.QANMySQLPerfSchemaAgent.CustomLabelsEntry - nil, // 69: inventory.v1.QANMySQLSlowlogAgent.CustomLabelsEntry - nil, // 70: inventory.v1.QANMongoDBProfilerAgent.CustomLabelsEntry - nil, // 71: inventory.v1.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry - nil, // 72: inventory.v1.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry - nil, // 73: inventory.v1.RDSExporter.CustomLabelsEntry - nil, // 74: inventory.v1.ExternalExporter.CustomLabelsEntry - nil, // 75: inventory.v1.AzureDatabaseExporter.CustomLabelsEntry - nil, // 76: inventory.v1.AddPMMAgentParams.CustomLabelsEntry - nil, // 77: inventory.v1.AddNodeExporterParams.CustomLabelsEntry - nil, // 78: inventory.v1.AddMySQLdExporterParams.CustomLabelsEntry - nil, // 79: inventory.v1.AddMongoDBExporterParams.CustomLabelsEntry - nil, // 80: inventory.v1.AddPostgresExporterParams.CustomLabelsEntry - nil, // 81: inventory.v1.AddProxySQLExporterParams.CustomLabelsEntry - nil, // 82: inventory.v1.AddQANMySQLPerfSchemaAgentParams.CustomLabelsEntry - nil, // 83: inventory.v1.AddQANMySQLSlowlogAgentParams.CustomLabelsEntry - nil, // 84: inventory.v1.AddQANMongoDBProfilerAgentParams.CustomLabelsEntry - nil, // 85: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.CustomLabelsEntry - nil, // 86: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.CustomLabelsEntry - nil, // 87: inventory.v1.AddRDSExporterParams.CustomLabelsEntry - nil, // 88: inventory.v1.AddExternalExporterParams.CustomLabelsEntry - nil, // 89: inventory.v1.AddAzureDatabaseExporterParams.CustomLabelsEntry - nil, // 90: inventory.v1.AddValkeyExporterParams.CustomLabelsEntry - (AgentStatus)(0), // 91: inventory.v1.AgentStatus - (LogLevel)(0), // 92: inventory.v1.LogLevel - (*common.MetricsResolutions)(nil), // 93: common.MetricsResolutions - (*common.StringMap)(nil), // 94: common.StringMap + (*QANMongoDBMongologAgent)(nil), // 13: inventory.v1.QANMongoDBMongologAgent + (*QANPostgreSQLPgStatementsAgent)(nil), // 14: inventory.v1.QANPostgreSQLPgStatementsAgent + (*QANPostgreSQLPgStatMonitorAgent)(nil), // 15: inventory.v1.QANPostgreSQLPgStatMonitorAgent + (*RDSExporter)(nil), // 16: inventory.v1.RDSExporter + (*ExternalExporter)(nil), // 17: inventory.v1.ExternalExporter + (*AzureDatabaseExporter)(nil), // 18: inventory.v1.AzureDatabaseExporter + (*ChangeCommonAgentParams)(nil), // 19: inventory.v1.ChangeCommonAgentParams + (*ListAgentsRequest)(nil), // 20: inventory.v1.ListAgentsRequest + (*ListAgentsResponse)(nil), // 21: inventory.v1.ListAgentsResponse + (*GetAgentRequest)(nil), // 22: inventory.v1.GetAgentRequest + (*GetAgentResponse)(nil), // 23: inventory.v1.GetAgentResponse + (*GetAgentLogsRequest)(nil), // 24: inventory.v1.GetAgentLogsRequest + (*GetAgentLogsResponse)(nil), // 25: inventory.v1.GetAgentLogsResponse + (*AddAgentRequest)(nil), // 26: inventory.v1.AddAgentRequest + (*AddAgentResponse)(nil), // 27: inventory.v1.AddAgentResponse + (*ChangeAgentRequest)(nil), // 28: inventory.v1.ChangeAgentRequest + (*ChangeAgentResponse)(nil), // 29: inventory.v1.ChangeAgentResponse + (*AddPMMAgentParams)(nil), // 30: inventory.v1.AddPMMAgentParams + (*AddNodeExporterParams)(nil), // 31: inventory.v1.AddNodeExporterParams + (*ChangeNodeExporterParams)(nil), // 32: inventory.v1.ChangeNodeExporterParams + (*AddMySQLdExporterParams)(nil), // 33: inventory.v1.AddMySQLdExporterParams + (*ChangeMySQLdExporterParams)(nil), // 34: inventory.v1.ChangeMySQLdExporterParams + (*AddMongoDBExporterParams)(nil), // 35: inventory.v1.AddMongoDBExporterParams + (*ChangeMongoDBExporterParams)(nil), // 36: inventory.v1.ChangeMongoDBExporterParams + (*AddPostgresExporterParams)(nil), // 37: inventory.v1.AddPostgresExporterParams + (*ChangePostgresExporterParams)(nil), // 38: inventory.v1.ChangePostgresExporterParams + (*AddProxySQLExporterParams)(nil), // 39: inventory.v1.AddProxySQLExporterParams + (*ChangeProxySQLExporterParams)(nil), // 40: inventory.v1.ChangeProxySQLExporterParams + (*AddQANMySQLPerfSchemaAgentParams)(nil), // 41: inventory.v1.AddQANMySQLPerfSchemaAgentParams + (*ChangeQANMySQLPerfSchemaAgentParams)(nil), // 42: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams + (*AddQANMySQLSlowlogAgentParams)(nil), // 43: inventory.v1.AddQANMySQLSlowlogAgentParams + (*ChangeQANMySQLSlowlogAgentParams)(nil), // 44: inventory.v1.ChangeQANMySQLSlowlogAgentParams + (*AddQANMongoDBProfilerAgentParams)(nil), // 45: inventory.v1.AddQANMongoDBProfilerAgentParams + (*ChangeQANMongoDBProfilerAgentParams)(nil), // 46: inventory.v1.ChangeQANMongoDBProfilerAgentParams + (*AddQANMongoDBMongologAgentParams)(nil), // 47: inventory.v1.AddQANMongoDBMongologAgentParams + (*ChangeQANMongoDBMongologAgentParams)(nil), // 48: inventory.v1.ChangeQANMongoDBMongologAgentParams + (*AddQANPostgreSQLPgStatementsAgentParams)(nil), // 49: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams + (*ChangeQANPostgreSQLPgStatementsAgentParams)(nil), // 50: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams + (*AddQANPostgreSQLPgStatMonitorAgentParams)(nil), // 51: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams + (*ChangeQANPostgreSQLPgStatMonitorAgentParams)(nil), // 52: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams + (*AddRDSExporterParams)(nil), // 53: inventory.v1.AddRDSExporterParams + (*ChangeRDSExporterParams)(nil), // 54: inventory.v1.ChangeRDSExporterParams + (*AddExternalExporterParams)(nil), // 55: inventory.v1.AddExternalExporterParams + (*ChangeExternalExporterParams)(nil), // 56: inventory.v1.ChangeExternalExporterParams + (*AddAzureDatabaseExporterParams)(nil), // 57: inventory.v1.AddAzureDatabaseExporterParams + (*ChangeAzureDatabaseExporterParams)(nil), // 58: inventory.v1.ChangeAzureDatabaseExporterParams + (*ChangeNomadAgentParams)(nil), // 59: inventory.v1.ChangeNomadAgentParams + (*AddValkeyExporterParams)(nil), // 60: inventory.v1.AddValkeyExporterParams + (*ChangeValkeyExporterParams)(nil), // 61: inventory.v1.ChangeValkeyExporterParams + (*RemoveAgentRequest)(nil), // 62: inventory.v1.RemoveAgentRequest + (*RemoveAgentResponse)(nil), // 63: inventory.v1.RemoveAgentResponse + nil, // 64: inventory.v1.PMMAgent.CustomLabelsEntry + nil, // 65: inventory.v1.NodeExporter.CustomLabelsEntry + nil, // 66: inventory.v1.MySQLdExporter.CustomLabelsEntry + nil, // 67: inventory.v1.MongoDBExporter.CustomLabelsEntry + nil, // 68: inventory.v1.PostgresExporter.CustomLabelsEntry + nil, // 69: inventory.v1.ProxySQLExporter.CustomLabelsEntry + nil, // 70: inventory.v1.ValkeyExporter.CustomLabelsEntry + nil, // 71: inventory.v1.QANMySQLPerfSchemaAgent.CustomLabelsEntry + nil, // 72: inventory.v1.QANMySQLSlowlogAgent.CustomLabelsEntry + nil, // 73: inventory.v1.QANMongoDBProfilerAgent.CustomLabelsEntry + nil, // 74: inventory.v1.QANMongoDBMongologAgent.CustomLabelsEntry + nil, // 75: inventory.v1.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry + nil, // 76: inventory.v1.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry + nil, // 77: inventory.v1.RDSExporter.CustomLabelsEntry + nil, // 78: inventory.v1.ExternalExporter.CustomLabelsEntry + nil, // 79: inventory.v1.AzureDatabaseExporter.CustomLabelsEntry + nil, // 80: inventory.v1.AddPMMAgentParams.CustomLabelsEntry + nil, // 81: inventory.v1.AddNodeExporterParams.CustomLabelsEntry + nil, // 82: inventory.v1.AddMySQLdExporterParams.CustomLabelsEntry + nil, // 83: inventory.v1.AddMongoDBExporterParams.CustomLabelsEntry + nil, // 84: inventory.v1.AddPostgresExporterParams.CustomLabelsEntry + nil, // 85: inventory.v1.AddProxySQLExporterParams.CustomLabelsEntry + nil, // 86: inventory.v1.AddQANMySQLPerfSchemaAgentParams.CustomLabelsEntry + nil, // 87: inventory.v1.AddQANMySQLSlowlogAgentParams.CustomLabelsEntry + nil, // 88: inventory.v1.AddQANMongoDBProfilerAgentParams.CustomLabelsEntry + nil, // 89: inventory.v1.AddQANMongoDBMongologAgentParams.CustomLabelsEntry + nil, // 90: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.CustomLabelsEntry + nil, // 91: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.CustomLabelsEntry + nil, // 92: inventory.v1.AddRDSExporterParams.CustomLabelsEntry + nil, // 93: inventory.v1.AddExternalExporterParams.CustomLabelsEntry + nil, // 94: inventory.v1.AddAzureDatabaseExporterParams.CustomLabelsEntry + nil, // 95: inventory.v1.AddValkeyExporterParams.CustomLabelsEntry + (AgentStatus)(0), // 96: inventory.v1.AgentStatus + (LogLevel)(0), // 97: inventory.v1.LogLevel + (*common.MetricsResolutions)(nil), // 98: common.MetricsResolutions + (*common.StringMap)(nil), // 99: common.StringMap } ) var file_inventory_v1_agents_proto_depIdxs = []int32{ - 61, // 0: inventory.v1.PMMAgent.custom_labels:type_name -> inventory.v1.PMMAgent.CustomLabelsEntry - 91, // 1: inventory.v1.VMAgent.status:type_name -> inventory.v1.AgentStatus - 91, // 2: inventory.v1.NomadAgent.status:type_name -> inventory.v1.AgentStatus - 62, // 3: inventory.v1.NodeExporter.custom_labels:type_name -> inventory.v1.NodeExporter.CustomLabelsEntry - 91, // 4: inventory.v1.NodeExporter.status:type_name -> inventory.v1.AgentStatus - 92, // 5: inventory.v1.NodeExporter.log_level:type_name -> inventory.v1.LogLevel - 93, // 6: inventory.v1.NodeExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 63, // 7: inventory.v1.MySQLdExporter.custom_labels:type_name -> inventory.v1.MySQLdExporter.CustomLabelsEntry - 91, // 8: inventory.v1.MySQLdExporter.status:type_name -> inventory.v1.AgentStatus - 92, // 9: inventory.v1.MySQLdExporter.log_level:type_name -> inventory.v1.LogLevel - 93, // 10: inventory.v1.MySQLdExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 64, // 11: inventory.v1.MongoDBExporter.custom_labels:type_name -> inventory.v1.MongoDBExporter.CustomLabelsEntry - 91, // 12: inventory.v1.MongoDBExporter.status:type_name -> inventory.v1.AgentStatus - 92, // 13: inventory.v1.MongoDBExporter.log_level:type_name -> inventory.v1.LogLevel - 93, // 14: inventory.v1.MongoDBExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 65, // 15: inventory.v1.PostgresExporter.custom_labels:type_name -> inventory.v1.PostgresExporter.CustomLabelsEntry - 91, // 16: inventory.v1.PostgresExporter.status:type_name -> inventory.v1.AgentStatus - 92, // 17: inventory.v1.PostgresExporter.log_level:type_name -> inventory.v1.LogLevel - 93, // 18: inventory.v1.PostgresExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 66, // 19: inventory.v1.ProxySQLExporter.custom_labels:type_name -> inventory.v1.ProxySQLExporter.CustomLabelsEntry - 91, // 20: inventory.v1.ProxySQLExporter.status:type_name -> inventory.v1.AgentStatus - 92, // 21: inventory.v1.ProxySQLExporter.log_level:type_name -> inventory.v1.LogLevel - 93, // 22: inventory.v1.ProxySQLExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 67, // 23: inventory.v1.ValkeyExporter.custom_labels:type_name -> inventory.v1.ValkeyExporter.CustomLabelsEntry - 91, // 24: inventory.v1.ValkeyExporter.status:type_name -> inventory.v1.AgentStatus - 92, // 25: inventory.v1.ValkeyExporter.log_level:type_name -> inventory.v1.LogLevel - 93, // 26: inventory.v1.ValkeyExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 68, // 27: inventory.v1.QANMySQLPerfSchemaAgent.custom_labels:type_name -> inventory.v1.QANMySQLPerfSchemaAgent.CustomLabelsEntry - 91, // 28: inventory.v1.QANMySQLPerfSchemaAgent.status:type_name -> inventory.v1.AgentStatus - 92, // 29: inventory.v1.QANMySQLPerfSchemaAgent.log_level:type_name -> inventory.v1.LogLevel - 69, // 30: inventory.v1.QANMySQLSlowlogAgent.custom_labels:type_name -> inventory.v1.QANMySQLSlowlogAgent.CustomLabelsEntry - 91, // 31: inventory.v1.QANMySQLSlowlogAgent.status:type_name -> inventory.v1.AgentStatus - 92, // 32: inventory.v1.QANMySQLSlowlogAgent.log_level:type_name -> inventory.v1.LogLevel - 70, // 33: inventory.v1.QANMongoDBProfilerAgent.custom_labels:type_name -> inventory.v1.QANMongoDBProfilerAgent.CustomLabelsEntry - 91, // 34: inventory.v1.QANMongoDBProfilerAgent.status:type_name -> inventory.v1.AgentStatus - 92, // 35: inventory.v1.QANMongoDBProfilerAgent.log_level:type_name -> inventory.v1.LogLevel - 71, // 36: inventory.v1.QANPostgreSQLPgStatementsAgent.custom_labels:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry - 91, // 37: inventory.v1.QANPostgreSQLPgStatementsAgent.status:type_name -> inventory.v1.AgentStatus - 92, // 38: inventory.v1.QANPostgreSQLPgStatementsAgent.log_level:type_name -> inventory.v1.LogLevel - 72, // 39: inventory.v1.QANPostgreSQLPgStatMonitorAgent.custom_labels:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry - 91, // 40: inventory.v1.QANPostgreSQLPgStatMonitorAgent.status:type_name -> inventory.v1.AgentStatus - 92, // 41: inventory.v1.QANPostgreSQLPgStatMonitorAgent.log_level:type_name -> inventory.v1.LogLevel - 73, // 42: inventory.v1.RDSExporter.custom_labels:type_name -> inventory.v1.RDSExporter.CustomLabelsEntry - 91, // 43: inventory.v1.RDSExporter.status:type_name -> inventory.v1.AgentStatus - 92, // 44: inventory.v1.RDSExporter.log_level:type_name -> inventory.v1.LogLevel - 93, // 45: inventory.v1.RDSExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 74, // 46: inventory.v1.ExternalExporter.custom_labels:type_name -> inventory.v1.ExternalExporter.CustomLabelsEntry - 93, // 47: inventory.v1.ExternalExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 75, // 48: inventory.v1.AzureDatabaseExporter.custom_labels:type_name -> inventory.v1.AzureDatabaseExporter.CustomLabelsEntry - 91, // 49: inventory.v1.AzureDatabaseExporter.status:type_name -> inventory.v1.AgentStatus - 92, // 50: inventory.v1.AzureDatabaseExporter.log_level:type_name -> inventory.v1.LogLevel - 93, // 51: inventory.v1.AzureDatabaseExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 94, // 52: inventory.v1.ChangeCommonAgentParams.custom_labels:type_name -> common.StringMap - 93, // 53: inventory.v1.ChangeCommonAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 0, // 54: inventory.v1.ListAgentsRequest.agent_type:type_name -> inventory.v1.AgentType - 1, // 55: inventory.v1.ListAgentsResponse.pmm_agent:type_name -> inventory.v1.PMMAgent - 2, // 56: inventory.v1.ListAgentsResponse.vm_agent:type_name -> inventory.v1.VMAgent - 4, // 57: inventory.v1.ListAgentsResponse.node_exporter:type_name -> inventory.v1.NodeExporter - 5, // 58: inventory.v1.ListAgentsResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter - 6, // 59: inventory.v1.ListAgentsResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter - 7, // 60: inventory.v1.ListAgentsResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter - 8, // 61: inventory.v1.ListAgentsResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter - 10, // 62: inventory.v1.ListAgentsResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent - 11, // 63: inventory.v1.ListAgentsResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent - 12, // 64: inventory.v1.ListAgentsResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent - 13, // 65: inventory.v1.ListAgentsResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent - 14, // 66: inventory.v1.ListAgentsResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent - 16, // 67: inventory.v1.ListAgentsResponse.external_exporter:type_name -> inventory.v1.ExternalExporter - 15, // 68: inventory.v1.ListAgentsResponse.rds_exporter:type_name -> inventory.v1.RDSExporter - 17, // 69: inventory.v1.ListAgentsResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter - 3, // 70: inventory.v1.ListAgentsResponse.nomad_agent:type_name -> inventory.v1.NomadAgent - 9, // 71: inventory.v1.ListAgentsResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter - 1, // 72: inventory.v1.GetAgentResponse.pmm_agent:type_name -> inventory.v1.PMMAgent - 2, // 73: inventory.v1.GetAgentResponse.vmagent:type_name -> inventory.v1.VMAgent - 4, // 74: inventory.v1.GetAgentResponse.node_exporter:type_name -> inventory.v1.NodeExporter - 5, // 75: inventory.v1.GetAgentResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter - 6, // 76: inventory.v1.GetAgentResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter - 7, // 77: inventory.v1.GetAgentResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter - 8, // 78: inventory.v1.GetAgentResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter - 10, // 79: inventory.v1.GetAgentResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent - 11, // 80: inventory.v1.GetAgentResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent - 12, // 81: inventory.v1.GetAgentResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent - 13, // 82: inventory.v1.GetAgentResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent - 14, // 83: inventory.v1.GetAgentResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent - 16, // 84: inventory.v1.GetAgentResponse.external_exporter:type_name -> inventory.v1.ExternalExporter - 15, // 85: inventory.v1.GetAgentResponse.rds_exporter:type_name -> inventory.v1.RDSExporter - 17, // 86: inventory.v1.GetAgentResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter - 3, // 87: inventory.v1.GetAgentResponse.nomad_agent:type_name -> inventory.v1.NomadAgent - 9, // 88: inventory.v1.GetAgentResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter - 29, // 89: inventory.v1.AddAgentRequest.pmm_agent:type_name -> inventory.v1.AddPMMAgentParams - 30, // 90: inventory.v1.AddAgentRequest.node_exporter:type_name -> inventory.v1.AddNodeExporterParams - 32, // 91: inventory.v1.AddAgentRequest.mysqld_exporter:type_name -> inventory.v1.AddMySQLdExporterParams - 34, // 92: inventory.v1.AddAgentRequest.mongodb_exporter:type_name -> inventory.v1.AddMongoDBExporterParams - 36, // 93: inventory.v1.AddAgentRequest.postgres_exporter:type_name -> inventory.v1.AddPostgresExporterParams - 38, // 94: inventory.v1.AddAgentRequest.proxysql_exporter:type_name -> inventory.v1.AddProxySQLExporterParams - 52, // 95: inventory.v1.AddAgentRequest.external_exporter:type_name -> inventory.v1.AddExternalExporterParams - 50, // 96: inventory.v1.AddAgentRequest.rds_exporter:type_name -> inventory.v1.AddRDSExporterParams - 54, // 97: inventory.v1.AddAgentRequest.azure_database_exporter:type_name -> inventory.v1.AddAzureDatabaseExporterParams - 40, // 98: inventory.v1.AddAgentRequest.qan_mysql_perfschema_agent:type_name -> inventory.v1.AddQANMySQLPerfSchemaAgentParams - 42, // 99: inventory.v1.AddAgentRequest.qan_mysql_slowlog_agent:type_name -> inventory.v1.AddQANMySQLSlowlogAgentParams - 44, // 100: inventory.v1.AddAgentRequest.qan_mongodb_profiler_agent:type_name -> inventory.v1.AddQANMongoDBProfilerAgentParams - 46, // 101: inventory.v1.AddAgentRequest.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.AddQANPostgreSQLPgStatementsAgentParams - 48, // 102: inventory.v1.AddAgentRequest.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams - 57, // 103: inventory.v1.AddAgentRequest.valkey_exporter:type_name -> inventory.v1.AddValkeyExporterParams - 1, // 104: inventory.v1.AddAgentResponse.pmm_agent:type_name -> inventory.v1.PMMAgent - 4, // 105: inventory.v1.AddAgentResponse.node_exporter:type_name -> inventory.v1.NodeExporter - 5, // 106: inventory.v1.AddAgentResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter - 6, // 107: inventory.v1.AddAgentResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter - 7, // 108: inventory.v1.AddAgentResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter - 8, // 109: inventory.v1.AddAgentResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter - 16, // 110: inventory.v1.AddAgentResponse.external_exporter:type_name -> inventory.v1.ExternalExporter - 15, // 111: inventory.v1.AddAgentResponse.rds_exporter:type_name -> inventory.v1.RDSExporter - 17, // 112: inventory.v1.AddAgentResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter - 10, // 113: inventory.v1.AddAgentResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent - 11, // 114: inventory.v1.AddAgentResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent - 12, // 115: inventory.v1.AddAgentResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent - 13, // 116: inventory.v1.AddAgentResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent - 14, // 117: inventory.v1.AddAgentResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent - 9, // 118: inventory.v1.AddAgentResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter - 31, // 119: inventory.v1.ChangeAgentRequest.node_exporter:type_name -> inventory.v1.ChangeNodeExporterParams - 33, // 120: inventory.v1.ChangeAgentRequest.mysqld_exporter:type_name -> inventory.v1.ChangeMySQLdExporterParams - 35, // 121: inventory.v1.ChangeAgentRequest.mongodb_exporter:type_name -> inventory.v1.ChangeMongoDBExporterParams - 37, // 122: inventory.v1.ChangeAgentRequest.postgres_exporter:type_name -> inventory.v1.ChangePostgresExporterParams - 39, // 123: inventory.v1.ChangeAgentRequest.proxysql_exporter:type_name -> inventory.v1.ChangeProxySQLExporterParams - 53, // 124: inventory.v1.ChangeAgentRequest.external_exporter:type_name -> inventory.v1.ChangeExternalExporterParams - 51, // 125: inventory.v1.ChangeAgentRequest.rds_exporter:type_name -> inventory.v1.ChangeRDSExporterParams - 55, // 126: inventory.v1.ChangeAgentRequest.azure_database_exporter:type_name -> inventory.v1.ChangeAzureDatabaseExporterParams - 41, // 127: inventory.v1.ChangeAgentRequest.qan_mysql_perfschema_agent:type_name -> inventory.v1.ChangeQANMySQLPerfSchemaAgentParams - 43, // 128: inventory.v1.ChangeAgentRequest.qan_mysql_slowlog_agent:type_name -> inventory.v1.ChangeQANMySQLSlowlogAgentParams - 45, // 129: inventory.v1.ChangeAgentRequest.qan_mongodb_profiler_agent:type_name -> inventory.v1.ChangeQANMongoDBProfilerAgentParams - 47, // 130: inventory.v1.ChangeAgentRequest.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams - 49, // 131: inventory.v1.ChangeAgentRequest.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams - 56, // 132: inventory.v1.ChangeAgentRequest.nomad_agent:type_name -> inventory.v1.ChangeNomadAgentParams - 58, // 133: inventory.v1.ChangeAgentRequest.valkey_exporter:type_name -> inventory.v1.ChangeValkeyExporterParams - 4, // 134: inventory.v1.ChangeAgentResponse.node_exporter:type_name -> inventory.v1.NodeExporter - 5, // 135: inventory.v1.ChangeAgentResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter - 6, // 136: inventory.v1.ChangeAgentResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter - 7, // 137: inventory.v1.ChangeAgentResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter - 8, // 138: inventory.v1.ChangeAgentResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter - 16, // 139: inventory.v1.ChangeAgentResponse.external_exporter:type_name -> inventory.v1.ExternalExporter - 15, // 140: inventory.v1.ChangeAgentResponse.rds_exporter:type_name -> inventory.v1.RDSExporter - 17, // 141: inventory.v1.ChangeAgentResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter - 10, // 142: inventory.v1.ChangeAgentResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent - 11, // 143: inventory.v1.ChangeAgentResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent - 12, // 144: inventory.v1.ChangeAgentResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent - 13, // 145: inventory.v1.ChangeAgentResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent - 14, // 146: inventory.v1.ChangeAgentResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent - 3, // 147: inventory.v1.ChangeAgentResponse.nomad_agent:type_name -> inventory.v1.NomadAgent - 9, // 148: inventory.v1.ChangeAgentResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter - 76, // 149: inventory.v1.AddPMMAgentParams.custom_labels:type_name -> inventory.v1.AddPMMAgentParams.CustomLabelsEntry - 77, // 150: inventory.v1.AddNodeExporterParams.custom_labels:type_name -> inventory.v1.AddNodeExporterParams.CustomLabelsEntry - 92, // 151: inventory.v1.AddNodeExporterParams.log_level:type_name -> inventory.v1.LogLevel - 94, // 152: inventory.v1.ChangeNodeExporterParams.custom_labels:type_name -> common.StringMap - 93, // 153: inventory.v1.ChangeNodeExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 78, // 154: inventory.v1.AddMySQLdExporterParams.custom_labels:type_name -> inventory.v1.AddMySQLdExporterParams.CustomLabelsEntry - 92, // 155: inventory.v1.AddMySQLdExporterParams.log_level:type_name -> inventory.v1.LogLevel - 94, // 156: inventory.v1.ChangeMySQLdExporterParams.custom_labels:type_name -> common.StringMap - 93, // 157: inventory.v1.ChangeMySQLdExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 79, // 158: inventory.v1.AddMongoDBExporterParams.custom_labels:type_name -> inventory.v1.AddMongoDBExporterParams.CustomLabelsEntry - 92, // 159: inventory.v1.AddMongoDBExporterParams.log_level:type_name -> inventory.v1.LogLevel - 94, // 160: inventory.v1.ChangeMongoDBExporterParams.custom_labels:type_name -> common.StringMap - 93, // 161: inventory.v1.ChangeMongoDBExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 80, // 162: inventory.v1.AddPostgresExporterParams.custom_labels:type_name -> inventory.v1.AddPostgresExporterParams.CustomLabelsEntry - 92, // 163: inventory.v1.AddPostgresExporterParams.log_level:type_name -> inventory.v1.LogLevel - 94, // 164: inventory.v1.ChangePostgresExporterParams.custom_labels:type_name -> common.StringMap - 93, // 165: inventory.v1.ChangePostgresExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 81, // 166: inventory.v1.AddProxySQLExporterParams.custom_labels:type_name -> inventory.v1.AddProxySQLExporterParams.CustomLabelsEntry - 92, // 167: inventory.v1.AddProxySQLExporterParams.log_level:type_name -> inventory.v1.LogLevel - 94, // 168: inventory.v1.ChangeProxySQLExporterParams.custom_labels:type_name -> common.StringMap - 93, // 169: inventory.v1.ChangeProxySQLExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 82, // 170: inventory.v1.AddQANMySQLPerfSchemaAgentParams.custom_labels:type_name -> inventory.v1.AddQANMySQLPerfSchemaAgentParams.CustomLabelsEntry - 92, // 171: inventory.v1.AddQANMySQLPerfSchemaAgentParams.log_level:type_name -> inventory.v1.LogLevel - 94, // 172: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams.custom_labels:type_name -> common.StringMap - 93, // 173: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 83, // 174: inventory.v1.AddQANMySQLSlowlogAgentParams.custom_labels:type_name -> inventory.v1.AddQANMySQLSlowlogAgentParams.CustomLabelsEntry - 92, // 175: inventory.v1.AddQANMySQLSlowlogAgentParams.log_level:type_name -> inventory.v1.LogLevel - 94, // 176: inventory.v1.ChangeQANMySQLSlowlogAgentParams.custom_labels:type_name -> common.StringMap - 93, // 177: inventory.v1.ChangeQANMySQLSlowlogAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 84, // 178: inventory.v1.AddQANMongoDBProfilerAgentParams.custom_labels:type_name -> inventory.v1.AddQANMongoDBProfilerAgentParams.CustomLabelsEntry - 92, // 179: inventory.v1.AddQANMongoDBProfilerAgentParams.log_level:type_name -> inventory.v1.LogLevel - 94, // 180: inventory.v1.ChangeQANMongoDBProfilerAgentParams.custom_labels:type_name -> common.StringMap - 93, // 181: inventory.v1.ChangeQANMongoDBProfilerAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 85, // 182: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.custom_labels:type_name -> inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.CustomLabelsEntry - 92, // 183: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.log_level:type_name -> inventory.v1.LogLevel - 94, // 184: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams.custom_labels:type_name -> common.StringMap - 93, // 185: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 86, // 186: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.custom_labels:type_name -> inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.CustomLabelsEntry - 92, // 187: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.log_level:type_name -> inventory.v1.LogLevel - 94, // 188: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams.custom_labels:type_name -> common.StringMap - 93, // 189: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 87, // 190: inventory.v1.AddRDSExporterParams.custom_labels:type_name -> inventory.v1.AddRDSExporterParams.CustomLabelsEntry - 92, // 191: inventory.v1.AddRDSExporterParams.log_level:type_name -> inventory.v1.LogLevel - 94, // 192: inventory.v1.ChangeRDSExporterParams.custom_labels:type_name -> common.StringMap - 93, // 193: inventory.v1.ChangeRDSExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 88, // 194: inventory.v1.AddExternalExporterParams.custom_labels:type_name -> inventory.v1.AddExternalExporterParams.CustomLabelsEntry - 94, // 195: inventory.v1.ChangeExternalExporterParams.custom_labels:type_name -> common.StringMap - 93, // 196: inventory.v1.ChangeExternalExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 89, // 197: inventory.v1.AddAzureDatabaseExporterParams.custom_labels:type_name -> inventory.v1.AddAzureDatabaseExporterParams.CustomLabelsEntry - 92, // 198: inventory.v1.AddAzureDatabaseExporterParams.log_level:type_name -> inventory.v1.LogLevel - 94, // 199: inventory.v1.ChangeAzureDatabaseExporterParams.custom_labels:type_name -> common.StringMap - 93, // 200: inventory.v1.ChangeAzureDatabaseExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 90, // 201: inventory.v1.AddValkeyExporterParams.custom_labels:type_name -> inventory.v1.AddValkeyExporterParams.CustomLabelsEntry - 92, // 202: inventory.v1.AddValkeyExporterParams.log_level:type_name -> inventory.v1.LogLevel - 94, // 203: inventory.v1.ChangeValkeyExporterParams.custom_labels:type_name -> common.StringMap - 93, // 204: inventory.v1.ChangeValkeyExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 19, // 205: inventory.v1.AgentsService.ListAgents:input_type -> inventory.v1.ListAgentsRequest - 21, // 206: inventory.v1.AgentsService.GetAgent:input_type -> inventory.v1.GetAgentRequest - 23, // 207: inventory.v1.AgentsService.GetAgentLogs:input_type -> inventory.v1.GetAgentLogsRequest - 25, // 208: inventory.v1.AgentsService.AddAgent:input_type -> inventory.v1.AddAgentRequest - 27, // 209: inventory.v1.AgentsService.ChangeAgent:input_type -> inventory.v1.ChangeAgentRequest - 59, // 210: inventory.v1.AgentsService.RemoveAgent:input_type -> inventory.v1.RemoveAgentRequest - 20, // 211: inventory.v1.AgentsService.ListAgents:output_type -> inventory.v1.ListAgentsResponse - 22, // 212: inventory.v1.AgentsService.GetAgent:output_type -> inventory.v1.GetAgentResponse - 24, // 213: inventory.v1.AgentsService.GetAgentLogs:output_type -> inventory.v1.GetAgentLogsResponse - 26, // 214: inventory.v1.AgentsService.AddAgent:output_type -> inventory.v1.AddAgentResponse - 28, // 215: inventory.v1.AgentsService.ChangeAgent:output_type -> inventory.v1.ChangeAgentResponse - 60, // 216: inventory.v1.AgentsService.RemoveAgent:output_type -> inventory.v1.RemoveAgentResponse - 211, // [211:217] is the sub-list for method output_type - 205, // [205:211] is the sub-list for method input_type - 205, // [205:205] is the sub-list for extension type_name - 205, // [205:205] is the sub-list for extension extendee - 0, // [0:205] is the sub-list for field type_name + 64, // 0: inventory.v1.PMMAgent.custom_labels:type_name -> inventory.v1.PMMAgent.CustomLabelsEntry + 96, // 1: inventory.v1.VMAgent.status:type_name -> inventory.v1.AgentStatus + 96, // 2: inventory.v1.NomadAgent.status:type_name -> inventory.v1.AgentStatus + 65, // 3: inventory.v1.NodeExporter.custom_labels:type_name -> inventory.v1.NodeExporter.CustomLabelsEntry + 96, // 4: inventory.v1.NodeExporter.status:type_name -> inventory.v1.AgentStatus + 97, // 5: inventory.v1.NodeExporter.log_level:type_name -> inventory.v1.LogLevel + 98, // 6: inventory.v1.NodeExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 66, // 7: inventory.v1.MySQLdExporter.custom_labels:type_name -> inventory.v1.MySQLdExporter.CustomLabelsEntry + 96, // 8: inventory.v1.MySQLdExporter.status:type_name -> inventory.v1.AgentStatus + 97, // 9: inventory.v1.MySQLdExporter.log_level:type_name -> inventory.v1.LogLevel + 98, // 10: inventory.v1.MySQLdExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 67, // 11: inventory.v1.MongoDBExporter.custom_labels:type_name -> inventory.v1.MongoDBExporter.CustomLabelsEntry + 96, // 12: inventory.v1.MongoDBExporter.status:type_name -> inventory.v1.AgentStatus + 97, // 13: inventory.v1.MongoDBExporter.log_level:type_name -> inventory.v1.LogLevel + 98, // 14: inventory.v1.MongoDBExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 68, // 15: inventory.v1.PostgresExporter.custom_labels:type_name -> inventory.v1.PostgresExporter.CustomLabelsEntry + 96, // 16: inventory.v1.PostgresExporter.status:type_name -> inventory.v1.AgentStatus + 97, // 17: inventory.v1.PostgresExporter.log_level:type_name -> inventory.v1.LogLevel + 98, // 18: inventory.v1.PostgresExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 69, // 19: inventory.v1.ProxySQLExporter.custom_labels:type_name -> inventory.v1.ProxySQLExporter.CustomLabelsEntry + 96, // 20: inventory.v1.ProxySQLExporter.status:type_name -> inventory.v1.AgentStatus + 97, // 21: inventory.v1.ProxySQLExporter.log_level:type_name -> inventory.v1.LogLevel + 98, // 22: inventory.v1.ProxySQLExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 70, // 23: inventory.v1.ValkeyExporter.custom_labels:type_name -> inventory.v1.ValkeyExporter.CustomLabelsEntry + 96, // 24: inventory.v1.ValkeyExporter.status:type_name -> inventory.v1.AgentStatus + 97, // 25: inventory.v1.ValkeyExporter.log_level:type_name -> inventory.v1.LogLevel + 98, // 26: inventory.v1.ValkeyExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 71, // 27: inventory.v1.QANMySQLPerfSchemaAgent.custom_labels:type_name -> inventory.v1.QANMySQLPerfSchemaAgent.CustomLabelsEntry + 96, // 28: inventory.v1.QANMySQLPerfSchemaAgent.status:type_name -> inventory.v1.AgentStatus + 97, // 29: inventory.v1.QANMySQLPerfSchemaAgent.log_level:type_name -> inventory.v1.LogLevel + 72, // 30: inventory.v1.QANMySQLSlowlogAgent.custom_labels:type_name -> inventory.v1.QANMySQLSlowlogAgent.CustomLabelsEntry + 96, // 31: inventory.v1.QANMySQLSlowlogAgent.status:type_name -> inventory.v1.AgentStatus + 97, // 32: inventory.v1.QANMySQLSlowlogAgent.log_level:type_name -> inventory.v1.LogLevel + 73, // 33: inventory.v1.QANMongoDBProfilerAgent.custom_labels:type_name -> inventory.v1.QANMongoDBProfilerAgent.CustomLabelsEntry + 96, // 34: inventory.v1.QANMongoDBProfilerAgent.status:type_name -> inventory.v1.AgentStatus + 97, // 35: inventory.v1.QANMongoDBProfilerAgent.log_level:type_name -> inventory.v1.LogLevel + 74, // 36: inventory.v1.QANMongoDBMongologAgent.custom_labels:type_name -> inventory.v1.QANMongoDBMongologAgent.CustomLabelsEntry + 96, // 37: inventory.v1.QANMongoDBMongologAgent.status:type_name -> inventory.v1.AgentStatus + 97, // 38: inventory.v1.QANMongoDBMongologAgent.log_level:type_name -> inventory.v1.LogLevel + 75, // 39: inventory.v1.QANPostgreSQLPgStatementsAgent.custom_labels:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry + 96, // 40: inventory.v1.QANPostgreSQLPgStatementsAgent.status:type_name -> inventory.v1.AgentStatus + 97, // 41: inventory.v1.QANPostgreSQLPgStatementsAgent.log_level:type_name -> inventory.v1.LogLevel + 76, // 42: inventory.v1.QANPostgreSQLPgStatMonitorAgent.custom_labels:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry + 96, // 43: inventory.v1.QANPostgreSQLPgStatMonitorAgent.status:type_name -> inventory.v1.AgentStatus + 97, // 44: inventory.v1.QANPostgreSQLPgStatMonitorAgent.log_level:type_name -> inventory.v1.LogLevel + 77, // 45: inventory.v1.RDSExporter.custom_labels:type_name -> inventory.v1.RDSExporter.CustomLabelsEntry + 96, // 46: inventory.v1.RDSExporter.status:type_name -> inventory.v1.AgentStatus + 97, // 47: inventory.v1.RDSExporter.log_level:type_name -> inventory.v1.LogLevel + 98, // 48: inventory.v1.RDSExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 78, // 49: inventory.v1.ExternalExporter.custom_labels:type_name -> inventory.v1.ExternalExporter.CustomLabelsEntry + 98, // 50: inventory.v1.ExternalExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 79, // 51: inventory.v1.AzureDatabaseExporter.custom_labels:type_name -> inventory.v1.AzureDatabaseExporter.CustomLabelsEntry + 96, // 52: inventory.v1.AzureDatabaseExporter.status:type_name -> inventory.v1.AgentStatus + 97, // 53: inventory.v1.AzureDatabaseExporter.log_level:type_name -> inventory.v1.LogLevel + 98, // 54: inventory.v1.AzureDatabaseExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 99, // 55: inventory.v1.ChangeCommonAgentParams.custom_labels:type_name -> common.StringMap + 98, // 56: inventory.v1.ChangeCommonAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 0, // 57: inventory.v1.ListAgentsRequest.agent_type:type_name -> inventory.v1.AgentType + 1, // 58: inventory.v1.ListAgentsResponse.pmm_agent:type_name -> inventory.v1.PMMAgent + 2, // 59: inventory.v1.ListAgentsResponse.vm_agent:type_name -> inventory.v1.VMAgent + 4, // 60: inventory.v1.ListAgentsResponse.node_exporter:type_name -> inventory.v1.NodeExporter + 5, // 61: inventory.v1.ListAgentsResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter + 6, // 62: inventory.v1.ListAgentsResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter + 7, // 63: inventory.v1.ListAgentsResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter + 8, // 64: inventory.v1.ListAgentsResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter + 10, // 65: inventory.v1.ListAgentsResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent + 11, // 66: inventory.v1.ListAgentsResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent + 12, // 67: inventory.v1.ListAgentsResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent + 13, // 68: inventory.v1.ListAgentsResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent + 14, // 69: inventory.v1.ListAgentsResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent + 15, // 70: inventory.v1.ListAgentsResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent + 17, // 71: inventory.v1.ListAgentsResponse.external_exporter:type_name -> inventory.v1.ExternalExporter + 16, // 72: inventory.v1.ListAgentsResponse.rds_exporter:type_name -> inventory.v1.RDSExporter + 18, // 73: inventory.v1.ListAgentsResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter + 3, // 74: inventory.v1.ListAgentsResponse.nomad_agent:type_name -> inventory.v1.NomadAgent + 9, // 75: inventory.v1.ListAgentsResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter + 1, // 76: inventory.v1.GetAgentResponse.pmm_agent:type_name -> inventory.v1.PMMAgent + 2, // 77: inventory.v1.GetAgentResponse.vmagent:type_name -> inventory.v1.VMAgent + 4, // 78: inventory.v1.GetAgentResponse.node_exporter:type_name -> inventory.v1.NodeExporter + 5, // 79: inventory.v1.GetAgentResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter + 6, // 80: inventory.v1.GetAgentResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter + 7, // 81: inventory.v1.GetAgentResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter + 8, // 82: inventory.v1.GetAgentResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter + 10, // 83: inventory.v1.GetAgentResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent + 11, // 84: inventory.v1.GetAgentResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent + 12, // 85: inventory.v1.GetAgentResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent + 13, // 86: inventory.v1.GetAgentResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent + 14, // 87: inventory.v1.GetAgentResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent + 15, // 88: inventory.v1.GetAgentResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent + 17, // 89: inventory.v1.GetAgentResponse.external_exporter:type_name -> inventory.v1.ExternalExporter + 16, // 90: inventory.v1.GetAgentResponse.rds_exporter:type_name -> inventory.v1.RDSExporter + 18, // 91: inventory.v1.GetAgentResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter + 3, // 92: inventory.v1.GetAgentResponse.nomad_agent:type_name -> inventory.v1.NomadAgent + 9, // 93: inventory.v1.GetAgentResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter + 30, // 94: inventory.v1.AddAgentRequest.pmm_agent:type_name -> inventory.v1.AddPMMAgentParams + 31, // 95: inventory.v1.AddAgentRequest.node_exporter:type_name -> inventory.v1.AddNodeExporterParams + 33, // 96: inventory.v1.AddAgentRequest.mysqld_exporter:type_name -> inventory.v1.AddMySQLdExporterParams + 35, // 97: inventory.v1.AddAgentRequest.mongodb_exporter:type_name -> inventory.v1.AddMongoDBExporterParams + 37, // 98: inventory.v1.AddAgentRequest.postgres_exporter:type_name -> inventory.v1.AddPostgresExporterParams + 39, // 99: inventory.v1.AddAgentRequest.proxysql_exporter:type_name -> inventory.v1.AddProxySQLExporterParams + 55, // 100: inventory.v1.AddAgentRequest.external_exporter:type_name -> inventory.v1.AddExternalExporterParams + 53, // 101: inventory.v1.AddAgentRequest.rds_exporter:type_name -> inventory.v1.AddRDSExporterParams + 57, // 102: inventory.v1.AddAgentRequest.azure_database_exporter:type_name -> inventory.v1.AddAzureDatabaseExporterParams + 41, // 103: inventory.v1.AddAgentRequest.qan_mysql_perfschema_agent:type_name -> inventory.v1.AddQANMySQLPerfSchemaAgentParams + 43, // 104: inventory.v1.AddAgentRequest.qan_mysql_slowlog_agent:type_name -> inventory.v1.AddQANMySQLSlowlogAgentParams + 45, // 105: inventory.v1.AddAgentRequest.qan_mongodb_profiler_agent:type_name -> inventory.v1.AddQANMongoDBProfilerAgentParams + 47, // 106: inventory.v1.AddAgentRequest.qan_mongodb_mongolog_agent:type_name -> inventory.v1.AddQANMongoDBMongologAgentParams + 49, // 107: inventory.v1.AddAgentRequest.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.AddQANPostgreSQLPgStatementsAgentParams + 51, // 108: inventory.v1.AddAgentRequest.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams + 60, // 109: inventory.v1.AddAgentRequest.valkey_exporter:type_name -> inventory.v1.AddValkeyExporterParams + 1, // 110: inventory.v1.AddAgentResponse.pmm_agent:type_name -> inventory.v1.PMMAgent + 4, // 111: inventory.v1.AddAgentResponse.node_exporter:type_name -> inventory.v1.NodeExporter + 5, // 112: inventory.v1.AddAgentResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter + 6, // 113: inventory.v1.AddAgentResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter + 7, // 114: inventory.v1.AddAgentResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter + 8, // 115: inventory.v1.AddAgentResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter + 17, // 116: inventory.v1.AddAgentResponse.external_exporter:type_name -> inventory.v1.ExternalExporter + 16, // 117: inventory.v1.AddAgentResponse.rds_exporter:type_name -> inventory.v1.RDSExporter + 18, // 118: inventory.v1.AddAgentResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter + 10, // 119: inventory.v1.AddAgentResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent + 11, // 120: inventory.v1.AddAgentResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent + 12, // 121: inventory.v1.AddAgentResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent + 13, // 122: inventory.v1.AddAgentResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent + 14, // 123: inventory.v1.AddAgentResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent + 15, // 124: inventory.v1.AddAgentResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent + 9, // 125: inventory.v1.AddAgentResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter + 32, // 126: inventory.v1.ChangeAgentRequest.node_exporter:type_name -> inventory.v1.ChangeNodeExporterParams + 34, // 127: inventory.v1.ChangeAgentRequest.mysqld_exporter:type_name -> inventory.v1.ChangeMySQLdExporterParams + 36, // 128: inventory.v1.ChangeAgentRequest.mongodb_exporter:type_name -> inventory.v1.ChangeMongoDBExporterParams + 38, // 129: inventory.v1.ChangeAgentRequest.postgres_exporter:type_name -> inventory.v1.ChangePostgresExporterParams + 40, // 130: inventory.v1.ChangeAgentRequest.proxysql_exporter:type_name -> inventory.v1.ChangeProxySQLExporterParams + 56, // 131: inventory.v1.ChangeAgentRequest.external_exporter:type_name -> inventory.v1.ChangeExternalExporterParams + 54, // 132: inventory.v1.ChangeAgentRequest.rds_exporter:type_name -> inventory.v1.ChangeRDSExporterParams + 58, // 133: inventory.v1.ChangeAgentRequest.azure_database_exporter:type_name -> inventory.v1.ChangeAzureDatabaseExporterParams + 42, // 134: inventory.v1.ChangeAgentRequest.qan_mysql_perfschema_agent:type_name -> inventory.v1.ChangeQANMySQLPerfSchemaAgentParams + 44, // 135: inventory.v1.ChangeAgentRequest.qan_mysql_slowlog_agent:type_name -> inventory.v1.ChangeQANMySQLSlowlogAgentParams + 46, // 136: inventory.v1.ChangeAgentRequest.qan_mongodb_profiler_agent:type_name -> inventory.v1.ChangeQANMongoDBProfilerAgentParams + 48, // 137: inventory.v1.ChangeAgentRequest.qan_mongodb_mongolog_agent:type_name -> inventory.v1.ChangeQANMongoDBMongologAgentParams + 50, // 138: inventory.v1.ChangeAgentRequest.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams + 52, // 139: inventory.v1.ChangeAgentRequest.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams + 59, // 140: inventory.v1.ChangeAgentRequest.nomad_agent:type_name -> inventory.v1.ChangeNomadAgentParams + 61, // 141: inventory.v1.ChangeAgentRequest.valkey_exporter:type_name -> inventory.v1.ChangeValkeyExporterParams + 4, // 142: inventory.v1.ChangeAgentResponse.node_exporter:type_name -> inventory.v1.NodeExporter + 5, // 143: inventory.v1.ChangeAgentResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter + 6, // 144: inventory.v1.ChangeAgentResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter + 7, // 145: inventory.v1.ChangeAgentResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter + 8, // 146: inventory.v1.ChangeAgentResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter + 17, // 147: inventory.v1.ChangeAgentResponse.external_exporter:type_name -> inventory.v1.ExternalExporter + 16, // 148: inventory.v1.ChangeAgentResponse.rds_exporter:type_name -> inventory.v1.RDSExporter + 18, // 149: inventory.v1.ChangeAgentResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter + 10, // 150: inventory.v1.ChangeAgentResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent + 11, // 151: inventory.v1.ChangeAgentResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent + 12, // 152: inventory.v1.ChangeAgentResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent + 13, // 153: inventory.v1.ChangeAgentResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent + 14, // 154: inventory.v1.ChangeAgentResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent + 15, // 155: inventory.v1.ChangeAgentResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent + 3, // 156: inventory.v1.ChangeAgentResponse.nomad_agent:type_name -> inventory.v1.NomadAgent + 9, // 157: inventory.v1.ChangeAgentResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter + 80, // 158: inventory.v1.AddPMMAgentParams.custom_labels:type_name -> inventory.v1.AddPMMAgentParams.CustomLabelsEntry + 81, // 159: inventory.v1.AddNodeExporterParams.custom_labels:type_name -> inventory.v1.AddNodeExporterParams.CustomLabelsEntry + 97, // 160: inventory.v1.AddNodeExporterParams.log_level:type_name -> inventory.v1.LogLevel + 99, // 161: inventory.v1.ChangeNodeExporterParams.custom_labels:type_name -> common.StringMap + 98, // 162: inventory.v1.ChangeNodeExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 82, // 163: inventory.v1.AddMySQLdExporterParams.custom_labels:type_name -> inventory.v1.AddMySQLdExporterParams.CustomLabelsEntry + 97, // 164: inventory.v1.AddMySQLdExporterParams.log_level:type_name -> inventory.v1.LogLevel + 99, // 165: inventory.v1.ChangeMySQLdExporterParams.custom_labels:type_name -> common.StringMap + 98, // 166: inventory.v1.ChangeMySQLdExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 83, // 167: inventory.v1.AddMongoDBExporterParams.custom_labels:type_name -> inventory.v1.AddMongoDBExporterParams.CustomLabelsEntry + 97, // 168: inventory.v1.AddMongoDBExporterParams.log_level:type_name -> inventory.v1.LogLevel + 99, // 169: inventory.v1.ChangeMongoDBExporterParams.custom_labels:type_name -> common.StringMap + 98, // 170: inventory.v1.ChangeMongoDBExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 84, // 171: inventory.v1.AddPostgresExporterParams.custom_labels:type_name -> inventory.v1.AddPostgresExporterParams.CustomLabelsEntry + 97, // 172: inventory.v1.AddPostgresExporterParams.log_level:type_name -> inventory.v1.LogLevel + 99, // 173: inventory.v1.ChangePostgresExporterParams.custom_labels:type_name -> common.StringMap + 98, // 174: inventory.v1.ChangePostgresExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 85, // 175: inventory.v1.AddProxySQLExporterParams.custom_labels:type_name -> inventory.v1.AddProxySQLExporterParams.CustomLabelsEntry + 97, // 176: inventory.v1.AddProxySQLExporterParams.log_level:type_name -> inventory.v1.LogLevel + 99, // 177: inventory.v1.ChangeProxySQLExporterParams.custom_labels:type_name -> common.StringMap + 98, // 178: inventory.v1.ChangeProxySQLExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 86, // 179: inventory.v1.AddQANMySQLPerfSchemaAgentParams.custom_labels:type_name -> inventory.v1.AddQANMySQLPerfSchemaAgentParams.CustomLabelsEntry + 97, // 180: inventory.v1.AddQANMySQLPerfSchemaAgentParams.log_level:type_name -> inventory.v1.LogLevel + 99, // 181: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams.custom_labels:type_name -> common.StringMap + 98, // 182: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 87, // 183: inventory.v1.AddQANMySQLSlowlogAgentParams.custom_labels:type_name -> inventory.v1.AddQANMySQLSlowlogAgentParams.CustomLabelsEntry + 97, // 184: inventory.v1.AddQANMySQLSlowlogAgentParams.log_level:type_name -> inventory.v1.LogLevel + 99, // 185: inventory.v1.ChangeQANMySQLSlowlogAgentParams.custom_labels:type_name -> common.StringMap + 98, // 186: inventory.v1.ChangeQANMySQLSlowlogAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 88, // 187: inventory.v1.AddQANMongoDBProfilerAgentParams.custom_labels:type_name -> inventory.v1.AddQANMongoDBProfilerAgentParams.CustomLabelsEntry + 97, // 188: inventory.v1.AddQANMongoDBProfilerAgentParams.log_level:type_name -> inventory.v1.LogLevel + 99, // 189: inventory.v1.ChangeQANMongoDBProfilerAgentParams.custom_labels:type_name -> common.StringMap + 98, // 190: inventory.v1.ChangeQANMongoDBProfilerAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 89, // 191: inventory.v1.AddQANMongoDBMongologAgentParams.custom_labels:type_name -> inventory.v1.AddQANMongoDBMongologAgentParams.CustomLabelsEntry + 97, // 192: inventory.v1.AddQANMongoDBMongologAgentParams.log_level:type_name -> inventory.v1.LogLevel + 99, // 193: inventory.v1.ChangeQANMongoDBMongologAgentParams.custom_labels:type_name -> common.StringMap + 98, // 194: inventory.v1.ChangeQANMongoDBMongologAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 90, // 195: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.custom_labels:type_name -> inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.CustomLabelsEntry + 97, // 196: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.log_level:type_name -> inventory.v1.LogLevel + 99, // 197: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams.custom_labels:type_name -> common.StringMap + 98, // 198: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 91, // 199: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.custom_labels:type_name -> inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.CustomLabelsEntry + 97, // 200: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.log_level:type_name -> inventory.v1.LogLevel + 99, // 201: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams.custom_labels:type_name -> common.StringMap + 98, // 202: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 92, // 203: inventory.v1.AddRDSExporterParams.custom_labels:type_name -> inventory.v1.AddRDSExporterParams.CustomLabelsEntry + 97, // 204: inventory.v1.AddRDSExporterParams.log_level:type_name -> inventory.v1.LogLevel + 99, // 205: inventory.v1.ChangeRDSExporterParams.custom_labels:type_name -> common.StringMap + 98, // 206: inventory.v1.ChangeRDSExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 93, // 207: inventory.v1.AddExternalExporterParams.custom_labels:type_name -> inventory.v1.AddExternalExporterParams.CustomLabelsEntry + 99, // 208: inventory.v1.ChangeExternalExporterParams.custom_labels:type_name -> common.StringMap + 98, // 209: inventory.v1.ChangeExternalExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 94, // 210: inventory.v1.AddAzureDatabaseExporterParams.custom_labels:type_name -> inventory.v1.AddAzureDatabaseExporterParams.CustomLabelsEntry + 97, // 211: inventory.v1.AddAzureDatabaseExporterParams.log_level:type_name -> inventory.v1.LogLevel + 99, // 212: inventory.v1.ChangeAzureDatabaseExporterParams.custom_labels:type_name -> common.StringMap + 98, // 213: inventory.v1.ChangeAzureDatabaseExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 95, // 214: inventory.v1.AddValkeyExporterParams.custom_labels:type_name -> inventory.v1.AddValkeyExporterParams.CustomLabelsEntry + 97, // 215: inventory.v1.AddValkeyExporterParams.log_level:type_name -> inventory.v1.LogLevel + 99, // 216: inventory.v1.ChangeValkeyExporterParams.custom_labels:type_name -> common.StringMap + 98, // 217: inventory.v1.ChangeValkeyExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 20, // 218: inventory.v1.AgentsService.ListAgents:input_type -> inventory.v1.ListAgentsRequest + 22, // 219: inventory.v1.AgentsService.GetAgent:input_type -> inventory.v1.GetAgentRequest + 24, // 220: inventory.v1.AgentsService.GetAgentLogs:input_type -> inventory.v1.GetAgentLogsRequest + 26, // 221: inventory.v1.AgentsService.AddAgent:input_type -> inventory.v1.AddAgentRequest + 28, // 222: inventory.v1.AgentsService.ChangeAgent:input_type -> inventory.v1.ChangeAgentRequest + 62, // 223: inventory.v1.AgentsService.RemoveAgent:input_type -> inventory.v1.RemoveAgentRequest + 21, // 224: inventory.v1.AgentsService.ListAgents:output_type -> inventory.v1.ListAgentsResponse + 23, // 225: inventory.v1.AgentsService.GetAgent:output_type -> inventory.v1.GetAgentResponse + 25, // 226: inventory.v1.AgentsService.GetAgentLogs:output_type -> inventory.v1.GetAgentLogsResponse + 27, // 227: inventory.v1.AgentsService.AddAgent:output_type -> inventory.v1.AddAgentResponse + 29, // 228: inventory.v1.AgentsService.ChangeAgent:output_type -> inventory.v1.ChangeAgentResponse + 63, // 229: inventory.v1.AgentsService.RemoveAgent:output_type -> inventory.v1.RemoveAgentResponse + 224, // [224:230] is the sub-list for method output_type + 218, // [218:224] is the sub-list for method input_type + 218, // [218:218] is the sub-list for extension type_name + 218, // [218:218] is the sub-list for extension extendee + 0, // [0:218] is the sub-list for field type_name } func init() { file_inventory_v1_agents_proto_init() } @@ -9595,8 +10147,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[17].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[21].OneofWrappers = []any{ + file_inventory_v1_agents_proto_msgTypes[18].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[22].OneofWrappers = []any{ (*GetAgentResponse_PmmAgent)(nil), (*GetAgentResponse_Vmagent)(nil), (*GetAgentResponse_NodeExporter)(nil), @@ -9607,6 +10159,7 @@ func file_inventory_v1_agents_proto_init() { (*GetAgentResponse_QanMysqlPerfschemaAgent)(nil), (*GetAgentResponse_QanMysqlSlowlogAgent)(nil), (*GetAgentResponse_QanMongodbProfilerAgent)(nil), + (*GetAgentResponse_QanMongodbMongologAgent)(nil), (*GetAgentResponse_QanPostgresqlPgstatementsAgent)(nil), (*GetAgentResponse_QanPostgresqlPgstatmonitorAgent)(nil), (*GetAgentResponse_ExternalExporter)(nil), @@ -9615,7 +10168,7 @@ func file_inventory_v1_agents_proto_init() { (*GetAgentResponse_NomadAgent)(nil), (*GetAgentResponse_ValkeyExporter)(nil), } - file_inventory_v1_agents_proto_msgTypes[24].OneofWrappers = []any{ + file_inventory_v1_agents_proto_msgTypes[25].OneofWrappers = []any{ (*AddAgentRequest_PmmAgent)(nil), (*AddAgentRequest_NodeExporter)(nil), (*AddAgentRequest_MysqldExporter)(nil), @@ -9628,11 +10181,12 @@ func file_inventory_v1_agents_proto_init() { (*AddAgentRequest_QanMysqlPerfschemaAgent)(nil), (*AddAgentRequest_QanMysqlSlowlogAgent)(nil), (*AddAgentRequest_QanMongodbProfilerAgent)(nil), + (*AddAgentRequest_QanMongodbMongologAgent)(nil), (*AddAgentRequest_QanPostgresqlPgstatementsAgent)(nil), (*AddAgentRequest_QanPostgresqlPgstatmonitorAgent)(nil), (*AddAgentRequest_ValkeyExporter)(nil), } - file_inventory_v1_agents_proto_msgTypes[25].OneofWrappers = []any{ + file_inventory_v1_agents_proto_msgTypes[26].OneofWrappers = []any{ (*AddAgentResponse_PmmAgent)(nil), (*AddAgentResponse_NodeExporter)(nil), (*AddAgentResponse_MysqldExporter)(nil), @@ -9645,11 +10199,12 @@ func file_inventory_v1_agents_proto_init() { (*AddAgentResponse_QanMysqlPerfschemaAgent)(nil), (*AddAgentResponse_QanMysqlSlowlogAgent)(nil), (*AddAgentResponse_QanMongodbProfilerAgent)(nil), + (*AddAgentResponse_QanMongodbMongologAgent)(nil), (*AddAgentResponse_QanPostgresqlPgstatementsAgent)(nil), (*AddAgentResponse_QanPostgresqlPgstatmonitorAgent)(nil), (*AddAgentResponse_ValkeyExporter)(nil), } - file_inventory_v1_agents_proto_msgTypes[26].OneofWrappers = []any{ + file_inventory_v1_agents_proto_msgTypes[27].OneofWrappers = []any{ (*ChangeAgentRequest_NodeExporter)(nil), (*ChangeAgentRequest_MysqldExporter)(nil), (*ChangeAgentRequest_MongodbExporter)(nil), @@ -9661,12 +10216,13 @@ func file_inventory_v1_agents_proto_init() { (*ChangeAgentRequest_QanMysqlPerfschemaAgent)(nil), (*ChangeAgentRequest_QanMysqlSlowlogAgent)(nil), (*ChangeAgentRequest_QanMongodbProfilerAgent)(nil), + (*ChangeAgentRequest_QanMongodbMongologAgent)(nil), (*ChangeAgentRequest_QanPostgresqlPgstatementsAgent)(nil), (*ChangeAgentRequest_QanPostgresqlPgstatmonitorAgent)(nil), (*ChangeAgentRequest_NomadAgent)(nil), (*ChangeAgentRequest_ValkeyExporter)(nil), } - file_inventory_v1_agents_proto_msgTypes[27].OneofWrappers = []any{ + file_inventory_v1_agents_proto_msgTypes[28].OneofWrappers = []any{ (*ChangeAgentResponse_NodeExporter)(nil), (*ChangeAgentResponse_MysqldExporter)(nil), (*ChangeAgentResponse_MongodbExporter)(nil), @@ -9678,33 +10234,35 @@ func file_inventory_v1_agents_proto_init() { (*ChangeAgentResponse_QanMysqlPerfschemaAgent)(nil), (*ChangeAgentResponse_QanMysqlSlowlogAgent)(nil), (*ChangeAgentResponse_QanMongodbProfilerAgent)(nil), + (*ChangeAgentResponse_QanMongodbMongologAgent)(nil), (*ChangeAgentResponse_QanPostgresqlPgstatementsAgent)(nil), (*ChangeAgentResponse_QanPostgresqlPgstatmonitorAgent)(nil), (*ChangeAgentResponse_NomadAgent)(nil), (*ChangeAgentResponse_ValkeyExporter)(nil), } - file_inventory_v1_agents_proto_msgTypes[30].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[32].OneofWrappers = []any{} - 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[31].OneofWrappers = []any{} + 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[58].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[60].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: 90, + NumMessages: 95, NumExtensions: 0, NumServices: 1, }, diff --git a/api/inventory/v1/agents.pb.validate.go b/api/inventory/v1/agents.pb.validate.go index 9dac1706586..9e27d0ce600 100644 --- a/api/inventory/v1/agents.pb.validate.go +++ b/api/inventory/v1/agents.pb.validate.go @@ -1719,6 +1719,132 @@ var _ interface { ErrorName() string } = QANMongoDBProfilerAgentValidationError{} +// Validate checks the field values on QANMongoDBMongologAgent 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 *QANMongoDBMongologAgent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on QANMongoDBMongologAgent 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 +// QANMongoDBMongologAgentMultiError, or nil if none found. +func (m *QANMongoDBMongologAgent) ValidateAll() error { + return m.validate(true) +} + +func (m *QANMongoDBMongologAgent) 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 MaxQueryLength + + // no validation rules for CustomLabels + + // no validation rules for Status + + // no validation rules for ProcessExecPath + + // no validation rules for LogLevel + + if len(errors) > 0 { + return QANMongoDBMongologAgentMultiError(errors) + } + + return nil +} + +// QANMongoDBMongologAgentMultiError is an error wrapping multiple validation +// errors returned by QANMongoDBMongologAgent.ValidateAll() if the designated +// constraints aren't met. +type QANMongoDBMongologAgentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m QANMongoDBMongologAgentMultiError) 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 QANMongoDBMongologAgentMultiError) AllErrors() []error { return m } + +// QANMongoDBMongologAgentValidationError is the validation error returned by +// QANMongoDBMongologAgent.Validate if the designated constraints aren't met. +type QANMongoDBMongologAgentValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e QANMongoDBMongologAgentValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e QANMongoDBMongologAgentValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e QANMongoDBMongologAgentValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e QANMongoDBMongologAgentValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e QANMongoDBMongologAgentValidationError) ErrorName() string { + return "QANMongoDBMongologAgentValidationError" +} + +// Error satisfies the builtin error interface +func (e QANMongoDBMongologAgentValidationError) 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 %sQANMongoDBMongologAgent.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = QANMongoDBMongologAgentValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = QANMongoDBMongologAgentValidationError{} + // 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. @@ -3085,6 +3211,40 @@ func (m *ListAgentsResponse) validate(all bool) error { } + for idx, item := range m.GetQanMongodbMongologAgent() { + _, _ = 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("QanMongodbMongologAgent[%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("QanMongodbMongologAgent[%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("QanMongodbMongologAgent[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + for idx, item := range m.GetQanPostgresqlPgstatementsAgent() { _, _ = idx, item @@ -3947,6 +4107,47 @@ func (m *GetAgentResponse) validate(all bool) error { } } + case *GetAgentResponse_QanMongodbMongologAgent: + 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.GetQanMongodbMongologAgent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GetAgentResponseValidationError{ + field: "QanMongodbMongologAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GetAgentResponseValidationError{ + field: "QanMongodbMongologAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetQanMongodbMongologAgent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetAgentResponseValidationError{ + field: "QanMongodbMongologAgent", + reason: "embedded message failed validation", + cause: err, + } + } + } + case *GetAgentResponse_QanPostgresqlPgstatementsAgent: if v == nil { err := GetAgentResponseValidationError{ @@ -5050,6 +5251,47 @@ func (m *AddAgentRequest) validate(all bool) error { } } + case *AddAgentRequest_QanMongodbMongologAgent: + 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.GetQanMongodbMongologAgent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddAgentRequestValidationError{ + field: "QanMongodbMongologAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddAgentRequestValidationError{ + field: "QanMongodbMongologAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetQanMongodbMongologAgent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AddAgentRequestValidationError{ + field: "QanMongodbMongologAgent", + reason: "embedded message failed validation", + cause: err, + } + } + } + case *AddAgentRequest_QanPostgresqlPgstatementsAgent: if v == nil { err := AddAgentRequestValidationError{ @@ -5770,6 +6012,47 @@ func (m *AddAgentResponse) validate(all bool) error { } } + case *AddAgentResponse_QanMongodbMongologAgent: + if v == nil { + err := AddAgentResponseValidationError{ + field: "Agent", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetQanMongodbMongologAgent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddAgentResponseValidationError{ + field: "QanMongodbMongologAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddAgentResponseValidationError{ + field: "QanMongodbMongologAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetQanMongodbMongologAgent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AddAgentResponseValidationError{ + field: "QanMongodbMongologAgent", + reason: "embedded message failed validation", + cause: err, + } + } + } + case *AddAgentResponse_QanPostgresqlPgstatementsAgent: if v == nil { err := AddAgentResponseValidationError{ @@ -6460,7 +6743,7 @@ func (m *ChangeAgentRequest) validate(all bool) error { } } - case *ChangeAgentRequest_QanPostgresqlPgstatementsAgent: + case *ChangeAgentRequest_QanMongodbMongologAgent: if v == nil { err := ChangeAgentRequestValidationError{ field: "Agent", @@ -6473,11 +6756,11 @@ func (m *ChangeAgentRequest) validate(all bool) error { } if all { - switch v := interface{}(m.GetQanPostgresqlPgstatementsAgent()).(type) { + switch v := interface{}(m.GetQanMongodbMongologAgent()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ChangeAgentRequestValidationError{ - field: "QanPostgresqlPgstatementsAgent", + field: "QanMongodbMongologAgent", reason: "embedded message failed validation", cause: err, }) @@ -6485,23 +6768,23 @@ func (m *ChangeAgentRequest) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ChangeAgentRequestValidationError{ - field: "QanPostgresqlPgstatementsAgent", + field: "QanMongodbMongologAgent", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetQanPostgresqlPgstatementsAgent()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetQanMongodbMongologAgent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ChangeAgentRequestValidationError{ - field: "QanPostgresqlPgstatementsAgent", + field: "QanMongodbMongologAgent", reason: "embedded message failed validation", cause: err, } } } - case *ChangeAgentRequest_QanPostgresqlPgstatmonitorAgent: + case *ChangeAgentRequest_QanPostgresqlPgstatementsAgent: if v == nil { err := ChangeAgentRequestValidationError{ field: "Agent", @@ -6514,11 +6797,11 @@ func (m *ChangeAgentRequest) validate(all bool) error { } if all { - switch v := interface{}(m.GetQanPostgresqlPgstatmonitorAgent()).(type) { + switch v := interface{}(m.GetQanPostgresqlPgstatementsAgent()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ChangeAgentRequestValidationError{ - field: "QanPostgresqlPgstatmonitorAgent", + field: "QanPostgresqlPgstatementsAgent", reason: "embedded message failed validation", cause: err, }) @@ -6526,23 +6809,64 @@ func (m *ChangeAgentRequest) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ChangeAgentRequestValidationError{ - field: "QanPostgresqlPgstatmonitorAgent", + field: "QanPostgresqlPgstatementsAgent", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetQanPostgresqlPgstatmonitorAgent()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetQanPostgresqlPgstatementsAgent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ChangeAgentRequestValidationError{ - field: "QanPostgresqlPgstatmonitorAgent", + field: "QanPostgresqlPgstatementsAgent", reason: "embedded message failed validation", cause: err, } } } - case *ChangeAgentRequest_NomadAgent: + case *ChangeAgentRequest_QanPostgresqlPgstatmonitorAgent: + 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.GetQanPostgresqlPgstatmonitorAgent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ChangeAgentRequestValidationError{ + field: "QanPostgresqlPgstatmonitorAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ChangeAgentRequestValidationError{ + field: "QanPostgresqlPgstatmonitorAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetQanPostgresqlPgstatmonitorAgent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ChangeAgentRequestValidationError{ + field: "QanPostgresqlPgstatmonitorAgent", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ChangeAgentRequest_NomadAgent: if v == nil { err := ChangeAgentRequestValidationError{ field: "Agent", @@ -7182,6 +7506,47 @@ func (m *ChangeAgentResponse) validate(all bool) error { } } + case *ChangeAgentResponse_QanMongodbMongologAgent: + 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.GetQanMongodbMongologAgent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ChangeAgentResponseValidationError{ + field: "QanMongodbMongologAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ChangeAgentResponseValidationError{ + field: "QanMongodbMongologAgent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetQanMongodbMongologAgent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ChangeAgentResponseValidationError{ + field: "QanMongodbMongologAgent", + reason: "embedded message failed validation", + cause: err, + } + } + } + case *ChangeAgentResponse_QanPostgresqlPgstatementsAgent: if v == nil { err := ChangeAgentResponseValidationError{ @@ -10148,6 +10513,332 @@ var _ interface { ErrorName() string } = ChangeQANMongoDBProfilerAgentParamsValidationError{} +// Validate checks the field values on AddQANMongoDBMongologAgentParams 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 *AddQANMongoDBMongologAgentParams) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AddQANMongoDBMongologAgentParams 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 +// AddQANMongoDBMongologAgentParamsMultiError, or nil if none found. +func (m *AddQANMongoDBMongologAgentParams) ValidateAll() error { + return m.validate(true) +} + +func (m *AddQANMongoDBMongologAgentParams) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetPmmAgentId()) < 1 { + err := AddQANMongoDBMongologAgentParamsValidationError{ + 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 := AddQANMongoDBMongologAgentParamsValidationError{ + 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 Tls + + // no validation rules for TlsSkipVerify + + // no validation rules for TlsCertificateKey + + // no validation rules for TlsCertificateKeyFilePassword + + // no validation rules for TlsCa + + // no validation rules for MaxQueryLength + + // no validation rules for CustomLabels + + // no validation rules for SkipConnectionCheck + + // no validation rules for AuthenticationMechanism + + // no validation rules for AuthenticationDatabase + + // no validation rules for LogLevel + + if len(errors) > 0 { + return AddQANMongoDBMongologAgentParamsMultiError(errors) + } + + return nil +} + +// AddQANMongoDBMongologAgentParamsMultiError is an error wrapping multiple +// validation errors returned by +// AddQANMongoDBMongologAgentParams.ValidateAll() if the designated +// constraints aren't met. +type AddQANMongoDBMongologAgentParamsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AddQANMongoDBMongologAgentParamsMultiError) 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 AddQANMongoDBMongologAgentParamsMultiError) AllErrors() []error { return m } + +// AddQANMongoDBMongologAgentParamsValidationError is the validation error +// returned by AddQANMongoDBMongologAgentParams.Validate if the designated +// constraints aren't met. +type AddQANMongoDBMongologAgentParamsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AddQANMongoDBMongologAgentParamsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AddQANMongoDBMongologAgentParamsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AddQANMongoDBMongologAgentParamsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AddQANMongoDBMongologAgentParamsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AddQANMongoDBMongologAgentParamsValidationError) ErrorName() string { + return "AddQANMongoDBMongologAgentParamsValidationError" +} + +// Error satisfies the builtin error interface +func (e AddQANMongoDBMongologAgentParamsValidationError) 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 %sAddQANMongoDBMongologAgentParams.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AddQANMongoDBMongologAgentParamsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AddQANMongoDBMongologAgentParamsValidationError{} + +// Validate checks the field values on ChangeQANMongoDBMongologAgentParams 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 *ChangeQANMongoDBMongologAgentParams) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ChangeQANMongoDBMongologAgentParams +// 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 +// ChangeQANMongoDBMongologAgentParamsMultiError, or nil if none found. +func (m *ChangeQANMongoDBMongologAgentParams) ValidateAll() error { + return m.validate(true) +} + +func (m *ChangeQANMongoDBMongologAgentParams) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetMetricsResolutions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ChangeQANMongoDBMongologAgentParamsValidationError{ + field: "MetricsResolutions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ChangeQANMongoDBMongologAgentParamsValidationError{ + field: "MetricsResolutions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetricsResolutions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ChangeQANMongoDBMongologAgentParamsValidationError{ + field: "MetricsResolutions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + 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, ChangeQANMongoDBMongologAgentParamsValidationError{ + field: "CustomLabels", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ChangeQANMongoDBMongologAgentParamsValidationError{ + 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 ChangeQANMongoDBMongologAgentParamsValidationError{ + field: "CustomLabels", + reason: "embedded message failed validation", + cause: err, + } + } + } + } + + if m.EnablePushMetrics != nil { + // no validation rules for EnablePushMetrics + } + + if len(errors) > 0 { + return ChangeQANMongoDBMongologAgentParamsMultiError(errors) + } + + return nil +} + +// ChangeQANMongoDBMongologAgentParamsMultiError is an error wrapping multiple +// validation errors returned by +// ChangeQANMongoDBMongologAgentParams.ValidateAll() if the designated +// constraints aren't met. +type ChangeQANMongoDBMongologAgentParamsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ChangeQANMongoDBMongologAgentParamsMultiError) 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 ChangeQANMongoDBMongologAgentParamsMultiError) AllErrors() []error { return m } + +// ChangeQANMongoDBMongologAgentParamsValidationError is the validation error +// returned by ChangeQANMongoDBMongologAgentParams.Validate if the designated +// constraints aren't met. +type ChangeQANMongoDBMongologAgentParamsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ChangeQANMongoDBMongologAgentParamsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ChangeQANMongoDBMongologAgentParamsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ChangeQANMongoDBMongologAgentParamsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ChangeQANMongoDBMongologAgentParamsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ChangeQANMongoDBMongologAgentParamsValidationError) ErrorName() string { + return "ChangeQANMongoDBMongologAgentParamsValidationError" +} + +// Error satisfies the builtin error interface +func (e ChangeQANMongoDBMongologAgentParamsValidationError) 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 %sChangeQANMongoDBMongologAgentParams.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ChangeQANMongoDBMongologAgentParamsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ChangeQANMongoDBMongologAgentParamsValidationError{} + // Validate checks the field values on AddQANPostgreSQLPgStatementsAgentParams // 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 diff --git a/api/inventory/v1/agents.proto b/api/inventory/v1/agents.proto index dd32212c6ff..b408cee96f0 100644 --- a/api/inventory/v1/agents.proto +++ b/api/inventory/v1/agents.proto @@ -24,6 +24,7 @@ enum AgentType { AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT = 7; AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT = 8; AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT = 9; + AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT = 18; AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT = 10; AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT = 13; AGENT_TYPE_EXTERNAL_EXPORTER = 12; @@ -482,6 +483,42 @@ message QANMongoDBProfilerAgent { LogLevel log_level = 22; } +// QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server. +message QANMongoDBMongologAgent { + reserved 8; // TODO https://jira.percona.com/browse/PMM-4650 + reserved "query_examples_disabled"; + + // Unique randomly generated instance 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; + // MongoDB username for getting profiler data. + string username = 5; + // Use TLS for database connections. + bool tls = 6; + // Skip TLS certificate and hostname validation. + bool tls_skip_verify = 7; + // Limit query length in QAN (default: server-defined; -1: no limit). + int32 max_query_length = 9; + // Custom user-assigned labels. + map custom_labels = 10; + + // + // Status fields below. + // + + // Actual Agent status. + AgentStatus status = 20; + // Path to exec process. + string process_exec_path = 21; + // Log level for exporter. + LogLevel log_level = 22; +} + // QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server. message QANPostgreSQLPgStatementsAgent { // Unique randomly generated instance identifier. @@ -702,6 +739,7 @@ message ListAgentsResponse { repeated QANMySQLPerfSchemaAgent qan_mysql_perfschema_agent = 8; repeated QANMySQLSlowlogAgent qan_mysql_slowlog_agent = 9; repeated QANMongoDBProfilerAgent qan_mongodb_profiler_agent = 10; + repeated QANMongoDBMongologAgent qan_mongodb_mongolog_agent = 18; repeated QANPostgreSQLPgStatementsAgent qan_postgresql_pgstatements_agent = 11; repeated QANPostgreSQLPgStatMonitorAgent qan_postgresql_pgstatmonitor_agent = 12; repeated ExternalExporter external_exporter = 13; @@ -730,6 +768,7 @@ message GetAgentResponse { QANMySQLPerfSchemaAgent qan_mysql_perfschema_agent = 8; QANMySQLSlowlogAgent qan_mysql_slowlog_agent = 9; QANMongoDBProfilerAgent qan_mongodb_profiler_agent = 10; + QANMongoDBMongologAgent qan_mongodb_mongolog_agent = 18; QANPostgreSQLPgStatementsAgent qan_postgresql_pgstatements_agent = 11; QANPostgreSQLPgStatMonitorAgent qan_postgresql_pgstatmonitor_agent = 12; ExternalExporter external_exporter = 13; @@ -772,6 +811,7 @@ message AddAgentRequest { AddQANMySQLPerfSchemaAgentParams qan_mysql_perfschema_agent = 10; AddQANMySQLSlowlogAgentParams qan_mysql_slowlog_agent = 11; AddQANMongoDBProfilerAgentParams qan_mongodb_profiler_agent = 12; + AddQANMongoDBMongologAgentParams qan_mongodb_mongolog_agent = 16; AddQANPostgreSQLPgStatementsAgentParams qan_postgresql_pgstatements_agent = 13; AddQANPostgreSQLPgStatMonitorAgentParams qan_postgresql_pgstatmonitor_agent = 14; AddValkeyExporterParams valkey_exporter = 15; @@ -792,6 +832,7 @@ message AddAgentResponse { QANMySQLPerfSchemaAgent qan_mysql_perfschema_agent = 10; QANMySQLSlowlogAgent qan_mysql_slowlog_agent = 11; QANMongoDBProfilerAgent qan_mongodb_profiler_agent = 12; + QANMongoDBMongologAgent qan_mongodb_mongolog_agent = 16; QANPostgreSQLPgStatementsAgent qan_postgresql_pgstatements_agent = 13; QANPostgreSQLPgStatMonitorAgent qan_postgresql_pgstatmonitor_agent = 14; ValkeyExporter valkey_exporter = 15; @@ -815,6 +856,7 @@ message ChangeAgentRequest { ChangeQANMySQLPerfSchemaAgentParams qan_mysql_perfschema_agent = 10; ChangeQANMySQLSlowlogAgentParams qan_mysql_slowlog_agent = 11; ChangeQANMongoDBProfilerAgentParams qan_mongodb_profiler_agent = 12; + ChangeQANMongoDBMongologAgentParams qan_mongodb_mongolog_agent = 17; ChangeQANPostgreSQLPgStatementsAgentParams qan_postgresql_pgstatements_agent = 13; ChangeQANPostgreSQLPgStatMonitorAgentParams qan_postgresql_pgstatmonitor_agent = 14; ChangeNomadAgentParams nomad_agent = 15; @@ -837,6 +879,7 @@ message ChangeAgentResponse { QANMySQLPerfSchemaAgent qan_mysql_perfschema_agent = 10; QANMySQLSlowlogAgent qan_mysql_slowlog_agent = 11; QANMongoDBProfilerAgent qan_mongodb_profiler_agent = 12; + QANMongoDBMongologAgent qan_mongodb_mongolog_agent = 17; QANPostgreSQLPgStatementsAgent qan_postgresql_pgstatements_agent = 13; QANPostgreSQLPgStatMonitorAgent qan_postgresql_pgstatmonitor_agent = 14; NomadAgent nomad_agent = 15; @@ -1229,6 +1272,54 @@ message ChangeQANMongoDBProfilerAgentParams { common.MetricsResolutions metrics_resolutions = 4; } +// Add/Change QANMongoDBMongologAgent + +message AddQANMongoDBMongologAgentParams { + // 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]; + // MongoDB username for getting profile data. + string username = 3; + // MongoDB password for getting profile data. + string password = 4; + // Use TLS for database connections. + bool tls = 5; + // Skip TLS certificate and hostname validation. + bool tls_skip_verify = 6; + // Client certificate and key. + string tls_certificate_key = 7; + // Password for decrypting tls_certificate_key. + string tls_certificate_key_file_password = 8; + // Certificate Authority certificate chain. + string tls_ca = 9; + // Limit query length in QAN (default: server-defined; -1: no limit). + int32 max_query_length = 10; + // Custom user-assigned labels. + map custom_labels = 11; + // Skip connection check. + bool skip_connection_check = 12; + // Authentication mechanism. + // See https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism + // for details. + string authentication_mechanism = 13; + // Authentication database. + string authentication_database = 14; + // Log level for exporter. + LogLevel log_level = 15; +} + +message ChangeQANMongoDBMongologAgentParams { + // 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; + // Enables push metrics with vmagent. + optional bool enable_push_metrics = 3; + // Metrics resolution for this agent. + common.MetricsResolutions metrics_resolutions = 4; +} + // Add/Change QANPostgreSQLPgStatementsAgent message AddQANPostgreSQLPgStatementsAgentParams { 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 15f3e3784e0..9f5222732a3 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 @@ -216,6 +216,9 @@ type AddAgentBody struct { // proxysql exporter ProxysqlExporter *AddAgentParamsBodyProxysqlExporter `json:"proxysql_exporter,omitempty"` + // qan mongodb mongolog agent + QANMongodbMongologAgent *AddAgentParamsBodyQANMongodbMongologAgent `json:"qan_mongodb_mongolog_agent,omitempty"` + // qan mongodb profiler agent QANMongodbProfilerAgent *AddAgentParamsBodyQANMongodbProfilerAgent `json:"qan_mongodb_profiler_agent,omitempty"` @@ -274,6 +277,10 @@ func (o *AddAgentBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateQANMongodbMongologAgent(formats); err != nil { + res = append(res, err) + } + if err := o.validateQANMongodbProfilerAgent(formats); err != nil { res = append(res, err) } @@ -460,6 +467,25 @@ func (o *AddAgentBody) validateProxysqlExporter(formats strfmt.Registry) error { return nil } +func (o *AddAgentBody) validateQANMongodbMongologAgent(formats strfmt.Registry) error { + if swag.IsZero(o.QANMongodbMongologAgent) { // not required + return nil + } + + if o.QANMongodbMongologAgent != nil { + if err := o.QANMongodbMongologAgent.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "qan_mongodb_mongolog_agent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "qan_mongodb_mongolog_agent") + } + return err + } + } + + return nil +} + func (o *AddAgentBody) validateQANMongodbProfilerAgent(formats strfmt.Registry) error { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required return nil @@ -629,6 +655,10 @@ func (o *AddAgentBody) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } + if err := o.contextValidateQANMongodbMongologAgent(ctx, formats); err != nil { + res = append(res, err) + } + if err := o.contextValidateQANMongodbProfilerAgent(ctx, formats); err != nil { res = append(res, err) } @@ -823,6 +853,26 @@ func (o *AddAgentBody) contextValidateProxysqlExporter(ctx context.Context, form return nil } +func (o *AddAgentBody) contextValidateQANMongodbMongologAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbMongologAgent != nil { + + if swag.IsZero(o.QANMongodbMongologAgent) { // not required + return nil + } + + if err := o.QANMongodbMongologAgent.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "qan_mongodb_mongolog_agent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "qan_mongodb_mongolog_agent") + } + return err + } + } + + return nil +} + func (o *AddAgentBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { if o.QANMongodbProfilerAgent != nil { @@ -1230,6 +1280,9 @@ type AddAgentOKBody struct { // proxysql exporter ProxysqlExporter *AddAgentOKBodyProxysqlExporter `json:"proxysql_exporter,omitempty"` + // qan mongodb mongolog agent + QANMongodbMongologAgent *AddAgentOKBodyQANMongodbMongologAgent `json:"qan_mongodb_mongolog_agent,omitempty"` + // qan mongodb profiler agent QANMongodbProfilerAgent *AddAgentOKBodyQANMongodbProfilerAgent `json:"qan_mongodb_profiler_agent,omitempty"` @@ -1288,6 +1341,10 @@ func (o *AddAgentOKBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateQANMongodbMongologAgent(formats); err != nil { + res = append(res, err) + } + if err := o.validateQANMongodbProfilerAgent(formats); err != nil { res = append(res, err) } @@ -1474,6 +1531,25 @@ func (o *AddAgentOKBody) validateProxysqlExporter(formats strfmt.Registry) error return nil } +func (o *AddAgentOKBody) validateQANMongodbMongologAgent(formats strfmt.Registry) error { + if swag.IsZero(o.QANMongodbMongologAgent) { // not required + return nil + } + + if o.QANMongodbMongologAgent != nil { + if err := o.QANMongodbMongologAgent.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addAgentOk" + "." + "qan_mongodb_mongolog_agent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addAgentOk" + "." + "qan_mongodb_mongolog_agent") + } + return err + } + } + + return nil +} + func (o *AddAgentOKBody) validateQANMongodbProfilerAgent(formats strfmt.Registry) error { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required return nil @@ -1643,6 +1719,10 @@ func (o *AddAgentOKBody) ContextValidate(ctx context.Context, formats strfmt.Reg res = append(res, err) } + if err := o.contextValidateQANMongodbMongologAgent(ctx, formats); err != nil { + res = append(res, err) + } + if err := o.contextValidateQANMongodbProfilerAgent(ctx, formats); err != nil { res = append(res, err) } @@ -1837,6 +1917,26 @@ func (o *AddAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, fo return nil } +func (o *AddAgentOKBody) contextValidateQANMongodbMongologAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbMongologAgent != nil { + + if swag.IsZero(o.QANMongodbMongologAgent) { // not required + return nil + } + + if err := o.QANMongodbMongologAgent.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addAgentOk" + "." + "qan_mongodb_mongolog_agent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addAgentOk" + "." + "qan_mongodb_mongolog_agent") + } + return err + } + } + + return nil +} + func (o *AddAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { if o.QANMongodbProfilerAgent != nil { @@ -4128,6 +4228,215 @@ func (o *AddAgentOKBodyProxysqlExporterMetricsResolutions) UnmarshalBinary(b []b return nil } +/* +AddAgentOKBodyQANMongodbMongologAgent QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server. +swagger:model AddAgentOKBodyQANMongodbMongologAgent +*/ +type AddAgentOKBodyQANMongodbMongologAgent 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"` + + // MongoDB username for getting profiler data. + 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"` + + // Limit query length in QAN (default: server-defined; -1: no limit). + MaxQueryLength int32 `json:"max_query_length,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 finished. + // - 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"` + + // Path to exec process. + ProcessExecPath string `json:"process_exec_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"` +} + +// Validate validates this add agent OK body QAN mongodb mongolog agent +func (o *AddAgentOKBodyQANMongodbMongologAgent) 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 len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addAgentOkBodyQanMongodbMongologAgentTypeStatusPropEnum []interface{} + +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 { + addAgentOkBodyQanMongodbMongologAgentTypeStatusPropEnum = append(addAgentOkBodyQanMongodbMongologAgentTypeStatusPropEnum, v) + } +} + +const ( + + // AddAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + AddAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // AddAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + AddAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // AddAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSINITIALIZATIONERROR captures enum value "AGENT_STATUS_INITIALIZATION_ERROR" + AddAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSINITIALIZATIONERROR string = "AGENT_STATUS_INITIALIZATION_ERROR" + + // AddAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + AddAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // AddAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + AddAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // AddAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + AddAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // AddAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + AddAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // AddAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + AddAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *AddAgentOKBodyQANMongodbMongologAgent) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addAgentOkBodyQanMongodbMongologAgentTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddAgentOKBodyQANMongodbMongologAgent) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("addAgentOk"+"."+"qan_mongodb_mongolog_agent"+"."+"status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +var addAgentOkBodyQanMongodbMongologAgentTypeLogLevelPropEnum []interface{} + +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 { + addAgentOkBodyQanMongodbMongologAgentTypeLogLevelPropEnum = append(addAgentOkBodyQanMongodbMongologAgentTypeLogLevelPropEnum, v) + } +} + +const ( + + // AddAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + AddAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // AddAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + AddAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // AddAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + AddAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // AddAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + AddAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // AddAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + AddAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // AddAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + AddAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *AddAgentOKBodyQANMongodbMongologAgent) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addAgentOkBodyQanMongodbMongologAgentTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddAgentOKBodyQANMongodbMongologAgent) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("addAgentOk"+"."+"qan_mongodb_mongolog_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this add agent OK body QAN mongodb mongolog agent based on context it is used +func (o *AddAgentOKBodyQANMongodbMongologAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddAgentOKBodyQANMongodbMongologAgent) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddAgentOKBodyQANMongodbMongologAgent) UnmarshalBinary(b []byte) error { + var res AddAgentOKBodyQANMongodbMongologAgent + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + /* AddAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server. swagger:model AddAgentOKBodyQANMongodbProfilerAgent @@ -6811,6 +7120,153 @@ func (o *AddAgentParamsBodyProxysqlExporter) UnmarshalBinary(b []byte) error { return nil } +/* +AddAgentParamsBodyQANMongodbMongologAgent add agent params body QAN mongodb mongolog agent +swagger:model AddAgentParamsBodyQANMongodbMongologAgent +*/ +type AddAgentParamsBodyQANMongodbMongologAgent struct { + // The pmm-agent identifier which runs this instance. + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // Service identifier. + ServiceID string `json:"service_id,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"` + + // 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"` + + // Limit query length in QAN (default: server-defined; -1: no limit). + MaxQueryLength int32 `json:"max_query_length,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // Skip connection check. + SkipConnectionCheck bool `json:"skip_connection_check,omitempty"` + + // Authentication mechanism. + // See https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism + // for details. + AuthenticationMechanism string `json:"authentication_mechanism,omitempty"` + + // Authentication database. + AuthenticationDatabase string `json:"authentication_database,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"` +} + +// Validate validates this add agent params body QAN mongodb mongolog agent +func (o *AddAgentParamsBodyQANMongodbMongologAgent) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addAgentParamsBodyQanMongodbMongologAgentTypeLogLevelPropEnum []interface{} + +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 { + addAgentParamsBodyQanMongodbMongologAgentTypeLogLevelPropEnum = append(addAgentParamsBodyQanMongodbMongologAgentTypeLogLevelPropEnum, v) + } +} + +const ( + + // AddAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + AddAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // AddAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + AddAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // AddAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + AddAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // AddAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + AddAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // AddAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + AddAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // AddAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + AddAgentParamsBodyQANMongodbMongologAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *AddAgentParamsBodyQANMongodbMongologAgent) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addAgentParamsBodyQanMongodbMongologAgentTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddAgentParamsBodyQANMongodbMongologAgent) 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 { + return err + } + + return nil +} + +// ContextValidate validates this add agent params body QAN mongodb mongolog agent based on context it is used +func (o *AddAgentParamsBodyQANMongodbMongologAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddAgentParamsBodyQANMongodbMongologAgent) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddAgentParamsBodyQANMongodbMongologAgent) UnmarshalBinary(b []byte) error { + var res AddAgentParamsBodyQANMongodbMongologAgent + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + /* AddAgentParamsBodyQANMongodbProfilerAgent add agent params body QAN mongodb profiler agent swagger:model AddAgentParamsBodyQANMongodbProfilerAgent 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 1e77c445ac5..3b999bf7f59 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 @@ -216,6 +216,9 @@ type ChangeAgentBody struct { // proxysql exporter ProxysqlExporter *ChangeAgentParamsBodyProxysqlExporter `json:"proxysql_exporter,omitempty"` + // qan mongodb mongolog agent + QANMongodbMongologAgent *ChangeAgentParamsBodyQANMongodbMongologAgent `json:"qan_mongodb_mongolog_agent,omitempty"` + // qan mongodb profiler agent QANMongodbProfilerAgent *ChangeAgentParamsBodyQANMongodbProfilerAgent `json:"qan_mongodb_profiler_agent,omitempty"` @@ -274,6 +277,10 @@ func (o *ChangeAgentBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateQANMongodbMongologAgent(formats); err != nil { + res = append(res, err) + } + if err := o.validateQANMongodbProfilerAgent(formats); err != nil { res = append(res, err) } @@ -460,6 +467,25 @@ func (o *ChangeAgentBody) validateProxysqlExporter(formats strfmt.Registry) erro return nil } +func (o *ChangeAgentBody) validateQANMongodbMongologAgent(formats strfmt.Registry) error { + if swag.IsZero(o.QANMongodbMongologAgent) { // not required + return nil + } + + if o.QANMongodbMongologAgent != nil { + if err := o.QANMongodbMongologAgent.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "qan_mongodb_mongolog_agent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "qan_mongodb_mongolog_agent") + } + return err + } + } + + return nil +} + func (o *ChangeAgentBody) validateQANMongodbProfilerAgent(formats strfmt.Registry) error { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required return nil @@ -629,6 +655,10 @@ func (o *ChangeAgentBody) ContextValidate(ctx context.Context, formats strfmt.Re res = append(res, err) } + if err := o.contextValidateQANMongodbMongologAgent(ctx, formats); err != nil { + res = append(res, err) + } + if err := o.contextValidateQANMongodbProfilerAgent(ctx, formats); err != nil { res = append(res, err) } @@ -823,6 +853,26 @@ func (o *ChangeAgentBody) contextValidateProxysqlExporter(ctx context.Context, f return nil } +func (o *ChangeAgentBody) contextValidateQANMongodbMongologAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbMongologAgent != nil { + + if swag.IsZero(o.QANMongodbMongologAgent) { // not required + return nil + } + + if err := o.QANMongodbMongologAgent.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "qan_mongodb_mongolog_agent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "qan_mongodb_mongolog_agent") + } + return err + } + } + + return nil +} + func (o *ChangeAgentBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { if o.QANMongodbProfilerAgent != nil { @@ -1230,6 +1280,9 @@ type ChangeAgentOKBody struct { // proxysql exporter ProxysqlExporter *ChangeAgentOKBodyProxysqlExporter `json:"proxysql_exporter,omitempty"` + // qan mongodb mongolog agent + QANMongodbMongologAgent *ChangeAgentOKBodyQANMongodbMongologAgent `json:"qan_mongodb_mongolog_agent,omitempty"` + // qan mongodb profiler agent QANMongodbProfilerAgent *ChangeAgentOKBodyQANMongodbProfilerAgent `json:"qan_mongodb_profiler_agent,omitempty"` @@ -1288,6 +1341,10 @@ func (o *ChangeAgentOKBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateQANMongodbMongologAgent(formats); err != nil { + res = append(res, err) + } + if err := o.validateQANMongodbProfilerAgent(formats); err != nil { res = append(res, err) } @@ -1474,6 +1531,25 @@ func (o *ChangeAgentOKBody) validateProxysqlExporter(formats strfmt.Registry) er return nil } +func (o *ChangeAgentOKBody) validateQANMongodbMongologAgent(formats strfmt.Registry) error { + if swag.IsZero(o.QANMongodbMongologAgent) { // not required + return nil + } + + if o.QANMongodbMongologAgent != nil { + if err := o.QANMongodbMongologAgent.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("changeAgentOk" + "." + "qan_mongodb_mongolog_agent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("changeAgentOk" + "." + "qan_mongodb_mongolog_agent") + } + return err + } + } + + return nil +} + func (o *ChangeAgentOKBody) validateQANMongodbProfilerAgent(formats strfmt.Registry) error { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required return nil @@ -1643,6 +1719,10 @@ func (o *ChangeAgentOKBody) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } + if err := o.contextValidateQANMongodbMongologAgent(ctx, formats); err != nil { + res = append(res, err) + } + if err := o.contextValidateQANMongodbProfilerAgent(ctx, formats); err != nil { res = append(res, err) } @@ -1837,6 +1917,26 @@ func (o *ChangeAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, return nil } +func (o *ChangeAgentOKBody) contextValidateQANMongodbMongologAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbMongologAgent != nil { + + if swag.IsZero(o.QANMongodbMongologAgent) { // not required + return nil + } + + if err := o.QANMongodbMongologAgent.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("changeAgentOk" + "." + "qan_mongodb_mongolog_agent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("changeAgentOk" + "." + "qan_mongodb_mongolog_agent") + } + return err + } + } + + return nil +} + func (o *ChangeAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { if o.QANMongodbProfilerAgent != nil { @@ -4209,6 +4309,215 @@ func (o *ChangeAgentOKBodyProxysqlExporterMetricsResolutions) UnmarshalBinary(b return nil } +/* +ChangeAgentOKBodyQANMongodbMongologAgent QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server. +swagger:model ChangeAgentOKBodyQANMongodbMongologAgent +*/ +type ChangeAgentOKBodyQANMongodbMongologAgent 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"` + + // MongoDB username for getting profiler data. + 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"` + + // Limit query length in QAN (default: server-defined; -1: no limit). + MaxQueryLength int32 `json:"max_query_length,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 finished. + // - 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"` + + // Path to exec process. + ProcessExecPath string `json:"process_exec_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"` +} + +// Validate validates this change agent OK body QAN mongodb mongolog agent +func (o *ChangeAgentOKBodyQANMongodbMongologAgent) 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 len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var changeAgentOkBodyQanMongodbMongologAgentTypeStatusPropEnum []interface{} + +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 { + changeAgentOkBodyQanMongodbMongologAgentTypeStatusPropEnum = append(changeAgentOkBodyQanMongodbMongologAgentTypeStatusPropEnum, v) + } +} + +const ( + + // ChangeAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + ChangeAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // ChangeAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + ChangeAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // ChangeAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSINITIALIZATIONERROR captures enum value "AGENT_STATUS_INITIALIZATION_ERROR" + ChangeAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSINITIALIZATIONERROR string = "AGENT_STATUS_INITIALIZATION_ERROR" + + // ChangeAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + ChangeAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // ChangeAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + ChangeAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // ChangeAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + ChangeAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // ChangeAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + ChangeAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // ChangeAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + ChangeAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *ChangeAgentOKBodyQANMongodbMongologAgent) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentOkBodyQanMongodbMongologAgentTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *ChangeAgentOKBodyQANMongodbMongologAgent) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("changeAgentOk"+"."+"qan_mongodb_mongolog_agent"+"."+"status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +var changeAgentOkBodyQanMongodbMongologAgentTypeLogLevelPropEnum []interface{} + +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 { + changeAgentOkBodyQanMongodbMongologAgentTypeLogLevelPropEnum = append(changeAgentOkBodyQanMongodbMongologAgentTypeLogLevelPropEnum, v) + } +} + +const ( + + // ChangeAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ChangeAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // ChangeAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ChangeAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // ChangeAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ChangeAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // ChangeAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ChangeAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // ChangeAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ChangeAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // ChangeAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ChangeAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *ChangeAgentOKBodyQANMongodbMongologAgent) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentOkBodyQanMongodbMongologAgentTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *ChangeAgentOKBodyQANMongodbMongologAgent) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("changeAgentOk"+"."+"qan_mongodb_mongolog_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this change agent OK body QAN mongodb mongolog agent based on context it is used +func (o *ChangeAgentOKBodyQANMongodbMongologAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeAgentOKBodyQANMongodbMongologAgent) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeAgentOKBodyQANMongodbMongologAgent) UnmarshalBinary(b []byte) error { + var res ChangeAgentOKBodyQANMongodbMongologAgent + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + /* ChangeAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server. swagger:model ChangeAgentOKBodyQANMongodbProfilerAgent @@ -7572,6 +7881,236 @@ func (o *ChangeAgentParamsBodyProxysqlExporterMetricsResolutions) UnmarshalBinar return nil } +/* +ChangeAgentParamsBodyQANMongodbMongologAgent change agent params body QAN mongodb mongolog agent +swagger:model ChangeAgentParamsBodyQANMongodbMongologAgent +*/ +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"` + + // custom labels + CustomLabels *ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels `json:"custom_labels,omitempty"` + + // metrics resolutions + MetricsResolutions *ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions `json:"metrics_resolutions,omitempty"` +} + +// 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.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 +} + +func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) 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 { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "custom_labels") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "custom_labels") + } + return err + } + } + + return nil +} + +func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) 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 { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "metrics_resolutions") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "metrics_resolutions") + } + return err + } + } + + 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 { + 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 *ChangeAgentParamsBodyQANMongodbMongologAgent) 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 { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "custom_labels") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "custom_labels") + } + return err + } + } + + return nil +} + +func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) 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 { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "metrics_resolutions") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "qan_mongodb_mongolog_agent" + "." + "metrics_resolutions") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANMongodbMongologAgent + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value. +swagger:model ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels +*/ +type ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels 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 { + 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 { + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions MetricsResolutions represents Prometheus exporters metrics resolutions. +swagger:model ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions +*/ +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"` + + // 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 QAN mongodb mongolog agent metrics resolutions +func (o *ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions) 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 { + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + /* ChangeAgentParamsBodyQANMongodbProfilerAgent change agent params body QAN mongodb profiler agent swagger:model ChangeAgentParamsBodyQANMongodbProfilerAgent 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 d7c6e4cbd4e..39ab71ad76b 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 @@ -439,6 +439,9 @@ type GetAgentOKBody struct { // proxysql exporter ProxysqlExporter *GetAgentOKBodyProxysqlExporter `json:"proxysql_exporter,omitempty"` + // qan mongodb mongolog agent + QANMongodbMongologAgent *GetAgentOKBodyQANMongodbMongologAgent `json:"qan_mongodb_mongolog_agent,omitempty"` + // qan mongodb profiler agent QANMongodbProfilerAgent *GetAgentOKBodyQANMongodbProfilerAgent `json:"qan_mongodb_profiler_agent,omitempty"` @@ -504,6 +507,10 @@ func (o *GetAgentOKBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateQANMongodbMongologAgent(formats); err != nil { + res = append(res, err) + } + if err := o.validateQANMongodbProfilerAgent(formats); err != nil { res = append(res, err) } @@ -713,6 +720,25 @@ func (o *GetAgentOKBody) validateProxysqlExporter(formats strfmt.Registry) error return nil } +func (o *GetAgentOKBody) validateQANMongodbMongologAgent(formats strfmt.Registry) error { + if swag.IsZero(o.QANMongodbMongologAgent) { // not required + return nil + } + + if o.QANMongodbMongologAgent != nil { + if err := o.QANMongodbMongologAgent.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("getAgentOk" + "." + "qan_mongodb_mongolog_agent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("getAgentOk" + "." + "qan_mongodb_mongolog_agent") + } + return err + } + } + + return nil +} + func (o *GetAgentOKBody) validateQANMongodbProfilerAgent(formats strfmt.Registry) error { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required return nil @@ -905,6 +931,10 @@ func (o *GetAgentOKBody) ContextValidate(ctx context.Context, formats strfmt.Reg res = append(res, err) } + if err := o.contextValidateQANMongodbMongologAgent(ctx, formats); err != nil { + res = append(res, err) + } + if err := o.contextValidateQANMongodbProfilerAgent(ctx, formats); err != nil { res = append(res, err) } @@ -1123,6 +1153,26 @@ func (o *GetAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, fo return nil } +func (o *GetAgentOKBody) contextValidateQANMongodbMongologAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbMongologAgent != nil { + + if swag.IsZero(o.QANMongodbMongologAgent) { // not required + return nil + } + + if err := o.QANMongodbMongologAgent.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("getAgentOk" + "." + "qan_mongodb_mongolog_agent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("getAgentOk" + "." + "qan_mongodb_mongolog_agent") + } + return err + } + } + + return nil +} + func (o *GetAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { if o.QANMongodbProfilerAgent != nil { @@ -3564,6 +3614,215 @@ func (o *GetAgentOKBodyProxysqlExporterMetricsResolutions) UnmarshalBinary(b []b return nil } +/* +GetAgentOKBodyQANMongodbMongologAgent QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server. +swagger:model GetAgentOKBodyQANMongodbMongologAgent +*/ +type GetAgentOKBodyQANMongodbMongologAgent 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"` + + // MongoDB username for getting profiler data. + 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"` + + // Limit query length in QAN (default: server-defined; -1: no limit). + MaxQueryLength int32 `json:"max_query_length,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 finished. + // - 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"` + + // Path to exec process. + ProcessExecPath string `json:"process_exec_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"` +} + +// Validate validates this get agent OK body QAN mongodb mongolog agent +func (o *GetAgentOKBodyQANMongodbMongologAgent) 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 len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var getAgentOkBodyQanMongodbMongologAgentTypeStatusPropEnum []interface{} + +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 { + getAgentOkBodyQanMongodbMongologAgentTypeStatusPropEnum = append(getAgentOkBodyQanMongodbMongologAgentTypeStatusPropEnum, v) + } +} + +const ( + + // GetAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + GetAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // GetAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + GetAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // GetAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSINITIALIZATIONERROR captures enum value "AGENT_STATUS_INITIALIZATION_ERROR" + GetAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSINITIALIZATIONERROR string = "AGENT_STATUS_INITIALIZATION_ERROR" + + // GetAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + GetAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // GetAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + GetAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // GetAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + GetAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // GetAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + GetAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // GetAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + GetAgentOKBodyQANMongodbMongologAgentStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *GetAgentOKBodyQANMongodbMongologAgent) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, getAgentOkBodyQanMongodbMongologAgentTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *GetAgentOKBodyQANMongodbMongologAgent) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("getAgentOk"+"."+"qan_mongodb_mongolog_agent"+"."+"status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +var getAgentOkBodyQanMongodbMongologAgentTypeLogLevelPropEnum []interface{} + +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 { + getAgentOkBodyQanMongodbMongologAgentTypeLogLevelPropEnum = append(getAgentOkBodyQanMongodbMongologAgentTypeLogLevelPropEnum, v) + } +} + +const ( + + // GetAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + GetAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // GetAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + GetAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // GetAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + GetAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // GetAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + GetAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // GetAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + GetAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // GetAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + GetAgentOKBodyQANMongodbMongologAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *GetAgentOKBodyQANMongodbMongologAgent) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, getAgentOkBodyQanMongodbMongologAgentTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *GetAgentOKBodyQANMongodbMongologAgent) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("getAgentOk"+"."+"qan_mongodb_mongolog_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this get agent OK body QAN mongodb mongolog agent based on context it is used +func (o *GetAgentOKBodyQANMongodbMongologAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GetAgentOKBodyQANMongodbMongologAgent) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetAgentOKBodyQANMongodbMongologAgent) UnmarshalBinary(b []byte) error { + var res GetAgentOKBodyQANMongodbMongologAgent + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + /* GetAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server. swagger:model GetAgentOKBodyQANMongodbProfilerAgent 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 d64e62e9a3d..866b52ea269 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 @@ -442,6 +442,9 @@ type ListAgentsOKBody struct { // qan mongodb profiler agent QANMongodbProfilerAgent []*ListAgentsOKBodyQANMongodbProfilerAgentItems0 `json:"qan_mongodb_profiler_agent"` + // qan mongodb mongolog agent + QANMongodbMongologAgent []*ListAgentsOKBodyQANMongodbMongologAgentItems0 `json:"qan_mongodb_mongolog_agent"` + // qan postgresql pgstatements agent QANPostgresqlPgstatementsAgent []*ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 `json:"qan_postgresql_pgstatements_agent"` @@ -508,6 +511,10 @@ func (o *ListAgentsOKBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateQANMongodbMongologAgent(formats); err != nil { + res = append(res, err) + } + if err := o.validateQANPostgresqlPgstatementsAgent(formats); err != nil { res = append(res, err) } @@ -802,6 +809,32 @@ func (o *ListAgentsOKBody) validateQANMongodbProfilerAgent(formats strfmt.Regist return nil } +func (o *ListAgentsOKBody) validateQANMongodbMongologAgent(formats strfmt.Registry) error { + if swag.IsZero(o.QANMongodbMongologAgent) { // not required + return nil + } + + for i := 0; i < len(o.QANMongodbMongologAgent); i++ { + if swag.IsZero(o.QANMongodbMongologAgent[i]) { // not required + continue + } + + if o.QANMongodbMongologAgent[i] != nil { + if err := o.QANMongodbMongologAgent[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listAgentsOk" + "." + "qan_mongodb_mongolog_agent" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("listAgentsOk" + "." + "qan_mongodb_mongolog_agent" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (o *ListAgentsOKBody) validateQANPostgresqlPgstatementsAgent(formats strfmt.Registry) error { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required return nil @@ -1028,6 +1061,10 @@ func (o *ListAgentsOKBody) ContextValidate(ctx context.Context, formats strfmt.R res = append(res, err) } + if err := o.contextValidateQANMongodbMongologAgent(ctx, formats); err != nil { + res = append(res, err) + } + if err := o.contextValidateQANPostgresqlPgstatementsAgent(ctx, formats); err != nil { res = append(res, err) } @@ -1282,6 +1319,28 @@ func (o *ListAgentsOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Co 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 + return nil + } + + if err := o.QANMongodbMongologAgent[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listAgentsOk" + "." + "qan_mongodb_mongolog_agent" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("listAgentsOk" + "." + "qan_mongodb_mongolog_agent" + "." + strconv.Itoa(i)) + } + 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 { @@ -3717,6 +3776,215 @@ func (o *ListAgentsOKBodyProxysqlExporterItems0MetricsResolutions) UnmarshalBina return nil } +/* +ListAgentsOKBodyQANMongodbMongologAgentItems0 QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server. +swagger:model ListAgentsOKBodyQANMongodbMongologAgentItems0 +*/ +type ListAgentsOKBodyQANMongodbMongologAgentItems0 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"` + + // MongoDB username for getting profiler data. + 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"` + + // Limit query length in QAN (default: server-defined; -1: no limit). + MaxQueryLength int32 `json:"max_query_length,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 finished. + // - 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"` + + // Path to exec process. + ProcessExecPath string `json:"process_exec_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"` +} + +// Validate validates this list agents OK body QAN mongodb mongolog agent items0 +func (o *ListAgentsOKBodyQANMongodbMongologAgentItems0) 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 len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var listAgentsOkBodyQanMongodbMongologAgentItems0TypeStatusPropEnum []interface{} + +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 { + listAgentsOkBodyQanMongodbMongologAgentItems0TypeStatusPropEnum = append(listAgentsOkBodyQanMongodbMongologAgentItems0TypeStatusPropEnum, v) + } +} + +const ( + + // ListAgentsOKBodyQANMongodbMongologAgentItems0StatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + ListAgentsOKBodyQANMongodbMongologAgentItems0StatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // ListAgentsOKBodyQANMongodbMongologAgentItems0StatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + ListAgentsOKBodyQANMongodbMongologAgentItems0StatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // ListAgentsOKBodyQANMongodbMongologAgentItems0StatusAGENTSTATUSINITIALIZATIONERROR captures enum value "AGENT_STATUS_INITIALIZATION_ERROR" + ListAgentsOKBodyQANMongodbMongologAgentItems0StatusAGENTSTATUSINITIALIZATIONERROR string = "AGENT_STATUS_INITIALIZATION_ERROR" + + // ListAgentsOKBodyQANMongodbMongologAgentItems0StatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + ListAgentsOKBodyQANMongodbMongologAgentItems0StatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // ListAgentsOKBodyQANMongodbMongologAgentItems0StatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + ListAgentsOKBodyQANMongodbMongologAgentItems0StatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // ListAgentsOKBodyQANMongodbMongologAgentItems0StatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + ListAgentsOKBodyQANMongodbMongologAgentItems0StatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // ListAgentsOKBodyQANMongodbMongologAgentItems0StatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + ListAgentsOKBodyQANMongodbMongologAgentItems0StatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // ListAgentsOKBodyQANMongodbMongologAgentItems0StatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + ListAgentsOKBodyQANMongodbMongologAgentItems0StatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *ListAgentsOKBodyQANMongodbMongologAgentItems0) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, listAgentsOkBodyQanMongodbMongologAgentItems0TypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *ListAgentsOKBodyQANMongodbMongologAgentItems0) 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 listAgentsOkBodyQanMongodbMongologAgentItems0TypeLogLevelPropEnum []interface{} + +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 { + listAgentsOkBodyQanMongodbMongologAgentItems0TypeLogLevelPropEnum = append(listAgentsOkBodyQanMongodbMongologAgentItems0TypeLogLevelPropEnum, v) + } +} + +const ( + + // ListAgentsOKBodyQANMongodbMongologAgentItems0LogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + ListAgentsOKBodyQANMongodbMongologAgentItems0LogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // ListAgentsOKBodyQANMongodbMongologAgentItems0LogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + ListAgentsOKBodyQANMongodbMongologAgentItems0LogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // ListAgentsOKBodyQANMongodbMongologAgentItems0LogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + ListAgentsOKBodyQANMongodbMongologAgentItems0LogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // ListAgentsOKBodyQANMongodbMongologAgentItems0LogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + ListAgentsOKBodyQANMongodbMongologAgentItems0LogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // ListAgentsOKBodyQANMongodbMongologAgentItems0LogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + ListAgentsOKBodyQANMongodbMongologAgentItems0LogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // ListAgentsOKBodyQANMongodbMongologAgentItems0LogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + ListAgentsOKBodyQANMongodbMongologAgentItems0LogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *ListAgentsOKBodyQANMongodbMongologAgentItems0) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, listAgentsOkBodyQanMongodbMongologAgentItems0TypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *ListAgentsOKBodyQANMongodbMongologAgentItems0) 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 +} + +// ContextValidate validates this list agents OK body QAN mongodb mongolog agent items0 based on context it is used +func (o *ListAgentsOKBodyQANMongodbMongologAgentItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ListAgentsOKBodyQANMongodbMongologAgentItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ListAgentsOKBodyQANMongodbMongologAgentItems0) UnmarshalBinary(b []byte) error { + var res ListAgentsOKBodyQANMongodbMongologAgentItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + /* ListAgentsOKBodyQANMongodbProfilerAgentItems0 QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server. swagger:model ListAgentsOKBodyQANMongodbProfilerAgentItems0 diff --git a/api/inventory/v1/json/v1.json b/api/inventory/v1/json/v1.json index 7b168b8f670..2546bfd8cd4 100644 --- a/api/inventory/v1/json/v1.json +++ b/api/inventory/v1/json/v1.json @@ -56,6 +56,7 @@ "AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT", "AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT", "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT", + "AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT", "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT", "AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT", "AGENT_TYPE_EXTERNAL_EXPORTER", @@ -1220,6 +1221,101 @@ }, "x-order": 9 }, + "qan_mongodb_mongolog_agent": { + "type": "array", + "items": { + "description": "QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MongoDB username for getting profiler data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_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 finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 11 + } + } + }, + "x-order": 10 + }, "qan_postgresql_pgstatements_agent": { "type": "array", "items": { @@ -1318,7 +1414,7 @@ } } }, - "x-order": 10 + "x-order": 11 }, "qan_postgresql_pgstatmonitor_agent": { "type": "array", @@ -1423,7 +1519,7 @@ } } }, - "x-order": 11 + "x-order": 12 }, "external_exporter": { "type": "array", @@ -1519,7 +1615,7 @@ } } }, - "x-order": 12 + "x-order": 13 }, "rds_exporter": { "type": "array", @@ -1647,7 +1743,7 @@ } } }, - "x-order": 13 + "x-order": 14 }, "azure_database_exporter": { "type": "array", @@ -1764,7 +1860,7 @@ } } }, - "x-order": 14 + "x-order": 15 }, "nomad_agent": { "type": "array", @@ -1815,7 +1911,7 @@ } } }, - "x-order": 15 + "x-order": 16 }, "valkey_exporter": { "type": "array", @@ -1950,7 +2046,7 @@ } } }, - "x-order": 16 + "x-order": 17 } } } @@ -3008,6 +3104,101 @@ }, "x-order": 11 }, + "qan_mongodb_mongolog_agent": { + "type": "object", + "properties": { + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "username": { + "description": "MongoDB username for getting profile data.", + "type": "string", + "x-order": 2 + }, + "password": { + "description": "MongoDB password for getting profile data.", + "type": "string", + "x-order": 3 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "tls_certificate_key": { + "description": "Client certificate and key.", + "type": "string", + "x-order": 6 + }, + "tls_certificate_key_file_password": { + "description": "Password for decrypting tls_certificate_key.", + "type": "string", + "x-order": 7 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 8 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 9 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 10 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 11 + }, + "authentication_mechanism": { + "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", + "type": "string", + "x-order": 12 + }, + "authentication_database": { + "description": "Authentication database.", + "type": "string", + "x-order": 13 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 14 + } + }, + "x-order": 12 + }, "qan_postgresql_pgstatements_agent": { "type": "object", "properties": { @@ -3096,7 +3287,7 @@ "x-order": 13 } }, - "x-order": 12 + "x-order": 13 }, "qan_postgresql_pgstatmonitor_agent": { "type": "object", @@ -3191,7 +3382,7 @@ "x-order": 14 } }, - "x-order": 13 + "x-order": 14 }, "valkey_exporter": { "type": "object", @@ -3293,7 +3484,7 @@ "x-order": 15 } }, - "x-order": 14 + "x-order": 15 } } } @@ -4707,8 +4898,8 @@ }, "x-order": 11 }, - "qan_postgresql_pgstatements_agent": { - "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "qan_mongodb_mongolog_agent": { + "description": "QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -4732,38 +4923,33 @@ "x-order": 3 }, "username": { - "description": "PostgreSQL username for getting pg stat statements data.", + "description": "MongoDB username for getting profiler data.", "type": "string", "x-order": 4 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", + "tls": { + "description": "Use TLS for database connections.", "type": "boolean", "x-order": 5 }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, "max_query_length": { "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 6 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", "x-order": 7 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 8 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 9 + "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 finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", @@ -4779,12 +4965,12 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 10 + "x-order": 9 }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 11 + "x-order": 10 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -4799,13 +4985,13 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 12 + "x-order": 11 } }, "x-order": 12 }, - "qan_postgresql_pgstatmonitor_agent": { - "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "qan_postgresql_pgstatements_agent": { + "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -4829,30 +5015,127 @@ "x-order": 3 }, "username": { - "description": "PostgreSQL username for getting pg stat monitor data.", + "description": "PostgreSQL username for getting pg stat statements data.", "type": "string", "x-order": 4 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, "disable_comments_parsing": { "description": "Disable parsing comments from queries and showing them in QAN.", "type": "boolean", - "x-order": 7 + "x-order": 5 }, "max_query_length": { "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 8 + "x-order": 6 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 7 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_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 finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 11 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 12 + } + }, + "x-order": 13 + }, + "qan_postgresql_pgstatmonitor_agent": { + "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "PostgreSQL username for getting pg stat monitor data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 7 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 8 }, "query_examples_disabled": { "description": "True if query examples are disabled.", @@ -4904,7 +5187,7 @@ "x-order": 13 } }, - "x-order": 13 + "x-order": 14 }, "valkey_exporter": { "description": "ValkeyExporter runs on Generic or Container Node and exposes Valkey Service metrics.", @@ -5036,7 +5319,7 @@ "x-order": 15 } }, - "x-order": 14 + "x-order": 15 } } } @@ -6212,6 +6495,98 @@ }, "x-order": 9 }, + "qan_mongodb_mongolog_agent": { + "description": "QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MongoDB username for getting profiler data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_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 finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 11 + } + }, + "x-order": 10 + }, "qan_postgresql_pgstatements_agent": { "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", @@ -6307,7 +6682,7 @@ "x-order": 12 } }, - "x-order": 10 + "x-order": 11 }, "qan_postgresql_pgstatmonitor_agent": { "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", @@ -6409,7 +6784,7 @@ "x-order": 13 } }, - "x-order": 11 + "x-order": 12 }, "external_exporter": { "description": "ExternalExporter runs on any Node type, including Remote Node.", @@ -6502,7 +6877,7 @@ "x-order": 12 } }, - "x-order": 12 + "x-order": 13 }, "rds_exporter": { "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", @@ -6627,7 +7002,7 @@ "x-order": 14 } }, - "x-order": 13 + "x-order": 14 }, "azure_database_exporter": { "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics.", @@ -6741,7 +7116,7 @@ "x-order": 12 } }, - "x-order": 14 + "x-order": 15 }, "nomad_agent": { "type": "object", @@ -6789,7 +7164,7 @@ "x-order": 5 } }, - "x-order": 15 + "x-order": 16 }, "valkey_exporter": { "description": "ValkeyExporter runs on Generic or Container Node and exposes Valkey Service metrics.", @@ -6921,7 +7296,7 @@ "x-order": 15 } }, - "x-order": 16 + "x-order": 17 } } } @@ -7585,7 +7960,7 @@ }, "x-order": 10 }, - "qan_postgresql_pgstatements_agent": { + "qan_mongodb_mongolog_agent": { "type": "object", "properties": { "enable": { @@ -7640,7 +8015,7 @@ }, "x-order": 11 }, - "qan_postgresql_pgstatmonitor_agent": { + "qan_postgresql_pgstatements_agent": { "type": "object", "properties": { "enable": { @@ -7695,7 +8070,7 @@ }, "x-order": 12 }, - "nomad_agent": { + "qan_postgresql_pgstatmonitor_agent": { "type": "object", "properties": { "enable": { @@ -7703,10 +8078,65 @@ "type": "boolean", "x-nullable": true, "x-order": 0 + }, + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, + "x-order": 1 + }, + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", + "type": "boolean", + "x-nullable": true, + "x-order": 2 + }, + "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": 3 } }, "x-order": 13 }, + "nomad_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 + } + }, + "x-order": 14 + }, "valkey_exporter": { "type": "object", "properties": { @@ -7760,7 +8190,7 @@ "x-order": 3 } }, - "x-order": 14 + "x-order": 15 } } } @@ -9139,6 +9569,98 @@ }, "x-order": 10 }, + "qan_mongodb_mongolog_agent": { + "description": "QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MongoDB username for getting profiler data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_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 finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 11 + } + }, + "x-order": 11 + }, "qan_postgresql_pgstatements_agent": { "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", @@ -9234,7 +9756,7 @@ "x-order": 12 } }, - "x-order": 11 + "x-order": 12 }, "qan_postgresql_pgstatmonitor_agent": { "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", @@ -9336,7 +9858,7 @@ "x-order": 13 } }, - "x-order": 12 + "x-order": 13 }, "nomad_agent": { "type": "object", @@ -9384,7 +9906,7 @@ "x-order": 5 } }, - "x-order": 13 + "x-order": 14 }, "valkey_exporter": { "description": "ValkeyExporter runs on Generic or Container Node and exposes Valkey Service metrics.", @@ -9516,7 +10038,7 @@ "x-order": 15 } }, - "x-order": 14 + "x-order": 15 } } } diff --git a/api/inventory/v1/types/agent_types.go b/api/inventory/v1/types/agent_types.go index 96432233271..da702c464a0 100644 --- a/api/inventory/v1/types/agent_types.go +++ b/api/inventory/v1/types/agent_types.go @@ -32,6 +32,7 @@ const ( AgentTypeQANMySQLPerfSchemaAgent = "AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT" AgentTypeQANMySQLSlowlogAgent = "AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT" AgentTypeQANMongoDBProfilerAgent = "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT" + AgentTypeQANMongoDBMongologAgent = "AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT" AgentTypeQANPostgreSQLPgStatementsAgent = "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT" AgentTypeQANPostgreSQLPgStatMonitorAgent = "AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT" AgentTypeRDSExporter = "AGENT_TYPE_RDS_EXPORTER" @@ -53,6 +54,7 @@ var agentTypeNames = map[string]string{ AgentTypeQANMySQLPerfSchemaAgent: "mysql_perfschema_agent", AgentTypeQANMySQLSlowlogAgent: "mysql_slowlog_agent", AgentTypeQANMongoDBProfilerAgent: "mongodb_profiler_agent", + AgentTypeQANMongoDBMongologAgent: "mongodb_mongolog_agent", AgentTypeQANPostgreSQLPgStatementsAgent: "postgresql_pgstatements_agent", AgentTypeQANPostgreSQLPgStatMonitorAgent: "postgresql_pgstatmonitor_agent", AgentTypeRDSExporter: "rds_exporter", diff --git a/api/management/v1/json/client/management_service/add_service_responses.go b/api/management/v1/json/client/management_service/add_service_responses.go index e5e4b76dec6..f2e8249b9b6 100644 --- a/api/management/v1/json/client/management_service/add_service_responses.go +++ b/api/management/v1/json/client/management_service/add_service_responses.go @@ -1950,6 +1950,9 @@ type AddServiceOKBodyMongodb struct { // mongodb exporter MongodbExporter *AddServiceOKBodyMongodbMongodbExporter `json:"mongodb_exporter,omitempty"` + // qan mongodb mongolog + QANMongodbMongolog *AddServiceOKBodyMongodbQANMongodbMongolog `json:"qan_mongodb_mongolog,omitempty"` + // qan mongodb profiler QANMongodbProfiler *AddServiceOKBodyMongodbQANMongodbProfiler `json:"qan_mongodb_profiler,omitempty"` @@ -1965,6 +1968,10 @@ func (o *AddServiceOKBodyMongodb) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateQANMongodbMongolog(formats); err != nil { + res = append(res, err) + } + if err := o.validateQANMongodbProfiler(formats); err != nil { res = append(res, err) } @@ -1998,6 +2005,25 @@ func (o *AddServiceOKBodyMongodb) validateMongodbExporter(formats strfmt.Registr return nil } +func (o *AddServiceOKBodyMongodb) validateQANMongodbMongolog(formats strfmt.Registry) error { + if swag.IsZero(o.QANMongodbMongolog) { // not required + return nil + } + + if o.QANMongodbMongolog != nil { + if err := o.QANMongodbMongolog.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mongodb" + "." + "qan_mongodb_mongolog") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mongodb" + "." + "qan_mongodb_mongolog") + } + return err + } + } + + return nil +} + func (o *AddServiceOKBodyMongodb) validateQANMongodbProfiler(formats strfmt.Registry) error { if swag.IsZero(o.QANMongodbProfiler) { // not required return nil @@ -2044,6 +2070,10 @@ func (o *AddServiceOKBodyMongodb) ContextValidate(ctx context.Context, formats s res = append(res, err) } + if err := o.contextValidateQANMongodbMongolog(ctx, formats); err != nil { + res = append(res, err) + } + if err := o.contextValidateQANMongodbProfiler(ctx, formats); err != nil { res = append(res, err) } @@ -2078,6 +2108,26 @@ func (o *AddServiceOKBodyMongodb) contextValidateMongodbExporter(ctx context.Con return nil } +func (o *AddServiceOKBodyMongodb) contextValidateQANMongodbMongolog(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbMongolog != nil { + + if swag.IsZero(o.QANMongodbMongolog) { // not required + return nil + } + + if err := o.QANMongodbMongolog.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mongodb" + "." + "qan_mongodb_mongolog") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mongodb" + "." + "qan_mongodb_mongolog") + } + return err + } + } + + return nil +} + func (o *AddServiceOKBodyMongodb) contextValidateQANMongodbProfiler(ctx context.Context, formats strfmt.Registry) error { if o.QANMongodbProfiler != nil { @@ -2462,6 +2512,215 @@ func (o *AddServiceOKBodyMongodbMongodbExporterMetricsResolutions) UnmarshalBina return nil } +/* +AddServiceOKBodyMongodbQANMongodbMongolog QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server. +swagger:model AddServiceOKBodyMongodbQANMongodbMongolog +*/ +type AddServiceOKBodyMongodbQANMongodbMongolog 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"` + + // MongoDB username for getting profiler data. + 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"` + + // Limit query length in QAN (default: server-defined; -1: no limit). + MaxQueryLength int32 `json:"max_query_length,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 finished. + // - 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"` + + // Path to exec process. + ProcessExecPath string `json:"process_exec_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"` +} + +// Validate validates this add service OK body mongodb QAN mongodb mongolog +func (o *AddServiceOKBodyMongodbQANMongodbMongolog) 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 len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addServiceOkBodyMongodbQanMongodbMongologTypeStatusPropEnum []interface{} + +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 { + addServiceOkBodyMongodbQanMongodbMongologTypeStatusPropEnum = append(addServiceOkBodyMongodbQanMongodbMongologTypeStatusPropEnum, v) + } +} + +const ( + + // AddServiceOKBodyMongodbQANMongodbMongologStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + AddServiceOKBodyMongodbQANMongodbMongologStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // AddServiceOKBodyMongodbQANMongodbMongologStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + AddServiceOKBodyMongodbQANMongodbMongologStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // AddServiceOKBodyMongodbQANMongodbMongologStatusAGENTSTATUSINITIALIZATIONERROR captures enum value "AGENT_STATUS_INITIALIZATION_ERROR" + AddServiceOKBodyMongodbQANMongodbMongologStatusAGENTSTATUSINITIALIZATIONERROR string = "AGENT_STATUS_INITIALIZATION_ERROR" + + // AddServiceOKBodyMongodbQANMongodbMongologStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + AddServiceOKBodyMongodbQANMongodbMongologStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // AddServiceOKBodyMongodbQANMongodbMongologStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + AddServiceOKBodyMongodbQANMongodbMongologStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // AddServiceOKBodyMongodbQANMongodbMongologStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + AddServiceOKBodyMongodbQANMongodbMongologStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // AddServiceOKBodyMongodbQANMongodbMongologStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + AddServiceOKBodyMongodbQANMongodbMongologStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // AddServiceOKBodyMongodbQANMongodbMongologStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + AddServiceOKBodyMongodbQANMongodbMongologStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *AddServiceOKBodyMongodbQANMongodbMongolog) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceOkBodyMongodbQanMongodbMongologTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceOKBodyMongodbQANMongodbMongolog) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("addServiceOk"+"."+"mongodb"+"."+"qan_mongodb_mongolog"+"."+"status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +var addServiceOkBodyMongodbQanMongodbMongologTypeLogLevelPropEnum []interface{} + +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 { + addServiceOkBodyMongodbQanMongodbMongologTypeLogLevelPropEnum = append(addServiceOkBodyMongodbQanMongodbMongologTypeLogLevelPropEnum, v) + } +} + +const ( + + // AddServiceOKBodyMongodbQANMongodbMongologLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + AddServiceOKBodyMongodbQANMongodbMongologLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // AddServiceOKBodyMongodbQANMongodbMongologLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + AddServiceOKBodyMongodbQANMongodbMongologLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // AddServiceOKBodyMongodbQANMongodbMongologLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + AddServiceOKBodyMongodbQANMongodbMongologLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // AddServiceOKBodyMongodbQANMongodbMongologLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + AddServiceOKBodyMongodbQANMongodbMongologLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // AddServiceOKBodyMongodbQANMongodbMongologLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + AddServiceOKBodyMongodbQANMongodbMongologLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // AddServiceOKBodyMongodbQANMongodbMongologLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + AddServiceOKBodyMongodbQANMongodbMongologLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *AddServiceOKBodyMongodbQANMongodbMongolog) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceOkBodyMongodbQanMongodbMongologTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceOKBodyMongodbQANMongodbMongolog) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("addServiceOk"+"."+"mongodb"+"."+"qan_mongodb_mongolog"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this add service OK body mongodb QAN mongodb mongolog based on context it is used +func (o *AddServiceOKBodyMongodbQANMongodbMongolog) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBodyMongodbQANMongodbMongolog) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBodyMongodbQANMongodbMongolog) UnmarshalBinary(b []byte) error { + var res AddServiceOKBodyMongodbQANMongodbMongolog + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + /* AddServiceOKBodyMongodbQANMongodbProfiler QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server. swagger:model AddServiceOKBodyMongodbQANMongodbProfiler @@ -8208,6 +8467,9 @@ type AddServiceParamsBodyMongodb struct { // If true, adds qan-mongodb-profiler-agent for provided service. QANMongodbProfiler bool `json:"qan_mongodb_profiler,omitempty"` + // If true, adds qan-mongodb-mongolog-agent for provided service. + QANMongodbMongolog bool `json:"qan_mongodb_mongolog,omitempty"` + // Custom user-assigned labels for Service. CustomLabels map[string]string `json:"custom_labels,omitempty"` diff --git a/api/management/v1/json/v1.json b/api/management/v1/json/v1.json index 90927c8db24..36d793f0bae 100644 --- a/api/management/v1/json/v1.json +++ b/api/management/v1/json/v1.json @@ -2327,49 +2327,54 @@ "type": "boolean", "x-order": 13 }, + "qan_mongodb_mongolog": { + "description": "If true, adds qan-mongodb-mongolog-agent for provided service.", + "type": "boolean", + "x-order": 14 + }, "custom_labels": { "description": "Custom user-assigned labels for Service.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 14 + "x-order": 15 }, "skip_connection_check": { "description": "Skip connection check.", "type": "boolean", - "x-order": 15 + "x-order": 16 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 16 + "x-order": 17 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 17 + "x-order": 18 }, "tls_certificate_key": { "description": "Client certificate and key.", "type": "string", - "x-order": 18 + "x-order": 19 }, "tls_certificate_key_file_password": { "description": "Password for decrypting tls_certificate_key.", "type": "string", - "x-order": 19 + "x-order": 20 }, "tls_ca": { "description": "Certificate Authority certificate chain.", "type": "string", - "x-order": 20 + "x-order": 21 }, "max_query_length": { "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 21 + "x-order": 22 }, "metrics_mode": { "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", @@ -2380,7 +2385,7 @@ "METRICS_MODE_PULL", "METRICS_MODE_PUSH" ], - "x-order": 22 + "x-order": 23 }, "disable_collectors": { "description": "List of collector names to disable in this exporter.", @@ -2388,22 +2393,22 @@ "items": { "type": "string" }, - "x-order": 23 + "x-order": 24 }, "authentication_mechanism": { "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", "type": "string", - "x-order": 24 + "x-order": 25 }, "authentication_database": { "description": "Authentication database.", "type": "string", - "x-order": 25 + "x-order": 26 }, "agent_password": { "description": "Custom password for exporter endpoint /metrics.", "type": "string", - "x-order": 26 + "x-order": 27 }, "stats_collections": { "description": "List of collections to get stats from. Can use * .", @@ -2411,18 +2416,18 @@ "items": { "type": "string" }, - "x-order": 27 + "x-order": 28 }, "collections_limit": { "type": "integer", "format": "int32", "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", - "x-order": 28 + "x-order": 29 }, "enable_all_collectors": { "type": "boolean", "title": "Enable all collectors", - "x-order": 29 + "x-order": 30 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -2437,12 +2442,12 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 30 + "x-order": 31 }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 31 + "x-order": 32 } }, "x-order": 1 @@ -4249,6 +4254,98 @@ } }, "x-order": 2 + }, + "qan_mongodb_mongolog": { + "description": "QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MongoDB username for getting profiler data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_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 finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 11 + } + }, + "x-order": 3 } }, "x-order": 1 diff --git a/api/management/v1/mongodb.pb.go b/api/management/v1/mongodb.pb.go index 979ac3f1ebb..cf6e912b6d7 100644 --- a/api/management/v1/mongodb.pb.go +++ b/api/management/v1/mongodb.pb.go @@ -61,6 +61,8 @@ type AddMongoDBServiceParams struct { Password string `protobuf:"bytes,14,opt,name=password,proto3" json:"password,omitempty"` // If true, adds qan-mongodb-profiler-agent for provided service. QanMongodbProfiler bool `protobuf:"varint,15,opt,name=qan_mongodb_profiler,json=qanMongodbProfiler,proto3" json:"qan_mongodb_profiler,omitempty"` + // If true, adds qan-mongodb-mongolog-agent for provided service. + QanMongodbMongolog bool `protobuf:"varint,35,opt,name=qan_mongodb_mongolog,json=qanMongodbMongolog,proto3" json:"qan_mongodb_mongolog,omitempty"` // Custom user-assigned labels for Service. CustomLabels map[string]string `protobuf:"bytes,16,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"` // Skip connection check. @@ -234,6 +236,13 @@ func (x *AddMongoDBServiceParams) GetQanMongodbProfiler() bool { return false } +func (x *AddMongoDBServiceParams) GetQanMongodbMongolog() bool { + if x != nil { + return x.QanMongodbMongolog + } + return false +} + func (x *AddMongoDBServiceParams) GetCustomLabels() map[string]string { if x != nil { return x.CustomLabels @@ -365,6 +374,7 @@ type MongoDBServiceResult struct { Service *v1.MongoDBService `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` MongodbExporter *v1.MongoDBExporter `protobuf:"bytes,2,opt,name=mongodb_exporter,json=mongodbExporter,proto3" json:"mongodb_exporter,omitempty"` QanMongodbProfiler *v1.QANMongoDBProfilerAgent `protobuf:"bytes,3,opt,name=qan_mongodb_profiler,json=qanMongodbProfiler,proto3" json:"qan_mongodb_profiler,omitempty"` + QanMongodbMongolog *v1.QANMongoDBMongologAgent `protobuf:"bytes,4,opt,name=qan_mongodb_mongolog,json=qanMongodbMongolog,proto3" json:"qan_mongodb_mongolog,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -420,11 +430,18 @@ func (x *MongoDBServiceResult) GetQanMongodbProfiler() *v1.QANMongoDBProfilerAge return nil } +func (x *MongoDBServiceResult) GetQanMongodbMongolog() *v1.QANMongoDBMongologAgent { + if x != nil { + return x.QanMongodbMongolog + } + return nil +} + var File_management_v1_mongodb_proto protoreflect.FileDescriptor const file_management_v1_mongodb_proto_rawDesc = "" + "\n" + - "\x1bmanagement/v1/mongodb.proto\x12\rmanagement.v1\x1a\x19inventory/v1/agents.proto\x1a\x1cinventory/v1/log_level.proto\x1a\x1binventory/v1/services.proto\x1a\x1bmanagement/v1/metrics.proto\x1a\x18management/v1/node.proto\x1a\x17validate/validate.proto\"\xd1\v\n" + + "\x1bmanagement/v1/mongodb.proto\x12\rmanagement.v1\x1a\x19inventory/v1/agents.proto\x1a\x1cinventory/v1/log_level.proto\x1a\x1binventory/v1/services.proto\x1a\x1bmanagement/v1/metrics.proto\x1a\x18management/v1/node.proto\x1a\x17validate/validate.proto\"\x83\f\n" + "\x17AddMongoDBServiceParams\x12\x17\n" + "\anode_id\x18\x01 \x01(\tR\x06nodeId\x12\x1b\n" + "\tnode_name\x18\x02 \x01(\tR\bnodeName\x127\n" + @@ -441,7 +458,8 @@ const file_management_v1_mongodb_proto_rawDesc = "" + "\x0freplication_set\x18\f \x01(\tR\x0ereplicationSet\x12\x1a\n" + "\busername\x18\r \x01(\tR\busername\x12\x1a\n" + "\bpassword\x18\x0e \x01(\tR\bpassword\x120\n" + - "\x14qan_mongodb_profiler\x18\x0f \x01(\bR\x12qanMongodbProfiler\x12]\n" + + "\x14qan_mongodb_profiler\x18\x0f \x01(\bR\x12qanMongodbProfiler\x120\n" + + "\x14qan_mongodb_mongolog\x18# \x01(\bR\x12qanMongodbMongolog\x12]\n" + "\rcustom_labels\x18\x10 \x03(\v28.management.v1.AddMongoDBServiceParams.CustomLabelsEntryR\fcustomLabels\x122\n" + "\x15skip_connection_check\x18\x11 \x01(\bR\x13skipConnectionCheck\x12\x10\n" + "\x03tls\x18\x13 \x01(\bR\x03tls\x12&\n" + @@ -462,11 +480,12 @@ const file_management_v1_mongodb_proto_rawDesc = "" + "\x0fexpose_exporter\x18\" \x01(\bR\x0eexposeExporter\x1a?\n" + "\x11CustomLabelsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01J\x04\b\b\x10\tR\x17query_examples_disabled\"\xf1\x01\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01J\x04\b\b\x10\tR\x17query_examples_disabled\"\xca\x02\n" + "\x14MongoDBServiceResult\x126\n" + "\aservice\x18\x01 \x01(\v2\x1c.inventory.v1.MongoDBServiceR\aservice\x12H\n" + "\x10mongodb_exporter\x18\x02 \x01(\v2\x1d.inventory.v1.MongoDBExporterR\x0fmongodbExporter\x12W\n" + - "\x14qan_mongodb_profiler\x18\x03 \x01(\v2%.inventory.v1.QANMongoDBProfilerAgentR\x12qanMongodbProfilerB\xad\x01\n" + + "\x14qan_mongodb_profiler\x18\x03 \x01(\v2%.inventory.v1.QANMongoDBProfilerAgentR\x12qanMongodbProfiler\x12W\n" + + "\x14qan_mongodb_mongolog\x18\x04 \x01(\v2%.inventory.v1.QANMongoDBMongologAgentR\x12qanMongodbMongologB\xad\x01\n" + "\x11com.management.v1B\fMongodbProtoP\x01Z5github.com/percona/pmm/api/management/v1;managementv1\xa2\x02\x03MXX\xaa\x02\rManagement.V1\xca\x02\rManagement\\V1\xe2\x02\x19Management\\V1\\GPBMetadata\xea\x02\x0eManagement::V1b\x06proto3" var ( @@ -493,6 +512,7 @@ var ( (*v1.MongoDBService)(nil), // 6: inventory.v1.MongoDBService (*v1.MongoDBExporter)(nil), // 7: inventory.v1.MongoDBExporter (*v1.QANMongoDBProfilerAgent)(nil), // 8: inventory.v1.QANMongoDBProfilerAgent + (*v1.QANMongoDBMongologAgent)(nil), // 9: inventory.v1.QANMongoDBMongologAgent } ) @@ -504,11 +524,12 @@ var file_management_v1_mongodb_proto_depIdxs = []int32{ 6, // 4: management.v1.MongoDBServiceResult.service:type_name -> inventory.v1.MongoDBService 7, // 5: management.v1.MongoDBServiceResult.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter 8, // 6: management.v1.MongoDBServiceResult.qan_mongodb_profiler:type_name -> inventory.v1.QANMongoDBProfilerAgent - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 9, // 7: management.v1.MongoDBServiceResult.qan_mongodb_mongolog:type_name -> inventory.v1.QANMongoDBMongologAgent + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] 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 } func init() { file_management_v1_mongodb_proto_init() } diff --git a/api/management/v1/mongodb.pb.validate.go b/api/management/v1/mongodb.pb.validate.go index 2e2c39337ce..cf5a5df9b7d 100644 --- a/api/management/v1/mongodb.pb.validate.go +++ b/api/management/v1/mongodb.pb.validate.go @@ -134,6 +134,8 @@ func (m *AddMongoDBServiceParams) validate(all bool) error { // no validation rules for QanMongodbProfiler + // no validation rules for QanMongodbMongolog + // no validation rules for CustomLabels // no validation rules for SkipConnectionCheck @@ -355,6 +357,35 @@ func (m *MongoDBServiceResult) validate(all bool) error { } } + if all { + switch v := interface{}(m.GetQanMongodbMongolog()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MongoDBServiceResultValidationError{ + field: "QanMongodbMongolog", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MongoDBServiceResultValidationError{ + field: "QanMongodbMongolog", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetQanMongodbMongolog()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MongoDBServiceResultValidationError{ + field: "QanMongodbMongolog", + reason: "embedded message failed validation", + cause: err, + } + } + } + if len(errors) > 0 { return MongoDBServiceResultMultiError(errors) } diff --git a/api/management/v1/mongodb.proto b/api/management/v1/mongodb.proto index ae8967368dd..ea626bda872 100644 --- a/api/management/v1/mongodb.proto +++ b/api/management/v1/mongodb.proto @@ -49,6 +49,8 @@ message AddMongoDBServiceParams { string password = 14; // If true, adds qan-mongodb-profiler-agent for provided service. bool qan_mongodb_profiler = 15; + // If true, adds qan-mongodb-mongolog-agent for provided service. + bool qan_mongodb_mongolog = 35; // Custom user-assigned labels for Service. map custom_labels = 16; // Skip connection check. @@ -96,4 +98,5 @@ message MongoDBServiceResult { inventory.v1.MongoDBService service = 1; inventory.v1.MongoDBExporter mongodb_exporter = 2; inventory.v1.QANMongoDBProfilerAgent qan_mongodb_profiler = 3; + inventory.v1.QANMongoDBMongologAgent qan_mongodb_mongolog = 4; } diff --git a/api/swagger/swagger-dev.json b/api/swagger/swagger-dev.json index 393f92d63e8..34ed6cffc91 100644 --- a/api/swagger/swagger-dev.json +++ b/api/swagger/swagger-dev.json @@ -5182,6 +5182,7 @@ "AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT", "AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT", "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT", + "AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT", "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT", "AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT", "AGENT_TYPE_EXTERNAL_EXPORTER", @@ -6346,6 +6347,101 @@ }, "x-order": 9 }, + "qan_mongodb_mongolog_agent": { + "type": "array", + "items": { + "description": "QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MongoDB username for getting profiler data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_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 finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 11 + } + } + }, + "x-order": 10 + }, "qan_postgresql_pgstatements_agent": { "type": "array", "items": { @@ -6444,7 +6540,7 @@ } } }, - "x-order": 10 + "x-order": 11 }, "qan_postgresql_pgstatmonitor_agent": { "type": "array", @@ -6549,7 +6645,7 @@ } } }, - "x-order": 11 + "x-order": 12 }, "external_exporter": { "type": "array", @@ -6645,7 +6741,7 @@ } } }, - "x-order": 12 + "x-order": 13 }, "rds_exporter": { "type": "array", @@ -6773,7 +6869,7 @@ } } }, - "x-order": 13 + "x-order": 14 }, "azure_database_exporter": { "type": "array", @@ -6890,7 +6986,7 @@ } } }, - "x-order": 14 + "x-order": 15 }, "nomad_agent": { "type": "array", @@ -6941,7 +7037,7 @@ } } }, - "x-order": 15 + "x-order": 16 }, "valkey_exporter": { "type": "array", @@ -7076,7 +7172,7 @@ } } }, - "x-order": 16 + "x-order": 17 } } } @@ -8134,6 +8230,101 @@ }, "x-order": 11 }, + "qan_mongodb_mongolog_agent": { + "type": "object", + "properties": { + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "username": { + "description": "MongoDB username for getting profile data.", + "type": "string", + "x-order": 2 + }, + "password": { + "description": "MongoDB password for getting profile data.", + "type": "string", + "x-order": 3 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "tls_certificate_key": { + "description": "Client certificate and key.", + "type": "string", + "x-order": 6 + }, + "tls_certificate_key_file_password": { + "description": "Password for decrypting tls_certificate_key.", + "type": "string", + "x-order": 7 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 8 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 9 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 10 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 11 + }, + "authentication_mechanism": { + "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", + "type": "string", + "x-order": 12 + }, + "authentication_database": { + "description": "Authentication database.", + "type": "string", + "x-order": 13 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 14 + } + }, + "x-order": 12 + }, "qan_postgresql_pgstatements_agent": { "type": "object", "properties": { @@ -8222,7 +8413,7 @@ "x-order": 13 } }, - "x-order": 12 + "x-order": 13 }, "qan_postgresql_pgstatmonitor_agent": { "type": "object", @@ -8317,7 +8508,7 @@ "x-order": 14 } }, - "x-order": 13 + "x-order": 14 }, "valkey_exporter": { "type": "object", @@ -8419,7 +8610,7 @@ "x-order": 15 } }, - "x-order": 14 + "x-order": 15 } } } @@ -9833,6 +10024,98 @@ }, "x-order": 11 }, + "qan_mongodb_mongolog_agent": { + "description": "QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MongoDB username for getting profiler data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_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 finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 11 + } + }, + "x-order": 12 + }, "qan_postgresql_pgstatements_agent": { "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", @@ -9928,7 +10211,7 @@ "x-order": 12 } }, - "x-order": 12 + "x-order": 13 }, "qan_postgresql_pgstatmonitor_agent": { "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", @@ -10030,7 +10313,7 @@ "x-order": 13 } }, - "x-order": 13 + "x-order": 14 }, "valkey_exporter": { "description": "ValkeyExporter runs on Generic or Container Node and exposes Valkey Service metrics.", @@ -10162,7 +10445,7 @@ "x-order": 15 } }, - "x-order": 14 + "x-order": 15 } } } @@ -11338,6 +11621,98 @@ }, "x-order": 9 }, + "qan_mongodb_mongolog_agent": { + "description": "QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MongoDB username for getting profiler data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_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 finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 11 + } + }, + "x-order": 10 + }, "qan_postgresql_pgstatements_agent": { "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", @@ -11433,7 +11808,7 @@ "x-order": 12 } }, - "x-order": 10 + "x-order": 11 }, "qan_postgresql_pgstatmonitor_agent": { "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", @@ -11535,7 +11910,7 @@ "x-order": 13 } }, - "x-order": 11 + "x-order": 12 }, "external_exporter": { "description": "ExternalExporter runs on any Node type, including Remote Node.", @@ -11628,7 +12003,7 @@ "x-order": 12 } }, - "x-order": 12 + "x-order": 13 }, "rds_exporter": { "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", @@ -11753,7 +12128,7 @@ "x-order": 14 } }, - "x-order": 13 + "x-order": 14 }, "azure_database_exporter": { "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics.", @@ -11867,7 +12242,7 @@ "x-order": 12 } }, - "x-order": 14 + "x-order": 15 }, "nomad_agent": { "type": "object", @@ -11915,7 +12290,7 @@ "x-order": 5 } }, - "x-order": 15 + "x-order": 16 }, "valkey_exporter": { "description": "ValkeyExporter runs on Generic or Container Node and exposes Valkey Service metrics.", @@ -12047,7 +12422,7 @@ "x-order": 15 } }, - "x-order": 16 + "x-order": 17 } } } @@ -12434,9 +12809,64 @@ "x-order": 3 } }, - "x-order": 5 + "x-order": 5 + }, + "rds_exporter": { + "type": "object", + "properties": { + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", + "type": "boolean", + "x-nullable": true, + "x-order": 0 + }, + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, + "x-order": 1 + }, + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", + "type": "boolean", + "x-nullable": true, + "x-order": 2 + }, + "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": 3 + } + }, + "x-order": 6 }, - "rds_exporter": { + "azure_database_exporter": { "type": "object", "properties": { "enable": { @@ -12489,9 +12919,9 @@ "x-order": 3 } }, - "x-order": 6 + "x-order": 7 }, - "azure_database_exporter": { + "qan_mysql_perfschema_agent": { "type": "object", "properties": { "enable": { @@ -12544,9 +12974,9 @@ "x-order": 3 } }, - "x-order": 7 + "x-order": 8 }, - "qan_mysql_perfschema_agent": { + "qan_mysql_slowlog_agent": { "type": "object", "properties": { "enable": { @@ -12599,9 +13029,9 @@ "x-order": 3 } }, - "x-order": 8 + "x-order": 9 }, - "qan_mysql_slowlog_agent": { + "qan_mongodb_profiler_agent": { "type": "object", "properties": { "enable": { @@ -12654,9 +13084,9 @@ "x-order": 3 } }, - "x-order": 9 + "x-order": 10 }, - "qan_mongodb_profiler_agent": { + "qan_mongodb_mongolog_agent": { "type": "object", "properties": { "enable": { @@ -12709,7 +13139,7 @@ "x-order": 3 } }, - "x-order": 10 + "x-order": 11 }, "qan_postgresql_pgstatements_agent": { "type": "object", @@ -12764,7 +13194,7 @@ "x-order": 3 } }, - "x-order": 11 + "x-order": 12 }, "qan_postgresql_pgstatmonitor_agent": { "type": "object", @@ -12819,7 +13249,7 @@ "x-order": 3 } }, - "x-order": 12 + "x-order": 13 }, "nomad_agent": { "type": "object", @@ -12831,7 +13261,7 @@ "x-order": 0 } }, - "x-order": 13 + "x-order": 14 }, "valkey_exporter": { "type": "object", @@ -12886,7 +13316,7 @@ "x-order": 3 } }, - "x-order": 14 + "x-order": 15 } } } @@ -14265,6 +14695,98 @@ }, "x-order": 10 }, + "qan_mongodb_mongolog_agent": { + "description": "QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MongoDB username for getting profiler data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_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 finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 11 + } + }, + "x-order": 11 + }, "qan_postgresql_pgstatements_agent": { "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", @@ -14360,7 +14882,7 @@ "x-order": 12 } }, - "x-order": 11 + "x-order": 12 }, "qan_postgresql_pgstatmonitor_agent": { "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", @@ -14462,7 +14984,7 @@ "x-order": 13 } }, - "x-order": 12 + "x-order": 13 }, "nomad_agent": { "type": "object", @@ -14510,7 +15032,7 @@ "x-order": 5 } }, - "x-order": 13 + "x-order": 14 }, "valkey_exporter": { "description": "ValkeyExporter runs on Generic or Container Node and exposes Valkey Service metrics.", @@ -14642,7 +15164,7 @@ "x-order": 15 } }, - "x-order": 14 + "x-order": 15 } } } @@ -20945,49 +21467,54 @@ "type": "boolean", "x-order": 13 }, + "qan_mongodb_mongolog": { + "description": "If true, adds qan-mongodb-mongolog-agent for provided service.", + "type": "boolean", + "x-order": 14 + }, "custom_labels": { "description": "Custom user-assigned labels for Service.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 14 + "x-order": 15 }, "skip_connection_check": { "description": "Skip connection check.", "type": "boolean", - "x-order": 15 + "x-order": 16 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 16 + "x-order": 17 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 17 + "x-order": 18 }, "tls_certificate_key": { "description": "Client certificate and key.", "type": "string", - "x-order": 18 + "x-order": 19 }, "tls_certificate_key_file_password": { "description": "Password for decrypting tls_certificate_key.", "type": "string", - "x-order": 19 + "x-order": 20 }, "tls_ca": { "description": "Certificate Authority certificate chain.", "type": "string", - "x-order": 20 + "x-order": 21 }, "max_query_length": { "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 21 + "x-order": 22 }, "metrics_mode": { "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", @@ -20998,7 +21525,7 @@ "METRICS_MODE_PULL", "METRICS_MODE_PUSH" ], - "x-order": 22 + "x-order": 23 }, "disable_collectors": { "description": "List of collector names to disable in this exporter.", @@ -21006,22 +21533,22 @@ "items": { "type": "string" }, - "x-order": 23 + "x-order": 24 }, "authentication_mechanism": { "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", "type": "string", - "x-order": 24 + "x-order": 25 }, "authentication_database": { "description": "Authentication database.", "type": "string", - "x-order": 25 + "x-order": 26 }, "agent_password": { "description": "Custom password for exporter endpoint /metrics.", "type": "string", - "x-order": 26 + "x-order": 27 }, "stats_collections": { "description": "List of collections to get stats from. Can use * .", @@ -21029,18 +21556,18 @@ "items": { "type": "string" }, - "x-order": 27 + "x-order": 28 }, "collections_limit": { "type": "integer", "format": "int32", "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", - "x-order": 28 + "x-order": 29 }, "enable_all_collectors": { "type": "boolean", "title": "Enable all collectors", - "x-order": 29 + "x-order": 30 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -21055,12 +21582,12 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 30 + "x-order": 31 }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 31 + "x-order": 32 } }, "x-order": 1 @@ -22867,6 +23394,98 @@ } }, "x-order": 2 + }, + "qan_mongodb_mongolog": { + "description": "QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MongoDB username for getting profiler data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_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 finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 11 + } + }, + "x-order": 3 } }, "x-order": 1 diff --git a/api/swagger/swagger.json b/api/swagger/swagger.json index dea1a4bb6df..c95431a0ed8 100644 --- a/api/swagger/swagger.json +++ b/api/swagger/swagger.json @@ -4224,6 +4224,7 @@ "AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT", "AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT", "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT", + "AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT", "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT", "AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT", "AGENT_TYPE_EXTERNAL_EXPORTER", @@ -5388,6 +5389,101 @@ }, "x-order": 9 }, + "qan_mongodb_mongolog_agent": { + "type": "array", + "items": { + "description": "QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MongoDB username for getting profiler data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_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 finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 11 + } + } + }, + "x-order": 10 + }, "qan_postgresql_pgstatements_agent": { "type": "array", "items": { @@ -5486,7 +5582,7 @@ } } }, - "x-order": 10 + "x-order": 11 }, "qan_postgresql_pgstatmonitor_agent": { "type": "array", @@ -5591,7 +5687,7 @@ } } }, - "x-order": 11 + "x-order": 12 }, "external_exporter": { "type": "array", @@ -5687,7 +5783,7 @@ } } }, - "x-order": 12 + "x-order": 13 }, "rds_exporter": { "type": "array", @@ -5815,7 +5911,7 @@ } } }, - "x-order": 13 + "x-order": 14 }, "azure_database_exporter": { "type": "array", @@ -5932,7 +6028,7 @@ } } }, - "x-order": 14 + "x-order": 15 }, "nomad_agent": { "type": "array", @@ -5983,7 +6079,7 @@ } } }, - "x-order": 15 + "x-order": 16 }, "valkey_exporter": { "type": "array", @@ -6118,7 +6214,7 @@ } } }, - "x-order": 16 + "x-order": 17 } } } @@ -7176,6 +7272,101 @@ }, "x-order": 11 }, + "qan_mongodb_mongolog_agent": { + "type": "object", + "properties": { + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 0 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 1 + }, + "username": { + "description": "MongoDB username for getting profile data.", + "type": "string", + "x-order": 2 + }, + "password": { + "description": "MongoDB password for getting profile data.", + "type": "string", + "x-order": 3 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 4 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 5 + }, + "tls_certificate_key": { + "description": "Client certificate and key.", + "type": "string", + "x-order": 6 + }, + "tls_certificate_key_file_password": { + "description": "Password for decrypting tls_certificate_key.", + "type": "string", + "x-order": 7 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 8 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 9 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 10 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 11 + }, + "authentication_mechanism": { + "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", + "type": "string", + "x-order": 12 + }, + "authentication_database": { + "description": "Authentication database.", + "type": "string", + "x-order": 13 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 14 + } + }, + "x-order": 12 + }, "qan_postgresql_pgstatements_agent": { "type": "object", "properties": { @@ -7264,7 +7455,7 @@ "x-order": 13 } }, - "x-order": 12 + "x-order": 13 }, "qan_postgresql_pgstatmonitor_agent": { "type": "object", @@ -7359,7 +7550,7 @@ "x-order": 14 } }, - "x-order": 13 + "x-order": 14 }, "valkey_exporter": { "type": "object", @@ -7461,7 +7652,7 @@ "x-order": 15 } }, - "x-order": 14 + "x-order": 15 } } } @@ -8875,6 +9066,98 @@ }, "x-order": 11 }, + "qan_mongodb_mongolog_agent": { + "description": "QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MongoDB username for getting profiler data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_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 finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 11 + } + }, + "x-order": 12 + }, "qan_postgresql_pgstatements_agent": { "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", @@ -8970,7 +9253,7 @@ "x-order": 12 } }, - "x-order": 12 + "x-order": 13 }, "qan_postgresql_pgstatmonitor_agent": { "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", @@ -9072,7 +9355,7 @@ "x-order": 13 } }, - "x-order": 13 + "x-order": 14 }, "valkey_exporter": { "description": "ValkeyExporter runs on Generic or Container Node and exposes Valkey Service metrics.", @@ -9204,7 +9487,7 @@ "x-order": 15 } }, - "x-order": 14 + "x-order": 15 } } } @@ -10380,6 +10663,98 @@ }, "x-order": 9 }, + "qan_mongodb_mongolog_agent": { + "description": "QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MongoDB username for getting profiler data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_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 finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 11 + } + }, + "x-order": 10 + }, "qan_postgresql_pgstatements_agent": { "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", @@ -10475,7 +10850,7 @@ "x-order": 12 } }, - "x-order": 10 + "x-order": 11 }, "qan_postgresql_pgstatmonitor_agent": { "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", @@ -10577,7 +10952,7 @@ "x-order": 13 } }, - "x-order": 11 + "x-order": 12 }, "external_exporter": { "description": "ExternalExporter runs on any Node type, including Remote Node.", @@ -10670,7 +11045,7 @@ "x-order": 12 } }, - "x-order": 12 + "x-order": 13 }, "rds_exporter": { "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", @@ -10795,7 +11170,7 @@ "x-order": 14 } }, - "x-order": 13 + "x-order": 14 }, "azure_database_exporter": { "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics.", @@ -10909,7 +11284,7 @@ "x-order": 12 } }, - "x-order": 14 + "x-order": 15 }, "nomad_agent": { "type": "object", @@ -10957,7 +11332,7 @@ "x-order": 5 } }, - "x-order": 15 + "x-order": 16 }, "valkey_exporter": { "description": "ValkeyExporter runs on Generic or Container Node and exposes Valkey Service metrics.", @@ -11089,7 +11464,7 @@ "x-order": 15 } }, - "x-order": 16 + "x-order": 17 } } } @@ -11476,9 +11851,64 @@ "x-order": 3 } }, - "x-order": 5 + "x-order": 5 + }, + "rds_exporter": { + "type": "object", + "properties": { + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", + "type": "boolean", + "x-nullable": true, + "x-order": 0 + }, + "custom_labels": { + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value.", + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 0 + } + }, + "x-nullable": true, + "x-order": 1 + }, + "enable_push_metrics": { + "description": "Enables push metrics with vmagent.", + "type": "boolean", + "x-nullable": true, + "x-order": 2 + }, + "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": 3 + } + }, + "x-order": 6 }, - "rds_exporter": { + "azure_database_exporter": { "type": "object", "properties": { "enable": { @@ -11531,9 +11961,9 @@ "x-order": 3 } }, - "x-order": 6 + "x-order": 7 }, - "azure_database_exporter": { + "qan_mysql_perfschema_agent": { "type": "object", "properties": { "enable": { @@ -11586,9 +12016,9 @@ "x-order": 3 } }, - "x-order": 7 + "x-order": 8 }, - "qan_mysql_perfschema_agent": { + "qan_mysql_slowlog_agent": { "type": "object", "properties": { "enable": { @@ -11641,9 +12071,9 @@ "x-order": 3 } }, - "x-order": 8 + "x-order": 9 }, - "qan_mysql_slowlog_agent": { + "qan_mongodb_profiler_agent": { "type": "object", "properties": { "enable": { @@ -11696,9 +12126,9 @@ "x-order": 3 } }, - "x-order": 9 + "x-order": 10 }, - "qan_mongodb_profiler_agent": { + "qan_mongodb_mongolog_agent": { "type": "object", "properties": { "enable": { @@ -11751,7 +12181,7 @@ "x-order": 3 } }, - "x-order": 10 + "x-order": 11 }, "qan_postgresql_pgstatements_agent": { "type": "object", @@ -11806,7 +12236,7 @@ "x-order": 3 } }, - "x-order": 11 + "x-order": 12 }, "qan_postgresql_pgstatmonitor_agent": { "type": "object", @@ -11861,7 +12291,7 @@ "x-order": 3 } }, - "x-order": 12 + "x-order": 13 }, "nomad_agent": { "type": "object", @@ -11873,7 +12303,7 @@ "x-order": 0 } }, - "x-order": 13 + "x-order": 14 }, "valkey_exporter": { "type": "object", @@ -11928,7 +12358,7 @@ "x-order": 3 } }, - "x-order": 14 + "x-order": 15 } } } @@ -13307,6 +13737,98 @@ }, "x-order": 10 }, + "qan_mongodb_mongolog_agent": { + "description": "QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MongoDB username for getting profiler data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_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 finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 11 + } + }, + "x-order": 11 + }, "qan_postgresql_pgstatements_agent": { "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", @@ -13402,7 +13924,7 @@ "x-order": 12 } }, - "x-order": 11 + "x-order": 12 }, "qan_postgresql_pgstatmonitor_agent": { "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", @@ -13504,7 +14026,7 @@ "x-order": 13 } }, - "x-order": 12 + "x-order": 13 }, "nomad_agent": { "type": "object", @@ -13552,7 +14074,7 @@ "x-order": 5 } }, - "x-order": 13 + "x-order": 14 }, "valkey_exporter": { "description": "ValkeyExporter runs on Generic or Container Node and exposes Valkey Service metrics.", @@ -13684,7 +14206,7 @@ "x-order": 15 } }, - "x-order": 14 + "x-order": 15 } } } @@ -19987,49 +20509,54 @@ "type": "boolean", "x-order": 13 }, + "qan_mongodb_mongolog": { + "description": "If true, adds qan-mongodb-mongolog-agent for provided service.", + "type": "boolean", + "x-order": 14 + }, "custom_labels": { "description": "Custom user-assigned labels for Service.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 14 + "x-order": 15 }, "skip_connection_check": { "description": "Skip connection check.", "type": "boolean", - "x-order": 15 + "x-order": 16 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 16 + "x-order": 17 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 17 + "x-order": 18 }, "tls_certificate_key": { "description": "Client certificate and key.", "type": "string", - "x-order": 18 + "x-order": 19 }, "tls_certificate_key_file_password": { "description": "Password for decrypting tls_certificate_key.", "type": "string", - "x-order": 19 + "x-order": 20 }, "tls_ca": { "description": "Certificate Authority certificate chain.", "type": "string", - "x-order": 20 + "x-order": 21 }, "max_query_length": { "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 21 + "x-order": 22 }, "metrics_mode": { "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", @@ -20040,7 +20567,7 @@ "METRICS_MODE_PULL", "METRICS_MODE_PUSH" ], - "x-order": 22 + "x-order": 23 }, "disable_collectors": { "description": "List of collector names to disable in this exporter.", @@ -20048,22 +20575,22 @@ "items": { "type": "string" }, - "x-order": 23 + "x-order": 24 }, "authentication_mechanism": { "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", "type": "string", - "x-order": 24 + "x-order": 25 }, "authentication_database": { "description": "Authentication database.", "type": "string", - "x-order": 25 + "x-order": 26 }, "agent_password": { "description": "Custom password for exporter endpoint /metrics.", "type": "string", - "x-order": 26 + "x-order": 27 }, "stats_collections": { "description": "List of collections to get stats from. Can use * .", @@ -20071,18 +20598,18 @@ "items": { "type": "string" }, - "x-order": 27 + "x-order": 28 }, "collections_limit": { "type": "integer", "format": "int32", "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", - "x-order": 28 + "x-order": 29 }, "enable_all_collectors": { "type": "boolean", "title": "Enable all collectors", - "x-order": 29 + "x-order": 30 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -20097,12 +20624,12 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 30 + "x-order": 31 }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 31 + "x-order": 32 } }, "x-order": 1 @@ -21909,6 +22436,98 @@ } }, "x-order": 2 + }, + "qan_mongodb_mongolog": { + "description": "QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MongoDB username for getting profiler data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_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 finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 11 + } + }, + "x-order": 3 } }, "x-order": 1 diff --git a/go.mod b/go.mod index 2f45b472253..e5bb7707bd7 100644 --- a/go.mod +++ b/go.mod @@ -53,7 +53,7 @@ require ( github.com/minio/minio-go/v7 v7.0.55 github.com/percona/exporter_shared v0.7.5 github.com/percona/go-mysql v0.0.0-20250429063950-bc274ddba990 - github.com/percona/percona-toolkit v0.0.0-20250514130928-84095fd7d7d9 + github.com/percona/percona-toolkit v0.0.0-20250623101308-06d5966106f5 github.com/percona/promconfig v0.2.5 github.com/percona/saas v0.0.0-20240923141535-da19f6682c6e github.com/pganalyze/pg_query_go/v6 v6.1.0 @@ -69,7 +69,7 @@ require ( github.com/stretchr/objx v0.5.2 github.com/stretchr/testify v1.10.0 github.com/tink-crypto/tink-go v0.0.0-20230613075026-d6de17e3f164 - go.mongodb.org/mongo-driver v1.17.3 + go.mongodb.org/mongo-driver v1.17.4 go.starlark.net v0.0.0-20230717150657-8a3343210976 golang.org/x/crypto v0.39.0 golang.org/x/sync v0.15.0 @@ -80,6 +80,7 @@ require ( google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 google.golang.org/grpc v1.73.0 google.golang.org/protobuf v1.36.6 + gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 gopkg.in/reform.v1 v1.5.1 gopkg.in/yaml.v3 v3.0.1 ) @@ -126,7 +127,6 @@ require ( go.opentelemetry.io/otel/sdk v1.36.0 // indirect go.uber.org/atomic v1.11.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect ) require ( diff --git a/go.sum b/go.sum index c898bf43620..4f298b67cee 100644 --- a/go.sum +++ b/go.sum @@ -453,8 +453,8 @@ github.com/percona/exporter_shared v0.7.5 h1:sIhdDtKOfH0jsqtTAi41C7wm1R42yXYeAkK github.com/percona/exporter_shared v0.7.5/go.mod h1:P8ZHDzveyJRGD4ZIRNiEMuAdDexBpQWf2mAVwtyVcYU= github.com/percona/go-mysql v0.0.0-20250429063950-bc274ddba990 h1:Q2hn1Ctc8wPS9BFPanZRZ67zFm1gT4Zu5Fxbqm4jqlE= github.com/percona/go-mysql v0.0.0-20250429063950-bc274ddba990/go.mod h1:Ld01LWPTK0Ggx5Amb9Za0oJHHjEtLgHyogYiMr8NlTo= -github.com/percona/percona-toolkit v0.0.0-20250514130928-84095fd7d7d9 h1:b2MFerfmTI7uEE4Yg3pLpK6+Hsp0CADj0WJOEAa3Kw4= -github.com/percona/percona-toolkit v0.0.0-20250514130928-84095fd7d7d9/go.mod h1:AB1PerrSb6hZofPZkOidEScihirEAKq+XMGTRyybyxc= +github.com/percona/percona-toolkit v0.0.0-20250623101308-06d5966106f5 h1:u+IKhOU3HM35mNt+5Y6b7KBacRPi0nSJJ3iXh8ozdaA= +github.com/percona/percona-toolkit v0.0.0-20250623101308-06d5966106f5/go.mod h1:VqRg3o7QU8wpAfRHlgZCT8epVtFc5Naa8x63BoQgtQk= github.com/percona/promconfig v0.2.5 h1:f/HN/CbECQs7d9RIB6MKVkuXstsrsqEDxRvf6yigquc= github.com/percona/promconfig v0.2.5/go.mod h1:Y2uXi5QNk71+ceJHuI9poank+0S1kjxd3K105fXKVkg= github.com/percona/saas v0.0.0-20240923141535-da19f6682c6e h1:xhk5ivxlTPat0SwLBqU1UdfqJb+2R3x4yAhjCf6WMEU= @@ -574,8 +574,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= -go.mongodb.org/mongo-driver v1.17.3 h1:TQyXhnsWfWtgAhMtOgtYHMTkZIfBTpMTsMnd9ZBeHxQ= -go.mongodb.org/mongo-driver v1.17.3/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= +go.mongodb.org/mongo-driver v1.17.4 h1:jUorfmVzljjr0FLzYQsGP8cgN/qzzxlY9Vh0C9KFXVw= +go.mongodb.org/mongo-driver v1.17.4/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= @@ -808,8 +808,8 @@ gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo= gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/apimachinery v0.32.3 h1:JmDuDarhDmA/Li7j3aPrwhpNBA94Nvk5zLeOge9HH1U= -k8s.io/apimachinery v0.32.3/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= +k8s.io/apimachinery v0.33.1 h1:mzqXWV8tW9Rw4VeW9rEkqvnxj59k1ezDUl20tFK/oM4= +k8s.io/apimachinery v0.33.1/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= k8s.io/client-go v0.32.3 h1:RKPVltzopkSgHS7aS98QdscAgtgah/+zmpAogooIqVU= k8s.io/client-go v0.32.3/go.mod h1:3v0+3k4IcT9bXTc4V2rt+d2ZPPG700Xy6Oi0Gdl2PaY= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= diff --git a/managed/models/agent_helpers.go b/managed/models/agent_helpers.go index 27793d3b2f1..dca6825fdaa 100644 --- a/managed/models/agent_helpers.go +++ b/managed/models/agent_helpers.go @@ -784,6 +784,9 @@ func compatibleServiceAndAgent(serviceType ServiceType, agentType AgentType) boo QANMongoDBProfilerAgentType: { MongoDBServiceType, }, + QANMongoDBMongologAgentType: { + MongoDBServiceType, + }, PostgresExporterType: { PostgreSQLServiceType, }, diff --git a/managed/models/agent_model.go b/managed/models/agent_model.go index 9859b2a23e0..1e609c6d767 100644 --- a/managed/models/agent_model.go +++ b/managed/models/agent_model.go @@ -68,6 +68,7 @@ const ( QANMySQLPerfSchemaAgentType AgentType = "qan-mysql-perfschema-agent" QANMySQLSlowlogAgentType AgentType = "qan-mysql-slowlog-agent" QANMongoDBProfilerAgentType AgentType = "qan-mongodb-profiler-agent" + QANMongoDBMongologAgentType AgentType = "qan-mongodb-mongolog-agent" QANPostgreSQLPgStatementsAgentType AgentType = "qan-postgresql-pgstatements-agent" QANPostgreSQLPgStatMonitorAgentType AgentType = "qan-postgresql-pgstatmonitor-agent" ExternalExporterType AgentType = "external-exporter" @@ -541,7 +542,7 @@ func (s *Agent) DSN(service *Service, dsnParams DSNParams, tdp *DelimiterPair, p return cfg.FormatDSN() - case QANMongoDBProfilerAgentType, MongoDBExporterType: + case QANMongoDBProfilerAgentType, QANMongoDBMongologAgentType, MongoDBExporterType: q := make(url.Values) if dsnParams.DialTimeout != 0 { q.Set("connectTimeoutMS", strconv.Itoa(int(dsnParams.DialTimeout/time.Millisecond))) @@ -754,7 +755,7 @@ func (s Agent) Files() map[string]string { return nil case ProxySQLExporterType: return nil - case QANMongoDBProfilerAgentType, MongoDBExporterType: + case QANMongoDBProfilerAgentType, QANMongoDBMongologAgentType, MongoDBExporterType: files := make(map[string]string) if s.MongoDBOptions.TLSCa != "" { files[caFilePlaceholder] = s.MongoDBOptions.TLSCa diff --git a/managed/models/dsn_helpers.go b/managed/models/dsn_helpers.go index 5f3b8c1d424..4bebe45f9c5 100644 --- a/managed/models/dsn_helpers.go +++ b/managed/models/dsn_helpers.go @@ -70,6 +70,7 @@ func FindDSNByServiceIDandPMMAgentID(q *reform.Querier, serviceID, pmmAgentID, d agentTypes = append( agentTypes, QANMongoDBProfilerAgentType, + QANMongoDBMongologAgentType, MongoDBExporterType) default: return "", nil, status.Errorf(codes.FailedPrecondition, "Couldn't resolve dsn, as service is unsupported") diff --git a/managed/services/agents/mongodb.go b/managed/services/agents/mongodb.go index a0b3e3b3671..b05c9e99235 100644 --- a/managed/services/agents/mongodb.go +++ b/managed/services/agents/mongodb.go @@ -172,3 +172,20 @@ func qanMongoDBProfilerAgentConfig(service *models.Service, agent *models.Agent, }, } } + +// qanMongoDBMongologAgentConfig returns desired configuration of qan-mongodb-mongolog-agent built-in agent. +func qanMongoDBMongologAgentConfig(service *models.Service, agent *models.Agent, pmmAgentVersion *version.Parsed) *agentv1.SetStateRequest_BuiltinAgent { + tdp := agent.TemplateDelimiters(service) + + return &agentv1.SetStateRequest_BuiltinAgent{ + Type: inventoryv1.AgentType_AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT, + Dsn: agent.DSN(service, models.DSNParams{DialTimeout: time.Second, Database: ""}, nil, pmmAgentVersion), + DisableQueryExamples: agent.QANOptions.QueryExamplesDisabled, + MaxQueryLength: agent.QANOptions.MaxQueryLength, + TextFiles: &agentv1.TextFiles{ + Files: agent.Files(), + TemplateLeftDelim: tdp.Left, + TemplateRightDelim: tdp.Right, + }, + } +} diff --git a/managed/services/agents/state.go b/managed/services/agents/state.go index 3c9e76c311f..31a16797a7a 100644 --- a/managed/services/agents/state.go +++ b/managed/services/agents/state.go @@ -240,7 +240,8 @@ func (u *StateUpdater) sendSetStateRequest(ctx context.Context, agent *pmmAgentI // Agents with exactly one Service case models.MySQLdExporterType, models.MongoDBExporterType, models.PostgresExporterType, models.ProxySQLExporterType, - models.QANMySQLPerfSchemaAgentType, models.QANMySQLSlowlogAgentType, models.QANMongoDBProfilerAgentType, models.QANPostgreSQLPgStatementsAgentType, + models.QANMySQLPerfSchemaAgentType, models.QANMySQLSlowlogAgentType, models.QANMongoDBProfilerAgentType, + models.QANMongoDBMongologAgentType, models.QANPostgreSQLPgStatementsAgentType, models.QANPostgreSQLPgStatMonitorAgentType: service, err := models.FindServiceByID(u.db.Querier, pointer.GetString(row.ServiceID)) @@ -275,6 +276,8 @@ func (u *StateUpdater) sendSetStateRequest(ctx context.Context, agent *pmmAgentI builtinAgents[row.AgentID] = qanMySQLSlowlogAgentConfig(service, row, pmmAgentVersion) case models.QANMongoDBProfilerAgentType: builtinAgents[row.AgentID] = qanMongoDBProfilerAgentConfig(service, row, pmmAgentVersion) + case models.QANMongoDBMongologAgentType: + builtinAgents[row.AgentID] = qanMongoDBMongologAgentConfig(service, row, pmmAgentVersion) case models.QANPostgreSQLPgStatementsAgentType: builtinAgents[row.AgentID] = qanPostgreSQLPgStatementsAgentConfig(service, row, pmmAgentVersion) case models.QANPostgreSQLPgStatMonitorAgentType: diff --git a/managed/services/converters.go b/managed/services/converters.go index f74247f2634..c537f8129b5 100644 --- a/managed/services/converters.go +++ b/managed/services/converters.go @@ -386,6 +386,23 @@ func ToAPIAgent(q *reform.Querier, agent *models.Agent) (inventoryv1.Agent, erro // TODO QueryExamplesDisabled https://jira.percona.com/browse/PMM-4650 }, nil + case models.QANMongoDBMongologAgentType: + return &inventoryv1.QANMongoDBMongologAgent{ + 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, + MaxQueryLength: agent.QANOptions.MaxQueryLength, + ProcessExecPath: processExecPath, + LogLevel: inventoryv1.LogLevelAPIValue(agent.LogLevel), + // TODO QueryExamplesDisabled https://jira.percona.com/browse/PMM-4650 + }, nil + case models.ProxySQLExporterType: return &inventoryv1.ProxySQLExporter{ AgentId: agent.AgentID, diff --git a/managed/services/inventory/agents.go b/managed/services/inventory/agents.go index a7b624148a6..e46c34a41f2 100644 --- a/managed/services/inventory/agents.go +++ b/managed/services/inventory/agents.go @@ -774,6 +774,88 @@ func (as *AgentsService) ChangeQANMongoDBProfilerAgent(ctx context.Context, agen return res, nil } +// AddQANMongoDBMongologAgent adds MongoDB Mongolog QAN Agent. +func (as *AgentsService) AddQANMongoDBMongologAgent(ctx context.Context, p *inventoryv1.AddQANMongoDBMongologAgentParams) (*inventoryv1.AddAgentResponse, error) { + var agent *inventoryv1.QANMongoDBMongologAgent + + 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, + QANOptions: models.QANOptions{ + MaxQueryLength: p.MaxQueryLength, + // TODO QueryExamplesDisabled https://jira.percona.com/browse/PMM-4650 - done, but not included in params. + }, + MongoDBOptions: models.MongoDBOptionsFromRequest(p), + LogLevel: services.SpecifyLogLevel(p.LogLevel, inventoryv1.LogLevel_LOG_LEVEL_FATAL), + } + row, err := models.CreateAgent(tx.Querier, models.QANMongoDBMongologAgentType, params) + if err != nil { + return err + } + if !p.SkipConnectionCheck { + service, err := models.FindServiceByID(tx.Querier, p.ServiceId) + if err != nil { + return err + } + + if err = as.cc.CheckConnectionToService(ctx, tx.Querier, service, row); err != nil { + return err + } + } + + aa, err := services.ToAPIAgent(tx.Querier, row) + if err != nil { + return err + } + agent = aa.(*inventoryv1.QANMongoDBMongologAgent) //nolint:forcetypeassert + return nil + }) + if e != nil { + return nil, e + } + + as.state.RequestStateUpdate(ctx, p.PmmAgentId) + res := &inventoryv1.AddAgentResponse{ + Agent: &inventoryv1.AddAgentResponse_QanMongodbMongologAgent{ + QanMongodbMongologAgent: agent, + }, + } + + return res, e +} + +// ChangeQANMongoDBMongologAgent updates MongoDB Mongolog QAN Agent with given parameters. +// +//nolint:lll,dupl +func (as *AgentsService) ChangeQANMongoDBMongologAgent(ctx context.Context, agentID string, p *inventoryv1.ChangeQANMongoDBMongologAgentParams) (*inventoryv1.ChangeAgentResponse, error) { + common := &commonAgentParams{ + Enable: p.Enable, + EnablePushMetrics: p.EnablePushMetrics, + CustomLabels: p.CustomLabels, + MetricsResolutions: p.MetricsResolutions, + } + ag, err := as.changeAgent(ctx, agentID, common) + if err != nil { + return nil, err + } + + agent := ag.(*inventoryv1.QANMongoDBMongologAgent) //nolint:forcetypeassert + as.state.RequestStateUpdate(ctx, agent.PmmAgentId) + + res := &inventoryv1.ChangeAgentResponse{ + Agent: &inventoryv1.ChangeAgentResponse_QanMongodbMongologAgent{ + QanMongodbMongologAgent: agent, + }, + } + return res, nil +} + // AddProxySQLExporter inserts proxysql_exporter Agent with given parameters. func (as *AgentsService) AddProxySQLExporter(ctx context.Context, p *inventoryv1.AddProxySQLExporterParams) (*inventoryv1.AddAgentResponse, error) { var agent *inventoryv1.ProxySQLExporter diff --git a/managed/services/inventory/grpc/agents_server.go b/managed/services/inventory/grpc/agents_server.go index fe1d6dfdda1..58bb2bd1b43 100644 --- a/managed/services/inventory/grpc/agents_server.go +++ b/managed/services/inventory/grpc/agents_server.go @@ -99,6 +99,8 @@ func (s *agentsServer) ListAgents(ctx context.Context, req *inventoryv1.ListAgen res.ValkeyExporter = append(res.ValkeyExporter, agent) case *inventoryv1.QANMongoDBProfilerAgent: res.QanMongodbProfilerAgent = append(res.QanMongodbProfilerAgent, agent) + case *inventoryv1.QANMongoDBMongologAgent: + res.QanMongodbMongologAgent = append(res.QanMongodbMongologAgent, agent) case *inventoryv1.ProxySQLExporter: res.ProxysqlExporter = append(res.ProxysqlExporter, agent) case *inventoryv1.QANPostgreSQLPgStatementsAgent: @@ -149,6 +151,8 @@ func (s *agentsServer) GetAgent(ctx context.Context, req *inventoryv1.GetAgentRe res.Agent = &inventoryv1.GetAgentResponse_ValkeyExporter{ValkeyExporter: agent} case *inventoryv1.QANMongoDBProfilerAgent: res.Agent = &inventoryv1.GetAgentResponse_QanMongodbProfilerAgent{QanMongodbProfilerAgent: agent} + case *inventoryv1.QANMongoDBMongologAgent: + res.Agent = &inventoryv1.GetAgentResponse_QanMongodbMongologAgent{QanMongodbMongologAgent: agent} case *inventoryv1.ProxySQLExporter: res.Agent = &inventoryv1.GetAgentResponse_ProxysqlExporter{ProxysqlExporter: agent} case *inventoryv1.QANPostgreSQLPgStatementsAgent: @@ -213,6 +217,8 @@ func (s *agentsServer) AddAgent(ctx context.Context, req *inventoryv1.AddAgentRe return s.s.AddQANMySQLSlowlogAgent(ctx, req.GetQanMysqlSlowlogAgent()) case *inventoryv1.AddAgentRequest_QanMongodbProfilerAgent: return s.s.AddQANMongoDBProfilerAgent(ctx, req.GetQanMongodbProfilerAgent()) + case *inventoryv1.AddAgentRequest_QanMongodbMongologAgent: + return s.s.AddQANMongoDBMongologAgent(ctx, req.GetQanMongodbMongologAgent()) case *inventoryv1.AddAgentRequest_QanPostgresqlPgstatementsAgent: return s.s.AddQANPostgreSQLPgStatementsAgent(ctx, req.GetQanPostgresqlPgstatementsAgent()) case *inventoryv1.AddAgentRequest_QanPostgresqlPgstatmonitorAgent: @@ -251,6 +257,8 @@ func (s *agentsServer) ChangeAgent(ctx context.Context, req *inventoryv1.ChangeA return s.s.ChangeQANMySQLSlowlogAgent(ctx, agentID, req.GetQanMysqlSlowlogAgent()) case *inventoryv1.ChangeAgentRequest_QanMongodbProfilerAgent: return s.s.ChangeQANMongoDBProfilerAgent(ctx, agentID, req.GetQanMongodbProfilerAgent()) + case *inventoryv1.ChangeAgentRequest_QanMongodbMongologAgent: + return s.s.ChangeQANMongoDBMongologAgent(ctx, agentID, req.GetQanMongodbMongologAgent()) case *inventoryv1.ChangeAgentRequest_QanPostgresqlPgstatementsAgent: return s.s.ChangeQANPostgreSQLPgStatementsAgent(ctx, agentID, req.GetQanPostgresqlPgstatementsAgent()) case *inventoryv1.ChangeAgentRequest_QanPostgresqlPgstatmonitorAgent: diff --git a/managed/services/management/mongodb.go b/managed/services/management/mongodb.go index 47eef44c66a..04064ebb40b 100644 --- a/managed/services/management/mongodb.go +++ b/managed/services/management/mongodb.go @@ -124,6 +124,32 @@ func (s *ManagementService) addMongoDB(ctx context.Context, req *managementv1.Ad mongodb.QanMongodbProfiler = agent.(*inventoryv1.QANMongoDBProfilerAgent) //nolint:forcetypeassert } + if req.QanMongodbMongolog { + row, err = models.CreateAgent(tx.Querier, models.QANMongoDBMongologAgentType, &models.CreateAgentParams{ + PMMAgentID: req.PmmAgentId, + ServiceID: service.ServiceID, + Username: req.Username, + Password: req.Password, + TLS: req.Tls, + TLSSkipVerify: req.TlsSkipVerify, + QANOptions: models.QANOptions{ + MaxQueryLength: req.MaxQueryLength, + // TODO QueryExamplesDisabled https://jira.percona.com/browse/PMM-7860 + }, + MongoDBOptions: models.MongoDBOptionsFromRequest(req), + LogLevel: services.SpecifyLogLevel(req.LogLevel, inventoryv1.LogLevel_LOG_LEVEL_FATAL), + }) + if err != nil { + return err + } + + agent, err := services.ToAPIAgent(tx.Querier, row) + if err != nil { + return err + } + mongodb.QanMongodbMongolog = agent.(*inventoryv1.QANMongoDBMongologAgent) //nolint:forcetypeassert + } + return nil }); e != nil { return nil, e diff --git a/managed/services/victoriametrics/prometheus.go b/managed/services/victoriametrics/prometheus.go index 61e501f5c69..fea94ae8fad 100644 --- a/managed/services/victoriametrics/prometheus.go +++ b/managed/services/victoriametrics/prometheus.go @@ -171,7 +171,7 @@ func AddScrapeConfigs(l *logrus.Entry, cfg *config.Config, q *reform.Querier, // case models.QANMySQLPerfSchemaAgentType, models.QANMySQLSlowlogAgentType: continue - case models.QANMongoDBProfilerAgentType: + case models.QANMongoDBProfilerAgentType, models.QANMongoDBMongologAgentType: continue case models.QANPostgreSQLPgStatementsAgentType, models.QANPostgreSQLPgStatMonitorAgentType: continue diff --git a/qan-api2/migrations/sql/21_mongolog.down.sql b/qan-api2/migrations/sql/21_mongolog.down.sql new file mode 100644 index 00000000000..b8ba2eb7398 --- /dev/null +++ b/qan-api2/migrations/sql/21_mongolog.down.sql @@ -0,0 +1,9 @@ +ALTER TABLE metrics + MODIFY COLUMN `agent_type` Enum8( + 'qan-agent-type-invalid'=0, + 'qan-mysql-perfschema-agent'=1, + 'qan-mysql-slowlog-agent'=2, + 'qan-mongodb-profiler-agent'=3, + 'qan-postgresql-pgstatements-agent'=4, + 'qan-postgresql-pgstatmonitor-agent'=5 + ) COMMENT 'Agent Type that collects metrics: slowlog, perf schema, etc.'; diff --git a/qan-api2/migrations/sql/21_mongolog.up.sql b/qan-api2/migrations/sql/21_mongolog.up.sql new file mode 100644 index 00000000000..07de988f3bb --- /dev/null +++ b/qan-api2/migrations/sql/21_mongolog.up.sql @@ -0,0 +1,10 @@ +ALTER TABLE metrics + MODIFY COLUMN `agent_type` Enum8( + 'qan-agent-type-invalid'=0, + 'qan-mysql-perfschema-agent'=1, + 'qan-mysql-slowlog-agent'=2, + 'qan-mongodb-profiler-agent'=3, + 'qan-postgresql-pgstatements-agent'=4, + 'qan-postgresql-pgstatmonitor-agent'=5, + 'qan-mongodb-mongolog-agent'=6 + ) COMMENT 'Agent Type that collects metrics: slowlog, perf schema, etc.'; diff --git a/qan-api2/models/base.go b/qan-api2/models/base.go index a09292d3708..bbce91249b6 100644 --- a/qan-api2/models/base.go +++ b/qan-api2/models/base.go @@ -455,6 +455,7 @@ func agentTypeToClickHouseEnum(agentType inventoryv1.AgentType) string { inventoryv1.AgentType_AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT: "qan-mysql-perfschema-agent", inventoryv1.AgentType_AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT: "qan-mysql-slowlog-agent", inventoryv1.AgentType_AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT: "qan-mongodb-profiler-agent", + inventoryv1.AgentType_AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT: "qan-mongodb-mongolog-agent", inventoryv1.AgentType_AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT: "qan-postgresql-pgstatements-agent", inventoryv1.AgentType_AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT: "qan-postgresql-pgstatmonitor-agent", }