Puppet Class: statsd

Defined in:
modules/statsd/manifests/init.pp

Overview

Class: statsd

StatsD is a simple network daemon that listens to application metrics and aggregates them for easy plotting and analysis in Graphite or Ganglia. The simplicity of StatsD's UDP-based wire protocol and its ability to keep track of whatever data is sent to it make it a simple and effective means of instrumenting software.

Parameters

port

Port to listen for messages on over UDP (default: 8125).

settings

A hash of additional configuration options. For a full listing, see <github.com/etsy/statsd/blob/master/exampleConfig.js>.

Example

class { 'statsd':
    port     => 9000,
    settings => {
        backends     => [ 'graphite' ],
        graphiteHost => '',
        graphitePort => 2004,
    },
}

Parameters:

  • port (Any) (defaults to: 8125)
  • settings (Any) (defaults to: {})


29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'modules/statsd/manifests/init.pp', line 29

class statsd(
    $port          = 8125,
    $settings      = {},
) {
    package { 'statsd':
        ensure => present,
    }

    file { '/etc/statsd/localConfig.js':
        content => template('statsd/localConfig.js.erb'),
        require => Package['statsd'],
        notify  => Service['statsd'],
    }

    file { '/usr/local/share/statsd':
        ensure => directory,
    }

    service { 'statsd':
        ensure   => running,
    }
}