SOA-C02 exam dumps

SOA-C02 practice question 16 of 341

AWS Certified SysOps Administrator - Associate. Associate level, Amazon Web Services. Free question with the correct answer and a full explanation.

SOA-C02 Question 16

Select 3

You are tasked with monitoring a fleet of Amazon EC2 instances running a custom application. The application generates log files in a non-standard directory (/opt/app/logs) and also emits custom metrics that you want to collect. Which steps should you take to configure the CloudWatch agent to collect these logs and metrics?

  1. A

    Install the CloudWatch agent on the EC2 instances and create a custom configuration file specifying the log file directory and custom metrics.

  2. B

    Start the CloudWatch agent using the default configuration with no additional steps required.

  3. C

    Use the AWS Systems Manager Run Command to deploy the CloudWatch agent configuration file across the EC2 instances.

  4. D

    Enable detailed monitoring on the EC2 instances in the AWS Management Console.

  5. E

    Modify the IAM role attached to the EC2 instances to include permissions for writing logs and metrics to Amazon CloudWatch.

Show answer and explanation

Correct answers: A, C, E

Explanation

To collect logs from a non-standard directory and custom application metrics, you need to configure the CloudWatch agent appropriately. This involves installing the agent, creating a custom configuration file, deploying the configuration file (using a tool like AWS Systems Manager Run Command), and ensuring that the EC2 instances have the necessary IAM permissions to send logs and metrics to CloudWatch. Default settings or enabling detailed monitoring alone are insufficient in this scenario.

  • A. Correct.

    Correct: To collect custom logs and metrics, you must install the CloudWatch agent and create a custom configuration file to specify custom log directories and metrics.

  • B. Incorrect.

    Incorrect: The default configuration of the CloudWatch agent does not automatically collect logs from non-standard directories or custom metrics.

  • C. Correct.

    Correct: AWS Systems Manager Run Command is a recommended way to deploy the CloudWatch agent configuration file across multiple EC2 instances efficiently.

  • D. Incorrect.

    Incorrect: Enabling detailed monitoring only provides additional EC2 instance-level metrics. It does not collect custom logs or metrics from applications.

  • E. Correct.

    Correct: The EC2 instances need an IAM role with permissions to write logs and metrics to CloudWatch, such as CloudWatchAgentServerPolicy.

Timed practice exam

Take a SOA-C02 practice test under exam conditions

65 questions in 130 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam