Skip to content

Latest commit

 

History

History
388 lines (246 loc) · 10.7 KB

File metadata and controls

388 lines (246 loc) · 10.7 KB

Reference

Table of Contents

Classes

Public Classes

  • prosa: Guides the basic setup and installation of ProSA on your system.
  • prosa::processors: Creates prosa::proc defined types.

Private Classes

  • prosa::params: This class manages ProSA parameters
  • prosa::service: Installs and configures ProSA service.

Defined types

  • prosa::proc: Allows specialised configurations for ProSA processors Use the prosa::processors defined type if you want to create processors

Data types

Classes

prosa

A description of what this class does

Examples

class { 'prosa': }
Setting custom telemetry attributes
class { 'prosa':
  telemetry_attributes => {
    'service.name' => 'prosa-service',
    'host.id'      => 'fdbf79e8af94cb7f9e8df36789187052',
  }
}
Setting custom observability configuration
class { 'prosa':
  observability => {
    'metrics' => {
      'stdout' => {
        'level' => 'info',
      },
    },
    'traces'  => {
      'stdout' => {
        'level' => 'info',
      },
    },
    'logs'    => {
      'stdout' => {
        'level' => 'info',
      },
    },
  }
}

Parameters

The following parameters are available in the prosa class:

prosa_name

Data type: String

The name of your ProSA. It take this name to advertise himself. This name is sometime very important for some processors.

Default value: $prosa::params::prosa_name

service_name

Data type: String

Sets the name of the ProSA service.

Default value: $prosa::params::service_name

bin_repo

Data type: Optional[String]

Link to the binary repository where the ProSA binary can be find. See Puppet File source attribute to set this parameter

Default value: undef

bin_path

Data type: Stdlib::Absolutepath

Sets the path where the ProSA binary will be located.

Default value: $prosa::params::bin_path

log_dir

Data type: Stdlib::Absolutepath

Sets the directory where the ProSA logs files are located.

Default value: '/var/log'

conf_dir

Data type: Stdlib::Absolutepath

Sets the directory where the ProSA configuration files are located.

Default value: $prosa::params::conf_dir

service_enable

Data type: Boolean

Determines whether Puppet enables the ProSA service when the system is booted.

Default value: true

service_manage

Data type: Boolean

Determines whether Puppet manages the ProSA service's state.

Default value: true

service_ensure

Data type: Variant[Stdlib::Ensure::Service, Boolean]

Determines whether Puppet should make sure the service is running. Valid values are: true (or running) or false (or stopped).
The false or stopped values set the ProSA service resource's ensure parameter to false, which is useful when you want to let the service be managed by another application.

Default value: 'running'

service_limit_nofile

Data type: Optional[Integer]

Sets the limit on the number of open file descriptors for the ProSA service.
This parameter corresponds to the LimitNOFILE directive in the systemd service unit file.
Apply the default system limit when set to undef.

Default value: undef

manage_user

Data type: Boolean

When false, stops Puppet from creating the user resource.
This is for instances when you have a user, created from another Puppet module, you want to use to run ProSA. Without this parameter, attempting to use a previously established user would result in a duplicate resource error.

Default value: true

manage_group

Data type: Boolean

When false, stops Puppet from creating the group resource.
If you have a group created from another Puppet module that you want to use to run ProSA, set this to false. Without this parameter, attempting to use a previously established group results in a duplicate resource error.

Default value: true

user

Data type: String

Change the user that ProSA uses to run. To prevent Puppet from managing the user, set the manage_user parameter to false.

Default value: $prosa::params::user

group

Data type: String

Changes the group ID that ProSA uses to run. To prevent Puppet from managing the user, set the manage_user parameter to false.

Default value: $prosa::params::group

telemetry_level

Data type: ProSA::TelemetryLevel

Configures the ProSA TelemetryLevel directive which adjusts the verbosity of telemetry messages recorded.

Default value: $prosa::params::telemetry_level

telemetry_attributes

Data type: Optional[Hash[String, String]]

Configures the ProSA Telemetry Attributes directive which allows to add custom attributes to telemetry messages.
Refer to the ProSA book for more details on how to configure this directive.

Default value: undef

observability

Data type: Hash[String, Hash[String, Hash[String, String]]]

Configures the ProSA Observability directive which configure metrics, traces and logs export.
Refer to the ProSA book for more details on how to configure this directive.

Default value: $prosa::params::observability

prosa::processors

Creates prosa::proc defined types.

Examples

To create a ProSA processor stub-1
class { 'prosa::processors':
  processors => {
    'stub-1' => {
      'adaptor_config_path'          => undef,
      'proc_restart_duration_period' => undef,
      'proc_max_restart_period'      => undef,
      'proc_settings'                     => {
        'service_names' => ['test'],
      },
    },
  },
}

Parameters

The following parameters are available in the prosa::processors class:

processors

Data type: Hash

A hash, where the key represents the processor name and the value represents a hash of prosa::proc defined type's parameters.

Default value: {}

Defined types

prosa::proc

Allows specialised configurations for ProSA processors Use the prosa::processors defined type if you want to create processors

Parameters

The following parameters are available in the prosa::proc defined type:

adaptor_config_path

Data type: Optional[Stdlib::Absolutepath]

For some ProSA adaptor, they need to have a configuration in addition to processor. If needed you need to specify the path of it.

Default value: undef

adaptor_settings

Data type: Optional[Hash]

All settings of the adaptor if needed. The keys/values are depending of the adaptor. The adaptor_config_path should be defined if it's sets.

Default value: undef

proc_restart_duration_period

Data type: Optional[Integer[0, 86400000]]

Period in milliseconds of processors restarts when an error is detected

Default value: undef

proc_max_restart_period

Data type: Optional[Integer[10, 604800]]

Period in seconds of the maximum wait duration for a processor restart

Default value: undef

proc_settings

Data type: Hash

All settings of the processor. The keys/values are depending of the processor.

Default value: {}

config_file_mode

Data type: Optional[String]

Permissions mode for the processor configuration file The file should be read at least by the ProSA process. But can be reduced to avoid any configuration leak. If not set, the permission will be '0644'.

Default value: undef

Data types

ProSA::TelemetryLevel

A string that conforms to the ProSA TelemetryLevel syntax. Different levels can be specified for individual metrics, traces, and logs.

The levels are (in order of decreasing significance):

  • error
  • warn
  • info
  • debug
  • trace
  • off

ProSA accept non case sensitive levels (like this type).

Alias of Pattern[/\A(?i:error|warn|info|debug|trace|off)\Z/]