nerdswords / yet-another-cloudwatch-exporter

Prometheus exporter for AWS CloudWatch - Discovers services through AWS tags, gets CloudWatch metrics data and provides them as Prometheus metrics with AWS tags as labels
Apache License 2.0
953 stars 328 forks source link

[FEATURE] Include RDS Proxy Metrics in the RDS namespace #1460

Open jfentontyro opened 1 month ago

jfentontyro commented 1 month ago

Is there an existing issue for this?

Feature description

RDS Proxy metrics show up in AWS under the AWS/RDS namespace in Cloudwatch Metrics. Currently they aren't retrieved when including the relevant RDS Proxy metric name in our config under the RDS namespace with the correct search tags.

This is due to the db-proxy resource filter not being supported, given it is supported in the resourcegroupstagging api supporting this filter under the RDS namespace should allow us to retrieve these metrics

What might the configuration look like?

{
    Namespace: "AWS/RDS",
    Alias:     "rds",
    ResourceFilters: []*string{
        aws.String("rds:db"),
        aws.String("rds:cluster"),
        aws.String("rds:db-proxy"),
    },
    DimensionRegexps: []*regexp.Regexp{
        regexp.MustCompile(":cluster:(?P<DBClusterIdentifier>[^/]+)"),
        regexp.MustCompile(":db:(?P<DBInstanceIdentifier>[^/]+)"),
        regexp.MustCompile(":db-proxy:(?P<ProxyIdentifier>[^/]+)"),
    },
},

Anything else?

No response

jfentontyro commented 1 month ago

I've tested this locally and works as expected, and this passes all existing service tests. DB proxy metrics appear in local prometheus container running against our AWS account and had no issues. I would raise a PR for this as it's a 2 line change in the services.go file but am unable to push.

Could you have a look at this when you get a chance please @cristiangreco