Forge Home

go_carbon

Golang implementation of Graphite/Carbon server with classic architecture: Agent -> Cache -> Persister

7,582 downloads

7,582 latest version

2.9 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 Feb 24th 2016
This version is compatible with:
  • Puppet >=3.8.2 < 4.0.0

Start using this module

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

Add this module to your Puppetfile:

mod 'similarweb-go_carbon', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add similarweb-go_carbon
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install similarweb-go_carbon --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.

Download

Documentation

similarweb/go_carbon — version 0.1.0 Feb 24th 2016

go_carbon

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with go_carbon
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Development - Guide for contributing to the module

Overview

This module manages go_carbon by lomik.

Module Description

This module has been tested against go_carbon versions: 0.5, 0.7

Setup

Limitations

You must provide your own RPM - these can be built from the project sources by issuing

make rpm

More info here.

The module has been tested on CentOS 6

The module manages the following

  • The go_carbon package.
  • upstart / systemd services configuration file.
  • Multiple go_carbon instances supported (i.e. for JBOD sharding)
  • Aggregations / Schemas

Important Note

Please refer to go_carbon installation before using this module.

Setup Requirements

go_carbon module depends on the following puppet modules:

  • puppetlabs-stdlib >= 1.0.0
  • camptocamp-systemd >= 0.2.2 (CentOS 7 and up)

Beginning with go_carbon

Install this module via any of these approaches:

Usage

Multi Instance

This module supports multiple instances of gocarbon managed on one machine. You can define completely different configurations per managed instance, but the schemas aggregation and storage definition are _shared across.

Main class

Install go_carbon 0.7 by means of a yum repo

class { 'go_carbon':
  package_name => 'go_carbon',
  version => '0.7-1.el6',
}

Start a go_carbon instance with default configuration

class { 'go_carbon': } ->
go_carbon::instance { 'default': }

Support for multiple instances

go_carbon::instance { 'instance_1': 
  tcp_listen => ':2003',
  udp_enabled => false,
  whisper_data_dir => '/data1'  
}

go_carbon::instance { 'instance_2': 
  tcp_listen => ':2103',
  udp_enabled => false,
  whisper_data_dir => '/data2'
}

Hiera Support

  • Example: Defining storage schemas in hiera
go_carbon::storage_schemas:
  - carbon:
      pattern: '^carbon\.'
      retentions: '1m:30d'
  - collectd:
      pattern: '^collectd.*'
      retentions: '20s:1d,1m:14d,10m:90d'
  - default_1min_for_7day:
      pattern: '.*'
      retentions: '1m:7d'
  • Example: Defining 4 go_carbon instances with hiera
roles::graphite::go_carbon_instances:
    data1:
        tcp_listen: 0.0.0.0:2103
        udp_enabled: false
        pickle_listen: 0.0.0.0:2104
        carbonlink_listen: 127.0.0.1:7102
        whisper_data_dir: /data1/whisper
        log_file: /var/log/go_carbon/data1.log
        whisper_max_updates_per_second: 4000
    data2:
        tcp_listen: 0.0.0.0:2203
        udp_enabled: false
        pickle_listen: 0.0.0.0:2204
        carbonlink_listen: 127.0.0.1:7202
        whisper_data_dir: /data2/whisper
        log_file: /var/log/go_carbon/data2.log
        whisper_max_updates_per_second: 4000
    data3:
        tcp_listen: 0.0.0.0:2303
        pickle_listen: 0.0.0.0:2304
        udp_enabled: false
        carbonlink_listen: 127.0.0.1:7302
        whisper_data_dir: /data3/whisper
        log_file: /var/log/go_carbon/data3.log        
        whisper_max_updates_per_second: 4000
    data4:
        tcp_listen: 0.0.0.0:2403
        pickle_listen: 0.0.0.0:2404
        udp_enabled: false
        carbonlink_listen: 127.0.0.1:7402
        log_file: /var/log/go_carbon/data4.log        
        whisper_data_dir: /data4/whisper
        whisper_max_updates_per_second: 4000

Then in the manifest:

    create_resources(go_carbon::instance, hiera('roles::graphite::go_carbon_instances'), {})

Reference

Classes

Public classes

  • go_carbon - Installs and configures shared go_carbon configuration.
  • go_carbon::instance - Configures and launches a go_carbon instance. This is a defined resource and can be used multiple times.

Private classes

  • go_carbon::install - Installs the go_carbon package
  • go_carbon::config - Configures storage aggregations / schemas
  • go_carbon::service - Installs the upstart / systemd service

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like feature/add_component_x)
  3. Commit your changes.
  4. Submit a Pull Request using Github