diff --git a/admin/commands/base.go b/admin/commands/base.go index 127656906c2..b9cc197fba5 100644 --- a/admin/commands/base.go +++ b/admin/commands/base.go @@ -184,6 +184,31 @@ func ParseDisableCollectors(collectors []string) []string { return disableCollectors } +// ValidateEnvironmentVariableNames validates environment variable names. +func ValidateEnvironmentVariableNames(varNames []string) ([]string, error) { + if len(varNames) == 0 { + return nil, nil + } + + result := make([]string, 0, len(varNames)) + validNamePattern := regexp.MustCompile(`^[A-Z_][A-Z0-9_]*$`) + + for _, name := range varNames { + name = strings.TrimSpace(name) + if name == "" { + return nil, fmt.Errorf("environment variable name cannot be empty") + } + + if !validNamePattern.MatchString(name) { + return nil, fmt.Errorf("invalid environment variable name: %s (must match [A-Z_][A-Z0-9_]*)", name) + } + + result = append(result, name) + } + + return result, nil +} + // ReadFile reads file from filepath if filepath is not empty. func ReadFile(filePath string) (string, error) { if filePath == "" { diff --git a/admin/commands/management/add_mongodb.go b/admin/commands/management/add_mongodb.go index dbe9a78db00..1a31cac2774 100644 --- a/admin/commands/management/add_mongodb.go +++ b/admin/commands/management/add_mongodb.go @@ -82,6 +82,7 @@ type AddMongoDBCommand struct { StatsCollections []string `help:"Collections for collstats & indexstats"` CollectionsLimit int32 `name:"max-collections-limit" default:"-1" help:"Disable collstats, dbstats, topmetrics and indexstats if there are more than collections. 0: No limit. Default is -1, which let PMM automatically set this value"` ExposeExporter bool `name:"expose-exporter" help:"Optionally expose the address of the exporter publicly on 0.0.0.0"` + AgentEnvVars []string `name:"agent-env-vars" help:"Comma-separated list of environment variable names to pass to the exporter (values are read from the current environment), e.g. 'VAR1,VAR2'"` AddCommonFlags flags.MetricsModeFlags @@ -125,6 +126,10 @@ func (cmd *AddMongoDBCommand) GetCredentials() error { // RunCmd runs the command for AddMongoDBCommand. func (cmd *AddMongoDBCommand) RunCmd() (commands.Result, error) { customLabels := commands.ParseKeyValuePair(cmd.CustomLabels) + agentVarNames, err := commands.ValidateEnvironmentVariableNames(cmd.AgentEnvVars) + if err != nil { + return nil, err + } tlsCertificateKey, err := commands.ReadFile(cmd.TLSCertificateKeyFile) if err != nil { @@ -179,16 +184,17 @@ func (cmd *AddMongoDBCommand) RunCmd() (commands.Result, error) { QANMongodbProfiler: cmd.QuerySource == MongodbQuerySourceProfiler, QANMongodbMongolog: cmd.QuerySource == MongodbQuerySourceMongolog, - CustomLabels: customLabels, - SkipConnectionCheck: cmd.SkipConnectionCheck, - MaxQueryLength: cmd.MaxQueryLength, - TLS: cmd.TLS, - TLSSkipVerify: cmd.TLSSkipVerify, - TLSCertificateKey: tlsCertificateKey, - TLSCertificateKeyFilePassword: cmd.TLSCertificateKeyFilePassword, - TLSCa: tlsCa, - AuthenticationMechanism: cmd.AuthenticationMechanism, - AuthenticationDatabase: cmd.AuthenticationDatabase, + CustomLabels: customLabels, + SharedEnvironmentVariableNames: agentVarNames, + SkipConnectionCheck: cmd.SkipConnectionCheck, + MaxQueryLength: cmd.MaxQueryLength, + TLS: cmd.TLS, + TLSSkipVerify: cmd.TLSSkipVerify, + TLSCertificateKey: tlsCertificateKey, + TLSCertificateKeyFilePassword: cmd.TLSCertificateKeyFilePassword, + TLSCa: tlsCa, + AuthenticationMechanism: cmd.AuthenticationMechanism, + AuthenticationDatabase: cmd.AuthenticationDatabase, MetricsMode: cmd.MetricsModeFlags.MetricsMode.EnumValue(), diff --git a/agent/agents/supervisor/supervisor.go b/agent/agents/supervisor/supervisor.go index 3239a2c736b..fd9e8451da9 100644 --- a/agent/agents/supervisor/supervisor.go +++ b/agent/agents/supervisor/supervisor.go @@ -780,6 +780,17 @@ func (s *Supervisor) processParams(agentID string, agentProcess *agentv1.SetStat } processParams.Env = append(processParams.Env, env...) + for _, varName := range agentProcess.EnvVariableNames { + value, exists := os.LookupEnv(varName) + if !exists { + s.l.Warnf("Environment variable %s not found in pmm-agent environment for agent %s", varName, agentID) + continue + } + + processParams.Env = append(processParams.Env, fmt.Sprintf("%s=%s", varName, value)) + s.l.Debugf("Resolved environment variable %s for agent %s", varName, agentID) + } + return &processParams, nil } diff --git a/api-tests/management/mongodb_test.go b/api-tests/management/mongodb_test.go index 8d9edb84fe3..3868543d16d 100644 --- a/api-tests/management/mongodb_test.go +++ b/api-tests/management/mongodb_test.go @@ -597,9 +597,9 @@ func TestAddMongoDB(t *testing.T) { }, }, } - addProxySQLOK, err := client.Default.ManagementService.AddService(params) + addMongoDBOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Socket and address cannot be specified together.") - assert.Nil(t, addProxySQLOK) + assert.Nil(t, addMongoDBOK) }) t.Run("Socket", func(t *testing.T) { diff --git a/api/agent/v1/agent.pb.go b/api/agent/v1/agent.pb.go index e6e49e6c279..ce153a9704d 100644 --- a/api/agent/v1/agent.pb.go +++ b/api/agent/v1/agent.pb.go @@ -3667,8 +3667,10 @@ type SetStateRequest_AgentProcess struct { Env []string `protobuf:"bytes,5,rep,name=env,proto3" json:"env,omitempty"` TextFiles map[string]string `protobuf:"bytes,6,rep,name=text_files,json=textFiles,proto3" json:"text_files,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` RedactWords []string `protobuf:"bytes,7,rep,name=redact_words,json=redactWords,proto3" json:"redact_words,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // Environment variable names to be resolved from pmm-agent's environment. + EnvVariableNames []string `protobuf:"bytes,8,rep,name=env_variable_names,json=envVariableNames,proto3" json:"env_variable_names,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SetStateRequest_AgentProcess) Reset() { @@ -3750,6 +3752,13 @@ func (x *SetStateRequest_AgentProcess) GetRedactWords() []string { return nil } +func (x *SetStateRequest_AgentProcess) GetEnvVariableNames() []string { + if x != nil { + return x.EnvVariableNames + } + return nil +} + // BuiltinAgent describes desired configuration of a single built-in agent for pmm-agent. type SetStateRequest_BuiltinAgent struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -3769,6 +3778,8 @@ type SetStateRequest_BuiltinAgent struct { Tls bool `protobuf:"varint,8,opt,name=tls,proto3" json:"tls,omitempty"` // TLS certificate wont be verified. TlsSkipVerify bool `protobuf:"varint,9,opt,name=tls_skip_verify,json=tlsSkipVerify,proto3" json:"tls_skip_verify,omitempty"` + // Environment variables to be passed to the built-in agent. + Env map[string]string `protobuf:"bytes,10,rep,name=env,proto3" json:"env,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -3866,6 +3877,13 @@ func (x *SetStateRequest_BuiltinAgent) GetTlsSkipVerify() bool { return false } +func (x *SetStateRequest_BuiltinAgent) GetEnv() map[string]string { + if x != nil { + return x.Env + } + return nil +} + // MySQLExplainParams describes MySQL EXPLAIN action parameters. type StartActionRequest_MySQLExplainParams struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -3885,7 +3903,7 @@ type StartActionRequest_MySQLExplainParams struct { func (x *StartActionRequest_MySQLExplainParams) Reset() { *x = StartActionRequest_MySQLExplainParams{} - mi := &file_agent_v1_agent_proto_msgTypes[49] + mi := &file_agent_v1_agent_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3897,7 +3915,7 @@ func (x *StartActionRequest_MySQLExplainParams) String() string { func (*StartActionRequest_MySQLExplainParams) ProtoMessage() {} func (x *StartActionRequest_MySQLExplainParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[49] + mi := &file_agent_v1_agent_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3978,7 +3996,7 @@ type StartActionRequest_MySQLShowCreateTableParams struct { func (x *StartActionRequest_MySQLShowCreateTableParams) Reset() { *x = StartActionRequest_MySQLShowCreateTableParams{} - mi := &file_agent_v1_agent_proto_msgTypes[50] + mi := &file_agent_v1_agent_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3990,7 +4008,7 @@ func (x *StartActionRequest_MySQLShowCreateTableParams) String() string { func (*StartActionRequest_MySQLShowCreateTableParams) ProtoMessage() {} func (x *StartActionRequest_MySQLShowCreateTableParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[50] + mi := &file_agent_v1_agent_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4050,7 +4068,7 @@ type StartActionRequest_MySQLShowTableStatusParams struct { func (x *StartActionRequest_MySQLShowTableStatusParams) Reset() { *x = StartActionRequest_MySQLShowTableStatusParams{} - mi := &file_agent_v1_agent_proto_msgTypes[51] + mi := &file_agent_v1_agent_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4062,7 +4080,7 @@ func (x *StartActionRequest_MySQLShowTableStatusParams) String() string { func (*StartActionRequest_MySQLShowTableStatusParams) ProtoMessage() {} func (x *StartActionRequest_MySQLShowTableStatusParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[51] + mi := &file_agent_v1_agent_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4122,7 +4140,7 @@ type StartActionRequest_MySQLShowIndexParams struct { func (x *StartActionRequest_MySQLShowIndexParams) Reset() { *x = StartActionRequest_MySQLShowIndexParams{} - mi := &file_agent_v1_agent_proto_msgTypes[52] + mi := &file_agent_v1_agent_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4134,7 +4152,7 @@ func (x *StartActionRequest_MySQLShowIndexParams) String() string { func (*StartActionRequest_MySQLShowIndexParams) ProtoMessage() {} func (x *StartActionRequest_MySQLShowIndexParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[52] + mi := &file_agent_v1_agent_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4194,7 +4212,7 @@ type StartActionRequest_PostgreSQLShowCreateTableParams struct { func (x *StartActionRequest_PostgreSQLShowCreateTableParams) Reset() { *x = StartActionRequest_PostgreSQLShowCreateTableParams{} - mi := &file_agent_v1_agent_proto_msgTypes[53] + mi := &file_agent_v1_agent_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4206,7 +4224,7 @@ func (x *StartActionRequest_PostgreSQLShowCreateTableParams) String() string { func (*StartActionRequest_PostgreSQLShowCreateTableParams) ProtoMessage() {} func (x *StartActionRequest_PostgreSQLShowCreateTableParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[53] + mi := &file_agent_v1_agent_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4266,7 +4284,7 @@ type StartActionRequest_PostgreSQLShowIndexParams struct { func (x *StartActionRequest_PostgreSQLShowIndexParams) Reset() { *x = StartActionRequest_PostgreSQLShowIndexParams{} - mi := &file_agent_v1_agent_proto_msgTypes[54] + mi := &file_agent_v1_agent_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4278,7 +4296,7 @@ func (x *StartActionRequest_PostgreSQLShowIndexParams) String() string { func (*StartActionRequest_PostgreSQLShowIndexParams) ProtoMessage() {} func (x *StartActionRequest_PostgreSQLShowIndexParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[54] + mi := &file_agent_v1_agent_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4337,7 +4355,7 @@ type StartActionRequest_MongoDBExplainParams struct { func (x *StartActionRequest_MongoDBExplainParams) Reset() { *x = StartActionRequest_MongoDBExplainParams{} - mi := &file_agent_v1_agent_proto_msgTypes[55] + mi := &file_agent_v1_agent_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4349,7 +4367,7 @@ func (x *StartActionRequest_MongoDBExplainParams) String() string { func (*StartActionRequest_MongoDBExplainParams) ProtoMessage() {} func (x *StartActionRequest_MongoDBExplainParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[55] + mi := &file_agent_v1_agent_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4395,7 +4413,7 @@ type StartActionRequest_PTSummaryParams struct { func (x *StartActionRequest_PTSummaryParams) Reset() { *x = StartActionRequest_PTSummaryParams{} - mi := &file_agent_v1_agent_proto_msgTypes[56] + mi := &file_agent_v1_agent_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4407,7 +4425,7 @@ func (x *StartActionRequest_PTSummaryParams) String() string { func (*StartActionRequest_PTSummaryParams) ProtoMessage() {} func (x *StartActionRequest_PTSummaryParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[56] + mi := &file_agent_v1_agent_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4436,7 +4454,7 @@ type StartActionRequest_PTPgSummaryParams struct { func (x *StartActionRequest_PTPgSummaryParams) Reset() { *x = StartActionRequest_PTPgSummaryParams{} - mi := &file_agent_v1_agent_proto_msgTypes[57] + mi := &file_agent_v1_agent_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4448,7 +4466,7 @@ func (x *StartActionRequest_PTPgSummaryParams) String() string { func (*StartActionRequest_PTPgSummaryParams) ProtoMessage() {} func (x *StartActionRequest_PTPgSummaryParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[57] + mi := &file_agent_v1_agent_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4505,7 +4523,7 @@ type StartActionRequest_PTMongoDBSummaryParams struct { func (x *StartActionRequest_PTMongoDBSummaryParams) Reset() { *x = StartActionRequest_PTMongoDBSummaryParams{} - mi := &file_agent_v1_agent_proto_msgTypes[58] + mi := &file_agent_v1_agent_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4517,7 +4535,7 @@ func (x *StartActionRequest_PTMongoDBSummaryParams) String() string { func (*StartActionRequest_PTMongoDBSummaryParams) ProtoMessage() {} func (x *StartActionRequest_PTMongoDBSummaryParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[58] + mi := &file_agent_v1_agent_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4575,7 +4593,7 @@ type StartActionRequest_PTMySQLSummaryParams struct { func (x *StartActionRequest_PTMySQLSummaryParams) Reset() { *x = StartActionRequest_PTMySQLSummaryParams{} - mi := &file_agent_v1_agent_proto_msgTypes[59] + mi := &file_agent_v1_agent_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4587,7 +4605,7 @@ func (x *StartActionRequest_PTMySQLSummaryParams) String() string { func (*StartActionRequest_PTMySQLSummaryParams) ProtoMessage() {} func (x *StartActionRequest_PTMySQLSummaryParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[59] + mi := &file_agent_v1_agent_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4655,7 +4673,7 @@ type StartActionRequest_MySQLQueryShowParams struct { func (x *StartActionRequest_MySQLQueryShowParams) Reset() { *x = StartActionRequest_MySQLQueryShowParams{} - mi := &file_agent_v1_agent_proto_msgTypes[60] + mi := &file_agent_v1_agent_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4667,7 +4685,7 @@ func (x *StartActionRequest_MySQLQueryShowParams) String() string { func (*StartActionRequest_MySQLQueryShowParams) ProtoMessage() {} func (x *StartActionRequest_MySQLQueryShowParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[60] + mi := &file_agent_v1_agent_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4728,7 +4746,7 @@ type StartActionRequest_MySQLQuerySelectParams struct { func (x *StartActionRequest_MySQLQuerySelectParams) Reset() { *x = StartActionRequest_MySQLQuerySelectParams{} - mi := &file_agent_v1_agent_proto_msgTypes[61] + mi := &file_agent_v1_agent_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4740,7 +4758,7 @@ func (x *StartActionRequest_MySQLQuerySelectParams) String() string { func (*StartActionRequest_MySQLQuerySelectParams) ProtoMessage() {} func (x *StartActionRequest_MySQLQuerySelectParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[61] + mi := &file_agent_v1_agent_proto_msgTypes[62] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4799,7 +4817,7 @@ type StartActionRequest_PostgreSQLQueryShowParams struct { func (x *StartActionRequest_PostgreSQLQueryShowParams) Reset() { *x = StartActionRequest_PostgreSQLQueryShowParams{} - mi := &file_agent_v1_agent_proto_msgTypes[62] + mi := &file_agent_v1_agent_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4811,7 +4829,7 @@ func (x *StartActionRequest_PostgreSQLQueryShowParams) String() string { func (*StartActionRequest_PostgreSQLQueryShowParams) ProtoMessage() {} func (x *StartActionRequest_PostgreSQLQueryShowParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[62] + mi := &file_agent_v1_agent_proto_msgTypes[63] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4865,7 +4883,7 @@ type StartActionRequest_PostgreSQLQuerySelectParams struct { func (x *StartActionRequest_PostgreSQLQuerySelectParams) Reset() { *x = StartActionRequest_PostgreSQLQuerySelectParams{} - mi := &file_agent_v1_agent_proto_msgTypes[63] + mi := &file_agent_v1_agent_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4877,7 +4895,7 @@ func (x *StartActionRequest_PostgreSQLQuerySelectParams) String() string { func (*StartActionRequest_PostgreSQLQuerySelectParams) ProtoMessage() {} func (x *StartActionRequest_PostgreSQLQuerySelectParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[63] + mi := &file_agent_v1_agent_proto_msgTypes[64] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4935,7 +4953,7 @@ type StartActionRequest_MongoDBQueryGetParameterParams struct { func (x *StartActionRequest_MongoDBQueryGetParameterParams) Reset() { *x = StartActionRequest_MongoDBQueryGetParameterParams{} - mi := &file_agent_v1_agent_proto_msgTypes[64] + mi := &file_agent_v1_agent_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4947,7 +4965,7 @@ func (x *StartActionRequest_MongoDBQueryGetParameterParams) String() string { func (*StartActionRequest_MongoDBQueryGetParameterParams) ProtoMessage() {} func (x *StartActionRequest_MongoDBQueryGetParameterParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[64] + mi := &file_agent_v1_agent_proto_msgTypes[65] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4991,7 +5009,7 @@ type StartActionRequest_MongoDBQueryBuildInfoParams struct { func (x *StartActionRequest_MongoDBQueryBuildInfoParams) Reset() { *x = StartActionRequest_MongoDBQueryBuildInfoParams{} - mi := &file_agent_v1_agent_proto_msgTypes[65] + mi := &file_agent_v1_agent_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5003,7 +5021,7 @@ func (x *StartActionRequest_MongoDBQueryBuildInfoParams) String() string { func (*StartActionRequest_MongoDBQueryBuildInfoParams) ProtoMessage() {} func (x *StartActionRequest_MongoDBQueryBuildInfoParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[65] + mi := &file_agent_v1_agent_proto_msgTypes[66] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5047,7 +5065,7 @@ type StartActionRequest_MongoDBQueryGetCmdLineOptsParams struct { func (x *StartActionRequest_MongoDBQueryGetCmdLineOptsParams) Reset() { *x = StartActionRequest_MongoDBQueryGetCmdLineOptsParams{} - mi := &file_agent_v1_agent_proto_msgTypes[66] + mi := &file_agent_v1_agent_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5059,7 +5077,7 @@ func (x *StartActionRequest_MongoDBQueryGetCmdLineOptsParams) String() string { func (*StartActionRequest_MongoDBQueryGetCmdLineOptsParams) ProtoMessage() {} func (x *StartActionRequest_MongoDBQueryGetCmdLineOptsParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[66] + mi := &file_agent_v1_agent_proto_msgTypes[67] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5103,7 +5121,7 @@ type StartActionRequest_MongoDBQueryReplSetGetStatusParams struct { func (x *StartActionRequest_MongoDBQueryReplSetGetStatusParams) Reset() { *x = StartActionRequest_MongoDBQueryReplSetGetStatusParams{} - mi := &file_agent_v1_agent_proto_msgTypes[67] + mi := &file_agent_v1_agent_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5115,7 +5133,7 @@ func (x *StartActionRequest_MongoDBQueryReplSetGetStatusParams) String() string func (*StartActionRequest_MongoDBQueryReplSetGetStatusParams) ProtoMessage() {} func (x *StartActionRequest_MongoDBQueryReplSetGetStatusParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[67] + mi := &file_agent_v1_agent_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5159,7 +5177,7 @@ type StartActionRequest_MongoDBQueryGetDiagnosticDataParams struct { func (x *StartActionRequest_MongoDBQueryGetDiagnosticDataParams) Reset() { *x = StartActionRequest_MongoDBQueryGetDiagnosticDataParams{} - mi := &file_agent_v1_agent_proto_msgTypes[68] + mi := &file_agent_v1_agent_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5171,7 +5189,7 @@ func (x *StartActionRequest_MongoDBQueryGetDiagnosticDataParams) String() string func (*StartActionRequest_MongoDBQueryGetDiagnosticDataParams) ProtoMessage() {} func (x *StartActionRequest_MongoDBQueryGetDiagnosticDataParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[68] + mi := &file_agent_v1_agent_proto_msgTypes[69] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5211,7 +5229,7 @@ type StartActionRequest_RestartSystemServiceParams struct { func (x *StartActionRequest_RestartSystemServiceParams) Reset() { *x = StartActionRequest_RestartSystemServiceParams{} - mi := &file_agent_v1_agent_proto_msgTypes[69] + mi := &file_agent_v1_agent_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5223,7 +5241,7 @@ func (x *StartActionRequest_RestartSystemServiceParams) String() string { func (*StartActionRequest_RestartSystemServiceParams) ProtoMessage() {} func (x *StartActionRequest_RestartSystemServiceParams) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[69] + mi := &file_agent_v1_agent_proto_msgTypes[70] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5257,7 +5275,7 @@ type CheckConnectionResponse_Stats struct { func (x *CheckConnectionResponse_Stats) Reset() { *x = CheckConnectionResponse_Stats{} - mi := &file_agent_v1_agent_proto_msgTypes[70] + mi := &file_agent_v1_agent_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5269,7 +5287,7 @@ func (x *CheckConnectionResponse_Stats) String() string { func (*CheckConnectionResponse_Stats) ProtoMessage() {} func (x *CheckConnectionResponse_Stats) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[70] + mi := &file_agent_v1_agent_proto_msgTypes[71] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5321,7 +5339,7 @@ type StartJobRequest_MySQLBackup struct { func (x *StartJobRequest_MySQLBackup) Reset() { *x = StartJobRequest_MySQLBackup{} - mi := &file_agent_v1_agent_proto_msgTypes[71] + mi := &file_agent_v1_agent_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5333,7 +5351,7 @@ func (x *StartJobRequest_MySQLBackup) String() string { func (*StartJobRequest_MySQLBackup) ProtoMessage() {} func (x *StartJobRequest_MySQLBackup) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[71] + mi := &file_agent_v1_agent_proto_msgTypes[72] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5445,7 +5463,7 @@ type StartJobRequest_MySQLRestoreBackup struct { func (x *StartJobRequest_MySQLRestoreBackup) Reset() { *x = StartJobRequest_MySQLRestoreBackup{} - mi := &file_agent_v1_agent_proto_msgTypes[72] + mi := &file_agent_v1_agent_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5457,7 +5475,7 @@ func (x *StartJobRequest_MySQLRestoreBackup) String() string { func (*StartJobRequest_MySQLRestoreBackup) ProtoMessage() {} func (x *StartJobRequest_MySQLRestoreBackup) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[72] + mi := &file_agent_v1_agent_proto_msgTypes[73] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5550,7 +5568,7 @@ type StartJobRequest_MongoDBBackup struct { func (x *StartJobRequest_MongoDBBackup) Reset() { *x = StartJobRequest_MongoDBBackup{} - mi := &file_agent_v1_agent_proto_msgTypes[73] + mi := &file_agent_v1_agent_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5562,7 +5580,7 @@ func (x *StartJobRequest_MongoDBBackup) String() string { func (*StartJobRequest_MongoDBBackup) ProtoMessage() {} func (x *StartJobRequest_MongoDBBackup) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[73] + mi := &file_agent_v1_agent_proto_msgTypes[74] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5691,7 +5709,7 @@ type StartJobRequest_MongoDBRestoreBackup struct { func (x *StartJobRequest_MongoDBRestoreBackup) Reset() { *x = StartJobRequest_MongoDBRestoreBackup{} - mi := &file_agent_v1_agent_proto_msgTypes[74] + mi := &file_agent_v1_agent_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5703,7 +5721,7 @@ func (x *StartJobRequest_MongoDBRestoreBackup) String() string { func (*StartJobRequest_MongoDBRestoreBackup) ProtoMessage() {} func (x *StartJobRequest_MongoDBRestoreBackup) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[74] + mi := &file_agent_v1_agent_proto_msgTypes[75] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5814,7 +5832,7 @@ type JobResult_Error struct { func (x *JobResult_Error) Reset() { *x = JobResult_Error{} - mi := &file_agent_v1_agent_proto_msgTypes[75] + mi := &file_agent_v1_agent_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5826,7 +5844,7 @@ func (x *JobResult_Error) String() string { func (*JobResult_Error) ProtoMessage() {} func (x *JobResult_Error) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[75] + mi := &file_agent_v1_agent_proto_msgTypes[76] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5861,7 +5879,7 @@ type JobResult_MongoDBBackup struct { func (x *JobResult_MongoDBBackup) Reset() { *x = JobResult_MongoDBBackup{} - mi := &file_agent_v1_agent_proto_msgTypes[76] + mi := &file_agent_v1_agent_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5873,7 +5891,7 @@ func (x *JobResult_MongoDBBackup) String() string { func (*JobResult_MongoDBBackup) ProtoMessage() {} func (x *JobResult_MongoDBBackup) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[76] + mi := &file_agent_v1_agent_proto_msgTypes[77] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5914,7 +5932,7 @@ type JobResult_MySQLBackup struct { func (x *JobResult_MySQLBackup) Reset() { *x = JobResult_MySQLBackup{} - mi := &file_agent_v1_agent_proto_msgTypes[77] + mi := &file_agent_v1_agent_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5926,7 +5944,7 @@ func (x *JobResult_MySQLBackup) String() string { func (*JobResult_MySQLBackup) ProtoMessage() {} func (x *JobResult_MySQLBackup) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[77] + mi := &file_agent_v1_agent_proto_msgTypes[78] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5958,7 +5976,7 @@ type JobResult_MySQLRestoreBackup struct { func (x *JobResult_MySQLRestoreBackup) Reset() { *x = JobResult_MySQLRestoreBackup{} - mi := &file_agent_v1_agent_proto_msgTypes[78] + mi := &file_agent_v1_agent_proto_msgTypes[79] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5970,7 +5988,7 @@ func (x *JobResult_MySQLRestoreBackup) String() string { func (*JobResult_MySQLRestoreBackup) ProtoMessage() {} func (x *JobResult_MySQLRestoreBackup) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[78] + mi := &file_agent_v1_agent_proto_msgTypes[79] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5995,7 +6013,7 @@ type JobResult_MongoDBRestoreBackup struct { func (x *JobResult_MongoDBRestoreBackup) Reset() { *x = JobResult_MongoDBRestoreBackup{} - mi := &file_agent_v1_agent_proto_msgTypes[79] + mi := &file_agent_v1_agent_proto_msgTypes[80] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6007,7 +6025,7 @@ func (x *JobResult_MongoDBRestoreBackup) String() string { func (*JobResult_MongoDBRestoreBackup) ProtoMessage() {} func (x *JobResult_MongoDBRestoreBackup) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[79] + mi := &file_agent_v1_agent_proto_msgTypes[80] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6032,7 +6050,7 @@ type JobProgress_MySQLBackup struct { func (x *JobProgress_MySQLBackup) Reset() { *x = JobProgress_MySQLBackup{} - mi := &file_agent_v1_agent_proto_msgTypes[80] + mi := &file_agent_v1_agent_proto_msgTypes[81] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6044,7 +6062,7 @@ func (x *JobProgress_MySQLBackup) String() string { func (*JobProgress_MySQLBackup) ProtoMessage() {} func (x *JobProgress_MySQLBackup) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[80] + mi := &file_agent_v1_agent_proto_msgTypes[81] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6069,7 +6087,7 @@ type JobProgress_MySQLRestoreBackup struct { func (x *JobProgress_MySQLRestoreBackup) Reset() { *x = JobProgress_MySQLRestoreBackup{} - mi := &file_agent_v1_agent_proto_msgTypes[81] + mi := &file_agent_v1_agent_proto_msgTypes[82] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6081,7 +6099,7 @@ func (x *JobProgress_MySQLRestoreBackup) String() string { func (*JobProgress_MySQLRestoreBackup) ProtoMessage() {} func (x *JobProgress_MySQLRestoreBackup) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[81] + mi := &file_agent_v1_agent_proto_msgTypes[82] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6109,7 +6127,7 @@ type JobProgress_Logs struct { func (x *JobProgress_Logs) Reset() { *x = JobProgress_Logs{} - mi := &file_agent_v1_agent_proto_msgTypes[82] + mi := &file_agent_v1_agent_proto_msgTypes[83] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6121,7 +6139,7 @@ func (x *JobProgress_Logs) String() string { func (*JobProgress_Logs) ProtoMessage() {} func (x *JobProgress_Logs) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[82] + mi := &file_agent_v1_agent_proto_msgTypes[83] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6167,7 +6185,7 @@ type GetVersionsRequest_MySQLd struct { func (x *GetVersionsRequest_MySQLd) Reset() { *x = GetVersionsRequest_MySQLd{} - mi := &file_agent_v1_agent_proto_msgTypes[83] + mi := &file_agent_v1_agent_proto_msgTypes[84] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6179,7 +6197,7 @@ func (x *GetVersionsRequest_MySQLd) String() string { func (*GetVersionsRequest_MySQLd) ProtoMessage() {} func (x *GetVersionsRequest_MySQLd) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[83] + mi := &file_agent_v1_agent_proto_msgTypes[84] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6204,7 +6222,7 @@ type GetVersionsRequest_Xtrabackup struct { func (x *GetVersionsRequest_Xtrabackup) Reset() { *x = GetVersionsRequest_Xtrabackup{} - mi := &file_agent_v1_agent_proto_msgTypes[84] + mi := &file_agent_v1_agent_proto_msgTypes[85] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6216,7 +6234,7 @@ func (x *GetVersionsRequest_Xtrabackup) String() string { func (*GetVersionsRequest_Xtrabackup) ProtoMessage() {} func (x *GetVersionsRequest_Xtrabackup) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[84] + mi := &file_agent_v1_agent_proto_msgTypes[85] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6241,7 +6259,7 @@ type GetVersionsRequest_Xbcloud struct { func (x *GetVersionsRequest_Xbcloud) Reset() { *x = GetVersionsRequest_Xbcloud{} - mi := &file_agent_v1_agent_proto_msgTypes[85] + mi := &file_agent_v1_agent_proto_msgTypes[86] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6253,7 +6271,7 @@ func (x *GetVersionsRequest_Xbcloud) String() string { func (*GetVersionsRequest_Xbcloud) ProtoMessage() {} func (x *GetVersionsRequest_Xbcloud) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[85] + mi := &file_agent_v1_agent_proto_msgTypes[86] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6278,7 +6296,7 @@ type GetVersionsRequest_Qpress struct { func (x *GetVersionsRequest_Qpress) Reset() { *x = GetVersionsRequest_Qpress{} - mi := &file_agent_v1_agent_proto_msgTypes[86] + mi := &file_agent_v1_agent_proto_msgTypes[87] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6290,7 +6308,7 @@ func (x *GetVersionsRequest_Qpress) String() string { func (*GetVersionsRequest_Qpress) ProtoMessage() {} func (x *GetVersionsRequest_Qpress) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[86] + mi := &file_agent_v1_agent_proto_msgTypes[87] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6315,7 +6333,7 @@ type GetVersionsRequest_MongoDB struct { func (x *GetVersionsRequest_MongoDB) Reset() { *x = GetVersionsRequest_MongoDB{} - mi := &file_agent_v1_agent_proto_msgTypes[87] + mi := &file_agent_v1_agent_proto_msgTypes[88] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6327,7 +6345,7 @@ func (x *GetVersionsRequest_MongoDB) String() string { func (*GetVersionsRequest_MongoDB) ProtoMessage() {} func (x *GetVersionsRequest_MongoDB) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[87] + mi := &file_agent_v1_agent_proto_msgTypes[88] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6352,7 +6370,7 @@ type GetVersionsRequest_PBM struct { func (x *GetVersionsRequest_PBM) Reset() { *x = GetVersionsRequest_PBM{} - mi := &file_agent_v1_agent_proto_msgTypes[88] + mi := &file_agent_v1_agent_proto_msgTypes[89] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6364,7 +6382,7 @@ func (x *GetVersionsRequest_PBM) String() string { func (*GetVersionsRequest_PBM) ProtoMessage() {} func (x *GetVersionsRequest_PBM) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[88] + mi := &file_agent_v1_agent_proto_msgTypes[89] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6398,7 +6416,7 @@ type GetVersionsRequest_Software struct { func (x *GetVersionsRequest_Software) Reset() { *x = GetVersionsRequest_Software{} - mi := &file_agent_v1_agent_proto_msgTypes[89] + mi := &file_agent_v1_agent_proto_msgTypes[90] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6410,7 +6428,7 @@ func (x *GetVersionsRequest_Software) String() string { func (*GetVersionsRequest_Software) ProtoMessage() {} func (x *GetVersionsRequest_Software) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[89] + mi := &file_agent_v1_agent_proto_msgTypes[90] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6539,7 +6557,7 @@ type GetVersionsResponse_Version struct { func (x *GetVersionsResponse_Version) Reset() { *x = GetVersionsResponse_Version{} - mi := &file_agent_v1_agent_proto_msgTypes[90] + mi := &file_agent_v1_agent_proto_msgTypes[91] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6551,7 +6569,7 @@ func (x *GetVersionsResponse_Version) String() string { func (*GetVersionsResponse_Version) ProtoMessage() {} func (x *GetVersionsResponse_Version) ProtoReflect() protoreflect.Message { - mi := &file_agent_v1_agent_proto_msgTypes[90] + mi := &file_agent_v1_agent_proto_msgTypes[91] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6607,10 +6625,11 @@ const file_agent_v1_agent_proto_rawDesc = "" + "listenPort\x12*\n" + "\x11process_exec_path\x18\x04 \x01(\tR\x0fprocessExecPath\x12\x18\n" + "\aversion\x18\x05 \x01(\tR\aversion\"\x16\n" + - "\x14StateChangedResponse\"\x95\t\n" + + "\x14StateChangedResponse\"\xbe\n" + + "\n" + "\x0fSetStateRequest\x12V\n" + "\x0fagent_processes\x18\x01 \x03(\v2-.agent.v1.SetStateRequest.AgentProcessesEntryR\x0eagentProcesses\x12S\n" + - "\x0ebuiltin_agents\x18\x02 \x03(\v2,.agent.v1.SetStateRequest.BuiltinAgentsEntryR\rbuiltinAgents\x1a\xfa\x02\n" + + "\x0ebuiltin_agents\x18\x02 \x03(\v2,.agent.v1.SetStateRequest.BuiltinAgentsEntryR\rbuiltinAgents\x1a\xa8\x03\n" + "\fAgentProcess\x12+\n" + "\x04type\x18\x01 \x01(\x0e2\x17.inventory.v1.AgentTypeR\x04type\x12.\n" + "\x13template_left_delim\x18\x02 \x01(\tR\x11templateLeftDelim\x120\n" + @@ -6619,13 +6638,14 @@ const file_agent_v1_agent_proto_rawDesc = "" + "\x03env\x18\x05 \x03(\tR\x03env\x12T\n" + "\n" + "text_files\x18\x06 \x03(\v25.agent.v1.SetStateRequest.AgentProcess.TextFilesEntryR\ttextFiles\x12!\n" + - "\fredact_words\x18\a \x03(\tR\vredactWords\x1a<\n" + + "\fredact_words\x18\a \x03(\tR\vredactWords\x12,\n" + + "\x12env_variable_names\x18\b \x03(\tR\x10envVariableNames\x1a<\n" + "\x0eTextFilesEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1ai\n" + "\x13AgentProcessesEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12<\n" + - "\x05value\x18\x02 \x01(\v2&.agent.v1.SetStateRequest.AgentProcessR\x05value:\x028\x01\x1a\x82\x03\n" + + "\x05value\x18\x02 \x01(\v2&.agent.v1.SetStateRequest.AgentProcessR\x05value:\x028\x01\x1a\xfd\x03\n" + "\fBuiltinAgent\x12+\n" + "\x04type\x18\x01 \x01(\x0e2\x17.inventory.v1.AgentTypeR\x04type\x12\x10\n" + "\x03dsn\x18\x02 \x01(\tR\x03dsn\x12(\n" + @@ -6636,7 +6656,12 @@ const file_agent_v1_agent_proto_rawDesc = "" + "\n" + "text_files\x18\a \x01(\v2\x13.agent.v1.TextFilesR\ttextFiles\x12\x10\n" + "\x03tls\x18\b \x01(\bR\x03tls\x12&\n" + - "\x0ftls_skip_verify\x18\t \x01(\bR\rtlsSkipVerify\x1ah\n" + + "\x0ftls_skip_verify\x18\t \x01(\bR\rtlsSkipVerify\x12A\n" + + "\x03env\x18\n" + + " \x03(\v2/.agent.v1.SetStateRequest.BuiltinAgent.EnvEntryR\x03env\x1a6\n" + + "\bEnvEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1ah\n" + "\x12BuiltinAgentsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12<\n" + "\x05value\x18\x02 \x01(\v2&.agent.v1.SetStateRequest.BuiltinAgentR\x05value:\x028\x01\"\x12\n" + @@ -7053,7 +7078,7 @@ func file_agent_v1_agent_proto_rawDescGZIP() []byte { var ( file_agent_v1_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_agent_v1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 91) + file_agent_v1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 92) file_agent_v1_agent_proto_goTypes = []any{ (MysqlExplainOutputFormat)(0), // 0: agent.v1.MysqlExplainOutputFormat (StartActionRequest_RestartSystemServiceParams_SystemService)(0), // 1: agent.v1.StartActionRequest.RestartSystemServiceParams.SystemService @@ -7105,124 +7130,125 @@ var ( (*SetStateRequest_BuiltinAgent)(nil), // 47: agent.v1.SetStateRequest.BuiltinAgent nil, // 48: agent.v1.SetStateRequest.BuiltinAgentsEntry nil, // 49: agent.v1.SetStateRequest.AgentProcess.TextFilesEntry - nil, // 50: agent.v1.QueryActionMap.MapEntry - (*StartActionRequest_MySQLExplainParams)(nil), // 51: agent.v1.StartActionRequest.MySQLExplainParams - (*StartActionRequest_MySQLShowCreateTableParams)(nil), // 52: agent.v1.StartActionRequest.MySQLShowCreateTableParams - (*StartActionRequest_MySQLShowTableStatusParams)(nil), // 53: agent.v1.StartActionRequest.MySQLShowTableStatusParams - (*StartActionRequest_MySQLShowIndexParams)(nil), // 54: agent.v1.StartActionRequest.MySQLShowIndexParams - (*StartActionRequest_PostgreSQLShowCreateTableParams)(nil), // 55: agent.v1.StartActionRequest.PostgreSQLShowCreateTableParams - (*StartActionRequest_PostgreSQLShowIndexParams)(nil), // 56: agent.v1.StartActionRequest.PostgreSQLShowIndexParams - (*StartActionRequest_MongoDBExplainParams)(nil), // 57: agent.v1.StartActionRequest.MongoDBExplainParams - (*StartActionRequest_PTSummaryParams)(nil), // 58: agent.v1.StartActionRequest.PTSummaryParams - (*StartActionRequest_PTPgSummaryParams)(nil), // 59: agent.v1.StartActionRequest.PTPgSummaryParams - (*StartActionRequest_PTMongoDBSummaryParams)(nil), // 60: agent.v1.StartActionRequest.PTMongoDBSummaryParams - (*StartActionRequest_PTMySQLSummaryParams)(nil), // 61: agent.v1.StartActionRequest.PTMySQLSummaryParams - (*StartActionRequest_MySQLQueryShowParams)(nil), // 62: agent.v1.StartActionRequest.MySQLQueryShowParams - (*StartActionRequest_MySQLQuerySelectParams)(nil), // 63: agent.v1.StartActionRequest.MySQLQuerySelectParams - (*StartActionRequest_PostgreSQLQueryShowParams)(nil), // 64: agent.v1.StartActionRequest.PostgreSQLQueryShowParams - (*StartActionRequest_PostgreSQLQuerySelectParams)(nil), // 65: agent.v1.StartActionRequest.PostgreSQLQuerySelectParams - (*StartActionRequest_MongoDBQueryGetParameterParams)(nil), // 66: agent.v1.StartActionRequest.MongoDBQueryGetParameterParams - (*StartActionRequest_MongoDBQueryBuildInfoParams)(nil), // 67: agent.v1.StartActionRequest.MongoDBQueryBuildInfoParams - (*StartActionRequest_MongoDBQueryGetCmdLineOptsParams)(nil), // 68: agent.v1.StartActionRequest.MongoDBQueryGetCmdLineOptsParams - (*StartActionRequest_MongoDBQueryReplSetGetStatusParams)(nil), // 69: agent.v1.StartActionRequest.MongoDBQueryReplSetGetStatusParams - (*StartActionRequest_MongoDBQueryGetDiagnosticDataParams)(nil), // 70: agent.v1.StartActionRequest.MongoDBQueryGetDiagnosticDataParams - (*StartActionRequest_RestartSystemServiceParams)(nil), // 71: agent.v1.StartActionRequest.RestartSystemServiceParams - (*CheckConnectionResponse_Stats)(nil), // 72: agent.v1.CheckConnectionResponse.Stats - (*StartJobRequest_MySQLBackup)(nil), // 73: agent.v1.StartJobRequest.MySQLBackup - (*StartJobRequest_MySQLRestoreBackup)(nil), // 74: agent.v1.StartJobRequest.MySQLRestoreBackup - (*StartJobRequest_MongoDBBackup)(nil), // 75: agent.v1.StartJobRequest.MongoDBBackup - (*StartJobRequest_MongoDBRestoreBackup)(nil), // 76: agent.v1.StartJobRequest.MongoDBRestoreBackup - (*JobResult_Error)(nil), // 77: agent.v1.JobResult.Error - (*JobResult_MongoDBBackup)(nil), // 78: agent.v1.JobResult.MongoDBBackup - (*JobResult_MySQLBackup)(nil), // 79: agent.v1.JobResult.MySQLBackup - (*JobResult_MySQLRestoreBackup)(nil), // 80: agent.v1.JobResult.MySQLRestoreBackup - (*JobResult_MongoDBRestoreBackup)(nil), // 81: agent.v1.JobResult.MongoDBRestoreBackup - (*JobProgress_MySQLBackup)(nil), // 82: agent.v1.JobProgress.MySQLBackup - (*JobProgress_MySQLRestoreBackup)(nil), // 83: agent.v1.JobProgress.MySQLRestoreBackup - (*JobProgress_Logs)(nil), // 84: agent.v1.JobProgress.Logs - (*GetVersionsRequest_MySQLd)(nil), // 85: agent.v1.GetVersionsRequest.MySQLd - (*GetVersionsRequest_Xtrabackup)(nil), // 86: agent.v1.GetVersionsRequest.Xtrabackup - (*GetVersionsRequest_Xbcloud)(nil), // 87: agent.v1.GetVersionsRequest.Xbcloud - (*GetVersionsRequest_Qpress)(nil), // 88: agent.v1.GetVersionsRequest.Qpress - (*GetVersionsRequest_MongoDB)(nil), // 89: agent.v1.GetVersionsRequest.MongoDB - (*GetVersionsRequest_PBM)(nil), // 90: agent.v1.GetVersionsRequest.PBM - (*GetVersionsRequest_Software)(nil), // 91: agent.v1.GetVersionsRequest.Software - (*GetVersionsResponse_Version)(nil), // 92: agent.v1.GetVersionsResponse.Version - (*timestamppb.Timestamp)(nil), // 93: google.protobuf.Timestamp - (*MetricsBucket)(nil), // 94: agent.v1.MetricsBucket - (v1.AgentStatus)(0), // 95: inventory.v1.AgentStatus - (*durationpb.Duration)(nil), // 96: google.protobuf.Duration - (v1.ServiceType)(0), // 97: inventory.v1.ServiceType - (*status.Status)(nil), // 98: google.rpc.Status - (v1.AgentType)(0), // 99: inventory.v1.AgentType - (v11.DataModel)(0), // 100: backup.v1.DataModel - (*v11.PbmMetadata)(nil), // 101: backup.v1.PbmMetadata - (*v11.Metadata)(nil), // 102: backup.v1.Metadata + nil, // 50: agent.v1.SetStateRequest.BuiltinAgent.EnvEntry + nil, // 51: agent.v1.QueryActionMap.MapEntry + (*StartActionRequest_MySQLExplainParams)(nil), // 52: agent.v1.StartActionRequest.MySQLExplainParams + (*StartActionRequest_MySQLShowCreateTableParams)(nil), // 53: agent.v1.StartActionRequest.MySQLShowCreateTableParams + (*StartActionRequest_MySQLShowTableStatusParams)(nil), // 54: agent.v1.StartActionRequest.MySQLShowTableStatusParams + (*StartActionRequest_MySQLShowIndexParams)(nil), // 55: agent.v1.StartActionRequest.MySQLShowIndexParams + (*StartActionRequest_PostgreSQLShowCreateTableParams)(nil), // 56: agent.v1.StartActionRequest.PostgreSQLShowCreateTableParams + (*StartActionRequest_PostgreSQLShowIndexParams)(nil), // 57: agent.v1.StartActionRequest.PostgreSQLShowIndexParams + (*StartActionRequest_MongoDBExplainParams)(nil), // 58: agent.v1.StartActionRequest.MongoDBExplainParams + (*StartActionRequest_PTSummaryParams)(nil), // 59: agent.v1.StartActionRequest.PTSummaryParams + (*StartActionRequest_PTPgSummaryParams)(nil), // 60: agent.v1.StartActionRequest.PTPgSummaryParams + (*StartActionRequest_PTMongoDBSummaryParams)(nil), // 61: agent.v1.StartActionRequest.PTMongoDBSummaryParams + (*StartActionRequest_PTMySQLSummaryParams)(nil), // 62: agent.v1.StartActionRequest.PTMySQLSummaryParams + (*StartActionRequest_MySQLQueryShowParams)(nil), // 63: agent.v1.StartActionRequest.MySQLQueryShowParams + (*StartActionRequest_MySQLQuerySelectParams)(nil), // 64: agent.v1.StartActionRequest.MySQLQuerySelectParams + (*StartActionRequest_PostgreSQLQueryShowParams)(nil), // 65: agent.v1.StartActionRequest.PostgreSQLQueryShowParams + (*StartActionRequest_PostgreSQLQuerySelectParams)(nil), // 66: agent.v1.StartActionRequest.PostgreSQLQuerySelectParams + (*StartActionRequest_MongoDBQueryGetParameterParams)(nil), // 67: agent.v1.StartActionRequest.MongoDBQueryGetParameterParams + (*StartActionRequest_MongoDBQueryBuildInfoParams)(nil), // 68: agent.v1.StartActionRequest.MongoDBQueryBuildInfoParams + (*StartActionRequest_MongoDBQueryGetCmdLineOptsParams)(nil), // 69: agent.v1.StartActionRequest.MongoDBQueryGetCmdLineOptsParams + (*StartActionRequest_MongoDBQueryReplSetGetStatusParams)(nil), // 70: agent.v1.StartActionRequest.MongoDBQueryReplSetGetStatusParams + (*StartActionRequest_MongoDBQueryGetDiagnosticDataParams)(nil), // 71: agent.v1.StartActionRequest.MongoDBQueryGetDiagnosticDataParams + (*StartActionRequest_RestartSystemServiceParams)(nil), // 72: agent.v1.StartActionRequest.RestartSystemServiceParams + (*CheckConnectionResponse_Stats)(nil), // 73: agent.v1.CheckConnectionResponse.Stats + (*StartJobRequest_MySQLBackup)(nil), // 74: agent.v1.StartJobRequest.MySQLBackup + (*StartJobRequest_MySQLRestoreBackup)(nil), // 75: agent.v1.StartJobRequest.MySQLRestoreBackup + (*StartJobRequest_MongoDBBackup)(nil), // 76: agent.v1.StartJobRequest.MongoDBBackup + (*StartJobRequest_MongoDBRestoreBackup)(nil), // 77: agent.v1.StartJobRequest.MongoDBRestoreBackup + (*JobResult_Error)(nil), // 78: agent.v1.JobResult.Error + (*JobResult_MongoDBBackup)(nil), // 79: agent.v1.JobResult.MongoDBBackup + (*JobResult_MySQLBackup)(nil), // 80: agent.v1.JobResult.MySQLBackup + (*JobResult_MySQLRestoreBackup)(nil), // 81: agent.v1.JobResult.MySQLRestoreBackup + (*JobResult_MongoDBRestoreBackup)(nil), // 82: agent.v1.JobResult.MongoDBRestoreBackup + (*JobProgress_MySQLBackup)(nil), // 83: agent.v1.JobProgress.MySQLBackup + (*JobProgress_MySQLRestoreBackup)(nil), // 84: agent.v1.JobProgress.MySQLRestoreBackup + (*JobProgress_Logs)(nil), // 85: agent.v1.JobProgress.Logs + (*GetVersionsRequest_MySQLd)(nil), // 86: agent.v1.GetVersionsRequest.MySQLd + (*GetVersionsRequest_Xtrabackup)(nil), // 87: agent.v1.GetVersionsRequest.Xtrabackup + (*GetVersionsRequest_Xbcloud)(nil), // 88: agent.v1.GetVersionsRequest.Xbcloud + (*GetVersionsRequest_Qpress)(nil), // 89: agent.v1.GetVersionsRequest.Qpress + (*GetVersionsRequest_MongoDB)(nil), // 90: agent.v1.GetVersionsRequest.MongoDB + (*GetVersionsRequest_PBM)(nil), // 91: agent.v1.GetVersionsRequest.PBM + (*GetVersionsRequest_Software)(nil), // 92: agent.v1.GetVersionsRequest.Software + (*GetVersionsResponse_Version)(nil), // 93: agent.v1.GetVersionsResponse.Version + (*timestamppb.Timestamp)(nil), // 94: google.protobuf.Timestamp + (*MetricsBucket)(nil), // 95: agent.v1.MetricsBucket + (v1.AgentStatus)(0), // 96: inventory.v1.AgentStatus + (*durationpb.Duration)(nil), // 97: google.protobuf.Duration + (v1.ServiceType)(0), // 98: inventory.v1.ServiceType + (*status.Status)(nil), // 99: google.rpc.Status + (v1.AgentType)(0), // 100: inventory.v1.AgentType + (v11.DataModel)(0), // 101: backup.v1.DataModel + (*v11.PbmMetadata)(nil), // 102: backup.v1.PbmMetadata + (*v11.Metadata)(nil), // 103: backup.v1.Metadata } ) var file_agent_v1_agent_proto_depIdxs = []int32{ 44, // 0: agent.v1.TextFiles.files:type_name -> agent.v1.TextFiles.FilesEntry - 93, // 1: agent.v1.Pong.current_time:type_name -> google.protobuf.Timestamp - 94, // 2: agent.v1.QANCollectRequest.metrics_bucket:type_name -> agent.v1.MetricsBucket - 95, // 3: agent.v1.StateChangedRequest.status:type_name -> inventory.v1.AgentStatus + 94, // 1: agent.v1.Pong.current_time:type_name -> google.protobuf.Timestamp + 95, // 2: agent.v1.QANCollectRequest.metrics_bucket:type_name -> agent.v1.MetricsBucket + 96, // 3: agent.v1.StateChangedRequest.status:type_name -> inventory.v1.AgentStatus 46, // 4: agent.v1.SetStateRequest.agent_processes:type_name -> agent.v1.SetStateRequest.AgentProcessesEntry 48, // 5: agent.v1.SetStateRequest.builtin_agents:type_name -> agent.v1.SetStateRequest.BuiltinAgentsEntry - 93, // 6: agent.v1.QueryActionValue.timestamp:type_name -> google.protobuf.Timestamp + 94, // 6: agent.v1.QueryActionValue.timestamp:type_name -> google.protobuf.Timestamp 12, // 7: agent.v1.QueryActionValue.slice:type_name -> agent.v1.QueryActionSlice 13, // 8: agent.v1.QueryActionValue.map:type_name -> agent.v1.QueryActionMap 14, // 9: agent.v1.QueryActionValue.binary:type_name -> agent.v1.QueryActionBinary 11, // 10: agent.v1.QueryActionSlice.slice:type_name -> agent.v1.QueryActionValue - 50, // 11: agent.v1.QueryActionMap.map:type_name -> agent.v1.QueryActionMap.MapEntry + 51, // 11: agent.v1.QueryActionMap.map:type_name -> agent.v1.QueryActionMap.MapEntry 12, // 12: agent.v1.QueryActionResult.rows:type_name -> agent.v1.QueryActionSlice 13, // 13: agent.v1.QueryActionResult.docs:type_name -> agent.v1.QueryActionMap - 96, // 14: agent.v1.StartActionRequest.timeout:type_name -> google.protobuf.Duration - 51, // 15: agent.v1.StartActionRequest.mysql_explain_params:type_name -> agent.v1.StartActionRequest.MySQLExplainParams - 52, // 16: agent.v1.StartActionRequest.mysql_show_create_table_params:type_name -> agent.v1.StartActionRequest.MySQLShowCreateTableParams - 53, // 17: agent.v1.StartActionRequest.mysql_show_table_status_params:type_name -> agent.v1.StartActionRequest.MySQLShowTableStatusParams - 54, // 18: agent.v1.StartActionRequest.mysql_show_index_params:type_name -> agent.v1.StartActionRequest.MySQLShowIndexParams - 55, // 19: agent.v1.StartActionRequest.postgresql_show_create_table_params:type_name -> agent.v1.StartActionRequest.PostgreSQLShowCreateTableParams - 56, // 20: agent.v1.StartActionRequest.postgresql_show_index_params:type_name -> agent.v1.StartActionRequest.PostgreSQLShowIndexParams - 57, // 21: agent.v1.StartActionRequest.mongodb_explain_params:type_name -> agent.v1.StartActionRequest.MongoDBExplainParams - 58, // 22: agent.v1.StartActionRequest.pt_summary_params:type_name -> agent.v1.StartActionRequest.PTSummaryParams - 59, // 23: agent.v1.StartActionRequest.pt_pg_summary_params:type_name -> agent.v1.StartActionRequest.PTPgSummaryParams - 60, // 24: agent.v1.StartActionRequest.pt_mongodb_summary_params:type_name -> agent.v1.StartActionRequest.PTMongoDBSummaryParams - 61, // 25: agent.v1.StartActionRequest.pt_mysql_summary_params:type_name -> agent.v1.StartActionRequest.PTMySQLSummaryParams - 62, // 26: agent.v1.StartActionRequest.mysql_query_show_params:type_name -> agent.v1.StartActionRequest.MySQLQueryShowParams - 63, // 27: agent.v1.StartActionRequest.mysql_query_select_params:type_name -> agent.v1.StartActionRequest.MySQLQuerySelectParams - 64, // 28: agent.v1.StartActionRequest.postgresql_query_show_params:type_name -> agent.v1.StartActionRequest.PostgreSQLQueryShowParams - 65, // 29: agent.v1.StartActionRequest.postgresql_query_select_params:type_name -> agent.v1.StartActionRequest.PostgreSQLQuerySelectParams - 66, // 30: agent.v1.StartActionRequest.mongodb_query_getparameter_params:type_name -> agent.v1.StartActionRequest.MongoDBQueryGetParameterParams - 67, // 31: agent.v1.StartActionRequest.mongodb_query_buildinfo_params:type_name -> agent.v1.StartActionRequest.MongoDBQueryBuildInfoParams - 68, // 32: agent.v1.StartActionRequest.mongodb_query_getcmdlineopts_params:type_name -> agent.v1.StartActionRequest.MongoDBQueryGetCmdLineOptsParams - 69, // 33: agent.v1.StartActionRequest.mongodb_query_replsetgetstatus_params:type_name -> agent.v1.StartActionRequest.MongoDBQueryReplSetGetStatusParams - 70, // 34: agent.v1.StartActionRequest.mongodb_query_getdiagnosticdata_params:type_name -> agent.v1.StartActionRequest.MongoDBQueryGetDiagnosticDataParams - 71, // 35: agent.v1.StartActionRequest.restart_sys_service_params:type_name -> agent.v1.StartActionRequest.RestartSystemServiceParams + 97, // 14: agent.v1.StartActionRequest.timeout:type_name -> google.protobuf.Duration + 52, // 15: agent.v1.StartActionRequest.mysql_explain_params:type_name -> agent.v1.StartActionRequest.MySQLExplainParams + 53, // 16: agent.v1.StartActionRequest.mysql_show_create_table_params:type_name -> agent.v1.StartActionRequest.MySQLShowCreateTableParams + 54, // 17: agent.v1.StartActionRequest.mysql_show_table_status_params:type_name -> agent.v1.StartActionRequest.MySQLShowTableStatusParams + 55, // 18: agent.v1.StartActionRequest.mysql_show_index_params:type_name -> agent.v1.StartActionRequest.MySQLShowIndexParams + 56, // 19: agent.v1.StartActionRequest.postgresql_show_create_table_params:type_name -> agent.v1.StartActionRequest.PostgreSQLShowCreateTableParams + 57, // 20: agent.v1.StartActionRequest.postgresql_show_index_params:type_name -> agent.v1.StartActionRequest.PostgreSQLShowIndexParams + 58, // 21: agent.v1.StartActionRequest.mongodb_explain_params:type_name -> agent.v1.StartActionRequest.MongoDBExplainParams + 59, // 22: agent.v1.StartActionRequest.pt_summary_params:type_name -> agent.v1.StartActionRequest.PTSummaryParams + 60, // 23: agent.v1.StartActionRequest.pt_pg_summary_params:type_name -> agent.v1.StartActionRequest.PTPgSummaryParams + 61, // 24: agent.v1.StartActionRequest.pt_mongodb_summary_params:type_name -> agent.v1.StartActionRequest.PTMongoDBSummaryParams + 62, // 25: agent.v1.StartActionRequest.pt_mysql_summary_params:type_name -> agent.v1.StartActionRequest.PTMySQLSummaryParams + 63, // 26: agent.v1.StartActionRequest.mysql_query_show_params:type_name -> agent.v1.StartActionRequest.MySQLQueryShowParams + 64, // 27: agent.v1.StartActionRequest.mysql_query_select_params:type_name -> agent.v1.StartActionRequest.MySQLQuerySelectParams + 65, // 28: agent.v1.StartActionRequest.postgresql_query_show_params:type_name -> agent.v1.StartActionRequest.PostgreSQLQueryShowParams + 66, // 29: agent.v1.StartActionRequest.postgresql_query_select_params:type_name -> agent.v1.StartActionRequest.PostgreSQLQuerySelectParams + 67, // 30: agent.v1.StartActionRequest.mongodb_query_getparameter_params:type_name -> agent.v1.StartActionRequest.MongoDBQueryGetParameterParams + 68, // 31: agent.v1.StartActionRequest.mongodb_query_buildinfo_params:type_name -> agent.v1.StartActionRequest.MongoDBQueryBuildInfoParams + 69, // 32: agent.v1.StartActionRequest.mongodb_query_getcmdlineopts_params:type_name -> agent.v1.StartActionRequest.MongoDBQueryGetCmdLineOptsParams + 70, // 33: agent.v1.StartActionRequest.mongodb_query_replsetgetstatus_params:type_name -> agent.v1.StartActionRequest.MongoDBQueryReplSetGetStatusParams + 71, // 34: agent.v1.StartActionRequest.mongodb_query_getdiagnosticdata_params:type_name -> agent.v1.StartActionRequest.MongoDBQueryGetDiagnosticDataParams + 72, // 35: agent.v1.StartActionRequest.restart_sys_service_params:type_name -> agent.v1.StartActionRequest.RestartSystemServiceParams 2, // 36: agent.v1.PBMSwitchPITRRequest.text_files:type_name -> agent.v1.TextFiles - 97, // 37: agent.v1.CheckConnectionRequest.type:type_name -> inventory.v1.ServiceType - 96, // 38: agent.v1.CheckConnectionRequest.timeout:type_name -> google.protobuf.Duration + 98, // 37: agent.v1.CheckConnectionRequest.type:type_name -> inventory.v1.ServiceType + 97, // 38: agent.v1.CheckConnectionRequest.timeout:type_name -> google.protobuf.Duration 2, // 39: agent.v1.CheckConnectionRequest.text_files:type_name -> agent.v1.TextFiles - 97, // 40: agent.v1.ServiceInfoRequest.type:type_name -> inventory.v1.ServiceType - 96, // 41: agent.v1.ServiceInfoRequest.timeout:type_name -> google.protobuf.Duration + 98, // 40: agent.v1.ServiceInfoRequest.type:type_name -> inventory.v1.ServiceType + 97, // 41: agent.v1.ServiceInfoRequest.timeout:type_name -> google.protobuf.Duration 2, // 42: agent.v1.ServiceInfoRequest.text_files:type_name -> agent.v1.TextFiles - 96, // 43: agent.v1.StartJobRequest.timeout:type_name -> google.protobuf.Duration - 73, // 44: agent.v1.StartJobRequest.mysql_backup:type_name -> agent.v1.StartJobRequest.MySQLBackup - 74, // 45: agent.v1.StartJobRequest.mysql_restore_backup:type_name -> agent.v1.StartJobRequest.MySQLRestoreBackup - 75, // 46: agent.v1.StartJobRequest.mongodb_backup:type_name -> agent.v1.StartJobRequest.MongoDBBackup - 76, // 47: agent.v1.StartJobRequest.mongodb_restore_backup:type_name -> agent.v1.StartJobRequest.MongoDBRestoreBackup - 93, // 48: agent.v1.JobResult.timestamp:type_name -> google.protobuf.Timestamp - 77, // 49: agent.v1.JobResult.error:type_name -> agent.v1.JobResult.Error - 79, // 50: agent.v1.JobResult.mysql_backup:type_name -> agent.v1.JobResult.MySQLBackup - 80, // 51: agent.v1.JobResult.mysql_restore_backup:type_name -> agent.v1.JobResult.MySQLRestoreBackup - 78, // 52: agent.v1.JobResult.mongodb_backup:type_name -> agent.v1.JobResult.MongoDBBackup - 81, // 53: agent.v1.JobResult.mongodb_restore_backup:type_name -> agent.v1.JobResult.MongoDBRestoreBackup - 93, // 54: agent.v1.JobProgress.timestamp:type_name -> google.protobuf.Timestamp - 82, // 55: agent.v1.JobProgress.mysql_backup:type_name -> agent.v1.JobProgress.MySQLBackup - 83, // 56: agent.v1.JobProgress.mysql_restore_backup:type_name -> agent.v1.JobProgress.MySQLRestoreBackup - 84, // 57: agent.v1.JobProgress.logs:type_name -> agent.v1.JobProgress.Logs - 91, // 58: agent.v1.GetVersionsRequest.softwares:type_name -> agent.v1.GetVersionsRequest.Software - 92, // 59: agent.v1.GetVersionsResponse.versions:type_name -> agent.v1.GetVersionsResponse.Version - 98, // 60: agent.v1.AgentMessage.status:type_name -> google.rpc.Status + 97, // 43: agent.v1.StartJobRequest.timeout:type_name -> google.protobuf.Duration + 74, // 44: agent.v1.StartJobRequest.mysql_backup:type_name -> agent.v1.StartJobRequest.MySQLBackup + 75, // 45: agent.v1.StartJobRequest.mysql_restore_backup:type_name -> agent.v1.StartJobRequest.MySQLRestoreBackup + 76, // 46: agent.v1.StartJobRequest.mongodb_backup:type_name -> agent.v1.StartJobRequest.MongoDBBackup + 77, // 47: agent.v1.StartJobRequest.mongodb_restore_backup:type_name -> agent.v1.StartJobRequest.MongoDBRestoreBackup + 94, // 48: agent.v1.JobResult.timestamp:type_name -> google.protobuf.Timestamp + 78, // 49: agent.v1.JobResult.error:type_name -> agent.v1.JobResult.Error + 80, // 50: agent.v1.JobResult.mysql_backup:type_name -> agent.v1.JobResult.MySQLBackup + 81, // 51: agent.v1.JobResult.mysql_restore_backup:type_name -> agent.v1.JobResult.MySQLRestoreBackup + 79, // 52: agent.v1.JobResult.mongodb_backup:type_name -> agent.v1.JobResult.MongoDBBackup + 82, // 53: agent.v1.JobResult.mongodb_restore_backup:type_name -> agent.v1.JobResult.MongoDBRestoreBackup + 94, // 54: agent.v1.JobProgress.timestamp:type_name -> google.protobuf.Timestamp + 83, // 55: agent.v1.JobProgress.mysql_backup:type_name -> agent.v1.JobProgress.MySQLBackup + 84, // 56: agent.v1.JobProgress.mysql_restore_backup:type_name -> agent.v1.JobProgress.MySQLRestoreBackup + 85, // 57: agent.v1.JobProgress.logs:type_name -> agent.v1.JobProgress.Logs + 92, // 58: agent.v1.GetVersionsRequest.softwares:type_name -> agent.v1.GetVersionsRequest.Software + 93, // 59: agent.v1.GetVersionsResponse.versions:type_name -> agent.v1.GetVersionsResponse.Version + 99, // 60: agent.v1.AgentMessage.status:type_name -> google.rpc.Status 3, // 61: agent.v1.AgentMessage.ping:type_name -> agent.v1.Ping 7, // 62: agent.v1.AgentMessage.state_changed:type_name -> agent.v1.StateChangedRequest 5, // 63: agent.v1.AgentMessage.qan_collect:type_name -> agent.v1.QANCollectRequest @@ -7241,7 +7267,7 @@ var file_agent_v1_agent_proto_depIdxs = []int32{ 23, // 76: agent.v1.AgentMessage.pbm_switch_pitr:type_name -> agent.v1.PBMSwitchPITRResponse 25, // 77: agent.v1.AgentMessage.agent_logs:type_name -> agent.v1.AgentLogsResponse 29, // 78: agent.v1.AgentMessage.service_info:type_name -> agent.v1.ServiceInfoResponse - 98, // 79: agent.v1.ServerMessage.status:type_name -> google.rpc.Status + 99, // 79: agent.v1.ServerMessage.status:type_name -> google.rpc.Status 4, // 80: agent.v1.ServerMessage.pong:type_name -> agent.v1.Pong 8, // 81: agent.v1.ServerMessage.state_changed:type_name -> agent.v1.StateChangedResponse 6, // 82: agent.v1.ServerMessage.qan_collect:type_name -> agent.v1.QANCollectResponse @@ -7258,57 +7284,58 @@ var file_agent_v1_agent_proto_depIdxs = []int32{ 22, // 93: agent.v1.ServerMessage.pbm_switch_pitr:type_name -> agent.v1.PBMSwitchPITRRequest 24, // 94: agent.v1.ServerMessage.agent_logs:type_name -> agent.v1.AgentLogsRequest 28, // 95: agent.v1.ServerMessage.service_info:type_name -> agent.v1.ServiceInfoRequest - 99, // 96: agent.v1.SetStateRequest.AgentProcess.type:type_name -> inventory.v1.AgentType + 100, // 96: agent.v1.SetStateRequest.AgentProcess.type:type_name -> inventory.v1.AgentType 49, // 97: agent.v1.SetStateRequest.AgentProcess.text_files:type_name -> agent.v1.SetStateRequest.AgentProcess.TextFilesEntry 45, // 98: agent.v1.SetStateRequest.AgentProcessesEntry.value:type_name -> agent.v1.SetStateRequest.AgentProcess - 99, // 99: agent.v1.SetStateRequest.BuiltinAgent.type:type_name -> inventory.v1.AgentType + 100, // 99: agent.v1.SetStateRequest.BuiltinAgent.type:type_name -> inventory.v1.AgentType 2, // 100: agent.v1.SetStateRequest.BuiltinAgent.text_files:type_name -> agent.v1.TextFiles - 47, // 101: agent.v1.SetStateRequest.BuiltinAgentsEntry.value:type_name -> agent.v1.SetStateRequest.BuiltinAgent - 11, // 102: agent.v1.QueryActionMap.MapEntry.value:type_name -> agent.v1.QueryActionValue - 0, // 103: agent.v1.StartActionRequest.MySQLExplainParams.output_format:type_name -> agent.v1.MysqlExplainOutputFormat - 2, // 104: agent.v1.StartActionRequest.MySQLExplainParams.tls_files:type_name -> agent.v1.TextFiles - 2, // 105: agent.v1.StartActionRequest.MySQLShowCreateTableParams.tls_files:type_name -> agent.v1.TextFiles - 2, // 106: agent.v1.StartActionRequest.MySQLShowTableStatusParams.tls_files:type_name -> agent.v1.TextFiles - 2, // 107: agent.v1.StartActionRequest.MySQLShowIndexParams.tls_files:type_name -> agent.v1.TextFiles - 2, // 108: agent.v1.StartActionRequest.PostgreSQLShowCreateTableParams.tls_files:type_name -> agent.v1.TextFiles - 2, // 109: agent.v1.StartActionRequest.PostgreSQLShowIndexParams.tls_files:type_name -> agent.v1.TextFiles - 2, // 110: agent.v1.StartActionRequest.MongoDBExplainParams.text_files:type_name -> agent.v1.TextFiles - 2, // 111: agent.v1.StartActionRequest.MySQLQueryShowParams.tls_files:type_name -> agent.v1.TextFiles - 2, // 112: agent.v1.StartActionRequest.MySQLQuerySelectParams.tls_files:type_name -> agent.v1.TextFiles - 2, // 113: agent.v1.StartActionRequest.PostgreSQLQueryShowParams.tls_files:type_name -> agent.v1.TextFiles - 2, // 114: agent.v1.StartActionRequest.PostgreSQLQuerySelectParams.tls_files:type_name -> agent.v1.TextFiles - 2, // 115: agent.v1.StartActionRequest.MongoDBQueryGetParameterParams.text_files:type_name -> agent.v1.TextFiles - 2, // 116: agent.v1.StartActionRequest.MongoDBQueryBuildInfoParams.text_files:type_name -> agent.v1.TextFiles - 2, // 117: agent.v1.StartActionRequest.MongoDBQueryGetCmdLineOptsParams.text_files:type_name -> agent.v1.TextFiles - 2, // 118: agent.v1.StartActionRequest.MongoDBQueryReplSetGetStatusParams.text_files:type_name -> agent.v1.TextFiles - 2, // 119: agent.v1.StartActionRequest.MongoDBQueryGetDiagnosticDataParams.text_files:type_name -> agent.v1.TextFiles - 1, // 120: agent.v1.StartActionRequest.RestartSystemServiceParams.system_service:type_name -> agent.v1.StartActionRequest.RestartSystemServiceParams.SystemService - 32, // 121: agent.v1.StartJobRequest.MySQLBackup.s3_config:type_name -> agent.v1.S3LocationConfig - 32, // 122: agent.v1.StartJobRequest.MySQLRestoreBackup.s3_config:type_name -> agent.v1.S3LocationConfig - 2, // 123: agent.v1.StartJobRequest.MongoDBBackup.text_files:type_name -> agent.v1.TextFiles - 100, // 124: agent.v1.StartJobRequest.MongoDBBackup.data_model:type_name -> backup.v1.DataModel - 32, // 125: agent.v1.StartJobRequest.MongoDBBackup.s3_config:type_name -> agent.v1.S3LocationConfig - 33, // 126: agent.v1.StartJobRequest.MongoDBBackup.filesystem_config:type_name -> agent.v1.FilesystemLocationConfig - 2, // 127: agent.v1.StartJobRequest.MongoDBRestoreBackup.text_files:type_name -> agent.v1.TextFiles - 101, // 128: agent.v1.StartJobRequest.MongoDBRestoreBackup.pbm_metadata:type_name -> backup.v1.PbmMetadata - 93, // 129: agent.v1.StartJobRequest.MongoDBRestoreBackup.pitr_timestamp:type_name -> google.protobuf.Timestamp - 32, // 130: agent.v1.StartJobRequest.MongoDBRestoreBackup.s3_config:type_name -> agent.v1.S3LocationConfig - 33, // 131: agent.v1.StartJobRequest.MongoDBRestoreBackup.filesystem_config:type_name -> agent.v1.FilesystemLocationConfig - 102, // 132: agent.v1.JobResult.MongoDBBackup.metadata:type_name -> backup.v1.Metadata - 102, // 133: agent.v1.JobResult.MySQLBackup.metadata:type_name -> backup.v1.Metadata - 85, // 134: agent.v1.GetVersionsRequest.Software.mysqld:type_name -> agent.v1.GetVersionsRequest.MySQLd - 86, // 135: agent.v1.GetVersionsRequest.Software.xtrabackup:type_name -> agent.v1.GetVersionsRequest.Xtrabackup - 87, // 136: agent.v1.GetVersionsRequest.Software.xbcloud:type_name -> agent.v1.GetVersionsRequest.Xbcloud - 88, // 137: agent.v1.GetVersionsRequest.Software.qpress:type_name -> agent.v1.GetVersionsRequest.Qpress - 89, // 138: agent.v1.GetVersionsRequest.Software.mongod:type_name -> agent.v1.GetVersionsRequest.MongoDB - 90, // 139: agent.v1.GetVersionsRequest.Software.pbm:type_name -> agent.v1.GetVersionsRequest.PBM - 42, // 140: agent.v1.AgentService.Connect:input_type -> agent.v1.AgentMessage - 43, // 141: agent.v1.AgentService.Connect:output_type -> agent.v1.ServerMessage - 141, // [141:142] is the sub-list for method output_type - 140, // [140:141] is the sub-list for method input_type - 140, // [140:140] is the sub-list for extension type_name - 140, // [140:140] is the sub-list for extension extendee - 0, // [0:140] is the sub-list for field type_name + 50, // 101: agent.v1.SetStateRequest.BuiltinAgent.env:type_name -> agent.v1.SetStateRequest.BuiltinAgent.EnvEntry + 47, // 102: agent.v1.SetStateRequest.BuiltinAgentsEntry.value:type_name -> agent.v1.SetStateRequest.BuiltinAgent + 11, // 103: agent.v1.QueryActionMap.MapEntry.value:type_name -> agent.v1.QueryActionValue + 0, // 104: agent.v1.StartActionRequest.MySQLExplainParams.output_format:type_name -> agent.v1.MysqlExplainOutputFormat + 2, // 105: agent.v1.StartActionRequest.MySQLExplainParams.tls_files:type_name -> agent.v1.TextFiles + 2, // 106: agent.v1.StartActionRequest.MySQLShowCreateTableParams.tls_files:type_name -> agent.v1.TextFiles + 2, // 107: agent.v1.StartActionRequest.MySQLShowTableStatusParams.tls_files:type_name -> agent.v1.TextFiles + 2, // 108: agent.v1.StartActionRequest.MySQLShowIndexParams.tls_files:type_name -> agent.v1.TextFiles + 2, // 109: agent.v1.StartActionRequest.PostgreSQLShowCreateTableParams.tls_files:type_name -> agent.v1.TextFiles + 2, // 110: agent.v1.StartActionRequest.PostgreSQLShowIndexParams.tls_files:type_name -> agent.v1.TextFiles + 2, // 111: agent.v1.StartActionRequest.MongoDBExplainParams.text_files:type_name -> agent.v1.TextFiles + 2, // 112: agent.v1.StartActionRequest.MySQLQueryShowParams.tls_files:type_name -> agent.v1.TextFiles + 2, // 113: agent.v1.StartActionRequest.MySQLQuerySelectParams.tls_files:type_name -> agent.v1.TextFiles + 2, // 114: agent.v1.StartActionRequest.PostgreSQLQueryShowParams.tls_files:type_name -> agent.v1.TextFiles + 2, // 115: agent.v1.StartActionRequest.PostgreSQLQuerySelectParams.tls_files:type_name -> agent.v1.TextFiles + 2, // 116: agent.v1.StartActionRequest.MongoDBQueryGetParameterParams.text_files:type_name -> agent.v1.TextFiles + 2, // 117: agent.v1.StartActionRequest.MongoDBQueryBuildInfoParams.text_files:type_name -> agent.v1.TextFiles + 2, // 118: agent.v1.StartActionRequest.MongoDBQueryGetCmdLineOptsParams.text_files:type_name -> agent.v1.TextFiles + 2, // 119: agent.v1.StartActionRequest.MongoDBQueryReplSetGetStatusParams.text_files:type_name -> agent.v1.TextFiles + 2, // 120: agent.v1.StartActionRequest.MongoDBQueryGetDiagnosticDataParams.text_files:type_name -> agent.v1.TextFiles + 1, // 121: agent.v1.StartActionRequest.RestartSystemServiceParams.system_service:type_name -> agent.v1.StartActionRequest.RestartSystemServiceParams.SystemService + 32, // 122: agent.v1.StartJobRequest.MySQLBackup.s3_config:type_name -> agent.v1.S3LocationConfig + 32, // 123: agent.v1.StartJobRequest.MySQLRestoreBackup.s3_config:type_name -> agent.v1.S3LocationConfig + 2, // 124: agent.v1.StartJobRequest.MongoDBBackup.text_files:type_name -> agent.v1.TextFiles + 101, // 125: agent.v1.StartJobRequest.MongoDBBackup.data_model:type_name -> backup.v1.DataModel + 32, // 126: agent.v1.StartJobRequest.MongoDBBackup.s3_config:type_name -> agent.v1.S3LocationConfig + 33, // 127: agent.v1.StartJobRequest.MongoDBBackup.filesystem_config:type_name -> agent.v1.FilesystemLocationConfig + 2, // 128: agent.v1.StartJobRequest.MongoDBRestoreBackup.text_files:type_name -> agent.v1.TextFiles + 102, // 129: agent.v1.StartJobRequest.MongoDBRestoreBackup.pbm_metadata:type_name -> backup.v1.PbmMetadata + 94, // 130: agent.v1.StartJobRequest.MongoDBRestoreBackup.pitr_timestamp:type_name -> google.protobuf.Timestamp + 32, // 131: agent.v1.StartJobRequest.MongoDBRestoreBackup.s3_config:type_name -> agent.v1.S3LocationConfig + 33, // 132: agent.v1.StartJobRequest.MongoDBRestoreBackup.filesystem_config:type_name -> agent.v1.FilesystemLocationConfig + 103, // 133: agent.v1.JobResult.MongoDBBackup.metadata:type_name -> backup.v1.Metadata + 103, // 134: agent.v1.JobResult.MySQLBackup.metadata:type_name -> backup.v1.Metadata + 86, // 135: agent.v1.GetVersionsRequest.Software.mysqld:type_name -> agent.v1.GetVersionsRequest.MySQLd + 87, // 136: agent.v1.GetVersionsRequest.Software.xtrabackup:type_name -> agent.v1.GetVersionsRequest.Xtrabackup + 88, // 137: agent.v1.GetVersionsRequest.Software.xbcloud:type_name -> agent.v1.GetVersionsRequest.Xbcloud + 89, // 138: agent.v1.GetVersionsRequest.Software.qpress:type_name -> agent.v1.GetVersionsRequest.Qpress + 90, // 139: agent.v1.GetVersionsRequest.Software.mongod:type_name -> agent.v1.GetVersionsRequest.MongoDB + 91, // 140: agent.v1.GetVersionsRequest.Software.pbm:type_name -> agent.v1.GetVersionsRequest.PBM + 42, // 141: agent.v1.AgentService.Connect:input_type -> agent.v1.AgentMessage + 43, // 142: agent.v1.AgentService.Connect:output_type -> agent.v1.ServerMessage + 142, // [142:143] is the sub-list for method output_type + 141, // [141:142] is the sub-list for method input_type + 141, // [141:141] is the sub-list for extension type_name + 141, // [141:141] is the sub-list for extension extendee + 0, // [0:141] is the sub-list for field type_name } func init() { file_agent_v1_agent_proto_init() } @@ -7409,21 +7436,21 @@ func file_agent_v1_agent_proto_init() { (*ServerMessage_AgentLogs)(nil), (*ServerMessage_ServiceInfo)(nil), } - file_agent_v1_agent_proto_msgTypes[71].OneofWrappers = []any{ + file_agent_v1_agent_proto_msgTypes[72].OneofWrappers = []any{ (*StartJobRequest_MySQLBackup_S3Config)(nil), } - file_agent_v1_agent_proto_msgTypes[72].OneofWrappers = []any{ + file_agent_v1_agent_proto_msgTypes[73].OneofWrappers = []any{ (*StartJobRequest_MySQLRestoreBackup_S3Config)(nil), } - file_agent_v1_agent_proto_msgTypes[73].OneofWrappers = []any{ + file_agent_v1_agent_proto_msgTypes[74].OneofWrappers = []any{ (*StartJobRequest_MongoDBBackup_S3Config)(nil), (*StartJobRequest_MongoDBBackup_FilesystemConfig)(nil), } - file_agent_v1_agent_proto_msgTypes[74].OneofWrappers = []any{ + file_agent_v1_agent_proto_msgTypes[75].OneofWrappers = []any{ (*StartJobRequest_MongoDBRestoreBackup_S3Config)(nil), (*StartJobRequest_MongoDBRestoreBackup_FilesystemConfig)(nil), } - file_agent_v1_agent_proto_msgTypes[89].OneofWrappers = []any{ + file_agent_v1_agent_proto_msgTypes[90].OneofWrappers = []any{ (*GetVersionsRequest_Software_Mysqld)(nil), (*GetVersionsRequest_Software_Xtrabackup)(nil), (*GetVersionsRequest_Software_Xbcloud)(nil), @@ -7437,7 +7464,7 @@ func file_agent_v1_agent_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_agent_v1_agent_proto_rawDesc), len(file_agent_v1_agent_proto_rawDesc)), NumEnums: 2, - NumMessages: 91, + NumMessages: 92, NumExtensions: 0, NumServices: 1, }, diff --git a/api/agent/v1/agent.pb.validate.go b/api/agent/v1/agent.pb.validate.go index ed9da319c44..ea95d2a6439 100644 --- a/api/agent/v1/agent.pb.validate.go +++ b/api/agent/v1/agent.pb.validate.go @@ -8268,6 +8268,8 @@ func (m *SetStateRequest_BuiltinAgent) validate(all bool) error { // no validation rules for TlsSkipVerify + // no validation rules for Env + if len(errors) > 0 { return SetStateRequest_BuiltinAgentMultiError(errors) } diff --git a/api/agent/v1/agent.proto b/api/agent/v1/agent.proto index de206a8df16..14f687f5bfb 100644 --- a/api/agent/v1/agent.proto +++ b/api/agent/v1/agent.proto @@ -60,6 +60,8 @@ message SetStateRequest { repeated string env = 5; map text_files = 6; repeated string redact_words = 7; + // Environment variable names to be resolved from pmm-agent's environment. + repeated string env_variable_names = 8; } map agent_processes = 1; // BuiltinAgent describes desired configuration of a single built-in agent for pmm-agent. @@ -80,6 +82,8 @@ message SetStateRequest { bool tls = 8; // TLS certificate wont be verified. bool tls_skip_verify = 9; + // Environment variables to be passed to the built-in agent. + map env = 10; } map builtin_agents = 2; } diff --git a/api/inventory/v1/agents.pb.go b/api/inventory/v1/agents.pb.go index 24b803d5959..2158bd10006 100644 --- a/api/inventory/v1/agents.pb.go +++ b/api/inventory/v1/agents.pb.go @@ -814,8 +814,10 @@ type MongoDBExporter struct { ExposeExporter bool `protobuf:"varint,27,opt,name=expose_exporter,json=exposeExporter,proto3" json:"expose_exporter,omitempty"` // Metrics resolution for this agent. MetricsResolutions *common.MetricsResolutions `protobuf:"bytes,28,opt,name=metrics_resolutions,json=metricsResolutions,proto3" json:"metrics_resolutions,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // Environment variable names passed to the exporter. + EnvironmentVariableNames []string `protobuf:"bytes,29,rep,name=environment_variable_names,json=environmentVariableNames,proto3" json:"environment_variable_names,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *MongoDBExporter) Reset() { @@ -981,6 +983,13 @@ func (x *MongoDBExporter) GetMetricsResolutions() *common.MetricsResolutions { return nil } +func (x *MongoDBExporter) GetEnvironmentVariableNames() []string { + if x != nil { + return x.EnvironmentVariableNames + } + return nil +} + // PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics. type PostgresExporter struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -5609,8 +5618,11 @@ type AddMongoDBExporterParams struct { LogLevel LogLevel `protobuf:"varint,19,opt,name=log_level,json=logLevel,proto3,enum=inventory.v1.LogLevel" json:"log_level,omitempty"` // Optionally expose the exporter process on all public interfaces ExposeExporter bool `protobuf:"varint,20,opt,name=expose_exporter,json=exposeExporter,proto3" json:"expose_exporter,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // Environment variable names to pass to the exporter. + // Values will be resolved from pmm-agent's environment when starting the exporter. + EnvironmentVariableNames []string `protobuf:"bytes,21,rep,name=environment_variable_names,json=environmentVariableNames,proto3" json:"environment_variable_names,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AddMongoDBExporterParams) Reset() { @@ -5783,6 +5795,13 @@ func (x *AddMongoDBExporterParams) GetExposeExporter() bool { return false } +func (x *AddMongoDBExporterParams) GetEnvironmentVariableNames() []string { + if x != nil { + return x.EnvironmentVariableNames + } + return nil +} + type ChangeMongoDBExporterParams struct { state protoimpl.MessageState `protogen:"open.v1"` // Enable this Agent. Agents are enabled by default when they get added. @@ -6896,7 +6915,7 @@ type AddQANMongoDBProfilerAgentParams struct { 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. + // Log level for agent. 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 @@ -7141,7 +7160,7 @@ type AddQANMongoDBMongologAgentParams struct { 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. + // Log level for agent. 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 @@ -8908,7 +8927,7 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aA\n" + "\x13ExtraDsnParamsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x92\a\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xd0\a\n" + "\x0fMongoDBExporter\x12\x19\n" + "\bagent_id\x18\x01 \x01(\tR\aagentId\x12 \n" + "\fpmm_agent_id\x18\x02 \x01(\tR\n" + @@ -8932,7 +8951,8 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\x11process_exec_path\x18\x19 \x01(\tR\x0fprocessExecPath\x123\n" + "\tlog_level\x18\x1a \x01(\x0e2\x16.inventory.v1.LogLevelR\blogLevel\x12'\n" + "\x0fexpose_exporter\x18\x1b \x01(\bR\x0eexposeExporter\x12K\n" + - "\x13metrics_resolutions\x18\x1c \x01(\v2\x1a.common.MetricsResolutionsR\x12metricsResolutions\x1a?\n" + + "\x13metrics_resolutions\x18\x1c \x01(\v2\x1a.common.MetricsResolutionsR\x12metricsResolutions\x12<\n" + + "\x1aenvironment_variable_names\x18\x1d \x03(\tR\x18environmentVariableNames\x1a?\n" + "\x11CustomLabelsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xf2\x06\n" + @@ -9413,7 +9433,7 @@ 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\"\xe9\a\n" + + "\x14_enable_push_metrics\"\xa7\b\n" + "\x18AddMongoDBExporterParams\x12)\n" + "\fpmm_agent_id\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\n" + "pmmAgentId\x12&\n" + @@ -9437,7 +9457,8 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\x11stats_collections\x18\x11 \x03(\tR\x10statsCollections\x12+\n" + "\x11collections_limit\x18\x12 \x01(\x05R\x10collectionsLimit\x123\n" + "\tlog_level\x18\x13 \x01(\x0e2\x16.inventory.v1.LogLevelR\blogLevel\x12'\n" + - "\x0fexpose_exporter\x18\x14 \x01(\bR\x0eexposeExporter\x1a?\n" + + "\x0fexpose_exporter\x18\x14 \x01(\bR\x0eexposeExporter\x12<\n" + + "\x1aenvironment_variable_names\x18\x15 \x03(\tR\x18environmentVariableNames\x1a?\n" + "\x11CustomLabelsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xae\x02\n" + diff --git a/api/inventory/v1/agents.proto b/api/inventory/v1/agents.proto index e9dd7c9f8ef..c35232a180d 100644 --- a/api/inventory/v1/agents.proto +++ b/api/inventory/v1/agents.proto @@ -232,6 +232,8 @@ message MongoDBExporter { bool expose_exporter = 27; // Metrics resolution for this agent. common.MetricsResolutions metrics_resolutions = 28; + // Environment variable names passed to the exporter. + repeated string environment_variable_names = 29; } // PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics. @@ -1030,6 +1032,9 @@ message AddMongoDBExporterParams { LogLevel log_level = 19; // Optionally expose the exporter process on all public interfaces bool expose_exporter = 20; + // Environment variable names to pass to the exporter. + // Values will be resolved from pmm-agent's environment when starting the exporter. + repeated string environment_variable_names = 21; } message ChangeMongoDBExporterParams { @@ -1269,7 +1274,7 @@ message AddQANMongoDBProfilerAgentParams { string authentication_mechanism = 13; // Authentication database. string authentication_database = 14; - // Log level for exporter. + // Log level for agent. LogLevel log_level = 15; } @@ -1317,7 +1322,7 @@ message AddQANMongoDBMongologAgentParams { string authentication_mechanism = 13; // Authentication database. string authentication_database = 14; - // Log level for exporter. + // Log level for agent. LogLevel log_level = 15; } 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 9137686f21d..4eaa2c3844b 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 @@ -2928,6 +2928,9 @@ type AddAgentOKBodyMongodbExporter struct { // Optionally expose the exporter process on all public interfaces ExposeExporter bool `json:"expose_exporter,omitempty"` + // Environment variable names passed to the exporter. + EnvironmentVariableNames []string `json:"environment_variable_names"` + // metrics resolutions MetricsResolutions *AddAgentOKBodyMongodbExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` } @@ -6705,6 +6708,10 @@ type AddAgentParamsBodyMongodbExporter struct { // Optionally expose the exporter process on all public interfaces ExposeExporter bool `json:"expose_exporter,omitempty"` + + // Environment variable names to pass to the exporter. + // Values will be resolved from pmm-agent's environment when starting the exporter. + EnvironmentVariableNames []string `json:"environment_variable_names"` } // Validate validates this add agent params body mongodb exporter 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 2292ac63390..3c747838fd0 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 @@ -2928,6 +2928,9 @@ type ChangeAgentOKBodyMongodbExporter struct { // Optionally expose the exporter process on all public interfaces ExposeExporter bool `json:"expose_exporter,omitempty"` + // Environment variable names passed to the exporter. + EnvironmentVariableNames []string `json:"environment_variable_names"` + // metrics resolutions MetricsResolutions *ChangeAgentOKBodyMongodbExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` } 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 a96ef2c1ae8..e63050b3b3f 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 @@ -2072,6 +2072,9 @@ type GetAgentOKBodyMongodbExporter struct { // Optionally expose the exporter process on all public interfaces ExposeExporter bool `json:"expose_exporter,omitempty"` + // Environment variable names passed to the exporter. + EnvironmentVariableNames []string `json:"environment_variable_names"` + // metrics resolutions MetricsResolutions *GetAgentOKBodyMongodbExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` } diff --git a/api/inventory/v1/json/client/agents_service/list_agents_responses.go b/api/inventory/v1/json/client/agents_service/list_agents_responses.go index 4829432f892..6d91e74d9c4 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 @@ -2234,6 +2234,9 @@ type ListAgentsOKBodyMongodbExporterItems0 struct { // Optionally expose the exporter process on all public interfaces ExposeExporter bool `json:"expose_exporter,omitempty"` + // Environment variable names passed to the exporter. + EnvironmentVariableNames []string `json:"environment_variable_names"` + // metrics resolutions MetricsResolutions *ListAgentsOKBodyMongodbExporterItems0MetricsResolutions `json:"metrics_resolutions,omitempty"` } diff --git a/api/inventory/v1/json/v1.json b/api/inventory/v1/json/v1.json index ecc1872f950..bc11b8a83d6 100644 --- a/api/inventory/v1/json/v1.json +++ b/api/inventory/v1/json/v1.json @@ -601,6 +601,14 @@ } }, "x-order": 18 + }, + "environment_variable_names": { + "description": "Environment variable names passed to the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 19 } } }, @@ -2417,6 +2425,14 @@ "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", "x-order": 19 + }, + "environment_variable_names": { + "description": "Environment variable names to pass to the exporter.\nValues will be resolved from pmm-agent's environment when starting the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 20 } }, "x-order": 3 @@ -3980,6 +3996,14 @@ } }, "x-order": 18 + }, + "environment_variable_names": { + "description": "Environment variable names passed to the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 19 } }, "x-order": 3 @@ -5918,6 +5942,14 @@ } }, "x-order": 18 + }, + "environment_variable_names": { + "description": "Environment variable names passed to the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 19 } }, "x-order": 4 @@ -8669,6 +8701,14 @@ } }, "x-order": 18 + }, + "environment_variable_names": { + "description": "Environment variable names passed to the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 19 } }, "x-order": 2 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 c65c2a2c071..bb030ec6a04 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 @@ -2575,6 +2575,9 @@ type AddServiceOKBodyMongodbMongodbExporter struct { // Optionally expose the exporter process on all public interfaces ExposeExporter bool `json:"expose_exporter,omitempty"` + // Environment variable names passed to the exporter. + EnvironmentVariableNames []string `json:"environment_variable_names"` + // metrics resolutions MetricsResolutions *AddServiceOKBodyMongodbMongodbExporterMetricsResolutions `json:"metrics_resolutions,omitempty"` } @@ -9581,6 +9584,10 @@ type AddServiceParamsBodyMongodb struct { // Optionally expose the exporter process on all public interfaces ExposeExporter bool `json:"expose_exporter,omitempty"` + // Environment variable names to pass to the exporter. + // Values will be resolved from pmm-agent's environment when starting the exporter. + SharedEnvironmentVariableNames []string `json:"shared_environment_variable_names"` + // add node AddNode *AddServiceParamsBodyMongodbAddNode `json:"add_node,omitempty"` } diff --git a/api/management/v1/json/v1.json b/api/management/v1/json/v1.json index a8a3b6f60c4..354f91f52a1 100644 --- a/api/management/v1/json/v1.json +++ b/api/management/v1/json/v1.json @@ -2495,6 +2495,14 @@ "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", "x-order": 32 + }, + "shared_environment_variable_names": { + "description": "Environment variable names to pass to the exporter.\nValues will be resolved from pmm-agent's environment when starting the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 33 } }, "x-order": 1 @@ -4448,6 +4456,14 @@ } }, "x-order": 18 + }, + "environment_variable_names": { + "description": "Environment variable names passed to the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 19 } }, "x-order": 1 diff --git a/api/management/v1/mongodb.pb.go b/api/management/v1/mongodb.pb.go index d29b9caf6c2..9862c91c1ea 100644 --- a/api/management/v1/mongodb.pb.go +++ b/api/management/v1/mongodb.pb.go @@ -104,8 +104,11 @@ type AddMongoDBServiceParams struct { LogLevel v1.LogLevel `protobuf:"varint,33,opt,name=log_level,json=logLevel,proto3,enum=inventory.v1.LogLevel" json:"log_level,omitempty"` // Optionally expose the exporter process on all public interfaces ExposeExporter bool `protobuf:"varint,34,opt,name=expose_exporter,json=exposeExporter,proto3" json:"expose_exporter,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // Environment variable names to pass to the exporter. + // Values will be resolved from pmm-agent's environment when starting the exporter. + SharedEnvironmentVariableNames []string `protobuf:"bytes,36,rep,name=shared_environment_variable_names,json=sharedEnvironmentVariableNames,proto3" json:"shared_environment_variable_names,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AddMongoDBServiceParams) Reset() { @@ -369,6 +372,13 @@ func (x *AddMongoDBServiceParams) GetExposeExporter() bool { return false } +func (x *AddMongoDBServiceParams) GetSharedEnvironmentVariableNames() []string { + if x != nil { + return x.SharedEnvironmentVariableNames + } + return nil +} + type MongoDBServiceResult struct { state protoimpl.MessageState `protogen:"open.v1"` Service *v1.MongoDBService `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` @@ -441,7 +451,7 @@ 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\"\x83\f\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\"\xce\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" + @@ -477,7 +487,8 @@ const file_management_v1_mongodb_proto_rawDesc = "" + "\x11collections_limit\x18\x1f \x01(\x05R\x10collectionsLimit\x122\n" + "\x15enable_all_collectors\x18 \x01(\bR\x13enableAllCollectors\x123\n" + "\tlog_level\x18! \x01(\x0e2\x16.inventory.v1.LogLevelR\blogLevel\x12'\n" + - "\x0fexpose_exporter\x18\" \x01(\bR\x0eexposeExporter\x1a?\n" + + "\x0fexpose_exporter\x18\" \x01(\bR\x0eexposeExporter\x12I\n" + + "!shared_environment_variable_names\x18$ \x03(\tR\x1esharedEnvironmentVariableNames\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\"\xca\x02\n" + diff --git a/api/management/v1/mongodb.proto b/api/management/v1/mongodb.proto index ea626bda872..a485bba8922 100644 --- a/api/management/v1/mongodb.proto +++ b/api/management/v1/mongodb.proto @@ -92,6 +92,9 @@ message AddMongoDBServiceParams { inventory.v1.LogLevel log_level = 33; // Optionally expose the exporter process on all public interfaces bool expose_exporter = 34; + // Environment variable names to pass to the exporter. + // Values will be resolved from pmm-agent's environment when starting the exporter. + repeated string shared_environment_variable_names = 36; } message MongoDBServiceResult { diff --git a/api/swagger/swagger-dev.json b/api/swagger/swagger-dev.json index 5151a8cec36..c1035eec4a5 100644 --- a/api/swagger/swagger-dev.json +++ b/api/swagger/swagger-dev.json @@ -5735,6 +5735,14 @@ } }, "x-order": 18 + }, + "environment_variable_names": { + "description": "Environment variable names passed to the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 19 } } }, @@ -7551,6 +7559,14 @@ "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", "x-order": 19 + }, + "environment_variable_names": { + "description": "Environment variable names to pass to the exporter.\nValues will be resolved from pmm-agent's environment when starting the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 20 } }, "x-order": 3 @@ -9114,6 +9130,14 @@ } }, "x-order": 18 + }, + "environment_variable_names": { + "description": "Environment variable names passed to the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 19 } }, "x-order": 3 @@ -11052,6 +11076,14 @@ } }, "x-order": 18 + }, + "environment_variable_names": { + "description": "Environment variable names passed to the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 19 } }, "x-order": 4 @@ -13803,6 +13835,14 @@ } }, "x-order": 18 + }, + "environment_variable_names": { + "description": "Environment variable names passed to the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 19 } }, "x-order": 2 @@ -21743,6 +21783,14 @@ "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", "x-order": 32 + }, + "shared_environment_variable_names": { + "description": "Environment variable names to pass to the exporter.\nValues will be resolved from pmm-agent's environment when starting the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 33 } }, "x-order": 1 @@ -23696,6 +23744,14 @@ } }, "x-order": 18 + }, + "environment_variable_names": { + "description": "Environment variable names passed to the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 19 } }, "x-order": 1 diff --git a/api/swagger/swagger.json b/api/swagger/swagger.json index 5d4d24e5f33..241afa77d5f 100644 --- a/api/swagger/swagger.json +++ b/api/swagger/swagger.json @@ -4777,6 +4777,14 @@ } }, "x-order": 18 + }, + "environment_variable_names": { + "description": "Environment variable names passed to the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 19 } } }, @@ -6593,6 +6601,14 @@ "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", "x-order": 19 + }, + "environment_variable_names": { + "description": "Environment variable names to pass to the exporter.\nValues will be resolved from pmm-agent's environment when starting the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 20 } }, "x-order": 3 @@ -8156,6 +8172,14 @@ } }, "x-order": 18 + }, + "environment_variable_names": { + "description": "Environment variable names passed to the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 19 } }, "x-order": 3 @@ -10094,6 +10118,14 @@ } }, "x-order": 18 + }, + "environment_variable_names": { + "description": "Environment variable names passed to the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 19 } }, "x-order": 4 @@ -12845,6 +12877,14 @@ } }, "x-order": 18 + }, + "environment_variable_names": { + "description": "Environment variable names passed to the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 19 } }, "x-order": 2 @@ -20785,6 +20825,14 @@ "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", "x-order": 32 + }, + "shared_environment_variable_names": { + "description": "Environment variable names to pass to the exporter.\nValues will be resolved from pmm-agent's environment when starting the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 33 } }, "x-order": 1 @@ -22738,6 +22786,14 @@ } }, "x-order": 18 + }, + "environment_variable_names": { + "description": "Environment variable names passed to the exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 19 } }, "x-order": 1 diff --git a/managed/models/agent_helpers.go b/managed/models/agent_helpers.go index d2edd1c897e..a84b4868b95 100644 --- a/managed/models/agent_helpers.go +++ b/managed/models/agent_helpers.go @@ -759,25 +759,26 @@ func CreateExternalExporter(q *reform.Querier, params *CreateExternalExporterPar // CreateAgentParams params for add common exporter. type CreateAgentParams struct { - PMMAgentID string - NodeID string - ServiceID string - Username string - Password string - AgentPassword string - CustomLabels map[string]string - TLS bool - TLSSkipVerify bool - LogLevel string - Disabled bool - ExporterOptions ExporterOptions - QANOptions QANOptions - AWSOptions AWSOptions - AzureOptions AzureOptions - MongoDBOptions MongoDBOptions - MySQLOptions MySQLOptions - PostgreSQLOptions PostgreSQLOptions - ValkeyOptions ValkeyOptions + PMMAgentID string + NodeID string + ServiceID string + Username string + Password string + AgentPassword string + CustomLabels map[string]string + EnvironmentVariableNames []string + TLS bool + TLSSkipVerify bool + LogLevel string + Disabled bool + ExporterOptions ExporterOptions + QANOptions QANOptions + AWSOptions AWSOptions + AzureOptions AzureOptions + MongoDBOptions MongoDBOptions + MySQLOptions MySQLOptions + PostgreSQLOptions PostgreSQLOptions + ValkeyOptions ValkeyOptions } func compatibleNodeAndAgent(nodeType NodeType, agentType AgentType) bool { @@ -923,6 +924,9 @@ func CreateAgent(q *reform.Querier, agentType AgentType, params *CreateAgentPara if err := row.SetCustomLabels(params.CustomLabels); err != nil { return nil, err } + if err := row.SetEnvironmentVariableNames(params.EnvironmentVariableNames); err != nil { + return nil, err + } encryptedAgent := EncryptAgent(trimUnicodeNilsInCertFiles(*row)) if err := q.Insert(&encryptedAgent); err != nil { diff --git a/managed/models/agent_model.go b/managed/models/agent_model.go index c281e866470..609d237bd6a 100644 --- a/managed/models/agent_model.go +++ b/managed/models/agent_model.go @@ -18,6 +18,7 @@ package models import ( "bytes" "database/sql/driver" + "encoding/json" "fmt" "maps" "net" @@ -295,15 +296,16 @@ func (c ValkeyOptions) IsEmpty() bool { // //reform:agents type Agent struct { - AgentID string `reform:"agent_id,pk"` - AgentType AgentType `reform:"agent_type"` - RunsOnNodeID *string `reform:"runs_on_node_id"` - ServiceID *string `reform:"service_id"` - NodeID *string `reform:"node_id"` - PMMAgentID *string `reform:"pmm_agent_id"` - CustomLabels []byte `reform:"custom_labels"` - CreatedAt time.Time `reform:"created_at"` - UpdatedAt time.Time `reform:"updated_at"` + AgentID string `reform:"agent_id,pk"` + AgentType AgentType `reform:"agent_type"` + RunsOnNodeID *string `reform:"runs_on_node_id"` + ServiceID *string `reform:"service_id"` + NodeID *string `reform:"node_id"` + PMMAgentID *string `reform:"pmm_agent_id"` + CustomLabels []byte `reform:"custom_labels"` + EnvironmentVariables []byte `reform:"environment_variables"` + CreatedAt time.Time `reform:"created_at"` + UpdatedAt time.Time `reform:"updated_at"` Disabled bool `reform:"disabled"` Status string `reform:"status"` @@ -338,6 +340,9 @@ func (s *Agent) BeforeInsert() error { if len(s.CustomLabels) == 0 { s.CustomLabels = nil } + if len(s.EnvironmentVariables) == 0 { + s.EnvironmentVariables = nil + } if s.Status == "" && s.AgentType != ExternalExporterType && s.AgentType != PMMAgentType { s.Status = AgentStatusUnknown } @@ -353,6 +358,9 @@ func (s *Agent) BeforeUpdate() error { if len(s.CustomLabels) == 0 { s.CustomLabels = nil } + if len(s.EnvironmentVariables) == 0 { + s.EnvironmentVariables = nil + } if s.Disabled { s.Status = agentStatusDone } @@ -366,6 +374,9 @@ func (s *Agent) AfterFind() error { if len(s.CustomLabels) == 0 { s.CustomLabels = nil } + if len(s.EnvironmentVariables) == 0 { + s.EnvironmentVariables = nil + } return nil } @@ -379,6 +390,34 @@ func (s *Agent) SetCustomLabels(m map[string]string) error { return setLabels(m, &s.CustomLabels) } +// GetEnvironmentVariableNames decodes shared environment variable names. +func (s *Agent) GetEnvironmentVariableNames() ([]string, error) { + if s.EnvironmentVariables == nil { + return nil, nil + } + + var names []string + if err := json.Unmarshal(s.EnvironmentVariables, &names); err != nil { + return nil, errors.Wrap(err, "failed to unmarshal shared environment variable names") + } + return names, nil +} + +// SetEnvironmentVariableNames encodes shared environment variable names. +func (s *Agent) SetEnvironmentVariableNames(names []string) error { + if len(names) == 0 { + s.EnvironmentVariables = nil + return nil + } + + b, err := json.Marshal(names) + if err != nil { + return errors.Wrap(err, "failed to marshal shared environment variable names") + } + s.EnvironmentVariables = b + return nil +} + // GetAgentPassword returns agent password, if it is empty then agent ID. func (s *Agent) GetAgentPassword() string { password := s.AgentID diff --git a/managed/models/agent_model_reform.go b/managed/models/agent_model_reform.go index 7d3e2a4dda5..2f6137d7a6d 100644 --- a/managed/models/agent_model_reform.go +++ b/managed/models/agent_model_reform.go @@ -35,6 +35,7 @@ func (v *agentTableType) Columns() []string { "node_id", "pmm_agent_id", "custom_labels", + "environment_variables", "created_at", "updated_at", "disabled", @@ -87,6 +88,7 @@ var AgentTable = &agentTableType{ {Name: "NodeID", Type: "*string", Column: "node_id"}, {Name: "PMMAgentID", Type: "*string", Column: "pmm_agent_id"}, {Name: "CustomLabels", Type: "[]uint8", Column: "custom_labels"}, + {Name: "EnvironmentVariables", Type: "[]uint8", Column: "environment_variables"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, {Name: "UpdatedAt", Type: "time.Time", Column: "updated_at"}, {Name: "Disabled", Type: "bool", Column: "disabled"}, @@ -116,7 +118,7 @@ var AgentTable = &agentTableType{ // String returns a string representation of this struct or record. func (s Agent) String() string { - res := make([]string, 28) + res := make([]string, 29) res[0] = "AgentID: " + reform.Inspect(s.AgentID, true) res[1] = "AgentType: " + reform.Inspect(s.AgentType, true) res[2] = "RunsOnNodeID: " + reform.Inspect(s.RunsOnNodeID, true) @@ -124,27 +126,28 @@ func (s Agent) String() string { res[4] = "NodeID: " + reform.Inspect(s.NodeID, true) res[5] = "PMMAgentID: " + reform.Inspect(s.PMMAgentID, true) res[6] = "CustomLabels: " + reform.Inspect(s.CustomLabels, true) - res[7] = "CreatedAt: " + reform.Inspect(s.CreatedAt, true) - res[8] = "UpdatedAt: " + reform.Inspect(s.UpdatedAt, true) - res[9] = "Disabled: " + reform.Inspect(s.Disabled, true) - res[10] = "Status: " + reform.Inspect(s.Status, true) - res[11] = "ListenPort: " + reform.Inspect(s.ListenPort, true) - res[12] = "Version: " + reform.Inspect(s.Version, true) - res[13] = "ProcessExecPath: " + reform.Inspect(s.ProcessExecPath, true) - res[14] = "Username: " + reform.Inspect(s.Username, true) - res[15] = "Password: " + reform.Inspect(s.Password, true) - res[16] = "AgentPassword: " + reform.Inspect(s.AgentPassword, true) - res[17] = "TLS: " + reform.Inspect(s.TLS, true) - res[18] = "TLSSkipVerify: " + reform.Inspect(s.TLSSkipVerify, true) - res[19] = "LogLevel: " + reform.Inspect(s.LogLevel, true) - res[20] = "ExporterOptions: " + reform.Inspect(s.ExporterOptions, true) - res[21] = "QANOptions: " + reform.Inspect(s.QANOptions, true) - res[22] = "AWSOptions: " + reform.Inspect(s.AWSOptions, true) - res[23] = "AzureOptions: " + reform.Inspect(s.AzureOptions, true) - res[24] = "MongoDBOptions: " + reform.Inspect(s.MongoDBOptions, true) - res[25] = "MySQLOptions: " + reform.Inspect(s.MySQLOptions, true) - res[26] = "PostgreSQLOptions: " + reform.Inspect(s.PostgreSQLOptions, true) - res[27] = "ValkeyOptions: " + reform.Inspect(s.ValkeyOptions, true) + res[7] = "EnvironmentVariables: " + reform.Inspect(s.EnvironmentVariables, true) + res[8] = "CreatedAt: " + reform.Inspect(s.CreatedAt, true) + res[9] = "UpdatedAt: " + reform.Inspect(s.UpdatedAt, true) + res[10] = "Disabled: " + reform.Inspect(s.Disabled, true) + res[11] = "Status: " + reform.Inspect(s.Status, true) + res[12] = "ListenPort: " + reform.Inspect(s.ListenPort, true) + res[13] = "Version: " + reform.Inspect(s.Version, true) + res[14] = "ProcessExecPath: " + reform.Inspect(s.ProcessExecPath, true) + res[15] = "Username: " + reform.Inspect(s.Username, true) + res[16] = "Password: " + reform.Inspect(s.Password, true) + res[17] = "AgentPassword: " + reform.Inspect(s.AgentPassword, true) + res[18] = "TLS: " + reform.Inspect(s.TLS, true) + res[19] = "TLSSkipVerify: " + reform.Inspect(s.TLSSkipVerify, true) + res[20] = "LogLevel: " + reform.Inspect(s.LogLevel, true) + res[21] = "ExporterOptions: " + reform.Inspect(s.ExporterOptions, true) + res[22] = "QANOptions: " + reform.Inspect(s.QANOptions, true) + res[23] = "AWSOptions: " + reform.Inspect(s.AWSOptions, true) + res[24] = "AzureOptions: " + reform.Inspect(s.AzureOptions, true) + res[25] = "MongoDBOptions: " + reform.Inspect(s.MongoDBOptions, true) + res[26] = "MySQLOptions: " + reform.Inspect(s.MySQLOptions, true) + res[27] = "PostgreSQLOptions: " + reform.Inspect(s.PostgreSQLOptions, true) + res[28] = "ValkeyOptions: " + reform.Inspect(s.ValkeyOptions, true) return strings.Join(res, ", ") } @@ -159,6 +162,7 @@ func (s *Agent) Values() []interface{} { s.NodeID, s.PMMAgentID, s.CustomLabels, + s.EnvironmentVariables, s.CreatedAt, s.UpdatedAt, s.Disabled, @@ -194,6 +198,7 @@ func (s *Agent) Pointers() []interface{} { &s.NodeID, &s.PMMAgentID, &s.CustomLabels, + &s.EnvironmentVariables, &s.CreatedAt, &s.UpdatedAt, &s.Disabled, diff --git a/managed/models/database.go b/managed/models/database.go index 747690c48ac..16629be96bc 100644 --- a/managed/models/database.go +++ b/managed/models/database.go @@ -1149,6 +1149,9 @@ var databaseSchema = [][]string{ 112: { `UPDATE agents SET disabled = true WHERE agent_type = 'qan-postgresql-pgstatements-agent' AND service_id = (SELECT service_id FROM services WHERE service_name = 'pmm-server-postgresql' LIMIT 1);`, }, + 113: { + `ALTER TABLE agents ADD COLUMN environment_variables TEXT`, + }, } // ^^^ Avoid default values in schema definition. ^^^ diff --git a/managed/services/agents/mongodb.go b/managed/services/agents/mongodb.go index f650fe12174..a4b0d61f036 100644 --- a/managed/services/agents/mongodb.go +++ b/managed/services/agents/mongodb.go @@ -57,6 +57,10 @@ func mongodbExporterConfig(node *models.Node, service *models.Service, exporter sort.Strings(args) database := exporter.MongoDBOptions.AuthenticationDatabase + envVarNames, err := exporter.GetEnvironmentVariableNames() + if err != nil { + return nil, err + } env := []string{ fmt.Sprintf("MONGODB_URI=%s", exporter.DSN(service, models.DSNParams{DialTimeout: time.Second, Database: database}, tdp, pmmAgentVersion)), } @@ -67,6 +71,7 @@ func mongodbExporterConfig(node *models.Node, service *models.Service, exporter TemplateRightDelim: tdp.Right, Args: args, Env: env, + EnvVariableNames: envVarNames, TextFiles: exporter.Files(), } diff --git a/managed/services/inventory/agents.go b/managed/services/inventory/agents.go index 9239e060057..bad2990c622 100644 --- a/managed/services/inventory/agents.go +++ b/managed/services/inventory/agents.go @@ -364,15 +364,16 @@ func (as *AgentsService) AddMongoDBExporter(ctx context.Context, p *inventoryv1. var agent *inventoryv1.MongoDBExporter 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, - AgentPassword: p.AgentPassword, - CustomLabels: p.CustomLabels, - TLS: p.Tls, - TLSSkipVerify: p.TlsSkipVerify, - MongoDBOptions: models.MongoDBOptionsFromRequest(p), + PMMAgentID: p.PmmAgentId, + ServiceID: p.ServiceId, + Username: p.Username, + Password: p.Password, + AgentPassword: p.AgentPassword, + CustomLabels: p.CustomLabels, + EnvironmentVariableNames: p.GetEnvironmentVariableNames(), + TLS: p.Tls, + TLSSkipVerify: p.TlsSkipVerify, + MongoDBOptions: models.MongoDBOptionsFromRequest(p), ExporterOptions: models.ExporterOptions{ PushMetrics: p.PushMetrics, DisabledCollectors: p.DisableCollectors, diff --git a/managed/services/management/mongodb.go b/managed/services/management/mongodb.go index 04064ebb40b..093b6404c95 100644 --- a/managed/services/management/mongodb.go +++ b/managed/services/management/mongodb.go @@ -63,15 +63,16 @@ func (s *ManagementService) addMongoDB(ctx context.Context, req *managementv1.Ad } row, err := models.CreateAgent(tx.Querier, models.MongoDBExporterType, &models.CreateAgentParams{ - PMMAgentID: req.PmmAgentId, - ServiceID: service.ServiceID, - Username: req.Username, - Password: req.Password, - AgentPassword: req.AgentPassword, - TLS: req.Tls, - TLSSkipVerify: req.TlsSkipVerify, - MongoDBOptions: models.MongoDBOptionsFromRequest(req), - LogLevel: services.SpecifyLogLevel(req.LogLevel, inventoryv1.LogLevel_LOG_LEVEL_FATAL), + PMMAgentID: req.PmmAgentId, + ServiceID: service.ServiceID, + Username: req.Username, + Password: req.Password, + AgentPassword: req.AgentPassword, + EnvironmentVariableNames: req.SharedEnvironmentVariableNames, + TLS: req.Tls, + TLSSkipVerify: req.TlsSkipVerify, + MongoDBOptions: models.MongoDBOptionsFromRequest(req), + LogLevel: services.SpecifyLogLevel(req.LogLevel, inventoryv1.LogLevel_LOG_LEVEL_FATAL), ExporterOptions: models.ExporterOptions{ ExposeExporter: req.ExposeExporter, PushMetrics: isPushMode(req.MetricsMode), @@ -100,12 +101,13 @@ func (s *ManagementService) addMongoDB(ctx context.Context, req *managementv1.Ad if req.QanMongodbProfiler { row, err = models.CreateAgent(tx.Querier, models.QANMongoDBProfilerAgentType, &models.CreateAgentParams{ - PMMAgentID: req.PmmAgentId, - ServiceID: service.ServiceID, - Username: req.Username, - Password: req.Password, - TLS: req.Tls, - TLSSkipVerify: req.TlsSkipVerify, + PMMAgentID: req.PmmAgentId, + ServiceID: service.ServiceID, + Username: req.Username, + Password: req.Password, + EnvironmentVariableNames: req.SharedEnvironmentVariableNames, + TLS: req.Tls, + TLSSkipVerify: req.TlsSkipVerify, QANOptions: models.QANOptions{ MaxQueryLength: req.MaxQueryLength, // TODO QueryExamplesDisabled https://jira.percona.com/browse/PMM-7860 @@ -126,12 +128,13 @@ func (s *ManagementService) addMongoDB(ctx context.Context, req *managementv1.Ad 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, + PMMAgentID: req.PmmAgentId, + ServiceID: service.ServiceID, + Username: req.Username, + Password: req.Password, + EnvironmentVariableNames: req.SharedEnvironmentVariableNames, + TLS: req.Tls, + TLSSkipVerify: req.TlsSkipVerify, QANOptions: models.QANOptions{ MaxQueryLength: req.MaxQueryLength, // TODO QueryExamplesDisabled https://jira.percona.com/browse/PMM-7860