Docs » Splunk Distribution of the OpenTelemetry Collector の利用開始 » Collector デプロイツールとオプション » Puppet for Linux でCollectorをデプロイする

Puppet for Linux でCollectorをデプロイする 🔗

LinuxにCollectorをインストールおよび構成するには、このモジュールを使用します。Puppet Forge からモジュールをダウンロードしてインストールします。モジュールをダウンロードした後、class パラメータを使用してカスタマイズを追加できます。

現在、以下のLinuxディストリビューションとバージョンをサポートしています:

  • Amazon Linux: 2, 2023。Fluentd によるログ収集は Amazon Linux 2023 ではサポートされていません。

  • CentOS / Red Hat / Oracle: 7, 8, 9

  • Debian: 9, 10, 11

  • SUSE: 12, 15 (注意: Collectorバージョンv0.34.0以降にのみ適用されます。Fluentdによるログ収集は現在サポートされていません)。

  • Ubuntu: 16.04, 18.04, 20.04, 22.04

Linuxシステムでは、puppetlabs/stdlibモジュール が必要です。

注釈

systemdはサービス管理のためにホストにインストールする必要があります。

Puppetモジュールを使用する 🔗

このモジュールを使用するには、マニフェストに splunk_otel_collector クラスをサポートされるパラメータとともに含めます (使用可能なパラメータの説明については、クラスのパラメータを変更する を参照してください)。たとえば、次のデプロイ定義は、デフォルトのパラメータを使用した最も単純なデプロイ定義です ( VERSION を希望の Collector バージョンに、SPLUNK_ACCESS_TOKEN をリクエストを認証する Splunk アクセストークンに、SPLUNK_REALM をデータ送信先のレルムに置き換えてください):

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

クラスのパラメータを変更する 🔗

このクラスは、以下の表に示すパラメータを受け付けます:

Name

説明

デフォルト値

collector_version

インストールする Collector パッケージのバージョン(例: 0.25.0 )。バージョンは、Github Releases の前の v を除いたものに対応する必要があります。Linuxでは、このパラメータが指定されていない場合、最新のCollectorバージョンがインストールされることに注意してください。

なし

gomemlimit

Collector バージョン 0.97.0 から splunk_ballast_size_mib に代わります。GO ランタイムのメモリ使用量を制限し、ガベージコレクションを強化して、メモリ不足を防ぎます。詳細については、設定でメモリバラストを更新する方法 を参照してください。

90% of splunk_total_mem_mib

splunk_access_token

リクエストを認証する Splunk アクセストークン。この属性は必須です。

なし

splunk_realm

どのレルムにデータを送信するか、例えば us0。Splunk のインジェスト URL と API URL は、この値によって推測されます。コレクターサービスでは、SPLUNK_REALM 環境変数にこの値が設定されます。この属性は必須です。Splunk レルムを検索するには、レルムについての注意 を参照してください。

なし

splunk_ingest_url

$splunk_realm パラメータによって推測される URL ではなく、明示的に Splunk インジェスト URL を設定します。環境変数 SPLUNK_INGEST_URL には、Collector サービスに対してこの値が設定されます。

https://ingest.${splunk_realm}.signalfx.com

splunk_api_url

$splunk_realm パラメータによって推測される URL ではなく、明示的に Splunk API URL を設定します。環境変数 SPLUNK_API_URL には、Collector サービスに対してこの値が設定されます。

https://api.${splunk_realm}.signalfx.com

splunk_trace_url

$splunk_ingest_url パラメータによって推測される URL ではなく、明示的に Splunk トレースエンドポイント URL を設定します。環境変数 SPLUNK_TRACE_URL には、Collector サービスに対してこの値が設定されます。

${splunk_ingest_url}/v2/trace

splunk_hec_url

$splunk_ingest_url パラメータによって推測される URL ではなく、明示的に Splunk HEC エンドポイントの URL を設定します。環境変数 SPLUNK_HEC_URL には、Collector サービスに対してこの値が設定されます。

${splunk_ingest_url}/v1/log

splunk_hec_token

Splunk HEC 認証トークンを設定します ( $splunk_access_token と異なる場合)。SPLUNK_HEC_TOKEN 環境変数には、Collector サービスに対してこの値が設定されます。

$splunk_access_token

splunk_bundle_dir

Smart Agentバンドルディレクトリへのパス。デフォルトのパスはCollectorパッケージによって提供されます。指定したパスをデフォルト値から変更する場合は、ノードの既存のディレクトリにする必要があります。Collectorサービスでは、SPLUNK_BUNDLE_DIR 環境変数にこの値が設定されます。

/usr/lib/splunk-otel-collector/agent-bundle

splunk_collectd_dir

Smart Agent バンドルのcollectd設定ディレクトリへのパス。デフォルトのパスはCollectorパッケージによって提供されます。指定されたパスがデフォルト値から変更される場合、パスはノード上の既存のディレクトリである必要があります。Collectorサービスでは、SPLUNK_COLLECTD_DIR 環境変数にこの値が設定されます。

${splunk_bundle_dir}/run/collectd

splunk_memory_total_mib

Collector に割り当てる MIB の合計メモリ。バラストサイズを自動的に計算します。Collector サービスでは、SPLUNK_MEMORY_TOTAL_MIB 環境変数にこの値が設定されます。

512

splunk_ballast_size_mib

splunk_ballast_size_mib は Collector バージョン 0.97.0 から非推奨です。使用している場合は、設定の更新方法 を参照してください。

なし

collector_config_source

Collector 設定 YAML ファイルのソースパス。このファイルはノードの $collector_config_dest パスにコピーされます。サポートされる値のタイプについては、ファイルリソースの ソース属性 を参照してください。デフォルトのソースファイルはCollectorパッケージで提供されます。

/etc/otel/collector/agent_config.yaml

collector_config_dest

ノード上の Collector 構成ファイルの宛先パス。Collectorサービスでは、SPLUNK_CONFIG 環境変数にこの値が設定されます。

/etc/otel/collector/agent_config.yaml

service_user and $service_group

Collector サービスのユーザーまたはグループの所有権を設定します。ユーザーまたはグループが存在しない場合は作成されます。

splunk-otel-collector

with_fluentd

ログ収集のための Fluentd と依存関係をインストールするか管理するかどうか。Linux では、依存関係には、Linux の機能を有効にするための capng_c、systemd ジャーナルログ収集のための fluent-plugin-systemd、必要なライブラリと開発ツールが含まれます。

false

fluentd_config_source

Fluentd 設定ファイルのソースパス。このファイルはノードの $fluentd_config_dest パスにコピーされます。サポートされている値のタイプについては、ファイルリソースの ソース属性 を参照してください。デフォルトのソースファイルは Collector パッケージによって提供されます。$with_fluentdtrue に設定されている場合のみ適用できます。

/etc/otel/collector/fluentd/fluent.conf

fluentd_config_dest

ノード上の Fluentd 設定ファイルへの宛先パス。$with_fluentdtrue に設定されている場合にのみ適用されます。

/etc/otel/collector/fluentd/fluent.conf

manage_repo

Collector と Fluentd apt/yum リポジトリが外部で管理されている場合、false に設定すると、このモジュールによるリポジトリ管理を無効にします。false に設定すると、外部で管理されているリポジトリは splunk-otel-collectortd-agent パッケージを提供する必要があります。また、競合を避けるために、apt ( /etc/apt/sources.list.d/splunk-otel-collector.list/etc/apt/sources.list.d/splunk-td-agent.list ) と yum ( /etc/yum.repos.d/splunk-otel-collector.repo/etc/yum.repos.d/splunk-td-agent.repo ) リポジトリ定義ファイルが存在する場合は削除されます。

true

Configure automatic discovery for back-end application(s) (Linux only) 🔗

You can automatically instrument your back-end applications along with the Collector installation using automatic discovery. Automatic discovery (formerly zero configuration auto instrumentation) removes the need to install and configure the OpenTelemetry SDKs separately. See Discover telemetry sources automatically for more information.

次の表に、このPuppetモジュールで設定できる変数を示します:

Name

説明

デフォルト値

with_auto_instrumentation

Whether to install or manage automatic discovery for back-end applications. When set to true, the splunk-otel-auto-instrumentation deb/rpm package is downloaded and installed from the Collector repository. The applications on the node need to be restarted after installation for automatic discovery or any configuration changes to take effect. To learn more, see Automatic discovery and configuration for back-end applications in Linux.

false

with_auto_instrumentation_sdks

The automatic discovery SDKs to install and activate. Note: dotnet is currently only supported for x86_64/amd64.

['java', 'nodejs', 'dotnet']

auto_instrumentation_version

Version of the splunk-otel-auto-instrumentation package to install, for example, 0.50.0. The minimum supported version is 0.48.0 for Java, 0.87.0 for Node.js, and 0.99.0 for .NET.

latest

auto_instrumentation_systemd

Whether to activate and configure the automatic discovery for systemd services only. If set to true, automatic discovery environment variables are added to /usr/lib/systemd/system.conf.d/00-splunk-otel-auto-instrumentation.conf.

false

auto_instrumentation_ld_so_preload

By default, the /etc/ld.so.preload file on the node is configured for the /usr/lib/splunk-instrumentation/libsplunk.so shared object library provided by the splunk-otel-auto-instrumentation package. This file preloads the automatic discovery package and is required for automatic discovery. Configure this variable to include additional library paths, for example, /path/to/my.library.so.

なし

auto_instrumentation_resource_attributes

Configure the OpenTelemetry instrumentation resource attributes, for example, deployment.environment=prod. To learn more, see 一般設定 and 一般設定.

なし

auto_instrumentation_service_name

Explicitly sets the service name for all instrumented applications, for example, my.service. By default, the service names are automatically derived from the arguments for each of the discovered executables to be instrumented on the node. However, if this variable is set to a non-empty value, the value overrides all derived service names.

なし

auto_instrumentation_enable_profiler

AlwaysOn CPU プロファイリングを有効または無効にします。

false

auto_instrumentation_enable_profiler_memory

AlwaysOn Memory Profiling を有効または無効にします。

false

auto_instrumentation_enable_metrics

インストルメンテーションメトリクスのエクスポートを有効または無効にします。

false

auto_instrumentation_otlp_endpoint

Sets the OTLP endpoint that receives traces. Only applicable if auto_instrumentation_version is 0.87.0 and higher.

http://127.0.0.1:4317

auto_instrumentation_java_agent_jar

Splunk OpenTelemetry Java エージェントへのパス。デフォルトのパスは splunk-otel-auto-instrumentation パッケージによって提供されます。パスをデフォルト値から変更する場合は、ノード上の既存のファイルである必要があります。

/usr/lib/splunk-instrumentation/splunk-otel-javaagent.jar

auto_instrumentation_npm_path

The path to the pre-installed npm command required to install the Node.js SDK. For example, /my/custom/path/to/npm.

npm

This page was last updated on 2024年05月14日.