Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dan/top infra errors #3195

Merged
merged 6 commits into from
Mar 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .bldr.toml
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,7 @@ paths = [
"api/config/ui/*",
"api/config/workflow_nginx/*",
"api/config/workflow_server/*",
"api/external/cfgmgmt/*",
"api/external/common/*",
"api/external/ingest/*",
"api/interservice/authn/*",
Expand Down Expand Up @@ -1781,6 +1782,7 @@ paths = [
"components/data-feed-service/*",
"api/config/platform/*",
"api/config/shared/*",
"api/external/cfgmgmt/*",
"api/external/common/*",
"api/external/data_feed/*",
"api/external/secrets/*",
Expand Down
183 changes: 120 additions & 63 deletions api/external/cfgmgmt/cfgmgmt.pb.go

Large diffs are not rendered by default.

77 changes: 77 additions & 0 deletions api/external/cfgmgmt/cfgmgmt.pb.gw.go

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

3 changes: 3 additions & 0 deletions api/external/cfgmgmt/cfgmgmt.pb.policy.go

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

20 changes: 20 additions & 0 deletions api/external/cfgmgmt/cfgmgmt.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ option go_package = "github.com/chef/automate/api/external/cfgmgmt";
import "api/external/cfgmgmt/request/actions.proto";
import "api/external/cfgmgmt/request/nodes.proto";
import "api/external/cfgmgmt/request/stats.proto";
import "api/external/cfgmgmt/request/errors.proto";
import "api/external/cfgmgmt/request/root.proto";

import "api/external/cfgmgmt/response/actions.proto";
import "api/external/cfgmgmt/response/nodes.proto";
import "api/external/cfgmgmt/response/stats.proto";
import "api/external/cfgmgmt/response/errors.proto";

import "api/external/common/query/parameters.proto";
import "api/external/common/version/version.proto";
Expand Down Expand Up @@ -268,4 +270,22 @@ service ConfigMgmt {
option (chef.automate.api.iam.policy).resource = "infra:nodes:{revision_id}";
option (chef.automate.api.iam.policy).action = "infra:nodes:list";
};

/*
GetErrors

Returns a list of the most common errors reported for infra nodes' most recent Chef Client runs.

Authorization Action:
```
infra:nodes:list
```
*/
rpc GetErrors(cfgmgmt.request.Errors) returns (cfgmgmt.response.Errors) {
option (google.api.http).get = "/cfgmgmt/errors";
option (chef.automate.api.policy).resource = "cfgmgmt:nodes";
option (chef.automate.api.policy).action = "read";
option (chef.automate.api.iam.policy).resource = "infra:nodes";
option (chef.automate.api.iam.policy).action = "infra:nodes:list";
}
}
67 changes: 67 additions & 0 deletions api/external/cfgmgmt/cfgmgmt.swagger.json

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

98 changes: 98 additions & 0 deletions api/external/cfgmgmt/request/errors.pb.go

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

16 changes: 16 additions & 0 deletions api/external/cfgmgmt/request/errors.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
syntax = "proto3";

package chef.automate.api.cfgmgmt.request;
option go_package = "github.com/chef/automate/api/external/cfgmgmt/request";

message Errors {
// The number of results to return.
// If set to zero, the default size of 10 will be used. Set to a negative
// value for unlimited results.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭐️

int32 size = 1;
// Filters in the request select the nodes from which the errors are
// collected. The same filters may be specified for this request as for other
// Nodes requests, with the exception of 'status' which is not valid for this
// request.
repeated string filter = 2;
}
Loading