0.01
No commit activity in last 3 years
No release in over 3 years
This rubygem does not have a description or summary.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.8.0
 Project Readme

Very simple gem to monitor a mongodb cluster and send data to a graphite server.

Usage :

You have to set an environment variable MONGODB_GRAPHITE_DIR (or it will use the config dir in the current directory). Then write a yml file to contain basic settings:

log_dir: log
pid_dir: pids
graphite: graphite.mydomain:3333
interval: 3
instances_file: 'config/instances.rb'

Then in config/instances.rb, you can set instances to monitor:

instance 'mongoD' do
  host 'onemongo.mydomain'
  port '27021'
  prefix_callback (lambda { |stats|
    process_type = stats['process']
    "production.onemongo.#{process_type}"
  } )
end

instance 'mongoD' do
  host 'anothermongo.mydomain'
  port '27017'
  prefix_callback (lambda { |stats|
    process_type = stats['process']
    "test.anothermongo.#{process_type}"
  } )
end

Finally, you can use the gem as a service (start, status, stop)

mongodb-graphite start