- Description
- Setup - The basics of getting started with topbeat
- Usage - Configuration options and additional functionality
- Reference
- Limitations - OS compatibility, etc.
- 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.
By default topbeat
adds a software repository to your system, and installs topbeat along
with required configurations.
The topbeat
module depends on puppetlabs/stdlib
, and on
puppetlabs/apt
on Debian based systems.
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' => [
'http://localhost:9200',
'http://anotherserver:9200'
],
'index' => 'topbeat',
'cas' => [
'/etc/pki/root/ca.pem',
],
},
},
}
To ship system stats through logstash:
class { 'topbeat':
output => {
'logstash' => {
'hosts' => [
'localhost:5044',
'anotherserver:5044'
],
'loadbalance' => true,
},
},
}
Shipper and logging options can be configured the same way, and are documented on the elastic website.
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.
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 filedownload_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
Creates the configuration files required for topbeat (but not the prospectors)
Calls the correct installer class based on the kernel fact.
Sets default parameters for topbeat
based on the OS and other facts.
Installs the yum or apt repository for the system package manager to install topbeat.
Configures and manages the topbeat service.
Install the topbeat package on Linux kernels.
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.