Skip to content

Latest commit

 

History

History
63 lines (48 loc) · 3.08 KB

README.md

File metadata and controls

63 lines (48 loc) · 3.08 KB

Simple AWS Elastic Beanstalk exporter

A Prometheus Elastic Beanstalk exporter written in Python.

Metrics

Metrics Dimensions Labels Description
elasticbeanstalk_application application_name description Description of Elastic Beanstalk applications
elasticbeanstalk_environment_status environment_name id, application_name, platform, url, health, version, environment_tier Status of Elastic Beanstalk environments
elasticbeanstalk_enhanced_global_current_requests environment_name - Average number of requests per second over the last 10 seconds per environment (enhanced only)
elasticbeanstalk_enhanced_global_http_requests_percent environment_name status_code Percent of requests that resulted in a status code over the last 10 seconds (enhanced only)
elasticbeanstalk_enhanced_current_requests environment_name, instance_id - Average number of requests per instance per second over the last 10 seconds (enhanced only)
elasticbeanstalk_enhanced_load_average environment_name, instance_id mode Load average of instances (enhanced only)
elasticbeanstalk_enhanced_cpu_usage_percent environment_name, instance_id state CPU Usage per instance and state (enhanced only)
elasticbeanstalk_enhanced_health_status environment_name color, health_status Health of environments (enhanced only)
elasticbeanstalk_enhanced_status environment_name status Status of environments (enhanced only)
elasticbeanstalk_collector_duration_seconds collector - Duration of collections

Configuration

Credentials to AWS are provided in the following order:

  • Environment variables (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY)
  • Shared credentials file (~/.aws/credentials)
  • IAM role for Amazon EC2

For more information see the AWS Python SDK Documentation

To gather additional metrics about resources of your environment, AWS Elastic Beanstalk Enhanced Health Reporting needs to be enabled, see the AWS Elastic Beanstalk documentation

AWS IAM permissions

The exporter needs read access to Elastic Beanstalk service for describing applications and environments:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "elasticbeanstalk:Check*",
                "elasticbeanstalk:Describe*",
                "elasticbeanstalk:List*",
                "elasticbeanstalk:RequestEnvironmentInfo",
                "elasticbeanstalk:RetrieveEnvironmentInfo"
            ],
            "Resource": "*"
        }
    ]
}

Docker Image

To run the Elastic Beanstalk exporter on Docker, you need to specify the region to connect to. Metrics are exposed on port 9552.

When running on an ec2 machine using IAM role:

$ docker run -e AWS_DEFAULT_REGION=<region> -d -p 9552:9552 jeremietharaud/elasticbeanstalk-exporter