Puppet Class: collectd::plugins::write_http

Inherits:
collectd
Defined in:
manifests/plugins/write_http.pp

Overview

Parameters:

  • dimension_list (Any) (defaults to: $collectd::dimension_list)
  • aws_integration (Any) (defaults to: $collectd::aws_integration)
  • signalfx_api_endpoint (Any) (defaults to: $collectd::signalfx_api_endpoint)
  • write_http_timeout (Any) (defaults to: $collectd::write_http_timeout)
  • write_http_buffersize (Any) (defaults to: $collectd::write_http_buffersize)
  • write_http_flush_interval (Any) (defaults to: $collectd::write_http_flush_interval)
  • write_http_log_http_error (Any) (defaults to: $collectd::write_http_log_http_error)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'manifests/plugins/write_http.pp', line 1

class collectd::plugins::write_http(
  $dimension_list                    = $collectd::dimension_list,
  $aws_integration                   = $collectd::aws_integration,
  $signalfx_api_endpoint             = $collectd::signalfx_api_endpoint,
  $write_http_timeout                = $collectd::write_http_timeout,
  $write_http_buffersize             = $collectd::write_http_buffersize,
  $write_http_flush_interval         = $collectd::write_http_flush_interval,
  $write_http_log_http_error         = $collectd::write_http_log_http_error,
) inherits collectd {

  $dimensions = get_dimensions($dimension_list, $aws_integration)
  $signalfx_api_endpoint_with_dimensions = "${signalfx_api_endpoint}${dimensions}"

  if $::osfamily == 'Redhat' {
    collectd::check_and_install_package { $title :
      package_name => 'collectd-write_http',
      before       => File['load write_http plugin']
    }
  }

  file { 'load write_http plugin':
    ensure  => present,
    path    => "${collectd::params::plugin_config_dir}/10-write_http.conf",
    owner   => 'root',
    group   => 'root',
    mode    => '0640',
    content => template('collectd/write_http.conf.erb'),
    notify  => Class['collectd::service']
  }
}