You can store and view the metrics that you collect with the CloudWatch agent in CloudWatch similar to any other CloudWatch metrics. The default namespace for metrics collected by the CloudWatch agent is CWAgent. However, you can specify a different namespace when you configure the agent.
To configure the CloudWatch agent and publish custom metrics from the Amazon EMR cluster nodes, follow these steps:
1. Create an example CloudWatch agent configuration file (config.json) with the following example configuration. The agent configuration file is a JSON file that specifies the metrics and logs that the agent must collect, including custom metrics. In the following example for collecting the metrics for a Linux server, four CPU metrics, two disk metrics, and one memory metric are collecting. The agent is set up to receive these metrics from a collectd client.
After importing the collectd metrics into CloudWatch, you can view these metrics as time series graphs. You can also set alarms so that you are notified when the metrics exceed a certain threshold that you specify. To view the collectd metrics in the CloudWatch console,. choose the namespace for the metrics that are collected by the agent. By default, this namespace is called CWagent. For more information, see Viewing collectd metrics imported by the CloudWatch agent.