Page History
...
Code Block |
---|
$ wget https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb |
For Windows, follow the below command to connect to the EC2 instance.
Code Block |
---|
curl -O https://s3.amazonaws.com/amazoncloudwatch-agent/windows/amd64/latest/amazon-cloudwatch-agent.msi |
Use the following command to install the Agent on Ubuntu:
Code Block |
---|
$ sudo dpkg -i -E ./amazon-cloudwatch-agent.deb |
For Windows:
Code Block |
---|
msiexec /i amazon-cloudwatch-agent.msi |
After installing the CloudWatch Agent, the user needs to be configured before it starts. It can be configured in two ways: by manually creating a config file or using the wizard (In which the user needs to answer a series of questions). It generates a config file.
...
Code Block |
---|
{ "agent": { "run_as_user": "root" }, "logs": { "logs_collected": { "files": { "collect_list": [ { "file_path": "/var/log/scheduler/error.log{path to your log file}", "log_group_name": "scheduler-error-log", "log_stream_name": "{instance_id}" } ] } } } } |
...
Overview
Content Tools