Puppet Class: ganglia::params

Inherited by:
ganglia::web
ganglia::gmond
ganglia::gmetad
Defined in:
manifests/params.pp

Summary

ganglia::params provides parameters for the ganglia module

Overview



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
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'manifests/params.pp', line 5

class ganglia::params {

  # files are the same for ubuntu and el5/el6
  $web_php_erb          = 'ganglia/conf.php.el6.erb'

  $rras = [
    {
      cf      => 'AVERAGE',
      xff     => 0.5,
      steps   => 1,
      rows    => 5856
    },
    {
      cf      => 'AVERAGE',
      xff     => 0.5,
      steps   => 4,
      rows    => 20160
    },
    {
      cf      => 'AVERAGE',
      xff     => 0.5,
      steps   => 40,
      rows    => 52704
    },
  ]

  $gmetad_service_erb    = 'ganglia/gmetad.conf.erb'
  $default_gmetad_status  = 'pgrep -u ganglia -f /usr/sbin/gmetad'
  $default_gmond_status   = 'pgrep -u ganglia -f /usr/sbin/gmond'

  case $facts['osfamily'] {
    'redhat': {
      $gmond_package_name   = 'ganglia-gmond'
      $gmond_service_name   = 'gmond'

      $gmetad_package_name  = 'ganglia-gmetad'
      $gmetad_service_name  = 'gmetad'

      # paths are the same for el5.x & el6.x
      $web_package_name     = 'ganglia-web'
      $web_php_config       = '/etc/ganglia/conf.php'

      case $facts['operatingsystem'] {
        'Fedora': {
          $gmond_service_config  = '/etc/ganglia/gmond.conf'
          $gmetad_user           = 'nobody'
          $gmond_service_erb     = 'ganglia/gmond.conf.el6.erb'

          $gmetad_service_config = '/etc/ganglia/gmetad.conf'

          $gmetad_hostnames_case = 0
          $gmetad_status_command = $default_gmetad_status
          $gmond_status_command  = $default_gmond_status
        }
        default: {
          case $facts['operatingsystemmajrelease'] {
            '6', '7', '8': {
              $gmond_service_config = '/etc/ganglia/gmond.conf'
              $gmetad_user          = 'ganglia'
              $gmond_service_erb    = 'ganglia/gmond.conf.el6.erb'

              $gmetad_service_config  = '/etc/ganglia/gmetad.conf'

              $gmetad_hostnames_case  = 0
              $gmetad_status_command  = $default_gmetad_status
              $gmond_status_command   = $default_gmond_status
            }
            default: {
              fail("Module ${module_name} is not supported on operatingsystemmajrelease ${::operatingsystemmajrelease}") # lint:ignore:140chars
            }
          }
        }
      }
    }
    'debian': {
      $gmond_package_name    = 'ganglia-monitor'
      $gmond_service_name    = 'ganglia-monitor'

      $gmetad_package_name   = 'ganglia-gmetad'
      $gmetad_service_name   = 'gmetad'
      $gmetad_user           = 'nobody'

      $web_package_name      = 'ganglia-webfrontend'
      $web_php_config        = '/usr/share/ganglia-webfrontend/conf.php'

      $gmond_service_config  = '/etc/ganglia/gmond.conf'
      $gmond_service_erb     = 'ganglia/gmond.conf.debian.erb'

      $gmetad_service_config = '/etc/ganglia/gmetad.conf'

      $gmetad_hostnames_case = 1

      $gmond_status_command  = 'pgrep -u ganglia -f /usr/sbin/gmond'
      $gmetad_status_command = 'pgrep -u nobody -f /usr/sbin/gmetad'
    }
    default: {
      fail("Module ${module_name} is not supported on ${facts['operatingsystem']}")
    }
  }
}