Puppet and Cube


A while back the team at Square released a time series collection and analysis tool called Cube. With the exception of the undergraduate pun name, it’s a really neat tool. It’s built on Node and MongoDB and has a simple to use collector and a sparse but practical evaluator that includes a fairly usable web interface.

I’ve written a Puppet report processor that sends each log event from a Puppet run to Cube as an event labelled puppet_log with the data portion of the event being the Puppet client’s hostname and the contents of the log event:

data = { host:, output: log }

You can then see the output in the Cube Dashboard:


You can find the code on GitHub and a module on the Forge.

There are some simple installation instructions:

  1. Install the rest-client and json gems on your Puppet master

    $ sudo gem install rest-client json
  2. Install puppet-cube as a module in your Puppet master’s module path.

  3. Update the host and port variables in the cube.yaml file with the hostname and port of your Cube collector and copy the file to /etc/puppet/. An example file is included.

  4. Enable pluginsync and reports on your master and clients in puppet.conf

    report = true
    reports = cube
    pluginsync = true
    report = true
    pluginsync = true
  5. Run the Puppet client and sync the report as a plugin.