Puppet Class: profile::statsite
- Defined in:
- modules/profile/manifests/statsite.pp
Overview
Class: profile::statsite
statsite is a network daemon that listens on a socket for metric data (like timers and counters) and writes aggregates to a metric storage backend like Graphite or Ganglia. See <github.com/armon/statsite>.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'modules/profile/manifests/statsite.pp', line 7
class profile::statsite (
Optional[Stdlib::Host] $graphite_host = lookup('graphite_host'),
Wmflib::Ensure $ensure = lookup('profile::statsite::ensure', { 'default_value' => 'present' }),
) {
system::role { 'statsite':
description => 'statsite server'
}
if $ensure == 'present' and $graphite_host == undef {
fail('$graphite_host required, but it is set to undef')
}
class { '::statsite':
ensure => $ensure,
}
statsite::instance { '8125':
ensure => $ensure,
graphite_host => $graphite_host,
}
ferm::service { 'statsite':
ensure => $ensure,
proto => 'udp',
notrack => true,
port => '8125',
}
ferm::client { 'statsite':
ensure => $ensure,
proto => 'udp',
notrack => true,
port => 8125,
}
}
|