{"id":17960992,"url":"https://github.com/slok/ecs-exporter","last_synced_at":"2025-05-07T17:51:16.306Z","repository":{"id":38751591,"uuid":"75209626","full_name":"slok/ecs-exporter","owner":"slok","description":"Export AWS ECS cluster metrics to Prometheus","archived":false,"fork":false,"pushed_at":"2023-11-03T09:51:40.000Z","size":6045,"stargazers_count":142,"open_issues_count":9,"forks_count":35,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-31T12:39:07.371Z","etag":null,"topics":["amazon","aws","aws-ecs","cluster","ecs","ecs-exporter","exported-metrics","metrics","prometheus"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slok.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-11-30T17:17:31.000Z","updated_at":"2025-03-18T11:16:57.000Z","dependencies_parsed_at":"2024-01-14T09:00:14.935Z","dependency_job_id":null,"html_url":"https://github.com/slok/ecs-exporter","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slok%2Fecs-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slok%2Fecs-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slok%2Fecs-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slok%2Fecs-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slok","download_url":"https://codeload.github.com/slok/ecs-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931391,"owners_count":21827104,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amazon","aws","aws-ecs","cluster","ecs","ecs-exporter","exported-metrics","metrics","prometheus"],"created_at":"2024-10-29T11:07:57.221Z","updated_at":"2025-05-07T17:51:16.278Z","avatar_url":"https://github.com/slok.png","language":"Go","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"## This repository is not maintained anymore. It's stable and works as it is, it will not have new features or metrics.\n\n# ECS exporter [![Build Status](https://travis-ci.org/slok/ecs-exporter.svg?branch=master)](https://travis-ci.org/slok/ecs-exporter)\n\nExport AWS ECS cluster metrics to Prometheus\n\n```bash\nmake\n./bin/ecs-exporter --aws.region=\"${AWS_REGION}\"\n```\n\n## Notes:\n\n- This exporter will listen by default on the port `9222`\n- Requires AWS credentials or permission from an EC2 instance\n- You can use the following IAM policy to grant required permissions:\n\n```\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"ecs:ListServices\",\n                \"ecs:ListContainerInstances\",\n                \"ecs:ListClusters\",\n                \"ecs:DescribeServices\",\n                \"ecs:DescribeContainerInstances\",\n                \"ecs:DescribeClusters\"\n            ],\n            \"Resource\": \"*\"\n        }\n    ]\n}\n```\n\n## Exported Metrics\n\n| Metric                                 | Meaning                                                                                                       | Labels                    |\n| -------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------- |\n| ecs_up                                 | Was the last query of ecs successful                                                                          | region                    |\n| ecs_clusters                           | The total number of clusters                                                                                  | region                    |\n| ecs_services                           | The total number of services                                                                                  | region, cluster           |\n| ecs_service_desired_tasks              | The desired number of instantiations of the task definition to keep running regarding a service               | region, cluster, service  |\n| ecs_service_pending_tasks              | The number of tasks in the cluster that are in the PENDING state regarding a service                          | region, cluster, service  |\n| ecs_service_running_tasks              | The number of tasks in the cluster that are in the RUNNING state regarding a service                          | region, cluster, service  |\n| ecs_container_instances                | The total number of container instances                                                                       | region, cluster           |\n| ecs_container_instance_agent_connected | The connected state of the container instance agent                                                           | region, cluster, instance |\n| ecs_container_instance_active          | The status of the container instance in ACTIVE state, indicates that the container instance can accept tasks. | region, cluster, instance |\n| ecs_container_instance_pending_tasks   | The number of tasks on the container instance that are in the PENDING status.                                 | region, cluster, instance |\n\n## Flags\n\n- `aws.region`: The AWS region to get metrics from\n- `aws.cluster-filter`: Regex used to filter the cluster names, if doesn't match the cluster is ignored (default \".\\*\")\n- `debug`: Run exporter in debug mode\n- `web.listen-address`: Address to listen on (default \":9222\")\n- `web.telemetry-path`: The path where metrics will be exposed (default \"/metrics\")\n- `metrics.disable-cinstances`: Disable clusters container instances metrics gathering\n\n## Docker\n\nYou can deploy this exporter using the [slok/ecs-exporter](https://hub.docker.com/r/slok/ecs-exporter/) Docker image.\n\nNote: Requires AWS credentials or permission from an EC2 instance, for example you can pass the env vars using `-e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} -e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}` options\n\nFor example:\n\n```bash\ndocker pull slok/ecs-exporter\ndocker run -d -p 9222:9222 slok/ecs-exporter -aws.region=\"eu-west-1\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslok%2Fecs-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslok%2Fecs-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslok%2Fecs-exporter/lists"}