Blog Logo
  • Home
  • About

pyawschart - v0.2 released

by Drew Engelson — 10 Jan 2011

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
Drew Engelson
Author

Drew Engelson

https://tomatohater.com

I currently lead the Cloud Foundation Services team at Starbucks. We are building the Starbucks PaaS to allow digital platforms to be deployed globally with a focus on automation, scalability, performance, security, and developer experience.

Prior to Starbucks, I led Celerity's Technology Innovation and Architecture practice and founded Zoombit and served in technology leadership at Huge and PBS.

Yes. I seriously hate tomatoes.

All content copyright Tomatohater © 2006-2021 • All rights reserved.