Skip to content

Commit 2974a97

Browse files
authored
Merge pull request #278 from aniadev-aws/main
Add Getting Started on CloudWatch guide
2 parents 2d3e429 + 19dbe46 commit 2974a97

File tree

13 files changed

+293
-0
lines changed

13 files changed

+293
-0
lines changed
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
sidebar_position: 3
3+
---
4+
5+
# Configure Agents/Collectors
6+
7+
Once you have your monitoring account structure in place, you will need to configure your applications, services, and other infrastructure components to send telemetry to CloudWatch.
8+
9+
This is a high-level guide to configuring your agents and collectors. For in-depth guidance, please refer to various sections in this best practices guide.
10+
11+
## Amazon EKS
12+
13+
For EKS, the simplest way to configure observability it to use the Amazon EKS add-on. This will install Container Insights with enhanced observability for Amazon EKS. The add-on installs the CloudWatch agent to send infrastructure metrics from the cluster, installs Fluent Bit to send container logs, and also enables CloudWatch Application Signals to send application performance telemetry. (It is configurable if you do not want Application Signals, Container Insights, etc.)
14+
15+
Typically, the Amazon CloudWatch Observability EKS add-on is installed as a DaemonSet.
16+
17+
Some options for EKS are:
18+
19+
### CloudWatch Agent for EKS
20+
21+
- Amazon CloudWatch Observability EKS add-on
22+
- Amazon CloudWatch Observability Helm Chart
23+
24+
### OTEL Collector for EKS
25+
26+
Alternatively, if you want to use the OTEL collector, you can:
27+
- Configure AWS Exporters
28+
- Set your OTLP exporter to point to the log and traces OTLP endpoints
29+
- Define your processing pipelines
30+
- Instrument your application using OTEL libraries (if required)
31+
32+
## Amazon ECS
33+
34+
For ECS, you can enable Container Insights to collect infrastructure metrics for your clusters. You can also deploy Application Signals to collect application performance telemetry and associated traces. For logs, you can use the awslogs driver to send your log data to CloudWatch, or you can use OpenTelemetry collectors to send the data.
35+
36+
Some options for EKS are:
37+
38+
### CloudWatch Agent for ECS
39+
40+
- Enable Container Insights
41+
- Deploy Application Signals (optional)
42+
- Use the awslogs log driver
43+
44+
### OTEL Collector for ECS
45+
46+
Alternatively, you can:
47+
- Run as a sidecar
48+
- Configure AWS Exporters
49+
- Set OTLP endpoints
50+
- Define processing pipelines
51+
- Instrument applications (if required)
52+
53+
## Amazon EC2 and On-Premises
54+
55+
CloudWatch agent can be used to send telemetry data from EC2 instances, other virtual machines, and on-premises servers to CloudWatch.
56+
57+
### Deployment Options
58+
59+
- **Workload Detection for EC2** – Provides an automated way to deploy the agent
60+
61+
![EC2 Workload Detection](../../images/GettingStarted/ec2workloaddetection.png)
62+
63+
- **Systems Manager** – Deploy and configure the agent using AWS Systems Manager
64+
- **Custom Automation** – Use your own automation tools
65+
- **Manual Installation** – Install manually for specific use cases
66+
67+
You can configure/customize telemetry via config file (automatically or manually), and there is a wizard available to help you fine-tune your settings.
68+
69+
### OTEL Collector for EC2
70+
71+
You can also use the OTEL collector with:
72+
73+
**OTLP Exporters:**
74+
75+
![OTLP Configuration](../../images/GettingStarted/otlp.png)
76+
77+
Use OTLP exporters for trace and log OTLP endpoints.
78+
79+
**AWS-Specific Exporters:**
80+
81+
![ADOT Configuration](../../images/GettingStarted/adot.png)
82+
83+
Use AWS-specific exporters and processing pipelines.
84+
85+
## Summary
86+
87+
To summarize:
88+
1. Choose the appropriate agent/collector for your compute platform (EKS, ECS, EC2)
89+
2. Deploy using automated methods (add-ons, Helm charts, Systems Manager) or manual installation
90+
3. Configure telemetry collection based on your requirements
91+
4. Optionally use OpenTelemetry for vendor-neutral instrumentation
92+
93+
For detailed configuration guides, refer to the specific sections in this best practices guide for your compute platform and observability tools.
94+
95+
## Next Steps
96+
97+
Continue to [Dashboards and Alerts](./dashboards-alerts.md)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
sidebar_position: 4
3+
---
4+
5+
# Dashboards and Alerts
6+
7+
Once your telemetry is flowing, you can set up dashboards and alerts relevant to your use case.
8+
9+
## Curated Dashboards
10+
11+
Be sure to leverage curated dashboards which you can find under various parts of the CloudWatch console.
12+
13+
For example, you will find automated dashboards for many services (such as Lambda, EC2, API Gateway, and many more) under Dashboards.
14+
15+
If you are leveraging Application Signals, you will find application maps and dashboards under Application Signals (APM). In addition, you will find uninstrumented services which will highlight any gaps in observability.
16+
17+
## Custom Dashboards
18+
19+
You will also need to design your own business-specific dashboards. Refer to this guide on how to design your dashboards for operational excellence: [Building Dashboards for Operational Visibility](https://aws.amazon.com/builders-library/building-dashboards-for-operational-visibility/)
20+
21+
## CloudWatch Alarms
22+
23+
You will also create alerts (or Alarms in CloudWatch) to signal any problems with your services and infrastructure. You can create alarms in your monitoring account for centralized alarm visibility or/and individual alarms in local accounts.
24+
25+
### Alarm Recommendations
26+
27+
If you are unsure how to get started, Alarm Recommendations will help you. Alarm recommendations are based on monitoring best practices. Review the recommended alarm configurations before creating an alarm.
28+
29+
For more details, see [Alarm recommendations for AWS services](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Best_Practice_Recommended_Alarms_AWS_Services.html).
30+
31+
## Service Level Objectives (SLOs)
32+
33+
You can also create SLOs and associated alarms to help you track important KPIs.
34+
35+
For more information, see [CloudWatch SLOs](../../tools/slos.md).
36+
37+
## Summary
38+
39+
This concludes the Getting Started on CloudWatch guide. Here are the steps we covered:
40+
41+
1. **Setup Monitoring and Source Accounts** – Configured cross-account observability to centralize telemetry data from multiple AWS accounts and regions
42+
2. **Setup Unified Data Store** – Centralized log data into a single account and region for unified querying and analysis
43+
3. **Configure Agents/Collectors** – Deployed CloudWatch agents and/or OpenTelemetry collectors to send telemetry from your applications and infrastructure
44+
4. **Dashboards and Alerts** – Created dashboards for visibility and alarms to monitor the health of your services
45+
46+
## Next Steps
47+
48+
For more in-depth guidance on specific topics, refer to the detailed sections throughout this best practices guide:
49+
50+
- [Containers (ECS/EKS)](../containers/aws-native/eks/amazon-cloudwatch-container-insights.md)
51+
- [Serverless](../serverless/aws-native/lambda-based-observability.md)
52+
- [Operational Guides](../operational/observability-driven-dev.md)
53+
- [Cost Optimization](../cost/cost-visualization/cost.md)
54+
- [Signal Collection](../signal-collection/emf.md)
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# Setup Monitoring and Source Accounts
6+
7+
In the majority of cases, customers need to visualize and correlate telemetry data from multiple AWS accounts because their services run across many accounts, and sometimes, many regions.
8+
9+
If you only plan to run your observability and services in a single account, you can skip this step.
10+
11+
The first step is to setup your monitoring and source accounts and specify exactly what telemetry you wish to share. You will leverage cross-account observability to do so. Please note that this works on a per-region basis.
12+
13+
For more detailed instructions on how to setup cross-account observability, please refer to the [CloudWatch Cross-Account Observability](../cloudwatch_cross_account_observability.md) guide.
14+
15+
## Monitoring Account
16+
17+
Nominate a monitoring account from which you want to view the telemetry data in a centralized manner.
18+
19+
Then define which accounts will share the data with your monitoring account. You can choose all accounts in your AWS organization or pick individual source accounts. You will also specify what telemetry data you want to share with the monitoring account (e.g. logs, metrics, traces, application signals etc).
20+
21+
You will then [link the source accounts](../cloudwatch_cross_account_observability.md#step-2-link-source-accounts-to-the-monitoring-account) to complete the setup.
22+
23+
Your typical monitoring account structure will look similar to this:
24+
25+
![Monitoring Account Structure](../../images/GettingStarted/monitoring-acct-struct.png)
26+
27+
You will [configure](../cloudwatch_cross_account_observability.md#step-1-set-up-a-monitoring-account) this on a per-region basis in CloudWatch settings.
28+
29+
:::info
30+
With cross-account observability, logs and metrics are NOT copied from the source accounts, but trace data is copied to the monitoring account (with trace copy to the 1st monitoring account included at no additional cost). You simply view logs, metrics, traces and other telemetry centrally.
31+
:::
32+
33+
## Multiple Monitoring Accounts
34+
35+
Each monitoring account can be linked with up to 100,000 source accounts.
36+
37+
However, there may be operational situations where you need multiple monitoring accounts. You can have multiple monitoring accounts based on your own requirements. This setup might look something like this:
38+
39+
![Multiple Monitoring Accounts](../../images/GettingStarted/multiple-mon-accts.png)
40+
41+
:::info
42+
If you need to share data from a single source account with multiple monitoring accounts, that is also configurable as each source account can share data with up to 5 monitoring accounts.
43+
:::
44+
45+
## Telemetry Control
46+
47+
You also have control of what telemetry data you share with the ability to specify metric and log filters allowing you extra granularity.
48+
49+
![Telemetry Configuration](../../images/GettingStarted/telemetry-config.png)
50+
51+
You will now be able to [visualize and query cross-account](../cloudwatch_cross_account_observability.md#querying-cross-account-telemetry-data) data from multiple accounts in a single monitoring account (per region).
52+
53+
## Summary
54+
55+
To summarize:
56+
1. Nominate and configure monitoring account(s)
57+
2. Configure source accounts
58+
3. Fine tune which telemetry you want to share
59+
4. Visualize and query all the source account data from the monitoring account
60+
61+
## Next Steps
62+
63+
Continue to [Setup Unified Data Store](./setup-unified-data-store.md)
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
sidebar_position: 2
3+
---
4+
5+
# Setup Unified Data Store
6+
7+
In addition to cross-account observability, you can also centralize (copy) logs to a central region and a central account. The first copy is included at no additional cost!
8+
9+
The CloudWatch Unified Data Store helps you build a unified repository at scale for your organization. You can collect, shape, and analyze your telemetry from here.
10+
11+
## Overview
12+
13+
CloudWatch Unified Data Store allows you to centralize your application, operational, security, and compliance data in one place. This means you can centralize your log data from multiple AWS accounts/regions, as well as from third-party tools into a single account and region for central querying and analysis.
14+
15+
![Unified Data Store](../../images/GettingStarted/UDS.png)
16+
17+
You can use the Unified Data Store in conjunction with cross-account observability or by itself.
18+
19+
## Key Benefits
20+
21+
- **Centralize all observability data** – Consolidate operational, security, and compliance data from AWS services and third-party sources into one unified store across multiple accounts and regions
22+
23+
- **Eliminate data silos and duplication** – Remove unnecessary ETL pipelines, reduce storage costs, and simplify management by storing data once in a single location
24+
25+
- **Accelerate troubleshooting and reduce MTTR** – Get faster insights with intuitive faceted queries, natural language search, and advanced visualizations through CloudWatch Logs Insights and Amazon OpenSearch Service
26+
27+
- **Unlock business intelligence with flexible analytics** – Analyze unified data using your choice of tools including Amazon Athena, QuickSight, SageMaker, Apache Spark, and third-party Iceberg-compatible platforms without data duplication
28+
29+
## Configuration Steps
30+
31+
This is configured at the organization level:
32+
33+
### Step 1: Configure Root Account
34+
35+
In your root account:
36+
1. Turn on trusted access
37+
2. Identify a delegate account for the centralized datastore
38+
39+
### Step 2: Configure Centralized Account
40+
41+
In your centralized account, create centralization rule(s) including:
42+
- Organization ID or source accounts
43+
- Source regions
44+
45+
## Centralization Rules
46+
47+
You can decide and configure:
48+
49+
1. **Source accounts** – Choose which source accounts you want to copy the data from and filter those by Organization, OU, or account ID
50+
2. **Source regions** – Select which source regions to copy the data from
51+
3. **Backup region** – Configure a backup region for a second copy of the data (optional)
52+
4. **Log group filters** – Filter log groups by name, prefix, or keyword using a number of operators
53+
5. **Multiple rules** – Configure multiple centralization rules based on your requirements
54+
55+
Your account structure for centralized logging may look something like this:
56+
57+
![Centralized Logs](../../images/GettingStarted/centralised-logs.png)
58+
59+
## Summary
60+
61+
To summarize:
62+
1. Enable trusted access in root account and identify delegate account
63+
2. Create centralization rules in the centralized account
64+
3. Configure source accounts, regions, and log group filters
65+
4. Optionally configure backup regions for redundancy
66+
67+
## Next Steps
68+
69+
Continue to [Configure Agents/Collectors](./configure-agents-collectors.md)
136 KB
Loading
131 KB
Loading
119 KB
Loading
94.5 KB
Loading
156 KB
Loading
142 KB
Loading

0 commit comments

Comments
 (0)