Forge Home

splunk_otel_collector

This module installs the Splunk OpenTelemetry Collector via distro packages and configures it.

14,382 downloads

663 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.18.0 (latest)
  • 0.17.0
  • 0.16.0
  • 0.15.0
  • 0.14.0
  • 0.13.0
  • 0.12.0
  • 0.11.0
  • 0.10.0
  • 0.9.0
  • 0.8.0
  • 0.7.0
  • 0.6.0
  • 0.5.0
  • 0.4.0
  • 0.3.0
  • 0.2.1
  • 0.2.0
  • 0.1.0
  • 0.0.1
released Aug 29th 2024
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x
  • Puppet >= 6.0.0
  • , , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'signalfx-splunk_otel_collector', '0.18.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add signalfx-splunk_otel_collector
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install signalfx-splunk_otel_collector --version 0.18.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

signalfx/splunk_otel_collector — version 0.18.0 Aug 29th 2024

Splunk OpenTelemetry Collector Puppet Module

This is a Puppet module that will install and configure the Splunk OpenTelemetry Collector.

Linux

Currently, the following Linux distributions and versions are supported:

  • Amazon Linux: 2, 2023 (Note: Log collection with Fluentd not currently supported for Amazon Linux 2023.)
  • CentOS / Red Hat / Oracle: 7, 8, 9
  • Debian: 9, 10, 11
  • SUSE: 12, 15 (Note: Only for collector versions v0.34.0 or higher. Log collection with Fluentd not currently supported.)
  • Ubuntu: 16.04, 18.04, 20.04, 22.04

Note: systemd is required to be installed on the host for service management.

Windows

Currently, the following Windows versions are supported and requires PowerShell 3.0 or newer:

  • Windows Server 2012 64-bit
  • Windows Server 2016 64-bit
  • Windows Server 2019 64-bit
  • Windows Server 2022 64-bit

On Windows, the collector is installed as a Windows service and its environment variables are set at the service scope, i.e.: they are only available to the collector service and not to the entire machine.

Usage

This module can be downloaded and installed from Puppet Forge.

To use this module, include the splunk_otel_collector class in your manifests with the supported parameters (see the table below for descriptions of the available parameters). For example, the simplest deployment definition with the default parameters would be (replace VERSION with the desired collector version, SPLUNK_ACCESS_TOKEN with your Splunk access token to authenticate requests, and SPLUNK_REALM for the realm to send the data to):

class { splunk_otel_collector:
  collector_version => 'VERSION'
  splunk_access_token => 'SPLUNK_ACCESS_TOKEN',
  splunk_realm => 'SPLUNK_REALM',
}

This class accepts the following parameters:

Collector

Name Description Default value
collector_version Required on Windows: Version of the collector package to install, e.g., 0.25.0. The version should correspond to Github Releases without the preceding v. Note: On Linux, the latest collector version will be installed if this parameter is not specified. None
splunk_access_token Required: The Splunk access token to authenticate requests. None
splunk_realm Required: Which realm to send the data to, e.g. us0. The Splunk ingest and API URLs will be inferred by this value. The SPLUNK_REALM environment variable will be set with this value for the collector service. None
splunk_ingest_url Set the Splunk ingest URL explicitly instead of the URL inferred by the $splunk_realm parameter. The SPLUNK_INGEST_URL environment variable will be set with this value for the collector service. https://ingest.${splunk_realm}.signalfx.com
splunk_api_url Set the Splunk API URL explicitly instead of the URL inferred by the $splunk_realm parameter. The SPLUNK_API_URL environment variable will be set with this value for the collector service. https://api.${splunk_realm}.signalfx.com
splunk_trace_url Set the Splunk trace endpoint URL explicitly instead of the URL inferred by the $splunk_ingest_url parameter. The SPLUNK_TRACE_URL environment variable will be set with this value for the collector service. ${splunk_ingest_url}/v2/trace
splunk_hec_url Set the Splunk HEC endpoint URL explicitly instead of the URL inferred by the $splunk_ingest_url parameter. The SPLUNK_HEC_URL environment variable will be set with this value for the collector service. ${splunk_ingest_url}/v1/log
splunk_hec_token Set the Splunk HEC authentication token if different than $splunk_access_token. The SPLUNK_HEC_TOKEN environment variable will be set with this value for the collector service. $splunk_access_token
splunk_bundle_dir The path to the Smart Agent bundle directory. The default path is provided by the collector package. If the specified path is changed from the default value, the path should be an existing directory on the node. The SPLUNK_BUNDLE_DIR environment variable will be set to this value for the collector service. Linux: /usr/lib/splunk-otel-collector/agent-bundleWindows: %PROGRAMFILES%\Splunk\OpenTelemetry Collector\agent-bundle
splunk_collectd_dir The path to the collectd config directory for the Smart Agent bundle. The default path is provided by the collector package. If the specified path is changed from the default value, the path should be an existing directory on the node. The SPLUNK_COLLECTD_DIR environment variable will be set to this value for the collector service. Linux: ${splunk_bundle_dir}/run/collectdWindows: ${splunk_bundle_dir}\run\collectd
splunk_memory_total_mib Total memory in MIB to allocate to the collector; automatically calculates the ballast size. The SPLUNK_MEMORY_TOTAL_MIB environment variable will be set with this value for the collector service. 512
DEPRECATED splunk_ballast_size_mib Set the ballast size for the collector explicitly instead of the value calculated from the $splunk_memory_total_mib parameter. This should be set to 1/3 to 1/2 of configured memory. The SPLUNK_BALLAST_SIZE_MIB environment variable will be set with this value for the collector service. Only applicable if collector_version is < 0.97.0. None
splunk_listen_interface Set the network interface the collector receivers will listen on. 0.0.0.0
collector_config_source Source path to the collector config YAML file. This file will be copied to the $collector_config_dest path on the node. See the source attribute of the file resource for supported value types. The default source file is provided by the collector package. Linux: /etc/otel/collector/agent_config.yamlWindows: %PROGRAMFILES\Splunk\OpenTelemetry Collector\agent_config.yaml
collector_config_dest Destination path of the collector config file on the node. The SPLUNK_CONFIG environment variable will be set with this value for the collector service. Linux: /etc/otel/collector/agent_config.yamlWindows: %PROGRAMDATA%\Splunk\OpenTelemetry Collector\agent_config.yaml
service_user and $service_group Linux only: Set the user/group ownership for the collector service. The user/group will be created if they do not exist. splunk-otel-collector
collector_additional_env_vars Hash of additional environment variables from the collector configuration file for the collector service. For example, if the collector configuration file includes references to ${MY_CUSTOM_VAR1} and ${MY_CUSTOM_VAR2}, specify the following to allow the collector service to expand these variables: collector_additional_env_vars => {'MY_CUSTOM_VAR1' => 'value1', 'MY_CUSTOM_VAR2' => 'value2'} {}
manage_repo Linux only: In cases where the collector and fluentd apt/yum repositories are managed externally, set this to false to disable management of the repositories by this module. Note: If set to false, the externally managed repositories should provide the splunk-otel-collector and td-agent packages. Also, the apt (/etc/apt/sources.list.d/splunk-otel-collector.list, /etc/apt/sources.list.d/splunk-td-agent.list) and yum (/etc/yum.repos.d/splunk-otel-collector.repo, /etc/yum.repos.d/splunk-td-agent.repo) repository definition files will be deleted if they exist in order to avoid any conflicts. true
gomemlimit GOMEMLIMIT env var is introduced for the Splunk Otel Collector version >=0.97.0, allowing the limitation of memory usage in the Go runtime. This feature can help enhance GC (Garbage Collection) related performance and prevent GC related Out of Memory (OOM) situations. Note: By default 90% of the total memory is recommended. To increase frequency of garbage collections, set GOMEMLIMIT to a higher value than the default 90% of total memory and to reduce garbage collections, set GOMEMLIMIT to a lower value than the default 90% of the total memory. None

Fluentd

Name Description Default value
with_fluentd Whether to install/manage fluentd and dependencies for log collection. Note: On Linux, the dependencies include capng_c for enabling Linux capabilities, fluent-plugin-systemd for systemd journal log collection, and the required libraries/development tools. false
fluentd_config_source Source path to the fluentd config file. This file will be copied to the $fluentd_config_dest path on the node. See the source attribute of the file resource for supported value types. The default source file is provided by the collector package. Only applicable if $with_fluentd is set to true. Linux: /etc/otel/collector/fluentd/fluent.confWindows: %PROGRAMFILES\Splunk\OpenTelemetry Collector\fluentd\td-agent.conf
fluentd_config_dest Linux only: Destination path to the fluentd config file on the node. Only applicable if $with_fluentd is set to true. Note: On Windows, the path will always be set to %SYSTEMDRIVE%\opt\td-agent\etc\td-agent\td-agent.conf. /etc/otel/collector/fluentd/fluent.conf

Auto Instrumentation for Linux

Note: The application(s) to be instrumented need to be restarted separately after installation or any configuration changes in order for auto instrumentation to take effect.

Name Description Default value
with_auto_instrumentation Linux only: Whether to install/manage Splunk OpenTelemetry Auto Instrumentation. When set to true, the splunk-otel-auto-instrumentation deb/rpm package will be downloaded and installed from the Collector repository. false
with_auto_instrumentation_sdks Linux only: Which SDKs to install. .NET only supported on amd64/x86_64. ['java','nodejs','dotnet']
auto_instrumentation_npm_path Linux only: The path to the npm executable used for installation of the splunk-otel-js Node.js package. npm
auto_instrumentation_version Linux only: Version of the splunk-otel-auto-instrumentation package to install, e.g. 0.50.0. The minimum supported version for Java is 0.48.0. The minimum supported version for Node.js is 0.87.0. The minimum supported version for .NET is 0.99.0. latest
auto_instrumentation_systemd Linux only: By default, the /etc/ld.so.preload file on the node will be configured for the /usr/lib/splunk-instrumentation/libsplunk.so shared object library provided by the splunk-otel-auto-instrumentation package to activate and configure auto instrumentation system-wide for all supported applications. Alternatively, set this option to true to activate and configure auto instrumentation only for supported applications running as systemd services. If this option is set to true, /usr/lib/splunk-instrumentation/libsplunk.so will not be added to /etc/ld.so.preload. Instead, the /usr/lib/systemd/system.conf.d/00-splunk-otel-auto-instrumentation.conf systemd drop-in file will be created and configured for environment variables based on the default and specified options. false
auto_instrumentation_ld_so_preload Linux only: Configure this variable to include additional library paths, e.g. /path/to/my.library.so, to /etc/ld.so.preload. None
auto_instrumentation_java_agent_jar Linux only: Path to the Splunk OpenTelemetry Java agent. The default path is provided by the splunk-otel-auto-instrumentation package. If the path is changed from the default value, the path should be an existing file on the node. /usr/lib/splunk-instrumentation/splunk-otel-javaagent.jar
auto_instrumentation_resource_attributes Linux only: Configure the OpenTelemetry instrumentation resource attributes, e.g. deployment.environment=prod,my.key=value. None
auto_instrumentation_service_name Linux only: Explicitly set the service name for all instrumented applications, e.g. my.service. By default, the service name is automatically generated for each instrumented application. None
DEPRECATED auto_instrumentation_generate_service_name Linux only: Set this option to false to prevent the preloader from setting the OTEL_SERVICE_NAME environment variable. Only applicable if auto_instrumentation_version is < 0.87.0. true
DEPRECATED auto_instrumentation_disable_telemtry Linux only: Enable or disable the preloader from sending the splunk.linux-autoinstr.executions metric to the local collector. Only applicable if auto_instrumentation_version is < 0.87.0. false
auto_instrumentation_enable_profiler Linux only: Enable or disable AlwaysOn CPU Profiling. false
auto_instrumentation_enable_profiler_memory Linux only: Enable or disable AlwaysOn Memory Profiling. false
auto_instrumentation_enable_metrics Linux only: Enable or disable exporting instrumentation metrics. false
auto_instrumentation_otlp_endpoint Linux only: Set the OTLP endpoint for captured traces. The value will be set to the OTEL_EXPORTER_OTLP_ENDPOINT environment variable. Only applicable if auto_instrumentation_version is latest or >= 0.87.0. None, i.e. defer to the default OTEL_EXPORTER_OTLP_ENDPOINT value for each activated SDK
auto_instrumentation_otlp_endpoint_protocol Linux only: Set the protocol for the OTLP endpoint, for example grpc or http/protobuf. The value will be set to the OTEL_EXPORTER_OTLP_PROTOCOL environment variable. Only applicable if auto_instrumentation_version is latest or >= 0.104.0. None, i.e. defer to the default OTEL_EXPORTER_OTLP_PROTOCOL value for each activated SDK
auto_instrumentation_metrics_exporter Linux only: Comma-separated list of exporters for collected metrics by all activated SDKs, for example otlp,prometheus. Set the value to none to disable collection and export of metrics. The value will be set to the OTEL_METRICS_EXPORTER environment variable. Only applicable if auto_instrumentation_version is latest or >= 0.104.0. None, i.e. defer to the default OTEL_METRICS_EXPORTER value for each activated SDK
auto_instrumentation_logs_exporter Linux only: Set the exporter for collected logs by all activated SDKs, for example otlp. Set the value to none to disable collection and export of logs. The value will be set to the OTEL_LOGS_EXPORTER environment variable. Only applicable if auto_instrumentation_version is latest or >= 0.108.0. None, i.e. defer to the default OTEL_LOGS_EXPORTER value for each activated SDK

Dependencies

On Linux-based systems, the puppetlabs/stdlib module is required.

On Debian-based systems, the puppetlabs/apt module is required to manage the collector and fluentd apt repositories.

On RPM-based systems, the puppet/yum module is required to install the "Development Tools" package group as a dependency for fluentd.

On Windows systems, the puppetlabs/registry module is required to set the registry key/values, and the puppetlabs/powershell module is required to execute Powershell commands.