Opscode Chef cookbook for MongoDB Monitoring System (MMS) agent. MMS is a hosted monitoring service, provided by 10gen, Inc. Once the small python agent program is installed on the MongoDB host, it automatically collects the metrics and upload them to the MMS server. The graphs of these metrics are shown on the web page. It helps a lot for tackling MongoDB related problems, so MMS is the baseline for all production MongoDB deployments.
NOTE: This cookbook only installs the MMS agent program, not MongoDB itself. Using this cookbook together with edelight’s great MongoDB cookbook is recommended.
The knife-github-cookbooks gem is a plugin for knife that supports installing cookbooks directly from a GitHub repository. To install with this plugin, please follow these steps:
$ gem install knife-github-cookbooks $ cd chef-repo $ knife cookbook github install treasure-data/chef-mongodb-mms-agent
This cookbook has these external dependencies.
-
python cookbook
-
runit cookbook
-
node[:source]
Link to the agent archive. You can provide either your custom link (see .kitchen.yml for an example) or use default
-
node[:api_key]
-
node[:secret_key]
API and Secret Key are required if you don’t provide the custom (secret) link to the agent archive. You can get them at MMS settings page.
-
node[:monitor_hardware]
If you want to have mms agent sending munin-collected information to mms.10gen.com, set this to true (default).
-
node[:init_style]
If you want to use runit to manage the agent, set ‘runit’ (default). Any other value will use initd.
You can see .kitchen.yml to see example of usages.
This is an example role file, together with edelight’s great MongoDB cookbook.
name "mongo" description "mongo server role." run_list( "recipe[mongodb::10gen_repo]", "recipe[python]", "recipe[runit]", "recipe[mms-agent]", ) override_attributes( # for mongodb :mongodb => { :cluster_name => "cluster_foo", :dbpath => "/md0/mongo/db/", :logpath => "/md0/mongo/logs/", :port => 27017, }, # for mms-agent :mms_agent => { :api_key => 'foo', :secret_key => 'bar' } )