Skip to content

RDS instance grafana dashboard / Wrong evaluation for memory usage #251

@pudovd

Description

@pudovd

Describe the bug

For the RDS Instance dashboard revision 12 (link) in the Memory panel we can see a lower value than it actually is if there are several RDS instances with the same instance type.

Desktop (please complete the following information)

  • OS: Linux
  • Prometheus RDS exporter's version: 0.10.0
  • RDS engine: PostgreSQL

To Reproduce

We need at least two RDS instances in the same region with the same instance type.

Expected behavior

Current expression is:

100
- sum(rds_freeable_memory_bytes{aws_account_id="000000000000",aws_region="us-east-1",dbidentifier="myrds"}) by (dbidentifier)
  * 100
  / sum(rds_instance_memory_bytes{}
  * on (instance_class) group_left(dbidentifier) rds_instance_info{aws_account_id="000000000000",aws_region="us-east-1",dbidentifier="myrds"}
)
by (dbidentifier)

I think the right expression can be based on the expression for alert from this comment:

100
- max by (aws_account_id, aws_region, dbidentifier) (rds_freeable_memory_bytes{})
  * 100
  / on(aws_account_id, aws_region, dbidentifier) (
      max by (instance_class) (rds_instance_memory_bytes{}) 
      * on (instance_class) group_right() 
      max by (aws_account_id, aws_region, dbidentifier, instance_class) (rds_instance_info{aws_account_id="000000000000",aws_region="us-east-1",dbidentifier="myrds"})
)

Additional context

No addition context.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions