Puppet Class: stackdriver::plugin::elasticsearch

Inherited by:
stackdriver::plugin::elasticsearch::config
stackdriver::plugin::elasticsearch::install
Defined in:
manifests/plugin/elasticsearch.pp

Overview

vim: tabstop=2 expandtab shiftwidth=2 softtabstop=2 foldmethod=marker

Class: stackdriver::plugin::elasticsearch

Enable Elasticsearch Agent Plugin for Stackdriver Agent

Stackdriver’s Support Site

Parameters


pkg
  • Default - Based on $::osfamily

  • List of package(s) to install

config
  • Default - /opt/stackdriver/collectd/etc/collectd.d/elasticsearch.conf

  • Plugin configuration file

Usage


Puppet Code

Enable Elasticsearch plugin via Puppet CODE:

include '::stackdriver::plugin::elasticsearch'

Hiera

Enable Elasticsearch plugin via Hiera:

stackdriver::plugins:
 - 'elasticsearch'

Parameters:

  • pkg (Any) (defaults to: $::osfamily ? { /(?i:Debian)/ => 'libyajl1', /(?i:RedHat)/ => 'yajl', default => undef)
  • config (Any) (defaults to: '/opt/stackdriver/collectd/etc/collectd.d/elasticsearch.conf')


36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'manifests/plugin/elasticsearch.pp', line 36

class stackdriver::plugin::elasticsearch(

  $pkg = $::osfamily ? {
    /(?i:Debian)/   => 'libyajl1',
    /(?i:RedHat)/   => 'yajl',
    default         => undef,
  },

  $config = '/opt/stackdriver/collectd/etc/collectd.d/elasticsearch.conf',

) {

  if $pkg { validate_string ( $pkg ) }
  validate_string ( $config )


  contain "${name}::install"

  class { "::${name}::config": require => Class["::${name}::install"] }
  contain "${name}::config"

}