Forge Home


A module to install and manage topbeat


44,695 latest version

4.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.0 (latest)
released Jan 23rd 2016
This version is compatible with:
  • , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'pcfens-topbeat', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add pcfens-topbeat
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install pcfens-topbeat --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



pcfens/topbeat — version 0.1.0 Jan 23rd 2016


Build Status

Table of Contents

  1. Description
  2. Setup - The basics of getting started with topbeat
  3. Usage - Configuration options and additional functionality
  4. Reference
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module


The topbeat module installs and configures topbeat to ship system performance information to elasticsearch, logstash, or anything else that accepts the beats protocol.


What topbeat affects

By default topbeat adds a software repository to your system, and installs topbeat along with required configurations.

Setup Requirements

The topbeat module depends on puppetlabs/stdlib, and on puppetlabs/apt on Debian based systems.

Beginning with topbeat

topbeat can be installed with puppet module install pcfens-topbeat (or with r10k, librarian-puppet, etc.)

By default, topbeat ships system statistics (system load, cpu usage, swap usage, and memory usage), per-process statistics, and disk mounts/usage.


All of the default values in topbeat follow the upstream defaults (at the time of writing).

To ship system stats to elasticsearch:

class { 'topbeat':
  output => {
    'elasticsearch' => {
     'hosts' => [
     'index'       => 'topbeat',
     'cas'         => [

To ship system stats through logstash:

class { 'topbeat':
  output => {
    'logstash'     => {
     'hosts' => [
     'loadbalance' => true,

Shipper and logging options can be configured the same way, and are documented on the elastic website.

Configuring Inputs

By default, topbeat ships everything that it can, but can be tuned to ship specific information.

The full default hash looks like

  period => 10,   # How often stats should be collected and sent, in seconds.
  procs  => [     # An array of what processes to send more detailed information on.
  stats  => {
    system     => true,   # Whether or not to ship system-wide information
    proc       => true,   # Whether or not individual process information should be shipped
    filesystem => true,   # Whether or not filesystem/disk information should be shipped

Each component is documented more fully in the topbeat documentation.


Public Classes

Class: topbeat

Installs and configures topbeat.

Parameters within topbeat

  • package_ensure: [String] The ensure parameter for the topbeat package (default: present)
  • manage_repo: [Boolean] Whether or not the upstream (elastic) repo should be configured or not (default: true)
  • service_ensure: [String] The ensure parameter on the topbeat service (default: running)
  • service_enable: [String] The enable parameter on the topbeat service (default: true)
  • config_file_mode: [String] The permissions mode set on configuration files (default: 0644)
  • input: [Hash] Will be converted to YAML for the input section of the configuration file (see documentation, and above)(default: {})
  • output: [Hash] Will be converted to YAML for the required output section of the configuration (see documentation, and above)
  • shipper: [Hash] Will be converted to YAML to create the optional shipper section of the topbeat config (see documentation)
  • logging: [Hash] Will be converted to YAML to create the optional logging section of the topbeat config (see documentation)
  • conf_template: [String] The configuration template to use to generate the main topbeat.yml config file
  • download_url: [String] The URL of the zip file that should be downloaded to install topbeat (windows only)
  • install_dir: [String] Where topbeat should be installed (windows only)
  • tmp_dir: [String] Where topbeat should be temporarily downloaded to so it can be installed (windows only)
  • prospectors: [Hash] Prospectors that will be created. Commonly used to create prospectors using hiera

Private Classes

Class: topbeat::config

Creates the configuration files required for topbeat (but not the prospectors)

Class: topbeat::install

Calls the correct installer class based on the kernel fact.

Class: topbeat::params

Sets default parameters for topbeat based on the OS and other facts.

Class: topbeat::repo

Installs the yum or apt repository for the system package manager to install topbeat.

Class: topbeat::service

Configures and manages the topbeat service.

Class: topbeat::install::linux

Install the topbeat package on Linux kernels.

Class: topbeat::install::windows

Downloads, extracts, and installs the topbeat zip file in Windows.


This module doesn't load the elasticsearch index template into elasticsearch (required when shipping directly to elasticsearch).


Pull requests and bug reports are welcome. If you're sending a pull request, please consider writing tests if applicable.