Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Puppet module to install and manage statsd with multiple backends

License

Notifications You must be signed in to change notification settings

EmpaticoOrg/puppet-statsd

 
 

Repository files navigation

puppet-statsd

Build Status Puppet Forge

Description

This Puppet module will install statsd on Debian or RedHat.

Installation

puppet module install --modulepath /path/to/puppet/modules jdowning-statsd

Requirements

This module assumes nodejs & npm is installed on the host, but will not do it for you. I recommend using puppet/nodejs to set this up.

Usage

    class { 'statsd':
      backends         => [ './backends/graphite'],
      graphiteHost     => 'my.graphite.host',
      flushInterval    => 1000,
      percentThreshold => [75, 90, 99],
    }

Backends

You can install multiple backends. Supported backends include:

  • graphite
  • influxdb
  • librato
  • stackdriver
  • riemann
  • repeater

More information about the installation of each backend available in manifests/backends.pp.

Graphite

class { 'statsd':
  backends     => ['./backends/graphite'],
  graphiteHost => 'localhost'
}

InfluxDB

class { 'statsd':
  backends      => ['statsd-influxdb-backend'],
  influxdb_host => 'localhost'
}

Librato

class { 'statsd':
  backends      => ['statsd-librato-backend'],
  librato_email => 'foo@bar.com',
  librato_token => 'secret_token'
}

Stackdriver

class { 'statsd':
  backends           => ['stackdriver-statsd-backend'],
  stackdriver_apiKey => 'apiKey'
}

Riemann

class { 'statsd':
  backends     => ['statsd-riemann-backend'],
  riemann_host => 'riemann.example.com'
}

Repeater

class { 'statsd':
  backends         => ['./backends/repeater'],
  repeater         => [{"host" => 'my.statsd.host', port => 8125}],
  repeaterProtocol => 'udp4'
}

Testing

bundle install
bundle exec librarian-puppet install
vagrant up

Custom Nodejs Environment

Use the $env_append parameter to add custom environment variables or run scripts in the /etc/default/statsd file. For example, you could enable Redhat's software collections and add a custom path like so:

class { 'statsd':
  backends     => ['./backends/graphite'],
  graphiteHost => 'localhost',
  env_append   => [
    'source /opt/rh/nodejs010/enable',
    'PATH=/opt/my/path:$PATH',
  ],
}

About

Puppet module to install and manage statsd with multiple backends

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Puppet 55.4%
  • Shell 18.0%
  • Ruby 14.7%
  • HTML 11.9%