Create the CloudWatch agent configuration file with the wizard
The agent configuration file wizard, amazon-cloudwatch-agent-config-wizard
, asks a series of questions to help you configure the CloudWatch agent for your needs.
This section describes the credentials required for the configuration file.
It describes how to run the CloudWatch agent configuration wizard.
It also describes the metrics that are predenfined in the wizard.
Required credentials
The wizard can autodetect the credentials and AWS Region to use if you have the AWS credentials and configuration files in place before you start the wizard. For more information about these files, see Configuration and Credential Files in the AWS Systems Manager User Guide.
In the AWS credentials file, the wizard checks for default credentials and also looks
for an AmazonCloudWatchAgent
section such as the following:
[AmazonCloudWatchAgent] aws_access_key_id =
my_access_key
aws_secret_access_key =my_secret_key
The wizard displays the default credentials, the credentials from the
AmazonCloudWatchAgent
, and an Others
option. You can select
which credentials to use. If you choose Others
, you can input
credentials.
For my_access_key
and
my_secret_key
, use the keys from the IAM user that has the
permissions to write to Systems Manager Parameter Store. For more information about the IAM users needed
for the CloudWatch agent, see Create IAM users to use with the CloudWatch agent on on-premises servers.
In the AWS configuration file, you can specify the Region that the agent sends metrics
to if it's different than the [default]
section. The default is to publish the
metrics to the Region where the Amazon EC2 instance is located. If the metrics should be
published to a different Region, specify the Region here. In the following example, the
metrics are published to the us-west-1
Region.
[AmazonCloudWatchAgent] region = us-west-1
Run the CloudWatch agent configuration wizard
To create the CloudWatch agent configuration file
-
Start the CloudWatch agent configuration wizard by entering the following:
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard
On a server running Windows Server, run the following commands to launch the wizard:
cd "C:\Program Files\Amazon\AmazonCloudWatchAgent"
.\amazon-cloudwatch-agent-config-wizard.exe
-
Answer the questions to customize the configuration file for your server.
-
If you're storing the configuration file locally, the configuration file
config.json
is stored in/opt/aws/amazon-cloudwatch-agent/bin/
on Linux servers, and is stored inC:\Program Files\Amazon\AmazonCloudWatchAgent
on Windows Server. You can then copy this file to other servers where you want to install the agent.If you're going to use Systems Manager to install and configure the agent, be sure to answer Yes when prompted whether to store the file in Systems Manager Parameter Store. You can also choose to store the file in Parameter Store even if you aren't using the SSM Agent to install the CloudWatch agent. To be able to store the file in Parameter Store, you must use an IAM role with sufficient permissions. For more information, see Create IAM roles and users for use with the CloudWatch agent.
CloudWatch agent predefined metric sets
The wizard is configured with predefined sets of metrics, with different detail levels. These sets of metrics are shown in the following tables. For more information about these metrics, see Metrics collected by the CloudWatch agent.
Note
Parameter Store supports parameters in Standard and Advanced tiers. These parameter tiers are not related to the Basic, Standard, and Advanced levels of metric details that are described in these tables.
Amazon EC2 instances running Linux
Detail level | Metrics included |
---|---|
Basic |
Mem: mem_used_percent Disk: disk_used_percent The |
Standard |
CPU:
Disk:
Diskio:
Mem:
Swap:
|
Advanced |
CPU:
Disk:
Diskio:
Mem:
Netstat:
Swap:
|
On-premises servers running Linux
Detail level | Metrics included |
---|---|
Basic |
Disk:
Diskio:
Mem:
Net:
Swap:
|
Standard |
CPU:
Disk:
Diskio:
Mem:
Net:
Swap:
|
Advanced |
CPU:
Disk:
Diskio:
Mem:
Net:
Netstat:
Swap:
|
Amazon EC2 instances running Windows Server
Note
The metric names listed in this table display how the metric appears when viewed in the console. The actual metric
name might not include the first word. For example, the actual metric name for LogicalDisk % Free Space
is just % Free Space
.
Detail level | Metrics included |
---|---|
Basic |
Memory:
LogicalDisk:
|
Standard |
Memory:
Paging:
Processor:
PhysicalDisk:
LogicalDisk:
|
Advanced |
Memory:
Paging:
Processor:
LogicalDisk:
PhysicalDisk:
TCP:
|
On-premises server running Windows Server
Note
The metric names listed in this table display how the metric appears when viewed in the console. The actual metric
name might not include the first word. For example, the actual metric name for LogicalDisk % Free Space
is just % Free Space
.
Detail level | Metrics included |
---|---|
Basic |
Paging: Processor:
LogicalDisk: PhysicalDisk:
Memory:
Network Interface:
|
Standard |
Paging:
Processor:
LogicalDisk:
PhysicalDisk:
Memory:
Network Interface:
|
Advanced |
Paging: Processor:
LogicalDisk:
PhysicalDisk:
Memory:
Network Interface:
TCP:
|