In the previous article, we explored how CloudWatch Alarms detect infrastructure issues and how EventBridge routes alarm events.
Now, let's look at another important question:
How can we monitor multiple AWS resources from one place without switching between different monitoring pages?
This is where Amazon CloudWatch Dashboards help.
1. Why CloudWatch Dashboards?
Imagine managing an application running on EC2.
You need to monitor:
Checking each item separately takes time.
CloudWatch Dashboards bring selected monitoring information together in a single customizable view.
Think of a vehicle dashboard: speed, fuel, and warning indicators are displayed together instead of checking separate systems.
Important: A dashboard visualizes monitoring data. It does not collect metrics or replace CloudWatch Alarms.
2. Important Dashboard Concepts
A CloudWatch Dashboard contains different components called widgets.
Widget | Purpose | Example |
|---|
Line | Displays metric trends | CPU utilization |
Stacked area | Compares stacked metric values | Network traffic |
Number | Displays a numerical metric value | Current CPU value |
Gauge | Shows a value against configured ranges | Memory utilization |
Alarm status | Displays multiple alarm states | CPU and Memory alarms |
Text | Adds descriptions using Markdown | Dashboard instructions |
Logs | Displays Logs Insights query results | Application errors |
Metrics Explorer | Explores metrics across supported resources | Multiple EC2 instances |
Remember: Choose widgets based on what you want to monitor, not just their appearance.
3. Hands-on Demo – Create an EC2 Monitoring Dashboard
Let's create a dashboard using the resources from our previous demonstrations.
Step 1: Create a Dashboard
- Open the AWS Management Console.
- Navigate to CloudWatch → Dashboards.
- Enter the name
EC2-Operations-Dashboard .
Step 2: Add CPU Utilization
- Navigate to EC2 → Per-Instance Metrics.
- Select CPUUtilization for your EC2 instance.
Verify: Confirm that the graph displays data for the correct EC2 instance.
Step 3: Add Network Metrics
- Select Add widget → Line.
- Choose EC2 → Per-Instance Metrics.
- Select NetworkIn and NetworkOut.
Verify: Generate network activity and observe the metric graph.
Step 4: Add Memory Utilization
Remember the CloudWatch Agent configuration from Skill 1.1.2?
- Select Add widget → Line.
- Navigate to the CWAgent namespace.
- Select the memory utilization metric.
- Verify the correct instance dimensions.
Verify: Confirm that memory metrics are being published by the CloudWatch Agent.
Step 5: Add Alarm Status
Reuse the CPU and Memory alarms created in Skill 1.1.3.
- Select the required alarms.
Now you can view their current states together.
Step 6: Arrange and Save
- Resize and reposition widgets.
- Add a Text widget for dashboard information.
- Arrange the graphs and alarm status clearly.
Expected result: One dashboard showing CPU, network, memory, and alarm information.
4. Important Concepts for Revision
Time Range vs Period vs Statistic
These three concepts are easy to confuse.
Concept | Meaning |
|---|
Time range | How much historical data you want to view |
Period | Duration represented by each metric datapoint |
Statistic | How metric values are summarized |
Example:
- Time range: Last 6 hours.
This means the dashboard displays six hours of metric history, with five-minute datapoints using the Average statistic.
Important statistics:
- SampleCount – Number of data points.
Dashboard JSON
CloudWatch Dashboards can also be created or updated programmatically using JSON.
Important fields:
Field | Purpose |
|---|
widgets | Contains dashboard widgets |
type | Widget type |
x, y | Widget position |
width, height | Widget dimensions |
properties | Widget configuration |
metrics | Metrics to display |
period | Metric period |
stat | Metric statistic |
region | Metric's Region |
Important API: PutDashboard creates or updates a CloudWatch Dashboard.
A dashboard definition supports up to 500 widget objects.
5. Cross-Account and Cross-Region Dashboards
Consider an organization managing resources in multiple AWS accounts and Regions.
Instead of checking every account separately, CloudWatch supports centralized monitoring through cross-account and cross-Region dashboards.
- Cross-account: View selected monitoring information from multiple AWS accounts.
- Cross-Region: View selected monitoring information from multiple AWS Regions.
A common setup uses:
- Monitoring account – Central account used for monitoring.
- Source accounts – Accounts sharing their monitoring information.
Important points:
- Dashboards are global, not Region-specific.
- Individual metric widgets can still retrieve data from specific Regions.
- Cross-account monitoring requires the appropriate sharing configuration and permissions.
- Cross-account observability provides a broader monitoring experience for metrics, logs, and traces within a Region.
6. Troubleshooting
Problem | Check | Solution |
|---|
CPU graph is empty | Metric and instance dimensions | Select the correct instance |
Memory graph is empty | CloudWatch Agent and CWAgent namespace | Verify agent status and configuration |
Alarm widget doesn't show alarms | Selected alarm details | Select the correct alarms |
Logs widget returns no results | Log group, query and time range | Verify the query and log group |
Cross-account data is missing | Sharing configuration and permissions | Correct the monitoring setup |
Practise these failures:
- Select the wrong EC2 instance and identify why the graph displays different data.
- Stop the CloudWatch Agent and observe what happens to new memory datapoints.
- Select an incorrect time range and investigate why the expected metric spike isn't visible.
7. CloudOps Decision Notebook
Requirement | CloudWatch feature |
|---|
Visualize metric trends | Line widget |
Display numerical values | Number widget |
View multiple alarm states | Alarm status widget |
Display log query results | Logs widget |
Add dashboard descriptions | Text widget |
Explore metrics across resources | Metrics Explorer |
Manage dashboards through API | PutDashboard |
Important Exam Revision
- CloudWatch Dashboards are global.
- Widgets display metrics, logs, alarms, and other supported information.
- Dashboard definitions use JSON.
-
PutDashboard creates or updates dashboards.
- Time range, period, and statistic have different meanings.
- Cross-account and cross-Region dashboards require proper configuration.
- Dashboards visualize monitoring information; alarms evaluate conditions.
8. Cleanup
- Delete the test dashboard if no longer needed.
- Stop the CPU stress process.
- Remove unnecessary test resources.
- Check for resources that may incur charges.
What Have We Learned?
After this demonstration, we should be able to:
- Create and customize CloudWatch Dashboards.
- Visualize EC2 CPU, network, and memory metrics.
- Understand widget types and dashboard JSON.
- Explain cross-account and cross-Region monitoring.
- Troubleshoot missing dashboard data.
The CloudOps takeaway:
Monitoring data tells us what is happening. Alarms tell us when something needs attention. Dashboards help us see the bigger picture.
Monitor → Alert → Visualize → Investigate
Next in the series
Skill 1.1.5 – Configure and Manage Amazon Simple Notification Service (Amazon SNS)
Next, we'll explore how to deliver notifications when infrastructure alarms are triggered, including SNS topics, subscriptions, message delivery, and troubleshooting notification failures.
Loading article