Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDS memory usage alerts #164

Open
ganeshgaikwad2993 opened this issue Apr 25, 2024 · 3 comments
Open

RDS memory usage alerts #164

ganeshgaikwad2993 opened this issue Apr 25, 2024 · 3 comments
Labels
question Further information is requested

Comments

@ganeshgaikwad2993
Copy link

Now we can set RDS memory usage alerts like RDS freeable memory.. but we have multiple RDS and all RDS having different db instance type so every RDS having different memory and settings the common alerts for db instance is not good idea..
In this we have rds_freeable memory alerts which will give the output with db identifier and we have rds_instance memory that is not containing the db identifier in his expression..
While calculating the RDS free memory

Rds_freeable memory/rds_ instance memory *100
But this expression is not working bcz both having different parameters one having db identifier and one having instance type and that's why I have got the so.many issues and RDS memory is important parameters...
If you have anything please share with me or try to resolve this issues

Thank you

@ganeshgaikwad2993 ganeshgaikwad2993 added the enhancement New feature or request label Apr 25, 2024
@ganeshgaikwad2993
Copy link
Author

can anyone update me on this?

@pudovd
Copy link

pudovd commented Jun 5, 2024

There is similar case with different labels for rds_dbload_cpu_average and rds_instance_vcpu_average metrics.

@vmercierfr
Copy link
Collaborator

vmercierfr commented Jun 28, 2024

Sorry for this late reply!

I understand you want to set memory and CPU alerts based on RDS instance capacity. We actually designed the RDS exporter for that purpose. You can combine rds_freeable_memory_bytes, and rds_instance_memory_bytes using the instance_class label.

So you can have an 80% memory-used alert that is applicable to all instances regardless of their type.

We wrote all these alerts the Database Monitoring Framework project, see alerts definition.

I guess you are looking for RDSMemoryUtilization alert :

# Source https://github.com/qonto/database-monitoring-framework/blob/546282182ed63814e033582bf9951f193f4da2dd/charts/prometheus-rds-alerts/values.yaml#L91-L104
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{})
)
< 20

Does it fit to your need?

@vmercierfr vmercierfr added question Further information is requested and removed enhancement New feature or request labels Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants