> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Demo CloudWatch Metrics and Namespaces

> Overview of Amazon CloudWatch metrics, namespaces, and dimensions with practical tips for locating, filtering, and exploring metrics in the AWS Console.

In this lesson we review Amazon CloudWatch metrics and namespaces, and clarify how dimensions relate to them. This focused refresher covers the key concepts and practical tips for locating and exploring metrics in the AWS Management Console.

Open CloudWatch in the AWS Management Console

* From the AWS Management Console, type "CloudWatch" in the service search to jump to CloudWatch quickly.

![A screenshot of the AWS Management Console showing search results for "CloudWatch," with the CloudWatch service highlighted and other services like Athena and Amazon EventBridge listed. The page includes the Services sidebar and footer links such as CloudShell and Console Mobile App.](https://mintcdn.com/kodekloud-c4ac6d9a/FoKJ_KwuI1oFSFo9/images/AWS-Certified-DevOps-Engineer-Professional/Domain-4-Monitoring-and-Logging/Demo-CloudWatch-Metrics-and-Namespaces/aws-console-cloudwatch-search.jpg?fit=max\&auto=format\&n=FoKJ_KwuI1oFSFo9\&q=85\&s=556fcedfd4f491d91b272f161d31a6a3)

What are CloudWatch metrics?

* Metrics are time-ordered measurements that represent the state or performance of an AWS resource or application (for example, `CPUUtilization`, `NetworkIn`, or `RequestCount`).
* CloudWatch collects and stores metric measurements so you can visualize trends, create dashboards, and trigger alarms based on thresholds or anomalies.

Where to find metrics in the Console

* In CloudWatch, open the left-hand menu and choose **Metrics**. From here you can choose:
  * `All metrics` — a namespace-oriented list of available metrics.
  * `Metrics Explorer` — an interactive way to search, filter, and visualize metrics.
* Metrics Explorer is the fastest way to explore large sets of metrics (type `EC2` to filter to EC2-related metrics, for example).

When filtered to EC2 (via `All metrics` or Explorer) you’ll see per-instance and aggregated metrics such as `CPUUtilization`, `DiskReadOps`, `NetworkIn`, `NetworkOut`, `NetworkPacketsIn`, and `NetworkPacketsOut`.

The classic CloudWatch console groups metrics by namespace. The example below shows EC2 metrics in the CloudWatch Explorer.

![A screenshot of the AWS CloudWatch Explorer interface showing selected EC2 instance metrics (NetworkIn, NetworkOut, NetworkPacketsIn/Out, StatusCheckFailed, etc.) listed in the metrics panel. The left sidebar shows CloudWatch navigation items like Metrics and Network Monitoring.](https://mintcdn.com/kodekloud-c4ac6d9a/FoKJ_KwuI1oFSFo9/images/AWS-Certified-DevOps-Engineer-Professional/Domain-4-Monitoring-and-Logging/Demo-CloudWatch-Metrics-and-Namespaces/cloudwatch-explorer-ec2-metrics-panel.jpg?fit=max\&auto=format\&n=FoKJ_KwuI1oFSFo9\&q=85\&s=0cfd94b4bb818db854aa30ebe12658fc)

Understanding namespaces and dimensions

* Namespace: A container that groups related metrics by AWS service or by your application. Namespaces avoid naming collisions and make metrics easier to find. Examples: `AWS/EC2`, `AWS/ApplicationELB`, `AWS/ELB` (classic).
* Dimension: A name/value pair that scopes a metric to a specific resource (for example, `InstanceId` for EC2). Dimensions let you filter or aggregate metrics for single resources or resource groups.

Common namespaces, example metrics, and typical dimensions:

| Namespace | Example metrics | Common dimensions |
| -: | - | - |
| `AWS/EC2` | `CPUUtilization`, `EBSReadBytes`, `StatusCheckFailed_Instance` | `InstanceId` |
| `AWS/ApplicationELB` | `TargetResponseTime`, `HTTPCode_Target_2XX_Count`, `ActiveConnectionCount` | `LoadBalancer`, `TargetGroup` |
| `AWS/ELB` | `RequestCount`, `Latency` | `LoadBalancerName` |
| Custom/app namespace | `RequestLatency`, `ErrorCount` | `Service`, `Environment` |

Drilling into EC2 metrics

* Use filters to view metrics by `AutoScalingGroupName` or by individual `InstanceId`.
* Selecting a metric reveals its dimensions — confirm which `InstanceId` (or other identifier) the data belongs to before analyzing or creating alarms.
* Many useful EC2 measurements include `CPUCreditUsage`, `EBSReadBytes`, and `StatusCheckFailed_Instance`.

A simple mental model

* Metric = measurement (a time series)
* Namespace = group of related metrics (service or application)
* Dimension = attribute that identifies which resource the metric applies to

When exploring metrics, start in Metrics Explorer to quickly find the namespace you need (for example `AWS/EC2`), then inspect dimensions like `InstanceId` to narrow results to a single resource.

Switching namespaces — example: Application Load Balancer

* Switching the Explorer to the ALB (Application Load Balancer) namespace surfaces ALB-specific metrics such as `TargetResponseTime`, `HTTPCode_Target_2XX_Count`, and `ActiveConnectionCount`.
* ALB metrics are designed around request handling, response codes, response times, and load balancer capacity (LCUs).

![A screenshot of the AWS CloudWatch Metrics console showing an untitled, empty graph and a list of metrics (e.g., TargetResponseTime, HTTPCode\_Target\_2XX\_Count, ActiveConnectionCount). The header shows region controls and options for time range, actions, and queries.](https://mintcdn.com/kodekloud-c4ac6d9a/FoKJ_KwuI1oFSFo9/images/AWS-Certified-DevOps-Engineer-Professional/Domain-4-Monitoring-and-Logging/Demo-CloudWatch-Metrics-and-Namespaces/aws-cloudwatch-metrics-empty-graph.jpg?fit=max\&auto=format\&n=FoKJ_KwuI1oFSFo9\&q=85\&s=251a5cdfd22d06f689226ecc95e5edb0)

Quick CLI example — list metrics for a namespace

* You can also use the AWS CLI to list metrics for a given namespace. Example: list EC2 metrics in the `us-east-1` region.

```bash theme={null}
aws cloudwatch list-metrics --namespace AWS/EC2 --region us-east-1
```

Summary and next steps

* Use Metrics Explorer as your starting point to quickly locate metrics by namespace and dimension.
* Think of metrics as measurements, namespaces as groups, and dimensions as the attributes that identify resources (e.g., `InstanceId`).
* Each AWS service exposes a tailored set of metrics and dimensions — explore the namespace for the service you need to understand what you can monitor and alert on.

Links and references

* [Amazon CloudWatch Metrics — AWS Documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch-concepts.html)
* [Metrics Explorer — CloudWatch Console Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/view-metrics.html)

> **[Watch Video](https://learn.kodekloud.com/user/courses/aws-certified-devops-engineer-professional/module/15ed9473-60f4-466a-b7b2-3d9cb829e847/lesson/1d894e44-c9cc-4e5e-943f-c700e0af5815)**


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.