- Description
- Setup - The basics of getting started with scollector
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
This module will install and confgure the Scollector agent on both Windows and Linux hosts. It will manage external collectors as well however there is currently a dependency on the external collector being added to the module as a static file in the files direcotry.
- Creates a directory structure to install and configure Scollector
- Creates a Scollector service on Windows and places a startup script on Linux
Due to the intricacies of this module there is no option to simply use an
include. You will be required to declare the scollector class and specify
valid inputs. Depending on your architecture this will either be by modifying
the parameters in init.pp or writing a profile with a class declaration or
multiple hiera lookups.
Basic example using a class declaration:
class { '::scollector':
use_hiera => true,
version => '0.5.0',
host => '10.276.43.51',
port => '8067',
external_collectors => true,
freq_dir => ['15', '30', '45', '60'],
freq => 60,
full_host => true,
proto => 'http',
collector => { nagios => { collector => 'Process',
name => 'Nagios',
command => 'nagios',
args => '.*nagios.cfg',
},
bosun => { collector => 'Process',
name => 'Bosun',
command => '/sbin/sv',
args => 'status bosun',
}
},
tag_override => { 'environment' => $::environment,
'what_am_i' => "${::osfamily}_${::location}_${::environment}" }
}
External Collector example without hiera:
scollector::collector { 'sendthings.py':
ensure => present,
freq => '45',
}
External Collector example using hiera:
scollector::custom_collector:
'sendthings.py':
ensure: present
freq: '45'
Classes
Defines
Custom Facts
BONUS!
Parameters
use_hiera
If Hiera data should be used to create external collectors
Type: boolean
Default: false
required
version
The version of Scollector to install on the node
Type: string
Default: undef
required
host
The host to have Scollector send metrics to
Type: string
Default: undef
required
port
The port for Scollector to use to connect to the host
Type: string
Default: 8090
required
user
The user for Scollector to authenticate with
Type: string
Default: undef
optional
password
The password for authentication
Type: string
Default: undef
optional
external_collectors
Whether or not external collectors are going to be used
Type: boolean
Default: false
required
freq
The frequency in seconds to send metrics
Type: integer
Default: 60
required
freq_dir
The directory to deploy external collectors to in relation to frequency
Type: array
Default: undef
optional
full_host
Whether or not to use the full hostname when sending metrics
Type: boolean
Default: false
required
proto
The protocol to connect to the host with
Type: string
Default: https
required
collector
The native collector to use with valid inputs
Type: hash
Default: undef
optional
tag_override
What tags to override in the scollector.toml file
Type: hash
Default: undef
optional
real_arch
Normalizing the actual architecture of the system to meet Scollector conventions
Type: string
Default: If statement based on Facts
os
The operating system to match the SCollector binary name
Type: string
Default: Based on kernel Fact
ext
The extension of the Scollector binary
Type: string
Default: Based on kernel Fact
install_path
Where to place the binary package
Type: string
Default: Based on operating system Fact
config_path
Where to place the configuration file
Type: string
Default: Based on operating system Fact
collector_dir
Where to look for external collectors
Type: string
Default: Based on operating system Fact
collector_freq_dir
The directories used to run external collectors on schedule
Type: string
Default: Based on value of other parameters (collector_dir & freq_dir)
binary
The full name of the Scollector binary
Type: string
Default: Based on other parameters (os, real_arch, & ext)
download_url
The location to download the Scollector binary from
Type: string
Default: GitHub project repository
klass
The subclass to contain for os specific configuration
Type: string
Default: based on osfamily Fact
- Only written for RHEL 6/7 and Windows 2008R2/2012R2
- Only supports x86_64 and x64 bit architecture
- Process and HTTPUnit native collector support only
- Fork the project
- Create your feature and fully test it
- Write your tests
- Squash your commits
- Submit a pull request to the upstream