go_carbon
Golang implementation of Graphite/Carbon server with classic architecture: Agent -> Cache -> Persister
Version information
released Feb 24th 2016
This version is compatible with:
- Puppet >=3.8.2 < 4.0.0
Start using this module
Add this module to your Puppetfile:
mod 'similarweb-go_carbon', '0.1.0'
Learn more about managing modules with a PuppetfileDocumentation
similarweb/go_carbon — version 0.1.0 Feb 24th 2016
go_carbon
Table of Contents
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with go_carbon
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- 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:
- librarian-puppet
puppet module install similarweb-go_carbon
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 packagego_carbon::config
- Configures storage aggregations / schemasgo_carbon::service
- Installs the upstart / systemd service
Contributing
- Fork the repository on Github
- Create a named feature branch (like
feature/add_component_x
) - Commit your changes.
- Submit a Pull Request using Github
Dependencies
- puppetlabs-stdlib (>= 4.11.0)
- camptocamp-systemd (>= 0.2.2)
Copyright 2016 SimilarWeb. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY SimilarWeb ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SimilarWeb OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of SimilarWeb.