splunk_otel_collector
Version information
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
Add this module to your Puppetfile:
mod 'signalfx-splunk_otel_collector', '0.18.0'
Learn more about managing modules with a PuppetfileDocumentation
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-bundle Windows: %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/collectd Windows: ${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.yaml Windows: %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.yaml Windows: %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.conf Windows: %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.
Changelog
Unreleased
puppet-v0.18.0
- Breaking change: The default for the
auto_instrumentation_otlp_endpoint
option has been changed fromhttp://127.0.0.1:4317
to''
(empty), i.e. defer to the defaultOTEL_EXPORTER_OTLP_ENDPOINT
value for each activated SDK. - Add support for the
auto_instrumentation_otlp_endpoint_protocol
,auto_instrumentation_metrics_exporter
, andauto_instrumentation_logs_exporter
options to configure theOTEL_EXPORTER_OTLP_PROTOCOL
,OTEL_METRICS_EXPORTER
, andOTEL_LOGS_EXPORTER
environment variables, respectively.
puppet-v0.17.0
- Use
$facts['os']['family']
instead of the legacy$::osfamily
fact
puppet-v0.16.0
- Initial support for Splunk OpenTelemetry for .NET Auto
Instrumentation on Linux (x86_64/amd64 only):
- The .NET SDK is activated by default if the
with_auto_instrumentation
option is set totrue
andauto_instrumentation_version
islatest
or >=0.99.0
. - To skip .NET auto instrumentation, configure the
with_auto_instrumentation_sdks
option withoutdotnet
.
- The .NET SDK is activated by default if the
puppet-v0.15.0
- Fix installation of
splunk-otel-js
for Node.js auto instrumentation.
puppet-v0.14.0
- For Splunk Otel Collector version
0.97.0
or greater,GOMEMLIMIT
env var is introduced. The default is set to 90% of theSPLUNK_TOTAL_MEM_MIB
. For more information regarding the usage, please follow the instructions (here). - The
splunk_ballast_size_mib
option is deprecated and no longer effective. It is only applicable for Splunk OpenTelemetry Collector version <0.97.0
.
puppet-v0.13.0
- On Windows the
SPLUNK_*
environment variables were moved from the machine scope to the collector service scope. It is possible that some instrumentations are relying on the machine-wide environment variables set by the installation. (#3930) - Initial support for Splunk OpenTelemetry for Node.js Auto
Instrumentation on Linux:
- The Node.js SDK is installed and activated by default if the
with_auto_instrumentation
option is set totrue
andnpm
is found on the node with thebash -c 'command -v npm'
shell command. - Set the
with_auto_instrumentation_sdks
option to only['java']
to skip Node.js auto instrumentation. - Use the
auto_instrumentation_npm_path
option to specify a custom path fornpm
. - Note: This cookbook does not manage the installation/configuration of Node.js,
npm
, or Node.js applications.
- The Node.js SDK is installed and activated by default if the
puppet-v0.12.0
- Deprecations: The
auto_instrumentation_generate_service_name
andauto_instrumentation_disable_telemetry
options are deprecated and only applicable if theauto_instrumentation_version
option is <0.87.0
. - Support Splunk OpenTelemetry Auto Instrumentation for Linux v0.87.0 and newer (Java only).
- Support activation and configuration of auto instrumentation for only
systemd
services. - Support setting the OTLP exporter endpoint for auto instrumentation (default:
http://127.0.0.1:4317
). Only applicable if theauto_instrumentation_version
option islatest
or >=0.87.0
.
puppet-v0.11.0
- Add support for
splunk_listen_interface
used by default configurations asSPLUNK_LISTEN_INTERFACE
environment variable (only populated if set). - Update fluentd url for Windows.
puppet-v0.10.0
- Breaking Changes: Fluentd installation disabled by default.
- Specify the
with_fluentd => true
option to enable installation
- Specify the
puppet-v0.9.0
- Add support for additional options for Splunk OpenTelemetry Auto Instrumentation for Java (Linux only)
puppet-v0.8.0
- Add
collector_additional_env_vars
option to allow passing additional environment variables to the collector service - Add support for Windows 2022
puppet-v0.7.0
- Initial support for Linux Java Auto Instrumentation
- Bump default td-agent version to 4.3.2
puppet-v0.6.0
- Add support for Ubuntu 22.04
puppet-v0.5.0
- Add support for Debian 11, remove support for Debian 8
puppet-v0.4.0
- Bump default td-agent version to 4.3.0
puppet-v0.3.0
- Initial support for Suse 12 and 15
puppet-v0.2.1
- Install
libcap
dependency for RPM distros
puppet-v0.2.0
- Initial support for Windows
puppet-v0.1.0
- Initial release
Dependencies
- puppetlabs/apt (>= 4.1.0)
- puppet/yum (<= 4.3.0)
- puppetlabs/powershell (<= 5.0.0)
- puppetlabs/registry (<= 4.0.0)