Skip to content

Commit

Permalink
Add DiscoveryConfigStatus AWS resource counters (proto)
Browse files Browse the repository at this point in the history
This PR adds counters for AWS Resources found/enrolled/failed for a
given DiscoveryConfig, Integration a matcher type.
  • Loading branch information
marcoandredinis committed Aug 16, 2024
1 parent 045880f commit a1571f3
Show file tree
Hide file tree
Showing 2 changed files with 197 additions and 44 deletions.
219 changes: 175 additions & 44 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.

22 changes: 22 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,10 @@ message DiscoveryConfigStatus {

reserved 5;
reserved "aws_ec2_instances_discovered";

// AWSResourcesDiscovered contains all the AWS resources discovered.
// Does not include the AWS resources from Access Graph matchers.
repeated AWSResourcesDiscovered aws_resources_discovered = 6;
}

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

// AWSResourcesDiscovered represents the AWS resources that were discovered.
// Only resources found using integration credentials are reported.
message AWSResourcesDiscovered {
// Integration is the Integration name used to fetch the resource.
string integration = 1;
// MatcherType is the type of resource that was discovered.
// Matches match the values defined at types.AWSMatcher.Types.
// Example values: ec2, rds, redshift, elasticache, memorydb
string matcher_type = 2;
// 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 = 3;
// Enrolled holds the count of the resources that were successfully enrolled.
uint64 enrolled = 4;
// Failed holds the count of the resources that failed to enroll.
uint64 failed = 5;
}

0 comments on commit a1571f3

Please sign in to comment.