Sign inSign up

jmal98/ec2-exporter

By jmal98

Updated over 2 years ago

A Prometheus Exporter for Amazon EC2

Image
1

1.5K

jmal98/ec2-exporter repository overview

Amazon Elastic Compute Cloud (EC2) Exporter

A Prometheus exporter for Amazon EC2 metrics and conditions. While the official Prometheus Cloudwatch Exporter is pretty good, this exporter is a scaled back version collecting a subset of the information from EC2 resource types, while not incurring the cost of using the Cloudwatch API.

Build
docker build --tag ec2-exporter  .
Configuration

The exporter makes use of the official Java sdk, and can be configured using a variety of methods:

  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, etc...
  • Credentials delivered through the Amazon EC2 container service if AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" environment variable is set and security manager has permission to access the variable,
  • Instance profile credentials delivered through the Amazon EC2 metadata service if running within AWS
Running

You can deploy this exporter using the jmal98/ec2-exporter Docker image.

For example if using an IAM profile, you do not need to provide any environmental credentials:

docker run -d -p 9385:9385 jmal98/ec2-exporter:1.0.1

For example if supplying environment configuration:

docker run -d -p 9385:9385 -e AWS_ACCESS_KEY_ID=<access key> -e AWS_SECRET_ACCESS_KEY=<secret key> -e AWS_REGION=<region> [other Java AWS SDK environment variables]  jmal98/ec2-exporter:1.0.1

Tag summary

Content type

Image

Digest

sha256:126d7da58

Size

80.4 MB

Last updated

over 2 years ago

docker pull jmal98/ec2-exporter