Puppet Class: fluentbit::config

Defined in:
manifests/config.pp

Summary

configures the main fluentbit main config

Overview

Includes all [input] and [output] configs. (@include) Sets global variables (@set) Configures global [service] section



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

class fluentbit::config {
  assert_private()

  File {
    ensure  => file,
    mode    => $fluentbit::config_file_mode,
    notify  => Class['fluentbit::service'],
  }

  $config_dir = dirname($fluentbit::config_file)

  if $fluentbit::manage_config_dir {
    file { $config_dir:
      ensure  => directory,
      purge   => true,
      recurse => true,
      mode    => '0755',
    }
  }

  $flush = $fluentbit::flush
  $daemon = bool2str($fluentbit::daemon, 'On', 'Off')
  $log_file = $fluentbit::log_file
  $log_level = $fluentbit::log_level
  $parsers_file = $fluentbit::parsers_file
  $plugins_file = $fluentbit::plugins_file
  $streams_file = $fluentbit::streams_file
  $http_server = bool2str($fluentbit::http_server, 'On', 'Off')
  $http_listen = $fluentbit::http_listen
  $http_port = $fluentbit::http_port
  $coro_stack_size = $fluentbit::coro_stack_size
  $storage_path = $fluentbit::storage_path
  $storage_sync = $fluentbit::storage_sync
  $storage_checksum = bool2str($fluentbit::storage_checksum, 'On', 'Off')
  $storage_backlog_mem_limit = $fluentbit::storage_backlog_mem_limit
  $variables = $fluentbit::variables

  file { $fluentbit::config_file:
    content => template('fluentbit/td-agent-bit.conf.erb'),
  }

  $parsers = $fluentbit::parsers

  file { $fluentbit::parsers_file:
    content => template('fluentbit/parsers.conf.erb'),
  }

  $plugins = $fluentbit::plugins

  file { $fluentbit::plugins_file:
    content => template('fluentbit/plugins.conf.erb'),
  }

  $streams = $fluentbit::streams

  file { $fluentbit::streams_file:
    content => template('fluentbit/streams.conf.erb'),
  }
}