Skip to content

Instantly share code, notes, and snippets.

@initcron
Last active August 29, 2015 14:02
Show Gist options
  • Select an option

  • Save initcron/e6d900eb0da04a98d226 to your computer and use it in GitHub Desktop.

Select an option

Save initcron/e6d900eb0da04a98d226 to your computer and use it in GitHub Desktop.
mcollective tutorial
# Open Git Bash
cd ~/learn
mkdir mcollective
wget -c https://github.com/ripienaar/mcollective-vagrant/archive/master.zip
#Alternately download the above repo as a zip file directly from https://github.com/ripienaar/mcollective-vagrant and unzip inside mcollective dir.
cd mcollective-vagrant-master
#Edit Vagrantfile, set instances to 2
vagrant up
vagrant ssh middleware
mco ping -W roles::middleware
mco ping -W roles::node
mco ping -W "roles::middleware /redis/"
# List facts for all nodes in the cluster
mco facts cluster
#Ping nodes which blong to alfa cluster
mco ping -W "roles::node cluster=alfa"
# More complexity
mco ping -S "(roles::node or roles::middleware) and cluster=alfa"
# Getting info about the node
mco inventory middleware.example.net
# Restarting nrpe service on all
mco service restart nrpe
mco service status nrpe
# Managing packages
mco package status mcollective
# Running Monitoring Checks
mco nrpe check_load
# Launch Puppet Run on all
mco puppet runonce
mco puppet status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment