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

SaltでCollectorをデプロイする 🔗

式を使用して Collector をインストールおよび設定し、Linux マシンからメトリクス、トレース、ログを収集し、Splunk Observability Cloud にデータを送信することができます。Salt モジュールをダウンロードするには、GitHub リポジトリ を参照してください。

数式はあらかじめ書かれた Salt States です。Salt States と同様に自由で、パッケージのインストール、サービスの設定と開始、ユーザーやアクセス許可の設定、その他多くの一般的なタスクに使用できます。

前提条件 🔗

Salt を使うには以下のリソースが必要です:

Linux 🔗

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

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

  • CentOS、Red Hat、Oracle: 7、8、9

  • Debian: 9, 10, 11

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

  • Ubuntu:18.04, 20.04, 22.04

はじめに 🔗

Saltは、ユーザー定義のデータを 「ミニオン」が利用できるようにするために、「ピラー」と呼ばれるキー・バリュー・ストアを使用します。Saltはミニオンを、マネージャからのコマンドを聞き、要求されたタスクを実行できるSaltミニオンデーモンを実行しているサーバーと定義しています。一般的に、ミニオンはSaltを使って制御されるサーバーです。

splunk-otel-collector ピラーですべての属性を設定することができます。例:

splunk-otel-collector:
splunk_access_token: "MY_ACCESS_TOKEN"
splunk_realm: "SPLUNK_REALM"
splunk_repo_base_url: https://splunk.jfrog.io/splunk
splunk_otel_collector_config: '/etc/otel/collector/agent_config.yaml'
splunk_service_user: splunk-otel-collector
splunk_service_group: splunk-otel-collector

Linux 対応の属性 🔗

Linuxの場合、数式は以下の表に示す属性を受け付けます:

Name

説明

デフォルト値

collector_version

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

なし

gomemlimit

Collector バージョン 0.97.0 から splunk_ballast_size_mib に代わります。詳細については、設定でメモリバラストを更新する方法 を参照してください。

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 から非推奨です。使用している場合は、設定の更新方法 を参照してください。

splunk_memory_total_mib 合計の1/3

splunk_otel_collector_config_source

リモートホストの splunk_otel_collector_config の代わりにアップロードして設定する、コントロールホストの Collector 設定 YAML ファイルのソースパス。カスタムCollector設定を使用するには、Salt dirに設定ファイルを追加します。たとえば、salt://templates/agent_config.yaml

""、つまり、何もコピーされず、既存の splunk_otel_collector_config が使用されます

service_user$service_group

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

splunk-otel-collector

install_fluentd

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

false

td_agent_version

インストールする td-agent (Fluentd) パッケージのバージョン

Debian 9 には 3.7.1-0、その他のディストロには 4.3.0

splunk_fluentd_config

リモートホストの Fluentd 設定ファイルへのパス。

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

splunk_fluentd_config_source

リモートホストの splunk_fluentd_config ファイルの代わりにアップロードして設定する、コントロールホストのFluentd 設定ファイルのソースパスです。カスタム Fluentd 設定ファイルを使うには、設定ファイルを Salt dirに追加します。例えば、salt://templates/td_agent.conf

"" つまり、何もコピーされず、既存の splunk_fluentd_config ファイルが使われます。

fluentd_config_dest

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

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

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

You can automatically instrument your back-end applications along with the Collector installation. Automatic discovery removes the need to install and configure the OpenTelemetry SDKs separately. See Configure automatic discovery for Java for more information.

次の表に、このSaltモジュールで設定可能な変数を示します:

Name

説明

デフォルト値

install_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 started or restarted separately 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

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 and is required for automatic discovery. Configure this variable to include additional library paths, for example, /path/to/my.library.so.

''

auto_instrumentation_java_agent_path

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

auto_instrumentation_resource_attributes

Configure the OpenTelemetry instrumentation resource attributes, for example, deployment.environment=prod.

''

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

Activates or deactivates instrumentation metrics.

false

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