I have just pushed the source code for pyawschart - v0.2 out to GitHub. This project was created a few months back and I have been using it for personal (Proboscis) and professional (PBS) projects since then. I've just decided to open source it for the betterment of the AWS and Python communities.
The goal was quite simple... Use boto to pipe Amazon CloudWatch data into Python Google Chart and hope for some really cool data visualizations.
The results are pretty neat:
Features
pyawschart - v0.2 supports all of the metrics that Amazon makes available for Elastic Compute Cloud (EC2), Relation Database Service (RDS), Elastic Block Store (EBS), and Elastic Load Balancer (ELB).
Example code
Get EC2 cpu utilization chart for the past hour.
import boto
from pyawschart import RANGES
from pyawschart.ec2 import CPUUtilizationChart
# Connect with botoconn = boto.connect_cloudwatch(AWS_ACCESS_KEY AWS_SECRET_ACCCES_KEY)
chart = CPUUtilizationChart(conn, 'i-6d3efXXX', RANGES['hour'])
# Display chart url
print chart.get_url()
# Download chart image
chart.download('/tmp/i-6d3efXXX-cpu-hour.png')
Get RDS database connections chart for the past day.
import boto
from pyawschart import RANGES
from pyawschart.rds import DatabaseConnectionsChart
# Connect with botoconn = boto.connect_cloudwatch(AWS_ACCESS_KEY AWS_SECRET_ACCCES_KEY)
chart = DatabaseConnectionsChart(conn, 'my-rds-instance', RANGES['day'])
# Display chart url
print chart.get_url()
# Download chart image
chart.download('/tmp/my-ec2-instance-connections-day.png')
Feedback
While the library works well for most of the use cases I require, I would welcome feedback on your use cases. Use it... Abuse it.. then submit comments on this entry, or post issues/requests on GitHub.
URLs
- Project page: http://tomatohater.com/pyawschart/
- Source code: http://github.com/tomatohater/pyawschart
- Issue tracker: http://github.com/tomatohater/pyawschart/issues