Skip to content

Commit

Permalink
PMM-4172 pt-mysql-summary (#600)
Browse files Browse the repository at this point in the history
* Added go 1.15.x. (#592)

Co-authored-by: Alexey Palazhchenko <alexey.palazhchenko@percona.com>

* SAAS-107 Add comments (#581)

* PMM-6759 Support GET verb for pmm-agent's API (#589)

* SAAS-377 Disable checks by name (#588)

* SAAS-377 Add API for checks disabling

* SAAS-377 Make checks API consistent with other PMM APIs

* SAAS-377 Eliminate types collision in swagger generated code

* SAAS-377 Renaming

* SAAS-377 Fix typo

* SAAS-377 Renaming

* SAAS-377 Refactoring

* SAAS-377 Renaming

* SAAS-377 Minor tweaks

Co-authored-by: Alexey Palazhchenko <alexey.palazhchenko@percona.com>

* PMM-4172 PT MySQL summary.

* PMM-4172 Fix build.

* PMM-4172 Add endpoint for mysql summary.

* PMM-4172 Add params for request.

* PMM-4172 Change params for request.

* PMM-4172 Params.

* PMM-4172 Changes.

* PMM-4172 Changes.

* PMM-4172 Changes.

* Updated pt-mysql-summary messages comments.

* [PMM-4172] Regenerated files after the comments' change.

* [PMM-4172] Updated PTMySQLSummaryParams struct.

* PMM-4172 Changed the PTMySQLSummaryParams message.

* PMM-4172 Changed message structure's items according to AlekSi's suggestion.

* PMM-4172 Changed port from string to uint32.

Co-authored-by: Jaroslav Musil <49949480+yareach@users.noreply.github.com>
Co-authored-by: Alexey Palazhchenko <alexey.palazhchenko@percona.com>
Co-authored-by: Artem Gavrilov <artem.gavrilov@percona.com>
Co-authored-by: Jiří Čtvrtka <jiri.ctvrtka.sde@gmail.com>
Co-authored-by: JiriCtvrtka <62988319+JiriCtvrtka@users.noreply.github.com>
Co-authored-by: Jaroslav Musil <jaroslav.musil.sde@gmail.com>
  • Loading branch information
7 people committed Nov 13, 2020
1 parent 1255fe3 commit f6b182f
Show file tree
Hide file tree
Showing 12 changed files with 1,438 additions and 360 deletions.
495 changes: 310 additions & 185 deletions api/agentpb/agent.pb.go

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions api/agentpb/agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ message StartActionRequest {
// PTSummaryParams describes parameters for PT summary.
message PTSummaryParams {}

// PTMySQLSummaryParams describes parameters for PT MySQL summary.
message PTMySQLSummaryParams {
string address = 1;
uint32 port = 2;
string socket = 3;
string username = 4;
string password = 5;
}
// MySQLQueryShowParams describes MySQL SHOW query action parameters.
message MySQLQueryShowParams {
// DSN for the service. May contain connection (dial) timeout.
Expand Down Expand Up @@ -218,6 +226,7 @@ message StartActionRequest {
PostgreSQLShowIndexParams postgresql_show_index_params = 7;
MongoDBExplainParams mongodb_explain_params = 8;
PTSummaryParams pt_summary_params = 10;
PTMySQLSummaryParams pt_mysql_summary_params = 11;
MySQLQueryShowParams mysql_query_show_params = 50;
MySQLQuerySelectParams mysql_query_select_params = 51;
PostgreSQLQueryShowParams postgresql_query_show_params = 52;
Expand Down
10 changes: 10 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.

560 changes: 385 additions & 175 deletions api/managementpb/actions.pb.go

Large diffs are not rendered by default.

81 changes: 81 additions & 0 deletions api/managementpb/actions.pb.gw.go

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

24 changes: 24 additions & 0 deletions api/managementpb/actions.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ enum ActionType {
POSTGRESQL_SHOW_INDEX = 6;
MONGODB_EXPLAIN = 7;
PT_SUMMARY = 8;
PT_MYSQL_SUMMARY = 9;
}

message GetActionRequest {
Expand Down Expand Up @@ -288,6 +289,22 @@ message StartPTSummaryActionResponse {
string pmm_agent_id = 2;
}

// Message to prepare pt-mysql-summary data
message StartPTMySQLSummaryActionRequest {
// pmm-agent ID where to run this Action.
string pmm_agent_id = 1;
// Service ID for this Action.
string service_id = 2;
}

// Message to retrieve the prepared pt-mysql-summary data
message StartPTMySQLSummaryActionResponse {
// Unique Action ID.
string action_id = 1;
// pmm-agent ID where to this Action was started.
string pmm_agent_id = 2;
}

message CancelActionRequest {
// Unique Action ID. Required.
string action_id = 1 [
Expand Down Expand Up @@ -378,6 +395,13 @@ service Actions {
body: "*"
};
}
// StartPTMySQLSummaryAction starts pt--mysql-summary Action.
rpc StartPTMySQLSummaryAction(StartPTMySQLSummaryActionRequest) returns (StartPTMySQLSummaryActionResponse) {
option (google.api.http) = {
post: "/v1/management/Actions/StartPTMySQLSummary"
body: "*"
};
}
// CancelAction stops an Action.
rpc CancelAction(CancelActionRequest) returns (CancelActionResponse) {
option (google.api.http) = {
Expand Down
6 changes: 6 additions & 0 deletions api/managementpb/actions.validator.pb.go

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

35 changes: 35 additions & 0 deletions api/managementpb/json/client/actions/actions_client.go

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

Loading

0 comments on commit f6b182f

Please sign in to comment.