The easiest way to achieve your goal is to link the available components (which will require writing code, see below) and refrain from adding custom solutions as much as possible:
Amazon EC2 offers Auto Scaling , which is located in Rotate Metrics collected through Amazon CloudWatch . So metrics are key here, and that is what Sensu means, see, for example, Sensu and Graphite , which covers two approaches for pushing metrics from Sensu to Graphite:
Remember: think of Sensu as a โcontrol routerโ. While we're going to show how to click metrics on Graphite, itโs just as simple push metrics for any other system - Librato, Cube, OpenTSDB, etc. In fact, it would not be at all difficult to push the metrics to several. Graphic display of backends in branching mode. [emphasis mine]
Your metrics are already available on the Sensu server, so now you will need to paste them into CloudWatch (as described in Graphite in the article above), and in turn bind the corresponding auto-scaling policies to them.
Currently, the available metric handlers for Sensu are aimed at Graphite and Librato , so you will need to implement the Sensu Handler for Publishing custom metrics to CloudWatch (be sure to share it, it will definitely be widely used over time :)
Good luck
source share