Forge Home

scollector

This module installs and manages the SCollector agent for Bosun

7,392 downloads

7,226 latest version

3.7 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.2.0 (latest)
  • 0.1.0
released Mar 8th 2017
This version is compatible with:
  • Puppet Enterprise >= 4.0.0 < 2015.4.0
  • Puppet >= 4.0.0 < 2015.4.0
  • , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'discreet-scollector', '0.2.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add discreet-scollector
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install discreet-scollector --version 0.2.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.

Download

Documentation

discreet/scollector — version 0.2.0 Mar 8th 2017

Build Status

scollector

Table of Contents

  1. Description
  2. Setup - The basics of getting started with scollector
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module

Description

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.

Setup

What scollector affects

  • Creates a directory structure to install and configure Scollector
  • Creates a Scollector service on Windows and places a startup script on Linux

Setup Requirements

Beginning with scollector

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.

Usage

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'

Reference

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

Limitations

  • 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

Development

  1. Fork the project
  2. Create your feature and fully test it
  3. Write your tests
  4. Squash your commits
  5. Submit a pull request to the upstream