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

Add rds provisioned storage size as own metric #48

Closed
arnitolog opened this issue Mar 4, 2019 · 4 comments
Closed

Add rds provisioned storage size as own metric #48

arnitolog opened this issue Mar 4, 2019 · 4 comments

Comments

@arnitolog
Copy link
Contributor

Hello,

Is there any way to get some metrics directly from RDS? For example the size of provisioned storage. So, If we will know it we will be able to calculate the percent of RDS storage usage.

@izo3
Copy link

izo3 commented Mar 4, 2019

You can use something like this (might need some tweaks):

https://gist.github.com/izo3/5e58343ba9a96225a6d8b19c66e05e63

@thomaspeitz
Copy link
Contributor

thomaspeitz commented Mar 4, 2019

@arnitolog - In short "No, this is currently not possible."

Long Story:
Actually in the initial implementation of the scraper i implemented those metrics for some services and added those to the info metrics. I removed them again due to the added complexity.

Next questions are only interesting if you need the provisioned storage size for alerting and not visualization:

Do you have so many different sized databases? - Else i would suggest that you tag them e.g. with "Storage-Size" - "100G" - Then you can define different alerts for each tag.

Or how we solve it at our company is that we use forecasted alerts. We are not interested about the percentage, we are interested if it will be full in x days. Then we alert.

This is one rule as example. It checks the change in the last 24h and alerts based on that if it will be full in 32 days. This allows to detect changes in data usage a lot faster and we have more time to react. Less stress during nights :)

(predict_linear(aws_rds_free_storage_space_minimum[1d], 86400 * 32) + on (name) group_left(tag_type) aws_rds_info) / 1024 / 1024 / 1024 < 0

I hope it helps without code changes.

@thomaspeitz thomaspeitz changed the title RDS metrics Add rds provisioned storage size as own metric Mar 4, 2019
@arnitolog
Copy link
Contributor Author

Thanks a lot, Thomas.
Yes, unfortunately, we have several completely different storage types (8,20,60,200,500,700Gb)
Also thought about a tag with the storage size. And you suggested an interesting approach with predict_linear. I will take a close look at it.
Thanks for the advice and, of course, for the excellent tool

@thomaspeitz
Copy link
Contributor

I will close this here. Please tag me here if you want to get it reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants