crccheck / cloudwatch-to-graphite Goto Github PK
View Code? Open in Web Editor NEWHelper for pushing AWS CloudWatch metrics to Graphite
License: Apache License 2.0
Helper for pushing AWS CloudWatch metrics to Graphite
License: Apache License 2.0
Will not work w/ Python 2.6.
would be helpful. I think it should be called plumbum
to go with the leadbutt
theme.
I, @crccheck, don't use graphite these days. So I don't have the personal need to maintain this project anymore.
Ideas:
There are some basic levels of code quality I would like this project to meet that I would have put in (PR checks, contributers.md, code coverage, github templates) but I haven't had the time to do it yet.
The provided sample config file is little to simple to be useful, especially for those not too familiar with YAML. Here is a more complex one that avoids duplication via YAML anchor+alias. It would be helpful to include some of this, I believe.
# Define defaults that can be referenced below
My_Defaults:
- &ElbMetric
Namespace: "AWS/ELB"
Dimensions:
# You can have multiple dimensions, but boto will only return the last one
LoadBalancerName: "awseb-e-v-AWSEBLoa-ZELK76TU0GP"
Auth:
region: "us-west-1"
Metrics:
- <<: *ElbMetric
MetricName: "RequestCount"
Statistics: "Sum"
Unit: "Count"
# You can list additional metrics in one file. Just be careful about rate limits.
- <<: *ElbMetric
MetricName: "UnHealthyHostCount"
Statistics: "Maximum"
Unit: "Count"
# You can list additional metrics in one file. Just be careful about rate limits.
- <<: *ElbMetric
MetricName: "Latency"
Statistics:
- "Average"
- "Maximum"
Unit: "Seconds"
- <<: *ElbMetric
MetricName: "HTTPCode_ELB_5XX"
Statistics: "Sum"
Unit: "Count"
# OPTIONAL: set defaults for all metrics in this file
Options:
Count: 1 # How many Periods to return (note: there is a max num datapoints you can get at once)
Period: 5 # [min], minimum 1
Thank you!
I saw the PR for s3/redshift support that was closed by the author, was wondering if this will be added in some way?
Elastic beanstalk presents challenges because the resources are extremely ephemeral. I have a work-in-progress solution in development; that is viewable as a compare here: master...krux:pkrohn-EPE-58-elastic-beanstalk
Feedback appreciated.
and refactor option loading (it needs it!) so the priority is: command line, metric, config, global default
No need to use a custom formatter to adapt to use a hosted graphite solution. Here's an example for hostedgraphite:
$ leadbutt | awk '{print "123-456-789-0."$0}' | nc carbon.hostedgraphite.com 2003
Boto 2 (python package boto
) cannot filter ELBs by tags, this is hopefully fixed in v3.
See boto/boto#2549
Thank you!
Are there plans for plumbum to support other regions? How should one handle the hard-coded connection?
it throws the IOError right now.
in plumbum, when writing a new template, you're not sure how exactly to get at the juicy bits. is it resource.id or resource.name, is it in a tag? are tags even available?
I think if a template isn't specified, it should drop you into an interactive mode. Introspecting and displaying what's available would be nice, but would get messy fast.
I think I broke filtering when I switched from docopt
to argparse
for plumbum. The filter fix is pretty simple, and a test to prevent repeating this breakage would be great.
Support getting cloudwatch metrics for EBS volumes
would be helpful for running this in cron jobs because setting up the environment for that is always a pain
It's supposed to be seconds, but since they're limited to being multiples of 60, I figure minutes is human friendlier. But juggling two separate systems of numbers is annoying.
metric vs Metric is the big thing.
AWS's cloudwatch seems to use TitleCase for everything.
The makefile should detect that it is running on OS X and adjust the options passed in to sed
accordingly, so if does not make a bad change, then commit it.
See 025a9ac.
Could you please provide example of how plumbum filter works? I wasn't able to figure out how it work and receiving errors all the time.
Traceback (most recent call last):
File "/home/vagrant/.pyenv/versions/2.7.6/bin/plumbum", line 11, in <module>
sys.exit(main())
File "/home/vagrant/.pyenv/versions/2.7.6/lib/python2.7/site-packages/plumbum.py", line 222, in main
resources = list_resources[namespace](region, filters)
File "/home/vagrant/.pyenv/versions/2.7.6/lib/python2.7/site-packages/plumbum.py", line 136, in list_elb
return lookup(instances, filter_by=filter_by_kwargs)
File "/home/vagrant/.pyenv/versions/2.7.6/lib/python2.7/site-packages/plumbum.py", line 82, in lookup
return list(filter(filter_key(filter_by), instances))
File "/home/vagrant/.pyenv/versions/2.7.6/lib/python2.7/site-packages/plumbum.py", line 76, in filter_instance
for key, value in filter_args.items()])
AttributeError: 'str' object has no attribute 'items'
does it matter? it all gets fed into graphite which handles it fine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.