Puppet Class: puppet::reports::graphite

Defined in:
manifests/reports/graphite.pp

Overview

A report plugin to send metrics to graphite From github.com/nareshov/puppet-graphite

Parameters:

  • server (Any)
  • port (Any)
  • prefix (Any)


4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'manifests/reports/graphite.pp', line 4

class puppet::reports::graphite($server, $port, $prefix) {

  # This is a little bit dirty, as it just throws it straight in the
  # rubylib, but it's better than messing with libdir on the master.
  # See https://projects.puppetlabs.com/issues/4345 for mild
  # discussion.
  file{
    "/${puppet::server::report_dir}/graphite.rb":
      ensure => present,
      owner  => 'root',
      group  => 'root',
      mode   => '0644',
      source => 'puppet:///modules/puppet/reports/graphite.rb';
    '/etc/puppet/graphite.yaml':
      ensure  => present,
      owner   => 'root',
      group   => 'puppet',
      mode    => '0440',
      content => template('puppet/reports/graphite.yaml.erb'),
  }

  # We could, at this, tell Puppet we need to bounce it, but I think
  # would be bold.
}