chaspy / aws-rds-maxcon-prometheus-exporter

Prometheus Exporter for AWS RDS max connections

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aws-rds-maxcon-prometheus-exporter

Prometheus Exporter for AWS RDS Max Connections

image.png

How to run

Local

$ go run main.go

Binary

Get the binary file from Releases and run it.

Docker

$ docker run chaspy/aws-rds-maxcon-prometheus-exporter:v0.1.0

Metrics

$ curl -s localhost:8080/metrics | grep aws_custom_rds_max_connections
aws_custom_rds_max_connections{dbinstanceclass="db.r5.4xlarge",dbinstanceidentifier="postgres-api-production-a01"} 5000
aws_custom_rds_max_connections{dbinstanceclass="db.r5.4xlarge",dbinstanceidentifier="postgres-api-production-a02"} 5000
aws_custom_rds_max_connections{dbinstanceclass="db.r5.large",dbinstanceidentifier="test-postgres-production-a01"} 1800
aws_custom_rds_max_connections{dbinstanceclass="db.r5.large",dbinstanceidentifier="test-postgres-production-a02"} 1800

IAM Role

The following policy must be attached to the AWS role to be executed.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "rds:DescribeDBInstances",
                "rds:DescribeDBParameters",
            ],
            "Resource": "*"
        }
    ]
}

Datadog Autodiscovery

If you use Datadog, you can use Kubernetes Integration Autodiscovery feature.

About

Prometheus Exporter for AWS RDS max connections

License:MIT License


Languages

Language:Go 92.2%Language:Dockerfile 5.2%Language:Shell 2.6%