# Discover ECS

> Task-level observability for AWS ECS workloads — clusters, services, and individual tasks with CPU, memory, network, and storage metrics, built on ecs_task_* telemetry without CloudWatch Container Insights

Source: https://last9.io/docs/discover-ecs/

The ECS feature in Discover gives you task-level observability over your AWS ECS workloads — clusters, services, and individual tasks with CPU, memory, network, and storage usage. It is built entirely on `ecs_task_*` metrics collected through the ECS Task Metadata Endpoint by your OTel/ADOT sidecar — no CloudWatch Container Insights required.

{/* TODO screenshot: Discover → ECS with health overview and Services tab */}

## Prerequisites

Your ECS tasks need an OpenTelemetry (ADOT) sidecar collecting from the ECS Task Metadata Endpoint and shipping `ecs_task_*` metrics to Last9. See the [AWS ECS integration](/docs/integrations/) for setup. The ECS view appears once these metrics are flowing.

## Understanding the ECS View

The health overview reports total clusters, total services, running tasks, and average CPU and memory utilization. Below it, three tabs slice the same telemetry:

| Tab          | Granularity                | Columns                                                                                  |
| ------------ | -------------------------- | ---------------------------------------------------------------------------------------- |
| **Services** | Aggregated per ECS service | Service, cluster, launch type, running tasks, CPU %, memory %, network rx/tx             |
| **Tasks**    | Individual tasks           | Task ID, service, family, revision, status, launch type, CPU %, memory, network, storage |
| **Clusters** | Aggregated per cluster     | Cluster, region, services, running tasks, average CPU %, average memory %                |

Stopped and killed tasks are shown alongside running ones, so a task that died recently doesn't silently vanish from the view.

Health coloring follows fixed thresholds: **critical** above 90% CPU or memory utilization, **warning** above 75%, healthy otherwise.

## Filtering

The sidebar filters apply across all tabs:

- **Cluster** and **service**
- **Launch type** — EC2 or Fargate
- **Task status** — e.g. `RUNNING`, `STOPPED`
- **Environment** and **AWS region**

## Querying ECS Metrics Directly

The same `ecs_task_*` metrics power dashboards, alerts, and ad-hoc PromQL. Every series carries these labels:

| Label                       | Meaning                           |
| --------------------------- | --------------------------------- |
| `aws_ecs_cluster_name`      | ECS cluster                       |
| `aws_ecs_service_name`      | ECS service                       |
| `aws_ecs_task_id`           | Individual task                   |
| `aws_ecs_task_family`       | Task definition family            |
| `aws_ecs_task_version`      | Task definition revision          |
| `aws_ecs_task_known_status` | `RUNNING` / `STOPPED` / `PENDING` |
| `aws_ecs_task_launch_type`  | `EC2` / `FARGATE`                 |
| `cloud_region`              | AWS region                        |
| `deployment_environment`    | Environment                       |

For example, memory utilization percentage per service:

```promql
100 * avg by (aws_ecs_cluster_name, aws_ecs_service_name) (ecs_task_memory_utilized_Megabytes)
    / avg by (aws_ecs_cluster_name, aws_ecs_service_name) (ecs_task_memory_reserved_Megabytes)
```

## Limitations

Because the view is built purely from task telemetry, control-plane state isn't available:

- **No desired task count** — the view can't show running-vs-desired gaps
- **No pending tasks** — a task that never started never emitted metrics
- **No container instance (EC2 node) capacity view**

These require CloudWatch Container Insights and are not part of the telemetry-only view.

---

## Troubleshooting

- **The ECS view is empty or missing**: verify `ecs_task_*` metrics are arriving — check the metrics explorer for `ecs_task_cpu_utilized_None`. The view is driven entirely by these metrics.

Please get in touch with us on [Discord](https://discord.com/invite/Q3p2EEucx9) or [Email](mailto:support@last9.io) if you have any questions.
