AWS CloudWatch
This document provides an overview of AWS CloudWatch in the AWS console. You can retrieve, inspect, and analyze log data using CloudWatch. You can locate and inspect your logs in the CloudWatch Logs to help you address any issues you encounter.
Prerequisites
- You must have a valid AWS account to access and use AWS CloudWatch.
- Ensure that you have deployed the CDC (Change Data Capture) agent in the instance for which you want to generate logs. The Streaming agent captures and forwards log data to CloudWatch for monitoring and analysis.
- Make sure that your AWS account has the necessary IAM (Identity and Access Management) permissions to access CloudWatch and retrieve logs. At a minimum, the account should have the
cloudwatch:DescribeLogGroups
andcloudwatch:FilterLogEvents
permissions for the specific log group and log streams you want to access. - Ensure that you have configured a log group in CloudWatch to store the logs generated by the Streaming agent.
- Check the log retention settings for the log group to ensure that logs are retained for the desired period. By default, logs are retained for an indefinite duration, but you can configure a retention period based on your requirements.
CloudWatch Logs
To generate logs from AWS CloudWatch for a deployed Streaming agent in an instance, you can follow these steps:
- In the AWS Management console navigate to CloudWatch. Use the search bar at the top of the AWS Management Console or navigate to the CloudWatch service from the services menu.
- In the CloudWatch dashboard, locate and click on Log Groups in the left-hand navigation menu under the Logs category.
- In the Log Groups page, search for the log group associated with your Streaming agent's logs. The log group might have a name or pattern specific to your deployment. If a log group for the Streaming agent does not already exist, create a new log group by clicking the Create log group button.
- Click on the log group to access its details. You will see a list of log streams within that group.
- Identify the log stream that corresponds to the specific instance where your Streaming agent is deployed. Click on the log stream to view its logs.
- Within the log stream, you can filter and search for specific logs by applying filters, searching for keywords, or adjusting the time range.