Skip to content

Instantly share code, notes, and snippets.

@lancelakey
Last active September 19, 2018 06:29
Show Gist options
  • Save lancelakey/3573faa050a122cc6693 to your computer and use it in GitHub Desktop.
Save lancelakey/3573faa050a122cc6693 to your computer and use it in GitHub Desktop.
AWS CloudWatch custom metrics
### AWS scripts
These look trivial
http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/mon-scripts-perl.html
http://aws.amazon.com/code/8720044071969977
### Diamond
Diamond is fairly popular and it looks like there's a built in way for Diamond to send metrics to AWS CloudWatch so maybe this is fairly easy
https://github.com/BrightcoveOS/Diamond
https://github.com/BrightcoveOS/Diamond/wiki/handler-cloudwatchHandler
http://gistflow.com/posts/954-custom-aws-cloudwatch-metrics-with-boto
### Publishing metrics to CloudWatch
This looks fairly easy
http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/working_with_metrics.html
http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/PublishMetrics.html
### Collectd
Collectd is popular but I'm not sure how easy it is to use with AWS CloudWatch.
You could try to use Collectd to collect the system info and send it straight to CloudWatch. I can't tell if this is easy or not. It looks like there may not be a Collectd CloudWatch plugin so some kind of script may be required to get the events from Collectd into Cloudwatch
https://github.com/cityindex/logsearch/issues/91
### Riemann
This is complicated. We probably don't want to do this on the first iteration.
You could try to use Riemann with CloudWatch
In this case I think you have to use something like collectd > riemann > cloudwatch
You could also try to skip CloudWatch and try something like collectd > riemann. However, if we skip CloudWatch we'll want to add what we have with CloudWatch now to Riemann IOW we'd want to collect CPU, RAM, etc. info and we'd want to be able to display that on graphs.
http://riemann.io/index.html
https://github.com/aphyr/riemann
@Poil
Copy link

Poil commented Nov 20, 2015

Hi,

FYI, I made this POC today :)

https://github.com/Poil/collectd_to_cloudwatch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment