Skip to Content
Managing Infrastructure with Puppet
book

Managing Infrastructure with Puppet

by James Loope
June 2011
Beginner
56 pages
1h 13m
English
O'Reilly Media, Inc.
Content preview from Managing Infrastructure with Puppet

MCollective Commands

With both the servers and a client configured, we’re ready to start issuing MCollective commands. Let’s start off with the mc-find-hosts command. When run without any argument, mc-find-hosts will list all of the MCollective servers that are currently active and listening:

:> mc-find-hosts
A.example.com
B.example.com
C.example.com
D.example.com

We can also get some information about our individual MCollective nodes. mc-inventory will tell us what agents are available on a node, what Puppet classes that node is a member of, and assuming the Facter module is installed, a list out all of the available Facter facts about the node:

:> mc-inventory A.example.com

Inventory for A.example.com:

Server Statistics:
    Version: 1.0.1
    Start Time: Fri May 06 11:10:34 -0700 2011
    Config File: /etc/mcollective/server.cfg
    Process ID: 22338
    Total Messages: 143365
    Messages Passed Filters: 75428
    Messages Filtered: 67937
    Replies Sent: 75427
    Total Processor Time: 162.09 seconds
    System Time: 73.08 secondsAgents:
    discovery       filemgr        package 
    iptables        nrpe           rpcutil  
    process         puppetd        
    service

Configuration Management Classes:
    ntp             php                apache2
    mysql-5            varnish

Facts:
    architecture => x86_64
    domain => example.com
    facterversion => 1.5.7
    fqdn => A.example.com 
    hostname => A
    id => root
    is_virtual => true
    kernel => Linux
    kernelmajversion => 2.6
    kernelversion => 2.6.35

This is already a useful tool for diagnostics and inventory on all of your Puppet-managed servers, but MCollective also lets us execute agents on ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Puppet Types and Providers

Puppet Types and Providers

Dan Bode, Nan Liu
Pro Puppet, Second Edition

Pro Puppet, Second Edition

Spencer Krum, William Van Hevelingen, Ben Kero, James Turnbull, Jeffery McCune
Mastering Puppet

Mastering Puppet

Thomas Uphill

Publisher Resources

ISBN: 9781449309671Errata Page