cdk-monitoring-constructs
cdk-monitoring-constructs copied to clipboard
[core] Select resources to monitor based on tags
Feature scope
Any Namespace
Describe your suggested feature
Is it possible to select resources to monitor based on tags? Looked at the docs but did not see any way to do it.
thanks!
Hello! Great idea, can you please give us a specific example? It this more related about Aspects, or the monitoring in general?
Lets say I have a project that uses ECS, Dynamo and ALB. When I build the monitoring stack, I would like to only select resources that match a certain tag (which is specific to the project). I dont want to select and monitor all ECS clusters, just specific ones. I looked at aspects, they seem to be more about validations or decorating with tags. Does this help?
thanks!
Let me know if I got it right. So, instead of using .monitorEcs(ecs1) and .monitorEcs(ecs2), you would prefer to call something like monitorEcsWithTag(tag1), which would iterate over all tagged ECS clusters and generating a monitoring for them?
Yes! If this is not too specific a usecase, would love to see something like this added.
OK, got the idea. I like it very much to be honest and would like to implement it. I just need to think about how to balance between this, monitoring, and Aspect, since this look exactly like Aspect with additional filtering. Integrating the aspect more tightly with the facade and leveraging it for this might also be a solution.
The idea is really cool. But the problem that I see is that CDK does not provide any way to identify/import/filter a resource based on just tags (at least I could not find one). Therefore we cannot use Aspects for this since the node does not have anything that we can check for tags.
That is true, so far I have not found any way to get tags for the given resource. I do not understand why there is no read API for it :).