-
RSS Links
Categories
- /bike
- /blog
- /categoryless
- /coffee
- /dev/random
- /food
- /freenetworks
- /friends
- /funny
- /geek
- /GirTheCadillac
- /Lebowski
- /Life
- /LifeWithDog
- /me
- /metrix
- /music
- /National Wireless Summit 2006
- /phonecamera
- /photo
- /potpourri
- /seadrunks
- /seattle
- /seattlewireless
- /shmoocon
- /softball
- /StupidShellTricks
- /sysadmin
- /travel
- /unix
- /work
- cons
- monitoring
- pyramid
- ruby
Archives
- January 2011
- December 2010
- September 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- December 2008
- December 2007
- August 2007
- July 2007
- May 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- June 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- July 2004
- June 2004
- February 2004
- January 2004
- December 2003
- November 2003
- August 2003
Ganglia: Using the ruby gmetric gem
If you are new to Ganglia this post might not make much sense. If you are interested in Ganglia I suggest you read this paper first to get a better understanding of how it works.
Over the past year I have been moving away from Munin and towards Ganglia for my server monitoring needs (for reasons that should go in another post). One of the nice things about Munin is the number of plugins that are included out the box. Ganglia is lacking in this department. The lack of time to re-write plugins was one of the initial obstacles preventing me from ditching munin altogether. Once I found the gmetric gem for ruby that all changed.
Using the gemtric gem you can write a ganglia plugin in ruby and send the metrics directly from your ruby scirpt without integrating the “gmetric” command line tool provided by Ganglia. The other nice thing about the gem is that it supports the “group” part of the ganglia message protocol. So you can specify a grouping for the metric you submit. Using the stock “gmetric” tool that ships with ganglia in Ubuntu, all data goes into an uncategorised group in ganglia.
Here is an example of a simple gmetric plugin using the gem. It counts some files in directory and reports them to the ganglia cluster: