Puppet Class: vector

Defined in:
manifests/init.pp

Summary

Vector module for Puppet

Overview

vector

Installs, configures, then runs the Vector log and metric tool on RedHat and Debian type systems Note - this does not manage the repositories, it is assumed they are already configured

Examples:

include vector
class vector {
  data_dir => '/data/vector',
  install_vector => false,
}

Parameters:

  • version (Optional[String])

    What version of Vector to install. If left undef, will use default from repositories

  • install_vector (Boolean)

    Whether to have this module install Vector. Using this means the version param is ignored

  • config_dir (String)

    Base directory for configuration, default /etc/vector

  • config_dir_mode (String)

    File mode for the configuration directory, default 0755

  • data_dir (String)

    Directory for vector to store buffer and state data

  • data_dir_mode (String)

    File mode for the data directory, default 0755

  • user (String)

    What user to run Vector as, default ‘vector’

  • group (String)

    What group to run Vector as, default ‘vector’

  • manage_user (Boolean)

    Boolean to determine if puppet should manage the user vector runs as

  • user_opts (Hash)

    Dictionary of options to pass into the user resource, other than ‘name’ (specified with vector::user) and ‘ensure’

  • manage_group (Boolean)

    Boolean to determine if puppet should manage the group vector runs as

  • group_opts (Hash)

    Dictionary of options to pass into the group resource, other than ‘name’ (specified with vector::group) and ‘ensure’

  • service_name (String)

    Name of the service, default ‘vector’

  • manage_systemd (Boolean)

    Whether this module should manage the systemd unit file, default true

  • vector_executable (String)

    Path to vector executable file

  • service_ensure (Vector::Ensure)

    Used in the ‘service’ resource for vector, default true

  • service_enabled (Vector::Enabled)

    Used in the ‘service’ resource for vector, default true

  • service_restart (String) (defaults to: 'always')

    Used in the generated systemd unit file, default always

  • environment_file (String)

    Location of the environment file for Vector

  • global_options (Hash) (defaults to: {})

    Hash of global options for vector, besides data_dir (specifying data_dir here will be ignored)

  • environment_vars (Hash) (defaults to: {})

    Hash of environment variables to make available to vector

  • config_files (Hash) (defaults to: {})

    Hash of vector::configfile instances to create

  • sources (Hash) (defaults to: {})

    Hash of vector::source instances to create

  • transforms (Hash) (defaults to: {})

    Hash of vector::transform instances to create

  • sinks (Hash) (defaults to: {})

    Hash of vector::sink instances to create

  • systemd_dropins (Hash) (defaults to: {})

    Hash of vector::systemd_dropin instances to create

  • notify_on_config_change (Boolean)


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

class vector (
  Optional[String]  $version,
  Boolean           $install_vector,
  String            $config_dir,
  String            $config_dir_mode,
  String            $data_dir,
  String            $data_dir_mode,
  String            $user,
  String            $group,
  Boolean           $manage_user,
  Hash              $user_opts,
  Boolean           $manage_group,
  Hash              $group_opts,
  String            $service_name,
  Boolean           $manage_systemd,
  String            $vector_executable,
  Vector::Ensure    $service_ensure,
  Vector::Enabled   $service_enabled,
  String            $environment_file,
  Boolean           $notify_on_config_change,
  String            $service_restart    = 'always',
  Hash              $global_options     = {},
  Hash              $environment_vars   = {},
  Hash              $config_files       = {},
  Hash              $sources            = {},
  Hash              $transforms         = {},
  Hash              $sinks              = {},
  Hash              $systemd_dropins    = {},
) {
  contain vector::install
  contain vector::user
  contain vector::setup
  contain vector::configure
  contain vector::service

  Class['vector::install']
  -> Class['vector::user']
  -> Class['vector::setup']
  -> Class['vector::configure']
  -> Class['vector::service']
}