Skip to content

Latest commit

 

History

History
567 lines (319 loc) · 12.3 KB

REFERENCE.md

File metadata and controls

567 lines (319 loc) · 12.3 KB

Reference

Table of Contents

Classes

Public Classes

  • otelcol
  • otelcol::config: == Class: otelcol::config Templated generation of otelcol.conf
  • otelcol::install: == Class: otelcol::install Conditionally handle repos or package paths and install the necessary otelcol package.

Private Classes

  • otelcol::service: Manages the Otelcol service

Defined types

Public Defined types

Private Defined types

  • otelcol::component: Define a component for the OpenTelemetry Collector Configuration

Data types

Classes

otelcol

The otelcol class.

Parameters

The following parameters are available in the otelcol class:

package_name

Data type: String

Name of the package used

Default value: 'otelcol'

package_ensure

Data type: Enum['present','absent','installed','latest']

Ensure for the package

Default value: 'installed'

service_name

Data type: String

Name of the service used

Default value: $package_name

service_configcheck

Data type: Boolean

Check config before service reloads

Default value: true

environment_file

Data type: String

path of the environment file used for service

Default value: "/etc/${package_name}/${package_name}.conf"

run_options

Data type: Optional[String]

additional options for service

Default value: undef

config_file

Data type: String

path to config file

Default value: "/etc/${package_name}/config.yaml"

config_file_owner

Data type: String

owner of config_file

Default value: 'root'

config_file_group

Data type: String

group of config_file

Default value: 'root'

config_file_mode

Data type: Stdlib::Filemode

mode of config_file

Default value: '0644'

configs

Data type: Array[String]

additional config files or resources to add. Since this can be environment variables, http urls or files you are required to ensure the existence of a file!

Default value: []

receivers

Data type: Hash[String, Hash]

Hash for receivers config

Default value: {}

processors

Data type: Hash[String, Hash]

Hash for processors config

Default value: {}

exporters

Data type: Hash[String, Hash]

Hash for exporters config

Default value: {}

pipelines

Data type: Hash[String, Hash]

Hash for pipelines config

Default value: {}

extensions

Data type: Hash[String, Hash]

Hash for extensions config

Default value: {}

log_options

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

Hash for log_options config

Default value: {}

metrics_level

Data type: Enum['none','basic','normal','detailed']

Level for metrics config

Default value: 'basic'

metrics_address_host

Data type: Optional[Stdlib::Host]

Host metrics are listening to

Default value: undef

metrics_address_port

Data type: Stdlib::Port

Port metrics are listening to

Default value: 8888

service_ensure

Data type: Stdlib::Ensure::Service

Ensure for service

Default value: 'running'

service_enable

Data type: Boolean

Enable the service on boot

Default value: true

manage_service

Data type: Boolean

If service is managed by module

Default value: true

manage_archive

Data type: Boolean

If archive should be managed by module of will be provided by packagemanager

Default value: false

localpath_archive

Data type: String[1]

Path where archive will be stored if managed

Default value: '/tmp'

archive_version

Data type: String[1]

Version of otelcol that will be used, param is not used if archive_location is set

Default value: '0.89.0'

archive_location

Data type: String[1]

Path to archive without filetype extension

Default value: "https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v${archive_version}/${package_name}_${archive_version}_linux_amd64"

otelcol::config

== Class: otelcol::config

Templated generation of otelcol.conf

otelcol::install

== Class: otelcol::install

Conditionally handle repos or package paths and install the necessary otelcol package.

Defined types

otelcol::exporter

Create a OpenTelemetry Collector exporter in the configuration file.

Examples

Basic usage
otelcol::exporter { 'namevar': }
Define a exporter and attach it to a pipeline
otelcol::exporter { 'prometheus':
  pipelines => ['metrics'],
}

Parameters

The following parameters are available in the otelcol::exporter defined type:

name

The name of the exporter.

config

Data type: Hash

The configuration of the exporter.

Default value: {}

order

Data type: Integer[0,999]

The order of the exporter.

Default value: 0

pipelines

Data type: Array[String[1]]

The pipelines to attach the exporter to.

Default value: []

otelcol::extension

Add an extension to the OpenTelemetry Collector configuration

Examples

Basic usage
otelcol::extension { 'namevar': }

Parameters

The following parameters are available in the otelcol::extension defined type:

name

The name of the extension

config

Data type: Hash

The configuration for the extension

Default value: {}

order

Data type: Integer[0,999]

The order in which the extension should be loaded

Default value: 0

otelcol::pipeline

Used for explicitly configuring a pipeline in the OpenTelemetry Collector. This is useful for configuring a pipeline that is not automatically configured by its Components.

Examples

Configure a pipeline
otelcol::pipeline { 'namevar': }

Parameters

The following parameters are available in the otelcol::pipeline defined type:

name

The name of the pipeline to configure.

config

Data type: Hash

The configuration for the pipeline.

Default value: {}

order

Data type: Integer[0,999]

The order in which the pipeline should be configured.

Default value: 0

otelcol::processor

Add a processor to the OpenTelemetry Collector configuration

Examples

Basic usage
otelcol::processor { 'namevar': }
Define a processor and attach it to a pipeline
otelcol::processor { 'batch':
  pipelines => ['metrics'],
}

Parameters

The following parameters are available in the otelcol::processor defined type:

name

The name of the processor

config

Data type: Hash

The configuration of the processor

Default value: {}

order

Data type: Integer[0,999]

The order of the processor

Default value: 0

pipelines

Data type: Array[String[1]]

The pipelines to attach the processor to

Default value: []

otelcol::receiver

Add a receiver to the OpenTelemetry Collector configuration

Examples

basic receiver
otelcol::receiver { 'namevar': }
Define a receiver and attach it to a pipeline
otelcol::receiver { 'otlp':
  pipelines => ['metrics'],
}

Parameters

The following parameters are available in the otelcol::receiver defined type:

name

The name of the receiver

config

Data type: Hash

The configuration of the receiver

Default value: {}

order

Data type: Integer[0,999]

The order of the receiver

Default value: 0

pipelines

Data type: Array[String[1]]

The pipelines the receiver is part of

Default value: []

Data types

Otelcol::Component::Name

Type for name of Otel Collector Ressources

Alias of Pattern[/\A[a-z0-9_-]+(\/[a-z0-9]+)?\z/]