Skip to content

phin1x/prometheus-cloudwatch-adapter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prometheus Cloudwatch Adapter

The cloudwatch adapter is a service which receives metrics through remote_write and sends them to AWS Cloudwatch.

Building

make build

AWS Setup

The environment variable AWS_REGION must be set.

You must set up authentication supported by the golang aws sdk, for example, via IRSA, environment, node role, or local configuration.

AWS Policy

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "cloudwatch:PutMetricData",
            "Resource": "*"
        }
    ]
}

Cloudwatch Limits

  • 40kb request size
  • 200 transactions per seconds
  • max 10 labels per metrics (timeseries with more than 10 labels are ignored)
  • max 20 samples per request (every write request gets split up into multiple put metrics requests)
  • NaN and Inf Values are not supported (samples with the value NaN or Inf are ignored)

Prometheus Configuration

To configure Prometheus to send samples to cloudwatch, add the following to your prometheus.yml:

remote_write:
  - url: "http://prometheus-cloudwatch-adapter:9513/write"

License

Apache 2.0