Manivannan Thirugnanam
Manivannan Thirugnanam

Reputation: 781

How to get AWS RDS CPU and memory metric using script other then cloudwatch

I am hosting Linux server and RDS Posgresql server in Amazon Web Services. I would like to get AWS RDS CPU Utilization, Memory usage Metric using linux script. other than cloudwatch. Is there any way to do it..? I don't want to go with any third party software. i need to write cron job in linux.

Upvotes: 1

Views: 5396

Answers (1)

Adam Owczarczyk
Adam Owczarczyk

Reputation: 2862

Install aws cli if not already installed, then use http://docs.aws.amazon.com/cli/latest/reference/cloudwatch/get-metric-statistics.html

Example:

aws cloudwatch get-metric-statistics --namespace 'AWS/RDS' --metric-name 'CPUUtilization' --start-time '2017-05-25T12:00:00Z' --end-time '2017-05-25T12:30:00Z' --period 60 --statistics 'Maximum'

Upvotes: 3

Related Questions