Forge Home

splunk_otel_collector

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

6,072 downloads

93 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.9.0 (latest)
  • 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 Mar 16th 2023
This version is compatible with:
  • Puppet Enterprise 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.9.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.9.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.9.0 Mar 16th 2023

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
  • CentOS / Red Hat / Oracle: 7, 8
  • 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

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:

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
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. None
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'} {}
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. true
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
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
with_auto_instrumentation Linux only: Whether to install/manage Splunk OpenTelemetry Auto Instrumentation for Java. When set to true, the splunk-otel-auto-instrumentation deb/rpm package will be downloaded and installed from the Collector repository. Note: The Java application on the node needs to be started/restarted separately after installation in order for auto instrumentation to take effect. false
auto_instrumentation_version Linux only: Version of the splunk-otel-auto-instrumentation package to install, e.g. 0.50.0. The minimum supported version is 0.48.0. Note: The Java application on the node needs to be restarted separately in order for any change to take effect. latest
auto_instrumentation_ld_so_preload 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 and is required for auto instrumentation. Configure this variable to include additional library paths, e.g. /path/to/my.library.so. Note: The Java application on the node needs to be restarted separately in order for any change to take effect. 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. The specified path will be added to the /usr/lib/splunk-instrumentation/instrumentation.conf config file on the node. Note: The Java application on the node needs to be restarted separately in order for any change to take effect. /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. The specified resource attribute(s) will be added to the /usr/lib/splunk-instrumentation/instrumentation.conf config file on the node. Note: The Java application on the node needs to be restarted separately in order for any change to take effect. None
auto_instrumentation_service_name Linux only: Explicitly set the service name, for the instrumented Java application, e.g. my.service. By default, the service name is automatically derived from the arguments of the Java executable on the node. However, if this variable is set to a non-empty value, the value will override the derived service name and be added to the /usr/lib/splunk-instrumentation/instrumentation.conf config file on the node. Note: The Java application on the node needs to be restarted separately in order for any change to take effect. None
auto_instrumentation_generate_service_name Linux only: Set this option to false to prevent the preloader from setting the OTEL_SERVICE_NAME environment variable. Note: The Java application on the node needs to be restarted separately in order for any change to take effect. true
auto_instrumentation_disable_telemtry Linux only: Enable or disable the preloader from sending the splunk.linux-autoinstr.executions metric to the local collector. Note: The Java application on the node needs to be restarted separately in order for any change to take effect. false
auto_instrumentation_enable_profiler Linux only: Enable or disable AlwaysOn CPU Profiling. Note: The Java application on the node needs to be restarted separately in order for any change to take effect. false
auto_instrumentation_enable_profiler_memory Linux only: Enable or disable AlwaysOn Memory Profiling. Note: The Java application on the node needs to be restarted separately in order for any change to take effect. false
auto_instrumentation_enable_metrics Linux only: Enable or disable exporting Micrometer metrics. Note: The Java application on the node needs to be restarted separately in order for any change to take effect. false

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.