Puppet Class: newrelic::params

Defined in:
manifests/params.pp

Overview

Class: newrelic::params

This class configures parameters for the puppet-newrelic module.

Parameters:

Actions:

Requires:

Sample Usage:



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
# File 'manifests/params.pp', line 13

class newrelic::params {

  case $::osfamily {
    'RedHat': {
      $newrelic_package_name  = 'newrelic-sysmond'
      $newrelic_service_name  = 'newrelic-sysmond'
      $newrelic_php_package   = 'newrelic-php5'
      $newrelic_php_service   = 'newrelic-daemon'
      $newrelic_php_conf_dir  = ['/etc/php.d']
      package { 'newrelic-repo-5-3.noarch':
        ensure   => present,
        source   => 'http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm',
        provider => rpm,
      } ->
      # Make sure repo file is in catalog in case /etc/yum.repos.d is purged
      file { '/etc/yum.repos.d/newrelic.repo':
        replace => false,
      }
    }
    'Debian': {
      $newrelic_package_name  = 'newrelic-sysmond'
      $newrelic_service_name  = 'newrelic-sysmond'
      $newrelic_php_package   = 'newrelic-php5'
      $newrelic_php_service   = 'newrelic-daemon'
      apt::source { 'newrelic':
        location => 'http://apt.newrelic.com/debian/',
        repos    => 'non-free',
        key      => {
          id         => 'B60A3EC9BC013B9C23790EC8B31B29E5548C16BF',
          key_source => 'https://download.newrelic.com/548C16BF.gpg',
        },
        include  => {
          src => false,
        },
        release  => 'newrelic',
      }
      case $::operatingsystem {
        'Debian': {
          case $::operatingsystemrelease {
            /^6/: {
              $newrelic_php_conf_dir  = ['/etc/php5/conf.d']
            }
            default: {
              $newrelic_php_conf_dir  = ['/etc/php5/mods-available']
            }
          }
        }
        'Ubuntu': {
          case $::operatingsystemrelease {
            /^(10|12)/: {
              $newrelic_php_conf_dir  = ['/etc/php5/conf.d']
            }
            default: {
              $newrelic_php_conf_dir  = ['/etc/php5/mods-available']
            }
          }
        }
        default: {
          $newrelic_php_conf_dir  = ['/etc/php5/conf.d']
        }
      }
    }
    'windows': {
      $bitness                        = regsubst($::architecture,'^x([\d]{2})','\1')
      $newrelic_package_name          = 'New Relic Server Monitor'
      $newrelic_service_name          = 'nrsvrmon'
      $temp_dir                       = 'C:/Windows/temp'
      $server_monitor_source          = 'http://download.newrelic.com/windows_server_monitor/release/'
      $newrelic_dotnet_conf_dir       = 'C:\\ProgramData\\New Relic\\.NET Agent'
      $newrelic_dotnet_package        = "New Relic .NET Agent (${bitness}-bit)"
      $newrelic_dotnet_source         = 'http://download.newrelic.com/dot_net_agent/release/'
    }
    default: {
      fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}")
    }
  }

}