Puppet Class: otelcol::service

Defined in:
manifests/service.pp

Summary

Manages the Otelcol service

Overview

Examples:

Make sure Otelcol is running

include 'otelcol::service'

Disable otelcol service

class { 'otelcol::service':
  ensure => stopped,
}

Parameters:

  • ensure (Stdlib::Ensure::Service) (defaults to: $otelcol::service_ensure)

    Ensure service status



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'manifests/service.pp', line 15

class otelcol::service (
  Stdlib::Ensure::Service $ensure            = $otelcol::service_ensure,
) {
  # include install
  include otelcol::install

  # systemd::dropin_file { 'otelcol_service':
  #   unit     => 'otelcol.service',
  #   content  => epp('otelcol/otelcol.dropin.epp'),
  #   filename => 'otelcol_override.conf',
  # }
  # ~>
  service { 'otelcol':
    ensure    => $ensure,
    name      => $otelcol::service_name,
    require   => Package['otelcol'],
    subscribe => [Concat['otelcol-config'], File['otelcol-environment']],
  }
}