Skip to content
This repository has been archived by the owner on Mar 8, 2018. It is now read-only.

rtyler/graphite-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Some tools for working with Graphite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages