Defined Type: otelcol::receiver

Defined in:
manifests/receiver.pp

Summary

Add a receiver to the OpenTelemetry Collector configuration

Overview

Examples:

basic receiver

otelcol::receiver { 'namevar': }

Define a receiver and attach it to a pipeline

otelcol::receiver { 'otlp':
  pipelines => ['metrics'],
}

Parameters:

  • name

    The name of the receiver

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

    The configuration of the receiver

  • order (Integer[0,999]) (defaults to: 0)

    The order of the receiver

  • pipelines (Array[String[1]]) (defaults to: [])

    The pipelines the receiver is part of



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'manifests/receiver.pp', line 17

define otelcol::receiver (
  Hash $config = {},
  Integer[0,999] $order = 0,
  Array[String[1]] $pipelines = [],
) {
  $real_order = 1000+$order
  otelcol::component { "${name}-receivers":
    order          => $real_order,
    config         => $config,
    pipelines      => $pipelines,
    component_name => $name,
    type           => 'receivers',
  }
}