Prometheus Exporter for AWS RDS Max Connections
$ go run main.go
Get the binary file from Releases and run it.
$ docker run chaspy/aws-rds-maxcon-prometheus-exporter:v0.1.0
$ 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
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": "*"
}
]
}
If you use Datadog, you can use Kubernetes Integration Autodiscovery feature.