install and configure the CloudWatch Agent with a single script.
The script supports these Linux distributions:
Support | |
---|---|
Amaozon Linux 2023 | ✅ |
Amazon Linux 2 | ✅ |
Ununtu >= 20.04 | ✅ |
Rhel >=8 | ✅ |
centos >=8 | ✅ |
rocky >=8 | ✅ |
Windows>= 2016 | ✅ |
collect memory utilization and disk utilization through custom metrics on windows, linux
wget https://jinseokk-bucket.s3.ap-northeast-2.amazonaws.com/cloudwatch_linux.sh
sudo -s
./cloudwatch_linux.sh
Invoke-WebRequest -Uri "https://jinseokk-bucket.s3.ap-northeast-2.amazonaws.com/cloudwatch_window.ps1" -OutFile ".\cloudwatch_window.ps1"
Set-ExecutionPolicy Unrestricted -Scope Process -Force
.\cloudwatch_window.ps1
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri "https://jinseokk-bucket.s3.ap-northeast-2.amazonaws.com/cloudwatch_window.ps1" -OutFile ".\cloudwatch_window.ps1"
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -m ec2 -a status
& $Env:ProgramFiles\Amazon\AmazonCloudWatchAgent\amazon-cloudwatch-agent-ctl.ps1 -m ec2 -a status
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c file:/opt/aws/amazon-cloudwatch-agent/bin/config.json
& "C:\Program Files\Amazon\AmazonCloudWatchAgent\amazon-cloudwatch-agent-ctl.ps1" -a fetch-config -m ec2 -s -c "file:C:\Program Files\Amazon\AmazonCloudWatchAgent\config.json”