Skip to content

Commit

Permalink
Add DiscoveryConfigStatus AWS EC2 resource counters (proto)
Browse files Browse the repository at this point in the history
This PR adds counters for AWS Instances found/enrolled/failed for a
given DiscoveryConfig and Integration.
  • Loading branch information
marcoandredinis committed Aug 20, 2024
1 parent 741b54c commit 630f4a4
Show file tree
Hide file tree
Showing 2 changed files with 183 additions and 48 deletions.
214 changes: 166 additions & 48 deletions api/gen/proto/go/teleport/discoveryconfig/v1/discoveryconfig.pb.go

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

17 changes: 17 additions & 0 deletions api/proto/teleport/discoveryconfig/v1/discoveryconfig.proto
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ message DiscoveryConfigStatus {

reserved 5;
reserved "aws_ec2_instances_discovered";

// AWSEC2ResourcesDiscovered contains all the AWS EC2 instances discovered.
repeated AWSResourcesDiscoveredSummary aws_ec2_resources_discovered = 6;
}

// DiscoveryConfigState is the state of the discovery config resource.
Expand All @@ -83,3 +86,17 @@ enum DiscoveryConfigState {
// DISCOVERY_CONFIG_STATE_SYNCING is used when the discovery process has started but didn't finished yet.
DISCOVERY_CONFIG_STATE_SYNCING = 3;
}

// AWSResourcesDiscoveredSummary represents the AWS resources that were discovered.
message AWSResourcesDiscoveredSummary {
// Integration is the Integration name used to fetch the resource.
// Integration is empty if using ambient credentials.
string integration = 1;
// Found holds the count of resources found.
// After a resource is found, it starts the sync process and ends in either an enrolled or a failed resource.
uint64 found = 2;
// Enrolled holds the count of the resources that were successfully enrolled.
uint64 enrolled = 3;
// Failed holds the count of the resources that failed to enroll.
uint64 failed = 4;
}

0 comments on commit 630f4a4

Please sign in to comment.