Skip to content

Instantly share code, notes, and snippets.

@siroken3
Created August 24, 2012 06:59
Show Gist options
  • Save siroken3/3446921 to your computer and use it in GitHub Desktop.
Save siroken3/3446921 to your computer and use it in GitHub Desktop.
botoで cloudwatch の RDSメトリクス取得方法
#!/bin/env python
from datetime import datetime, timedelta
end = datetime.now()
start = end - timedelta(hours=1)
data = conn.get_metric_statistics(60, start, end, "CPUUtilization","AWS/RDS","Average", { 'DBInstanceIdentifier' : 'activity' }, 'Percent')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment