Puppet Class: telegraf::params

Inherited by:
telegraf
Defined in:
manifests/params.pp

Overview

Class: telegraf::params

A set of default parameters for Telegraf’s configuration.



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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'manifests/params.pp', line 5

class telegraf::params {
  case $facts['os']['family'] {
    'Darwin': {
      $config_file          = '/usr/local/etc/telegraf/telegraf.conf'
      $config_file_owner    = 'telegraf'
      $config_file_group    = 'telegraf'
      $config_file_mode     = '0640'
      $config_folder        = '/usr/local/etc/telegraf/telegraf.d'
      $config_folder_mode   = '0770'
      $logfile              = '/usr/local/var/log/telegraf/telegraf.log'
      $manage_repo          = false
      $manage_archive       = true
      $manage_user          = true
      $archive_install_dir  = '/usr/local/opt/telegraf'
      $archive_version      = '1.29.4'
      $archive_location     = "https://dl.influxdata.com/telegraf/releases/telegraf-${archive_version}_darwin_amd64.tar.gz"
      $repo_location        = 'https://repos.influxdata.com/'
      $service_enable       = true
      $service_ensure       = running
      $service_hasstatus    = true
      $service_restart      = 'pkill -HUP telegraf'
    }
    'FreeBSD': {
      $config_file          = '/usr/local/etc/telegraf.conf'
      $config_file_owner    = 'telegraf'
      $config_file_group    = 'telegraf'
      $config_file_mode     = '0640'
      $config_folder        = '/usr/local/etc/telegraf.d'
      $config_folder_mode   = '0770'
      $logfile              = '/var/log/telegraf/telegraf.log'
      $manage_repo          = false
      $manage_archive       = false
      $manage_user          = false
      $archive_install_dir  = undef
      $archive_version      = undef
      $archive_location     = undef
      $repo_location        = undef
      $service_enable       = true
      $service_ensure       = running
      $service_hasstatus    = true
      $service_restart      = 'pkill -HUP -j none telegraf'
    }
    'windows': {
      $config_file          = 'C:/Program Files/telegraf/telegraf.conf'
      $config_file_owner    = 'Administrator'
      $config_file_group    = 'Administrators'
      $config_file_mode     = undef
      $config_folder        = 'C:/Program Files/telegraf/telegraf.d'
      $config_folder_mode   = undef
      $logfile              = 'C:/Program Files/telegraf/telegraf.log'
      $manage_repo          = false
      $manage_archive       = false
      $manage_user          = false
      $archive_install_dir  = undef
      $archive_location     = undef
      $archive_version      = undef
      $repo_location        = undef
      $service_enable       = true
      $service_ensure       = running
      $service_hasstatus    = false
      $service_restart      = undef
    }
    'Suse': {
      $config_file          = '/etc/telegraf/telegraf.conf'
      $config_file_owner    = 'telegraf'
      $config_file_group    = 'telegraf'
      $config_file_mode     = '0640'
      $config_folder        = '/etc/telegraf/telegraf.d'
      $config_folder_mode   = '0770'
      $logfile              = ''
      $manage_repo          = false
      $manage_archive       = true
      $manage_user          = true
      $archive_install_dir  = '/opt/telegraf'
      $archive_version      = '1.29.4'
      $archive_location     = "https://dl.influxdata.com/telegraf/releases/telegraf-${archive_version}_linux_amd64.tar.gz"
      $repo_location        = 'https://repos.influxdata.com/'
      $service_enable       = true
      $service_ensure       = running
      $service_hasstatus    = true
      $service_restart      = 'pkill -HUP telegraf'
    }
    default: {
      $config_file          = '/etc/telegraf/telegraf.conf'
      $config_file_owner    = 'telegraf'
      $config_file_group    = 'telegraf'
      $config_file_mode     = '0640'
      $config_folder        = '/etc/telegraf/telegraf.d'
      $config_folder_mode   = '0770'
      $logfile              = ''
      $manage_repo          = true
      $manage_archive       = false
      $manage_user          = false
      $archive_install_dir  = undef
      $archive_location     = undef
      $archive_version      = undef
      $repo_location        = 'https://repos.influxdata.com/'
      $service_enable       = true
      $service_ensure       = running
      $service_hasstatus    = true
      $service_restart      = 'pkill -HUP telegraf'
    }
  }
  $package_name                  = 'telegraf'
  $ensure                        = 'present'
  $install_options               = []
  $hostname                      = $trusted['hostname']
  $omit_hostname                 = false
  $interval                      = '10s'
  $round_interval                = true
  $logfile_rotation_interval     = '0h'
  $logfile_rotation_max_size     = '0MB'
  $logfile_rotation_max_archives = 5
  $metric_batch_size             = 1000
  $metric_buffer_limit           = 10000
  $collection_jitter             = '0s'
  $flush_interval                = '10s'
  $flush_jitter                  = '0s'
  $precision                     = ''
  $debug                         = false
  $quiet                         = false
  $global_tags                   = {}
  $manage_service                = true
  $purge_config_fragments        = false
  $repo_type                     = 'stable'
  $windows_package_url           = 'https://chocolatey.org/api/v2/'

  $outputs = {
    'influxdb' => [
      {
        'urls'     => ['http://localhost:8086'],
        'database' => 'telegraf',
        'username' => 'telegraf',
        'password' => 'metricsmetricsmetrics',
    }],
  }

  $inputs = {
    'cpu' => [{
        'percpu'   => true,
        'totalcpu' => true,
    }],
  }
}