-
Notifications
You must be signed in to change notification settings - Fork 0
/
CloudWatch Agent
39 lines (24 loc) · 1 KB
/
CloudWatch Agent
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
************************************************************
Cloudwatch Agent
************************************************************
----*** Create IAM role ***----
* Go to IAM
* Create Role
* Under permission - tick - CloudWatchAgentServerPolicy
* Attach role to the EC2 instance
(Allow HTTPS from firewall)
----*** Configure the Agent ***----
$ sudo apt-get update
## Download the CloudWatch agent package
$ wget https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb
## Install the package
# sudo dpkg -i -E ./amazon-cloudwatch-agent.deb
## Configure the CloudWatch agent
$ sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard
>> CollectD - no
>> SSM - no
## Start the CloudWatch agent
$ 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
## Generate stress on system
$ sudo apt install stress
$ stress --cpu 1