Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Some tools for working with Graphite
Python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
monitors
.gitignore
README.markdown
aggclient.py
aggregated.py
runmonitors.py

README.markdown

graphite-tools

This repository contains a number of handy tools for using Graphite in a production environment, particularly with Python applications.

aggregated.py

This daemon is modeled after Etsy's statsd and listens for UDP packets with either timing information or count information.

For timing information, aggregated.py will tabulate the following metrics to be sent to the Carbon daemon every minute:

  • avg - average for the minute
  • upper - highest value seen in the minute
  • lower - lowest value seen in the minute
  • count - total events with this label seen in the minute

For count information, aggregated.py will send the sum of all the events to the Carbon daemon every minute.

One example, using both of these methods in conjunction with one another is when profiling cache hits/misses. For example:

result = cache.get('mykey')
if result:
    graphite.incr('app.method.cache.hit')
    return result

start = time.time()
result = slow_uncached_method()
graphite.timing('app.method.cache.miss', (time.time() - start))

The above example would give you the following metrics in Graphite:

  • app.method.cache.hit
  • app.method.cache.miss.avg
  • app.method.cache.miss.count
  • app.method.cache.miss.upper
  • app.method.cache.miss.lower

Using these five metrics you can get total cache hits/misses and plot an average cache miss time.

monitors

These system monitors are still in development, but are meant to be run from something like Jenkins on a timer to report information about machines or services running in the production cluster.

Something went wrong with that request. Please try again.