Puppet Class: st2::profile::metrics

Inherits:
st2
Defined in:
manifests/profile/metrics.pp

Summary

StackStorm compatable installation of MongoDB and dependencies.

Overview

Examples:

Basic Usage

include st2::profile::metrics

Customize (done via st2)

class { 'st2':
  metrics_include => true,
  metric_driver   => 'statsd',
  metric_host     => '127.0.0.1',
  metric_port     => '8125',
}
include st2::profile::metrics

Parameters:

  • metrics_include (Any) (defaults to: $st2::metrics_include)

    Should metrics be enabled

  • metric_driver (Any) (defaults to: $st2::metric_driver)

    The driver to use for the metrics. Default=‘statsd’

  • metric_host (Any) (defaults to: $st2::metric_host)

    The host to pull metrics from. Default=‘127.0.0.1’

  • metric_port (Any) (defaults to: $st2::metric_port)

    The port for the metrics. Default=‘8125’



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'manifests/profile/metrics.pp', line 24

class st2::profile::metrics (
  $metrics_include = $st2::metrics_include,
  $metric_driver   = $st2::metric_driver,
  $metric_host     = $st2::metric_host,
  $metric_port     = $st2::metric_port,
) inherits st2 {
  if $metrics_include {
    ini_setting { 'metrics_driver':
      path    => '/etc/st2/st2.conf',
      section => 'metrics',
      setting => 'driver',
      value   => $metric_driver,
      tag     => 'st2::config',
    }

    ini_setting { 'metrics_host':
      path    => '/etc/st2/st2.conf',
      section => 'metrics',
      setting => 'host',
      value   => $metric_host,
      tag     => 'st2::config',
    }

    ini_setting { 'metrics_port':
      path    => '/etc/st2/st2.conf',
      section => 'metrics',
      setting => 'port',
      value   => $metric_port,
      tag     => 'st2::config',
    }
  }
}