Amazon CloudWatch Agent: Fetching Application Specific Metrics

Configuring the Amazon CloudWatch Agent for Application Specific Metrics

Question

An IT firm is using the Amazon CloudWatch agent to collect system-level metrics from on-premises Linux Servers.

A new application is deployed on these servers.

The operations team is looking for specific metrics for this application in addition to system metrics. What configuration in the Amazon CloudWatch agent can be done to fetch application specific metrics?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: B.

Amazon CloudWatch Agent can be set up to use multiple configuration files.

These files can fetch different metrics like system level or application specific metrics using multiple configuration files.

Multiple Configuration files can be created with different names & added to configuration files using the append-config command.

Options A & D are incorrect as to append additional config files, it needs to use append-config & not aggregate-config.

Option C is incorrect as if append-config is used with two Configuration files with the same file name, it will overwrite the first file.

In the above case, the client is looking for both metrics system level & application level.

For more information on using Multiple CloudWatch agent configuration files, refer to the following URL,

https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-common-scenarios.html#CloudWatch-Agent-multiple-config-files

The correct answer is B. Create a configuration file with a different file name and append it to the existing configuration file using append-config.

Explanation:

The Amazon CloudWatch agent is a lightweight data collection agent that can be installed on EC2 instances, on-premises servers, and other resources. It can collect both system-level metrics and custom metrics from applications.

When a new application is deployed on the on-premises Linux servers, the operations team needs to configure the Amazon CloudWatch agent to collect application-specific metrics in addition to the existing system-level metrics.

To achieve this, they can create a separate configuration file for the new application with a different file name than the existing configuration file. The new configuration file should contain the necessary settings to collect the application-specific metrics.

Then, they can append the new configuration file to the existing configuration file using the append-config option. This will ensure that the Amazon CloudWatch agent collects both system-level metrics and application-specific metrics from the servers.

Option A, creating a configuration file with a different file name and appending it to the existing configuration file using aggregate-config, is incorrect because the aggregate-config option is used to merge multiple configuration files into a single configuration file. It is not suitable for adding a new configuration file for a new application.

Option C, creating a configuration file with the same file name and appending it to the existing configuration file using append-config, is incorrect because the new configuration file may overwrite the existing configuration file, leading to data loss.

Option D, creating a configuration file with the same file name and appending it to the existing configuration file using aggregate-config, is incorrect because the aggregate-config option is not suitable for adding a new configuration file for a new application.