🚧 🚧 🚧 This repo is still work in progress and is subject to change.
This repo contains a Prometheus exporter for Amazon Elastic Container Service (ECS) that publishes ECS task infra metrics in Prometheus format.
Run the following container as a sidecar on ECS tasks:
quay.io/prometheuscommunity/ecs-exporter:latest
An example Fargate task definition that includes the container is available.
To add ECS exporter to your existing ECS task:
- Go to ECS task definitions.
- Click on "Create new revision".
- Scroll down to "Container definitions" and click on "Add container".
- Set "ecs-exporter" as container name.
- Copy the container image URL from above.
- Add tcp/9779 as a port mapping.
- Click on "Add" to return back to task definition page.
- Click on "Create" to create a new revision.
By default, it publishes Prometheus metrics on ":9779/metrics". The exporter in this repo can be a useful complementary sidecar for the scenario described in this blog post. Adding this sidecar to the ECS task definition would export task-level metrics in addition to the custom metrics described in the blog.
The sidecar process is also supported on AWS App Runner and can be used to publish infra metrics in Prometheus format from App Runner services.
None.
- container_name: Name of the container (as in the ECS task definition) associated with a metric.
- interface: Network interface device associated with the metric. Only available for several network metrics.
Check out the metrics snapshots which
contain sample metrics emitted by ecs_exporter in the Prometheus text
format
you should expect to see on /metrics. Note that these snapshots behave as if
--web.disable-exporter-metrics
were passed when running ecs_exporter, such
that standard client_golang
metrics are not included.