cdk-monitoring-constructs icon indicating copy to clipboard operation
cdk-monitoring-constructs copied to clipboard

[core] Enable aspects for remaining resources.

Open ayush987goyal opened this issue 2 years ago • 6 comments

Enable scope monitoring with aspects for the following remaining resources

  • [ ] Cloudwatch Logs
  • [ ] ECS Patterns
  • [ ] ALB/NLB
  • [ ] SQS with DLQ
  • [ ] Stepfunction Integrations/Activity

ayush987goyal avatar Mar 05 '22 06:03 ayush987goyal

Would be awesome to see! Is there any inherent complexity one should think about when implementing aspects for these particular resources? I assume there was a reason it's not yet implemented.

LarsFronius avatar May 09 '22 15:05 LarsFronius

I don't believe there was a particular reason that they haven't yet been implemented, but @ayush987goyal could confirm.

echeung-amzn avatar May 10 '22 13:05 echeung-amzn

So these have not been implemented because of how the underlying facade implementation of the monitoring is done. For example

  • The ECS Patterns module is really tricky since it is difficult to identify all the resources and pass to the facade.
  • SQS with DLQ is also difficult since it is not entirely possible to related two queues to one another.
  • Adding cloudwatch logs monitoring aspects based can add a lot of noise potentially.

ayush987goyal avatar May 10 '22 14:05 ayush987goyal

Thanks for the insight @ayush987goyal - that roughly matches what I had observed from glancing over it.

  • ECS: I was thinking that maybe for the aspect side of the monitoring construct we could not work on the "patterns" but on the primitive of an ECS Service. I think we'd only only ever have CPU+Memory metrics but it's better than nothing?
  • For SQS that approach would of course mean no DLQ connection as well - I'll have a look if there is any way to obtain the reference though. Currently it looks like they show up as individual queues on the dashboard.
  • For cloudwatch logs I've gone down the route of adding one dashboard segment that automatically encompasses all log groups, so that they are not scattered as individual log groups on the dashboard. It looks somewhat clean for my case, but that may vary a lot on the individual stacks and purposes (in my case it's an ECS (Fargate) + ALB stack). I reckon that could be a configurable option on the monitoring aspect itself?

LarsFronius avatar May 10 '22 15:05 LarsFronius

  • ECS: I think that is correct but my initial thought was to not have a half baked solution. But it would make sense to add that if people are interested in just that.
  • SQS: A single SQS aspect monitoring is already present. In facade case, it accepts both the queues and hence it is able to create monitoring for them.
  • We will have to see if we need only one segment then how do we track that. But feel free to experiment and raise a PR!

ayush987goyal avatar May 10 '22 16:05 ayush987goyal

I mentioned this in #120, but I'm personally very much in favor of breaking ECS down into it's component parts for monitoring and not trying to work with the L2/L3 patterns.

RichiCoder1 avatar Jul 05 '22 18:07 RichiCoder1