HUB
Sign inSign up

tle253/prome-ecs2

By tle253

•Updated almost 2 years ago

Image
Monitoring & observability
Web analytics
1

1.1K

tle253/prome-ecs2 repository overview

⁠Prometheus ECS Metrics Integration Docker Image

⁠Overview

This Docker image integrates Prometheus, the leading open-source monitoring and alerting toolkit, with a custom application that simplifies the process of pulling metrics from AWS Elastic Container Service (ECS). It is designed to provide seamless observability into ECS environments by extending Prometheus's scraping capabilities.

⁠Key Features
  • Prometheus Integration: Fully supports Prometheus's standard configuration and scraping mechanisms.
  • Custom Metrics Application: Tailored for extracting metrics directly from AWS ECS, including task-level and service-level insights.
  • Ease of Use: Pre-configured and packaged in a single Docker image to simplify deployment in cloud-native and hybrid environments.
  • AWS Compatibility: Leverages AWS APIs to gather real-time metrics, ensuring compatibility with a variety of ECS configurations (EC2 and Fargate).
⁠Configuration

To start using the image, you need to configure the application settings. The configuration file is located at:

/ecssupport/application.properties

Update the file with your AWS ECS details. Below is an example configuration:

ecs.clusters=cluster1,cluster2        # Comma-separated list of ECS clusters
ecs.services=service1,service2        # Comma-separated list of ECS services
ecs.labels=env=dev,env=prod           # Labels to filter ECS metrics (optional)
ecs.accessKeyId=<your-access-key-id>  # Your AWS access key ID
ecs.secretAccessKey=<your-secret-key> # Your AWS secret access key
ecs.region=<your-region>              # AWS region (e.g., us-east-1)

Ensure you replace the placeholders (<your-access-key-id>, <your-secret-key>, <your-region>, etc.) with your actual AWS credentials and ECS setup.

⁠How It Works
  1. Custom Application: Queries AWS ECS APIs using the configured credentials to collect metrics for tasks, services, and clusters.
  2. Metrics Exporter: Exposes the gathered metrics in a Prometheus-compatible format.
  3. Prometheus Scraping: Prometheus scrapes the custom application's endpoint to ingest ECS metrics.
  4. Data Visualization: Metrics can be visualized using tools like Grafana to gain actionable insights.
⁠Benefits
  • Unified Monitoring: Centralizes monitoring for ECS tasks and services alongside other Prometheus metrics.
  • Customizable: Extend or tweak configurations to suit specific ECS monitoring needs.
  • Scalable: Built to handle metrics from small to large ECS deployments without significant performance overhead.
⁠Use Cases
  • ECS Monitoring: Gain visibility into the performance of ECS tasks, services, and clusters.
  • Performance Optimization: Identify bottlenecks and optimize resource utilization in ECS environments.
  • Alerting and Reporting: Set up alerts for critical metrics like task failures or service anomalies.
⁠Getting Started
  1. Pull the Docker image:

    docker pull tle253/prome-ecs2
    
  2. Mount your configured application.properties file to the container:

    docker run -v /path/to/application.properties:/ecssupport/application.properties tle253/prome-ecs2
    
  3. Set up Prometheus to scrape metrics from the container's exposed endpoint.

⁠Contribution and Feedback

Contributions, issues, and feature requests are welcome! Feel free to open a GitHub issue or submit a pull request.


This Docker image aims to bridge the gap between Prometheus and AWS ECS, empowering teams with better insights into their cloud-native applications. Let us know how it works for you!

Tag summary
Recent tags
Content type
Image
Digest
sha256:d617b82e3…
Size
358 MB
Last updated
almost 2 years ago
docker pull tle253/prome-ecs2:latest