You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

mongodb-graphite

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongodb-graphite

1.1.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 28 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts