GithubHelp home page GithubHelp logo

joaoplima / ecs-exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from slok/ecs-exporter

0.0 0.0 0.0 5.9 MB

Export AWS ECS cluster metrics to Prometheus

License: Apache License 2.0

Makefile 2.77% Shell 0.60% Go 95.89% Dockerfile 0.74%

ecs-exporter's Introduction

This repository is not maintained anymore. It's stable and works as it is, it will not have new features or metrics.

ECS exporter Build Status

Export AWS ECS cluster metrics to Prometheus

make
./bin/ecs-exporter --aws.region="${AWS_REGION}"

Notes:

  • This exporter will listen by default on the port 9222
  • Requires AWS credentials or permission from an EC2 instance
  • You can use the following IAM policy to grant required permissions:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "",
            "Effect": "Allow",
            "Action": [
                "ecs:ListServices",
                "ecs:ListContainerInstances",
                "ecs:ListClusters",
                "ecs:DescribeServices",
                "ecs:DescribeContainerInstances",
                "ecs:DescribeClusters"
            ],
            "Resource": "*"
        }
    ]
}

Exported Metrics

Metric Meaning Labels
ecs_up Was the last query of ecs successful region
ecs_clusters The total number of clusters region
ecs_services The total number of services region, cluster
ecs_service_desired_tasks The desired number of instantiations of the task definition to keep running regarding a service region, cluster, service
ecs_service_pending_tasks The number of tasks in the cluster that are in the PENDING state regarding a service region, cluster, service
ecs_service_running_tasks The number of tasks in the cluster that are in the RUNNING state regarding a service region, cluster, service
ecs_container_instances The total number of container instances region, cluster
ecs_container_instance_agent_connected The connected state of the container instance agent region, cluster, instance
ecs_container_instance_active The status of the container instance in ACTIVE state, indicates that the container instance can accept tasks. region, cluster, instance
ecs_container_instance_pending_tasks The number of tasks on the container instance that are in the PENDING status. region, cluster, instance

Flags

  • aws.region: The AWS region to get metrics from
  • aws.cluster-filter: Regex used to filter the cluster names, if doesn't match the cluster is ignored (default ".*")
  • debug: Run exporter in debug mode
  • web.listen-address: Address to listen on (default ":9222")
  • web.telemetry-path: The path where metrics will be exposed (default "/metrics")
  • metrics.disable-cinstances: Disable clusters container instances metrics gathering

Docker

You can deploy this exporter using the slok/ecs-exporter Docker image.

Note: 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

For example:

docker pull slok/ecs-exporter
docker run -d -p 9222:9222 slok/ecs-exporter -aws.region="eu-west-1"

ecs-exporter's People

Contributors

slok avatar endofcake avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.