qonto / prometheus-rds-exporter

Prometheus exporter for AWS RDS
MIT License
60 stars 10 forks source link

Fix storage performance information #178

Closed vmercierfr closed 3 months ago

vmercierfr commented 3 months ago

Objective

Fix storage performance information

Why

The rds_max_disk_iops_average and rds_max_storage_throughput_bytes currently return the value of the allocated capacity of the instance. But this is not reflecting the real capacity of the issue because some EC2 instance has baseline and maximum operation.

Depending on the instance class you're using, you might see lower IOPS performance than the maximum that you can provision with RDS. For specific information on IOPS performance for DB instance classes, see Amazon EBS–optimized instances in the Amazon EC2 User Guide. We recommend that you determine the maximum IOPS for the instance class before setting a Provisioned IOPS value for your DB instance. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html

On these instances (e.g. t3.medium), these disk max information are incorrect which lead to incorrect analysis.

Example:

fix

In this PR, I'm adding rds_allocated_disk_iops_average and rds_allocated_disk_throughput_bytes metrics with the value of allocated storage. This could be used in the future to detect over-provisionned resources for cost saving. And we change the method to compute max to the reflect minimum capacity between the EC2 instance and the EBS volume.

How

Release plan

vmercierfr commented 3 months ago

sre

github-actions[bot] commented 3 months ago

Code Coverage

Package Line Rate Health
github.com/qonto/prometheus-rds-exporter/internal/app/cloudwatch 87%
github.com/qonto/prometheus-rds-exporter/internal/app/ec2 87%
github.com/qonto/prometheus-rds-exporter/internal/app/exporter 81%
github.com/qonto/prometheus-rds-exporter/internal/app/rds 75%
github.com/qonto/prometheus-rds-exporter/internal/app/servicequotas 51%
github.com/qonto/prometheus-rds-exporter/internal/app/trace 100%
github.com/qonto/prometheus-rds-exporter/internal/app/unit 100%
Summary 80% (1062 / 1326)

Minimum allowed line rate is 60%

vmercierfr commented 3 months ago

I'm prepared these change on top of https://github.com/qonto/prometheus-rds-exporter/pull/177 because they are related subject.

We have a lack of consistency in metrics name for storage, we are using disk or storage terms. We may need to rename them for the 1.0.0