irvingpop / packer-chef-highperf-centos-ami

High-performance CentOS images for AWS created with Packer
39 stars 23 forks source link

What's CloudWatchMonitoringScripts for? #14

Open siebrand opened 5 years ago

siebrand commented 5 years ago

Just decided to create an issue, because I have no idea what else to do :).

https://github.com/irvingpop/packer-chef-highperf-centos-ami/blob/d23ab0f1681531d0b4357e59d2ae4cb749cc2a57/scripts/marketplace_dl.sh#L59 shows installation of something for sending CloudWatch metrics. I've never used it.

I looked it up, and found https://aws.amazon.com/blogs/aws/cloudwatch-monitoring-scripts-updated/ which is a blog post about this feature, and https://aws.amazon.com/blogs/aws/cloudwatch-monitoring-scripts-updated/ which contains the download link that marketplace_dl.sh also contains.

Two comments:

As far as I can tell, CloudWatchMonitoringScripts aren't enabled by default. That's good, because these scripts send metrics that cost actual money when collected. I've also found that the default configuration of CloudWatch Agent send a bunch of metrics that may not be useful at all, and thus cause about $1/month of CloudWatch charges that can be prevented with some configuration. Not sure if we should go that deeply in this component. In any case, my plee is for clarity on what is installed and why, and using "lastest available components".

I'd volunteer to submit a patch for removing this if there is no reason to have it, or change it to CloudWatch Agent.

irvingpop commented 5 years ago

hey @siebrand the marketplace_dl.sh script isn't used or applied in the normal highperf image. It's only used as part of the packer-marketplace.json build which supports a different Chef project.

Nice tip about the Cloudwatch agent! I'm going to check this out, it seems useful!