Skip to content

Commit

Permalink
PMM-5364 SSL support for Mongo. (#618)
Browse files Browse the repository at this point in the history
* PMM-5364 Changes.

* PMM-5364 Changes.

* PMM-5364 Fix names.

* PMM-5364 Gen.

* PMM-5364 Also add fileds into management.

* Revert "PMM-4172 pt-mysql-summary (#600)"

This reverts commit f6b182f.

* Revert "Revert "PMM-4172 pt-mysql-summary (#600)""

This reverts commit db10799.

* PMM-5364 Add fields also for QAN MongoDB profiler.

* PMM-5364 Gen.

* PMM-5364 Tweak comments

* PMM-5364 Add cert fields also for mongo actions.

* PMM-5364 Gen.

* PMM-5364 Gen.

* PMM-5364 Fix.

* PMM-5364 Renaming.

* PMM-5367 Gen.

* PM-5364 Field name typo fix.

* PMM-5364 Fix typo in other places.

* PMM-5364 Replace mongodb_options with files map.

* PMM-5364 Add delimiters.

* PMM-5364 Add text files to built-in agents.

* PMM-5364 Add comments.

* PMM-5364 Removed unnecessary struct.

Co-authored-by: Andrii Skomorokhov <[email protected]>
Co-authored-by: Alexey Palazhchenko <[email protected]>
Co-authored-by: Alexey Palazhchenko <[email protected]>
Co-authored-by: Nurlan Moldomurov <[email protected]>
Co-authored-by: Nurlan Moldomurov <[email protected]>
  • Loading branch information
6 people authored Dec 29, 2020
1 parent 947e30b commit 3776869
Show file tree
Hide file tree
Showing 13 changed files with 2,001 additions and 1,519 deletions.
1,564 changes: 871 additions & 693 deletions api/agentpb/agent.pb.go

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions api/agentpb/agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ import "inventorypb/agent_status.proto";
import "inventorypb/agents.proto";
import "inventorypb/services.proto";

// TextFiles contains files which can be used to connect to DB (certificates, keys and etc).
message TextFiles {
// files contains files which can be used to connect to DB (certificates, keys and etc).
map<string, string> files = 1;
// template_left_delim is used to replace placeholders in templates (DSN and etc.) with paths to files.
string template_left_delim = 2;
// template_right_delim is used to replace placeholders in templates (DSN and etc.) with paths to files.
string template_right_delim = 3;
}

// Ping is a AgentMessage/ServerMessage for checking connectivity, latency and clock drift.
message Ping {}

Expand Down Expand Up @@ -58,6 +68,8 @@ message SetStateRequest {
bool disable_query_examples = 3;
// Instructs QAN Agents to rotate query log file or table at this size if > 0.
int64 max_query_log_size = 4;
// Contains files and their contents which can be used in DSN.
TextFiles text_files = 5;
}
map<string, BuiltinAgent> builtin_agents = 2;
}
Expand Down Expand Up @@ -161,8 +173,11 @@ message StartActionRequest {
// MongoDBExplainParams describes MongoDB EXPLAIN action parameters.
message MongoDBExplainParams {
// DSN for the service. May contain connection (dial) timeout.
// May contain placeholders for file paths in DSN.
string dsn = 1;
string query = 2;
// Contains files and their contents which can be used in DSN.
TextFiles text_files = 3;
}
// PTSummaryParams describes parameters for PT summary.
message PTSummaryParams {}
Expand Down Expand Up @@ -196,17 +211,26 @@ message StartActionRequest {
// MongoDBQueryGetParameterParams describes MongoDB getParameter query action parameters.
message MongoDBQueryGetParameterParams {
// DSN for the service. May contain connection (dial) timeout.
// May contain placeholders for file paths in DSN.
string dsn = 1;
// Contains files and their contents which can be used in DSN.
TextFiles text_files = 2;
}
// MongoDBQueryBuildInfoParams describes MongoDB buildInfo query action parameters.
message MongoDBQueryBuildInfoParams {
// DSN for the service. May contain connection (dial) timeout.
// May contain placeholders for file paths in DSN.
string dsn = 1;
// Contains files and their contents which can be used in DSN.
TextFiles text_files = 2;
}
// MongoDBQueryGetCmdLineOptsParams describes MongoDB getCmdLineOpts query action parameters.
message MongoDBQueryGetCmdLineOptsParams {
// DSN for the service. May contain connection (dial) timeout.
// May contain placeholders for file paths in DSN.
string dsn = 1;
// Contains files and their contents which can be used in DSN.
TextFiles text_files = 2;
}
string action_id = 1;
oneof params {
Expand Down Expand Up @@ -264,6 +288,8 @@ message CheckConnectionRequest {
string dsn = 2;
// Timeout for the whole request.
google.protobuf.Duration timeout = 3;
// Contains files and their contents which can be used in DSN.
TextFiles text_files = 4;
}

// CheckConnectionResponse is an AgentMessage containing a result of connection check.
Expand Down
34 changes: 34 additions & 0 deletions api/agentpb/agent.validator.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3776869

Please sign in to comment.