レシーバークリエーターレシーバー 🔗
Use the Receiver creator receiver with the Splunk Distribution of the OpenTelemetry Collector to create new receivers at runtime based on configured rules and observer extensions. The supported pipeline types are metrics
, traces
, and logs
. See パイプラインでデータを処理する for more information.
You can use any of the following observer extensions as listeners for the Receiver creator:
docker_observer
:Docker APIを通じて実行中のコンテナエンドポイントを検出し、レポートします。ecs_task_observer
:ECS タスクを実行するコンテナエンドポイントを検出し、レポートします。host_observer
: 現在のホストのリッスンしているネットワークエンドポイントを発見します。k8s_observer
: Kubernetes APIを通じてKubernetesのポッド、ポート、ノードのエンドポイントを検出し、レポートします。
このレシーバーは、kubeletstats
や hostmetrics
レシーバーのように、アプリケーションやホスト用の他のレシーバーを使用できます。レシーバークリエーターの典型的なユースケースは、Kubernetes ポッドや Docker コンテナなど、動的にデプロイされるインフラストラクチャのメトリクスを収集することです。
はじめに 🔗
以下の手順に従って、コンポーネントの設定とアクティベーションを行ってください:
Splunk Distribution of the OpenTelemetry Collector をホストまたはコンテナプラットフォームにデプロイします:
Configure the Receiver creator receiver as described in the next section.
Collector を再起動します。
サンプル構成 🔗
To activate the Receiver creator receiver add the desired extensions to the extensions
section of your configuration file, followed by receiver_creator
instances in the receivers
section. For example:
extensions:
# Configures the Kubernetes observer to watch for pod start and stop events.
k8s_observer:
auth_type: serviceAccount
# Can be set to the node name to limit discovered endpoints
# The value can be obtained using the downward API
node: ${env:K8S_NODE_NAME}
observe_pods: true
observe_nodes: true
receivers:
receiver_creator/k8skubeletstats:
watch_observers: [k8s_observer]
receivers:
kubeletstats:
# If this rule matches an instance of this receiver will be started.
rule: type == "k8s.node"
config:
auth_type: serviceAccount
collection_interval: 15s
endpoint: '`endpoint`:`kubelet_endpoint_port`'
extra_metadata_labels:
- container.id
metric_groups:
- container
- pod
- node
service:
extensions: [k8s_observer]
pipelines:
metrics:
receivers: [receiver_creator/k8skubeletstats]
receiver_creator
設定の receivers
セクション内で、サポートされているレシーバーをネストして設定することができます。どのレシーバーをネストできるかは、レシーバークリエーターが watch_observers
で定義されている拡張機能を通じて監視しているインフラストラクチャの種類によって異なります。
Example: Docker observer 🔗
The following example shows how to configure the Receiver creator receiver using the Docker observer:
extensions:
docker_observer:
# Default is unix:///var/run/docker.sock
# Collector must have read access to the Docker Engine API
endpoint: path/to/docker.sock
excluded_images: ['redis', 'another_image_name']
# Docker observer requires Docker API version 1.22 or higher
api_version: 1.42
# Time to wait for a response from Docker API. Default is 5 seconds
timeout: 15s
receivers:
receiver_creator:
watch_observers: [docker_observer]
receivers:
nginx:
rule: type == "container" and name matches "nginx" and port == 80
config:
endpoint: '`endpoint`/status'
collection_interval: 10s
例Kubernetesオブザーバー 🔗
The following example shows how to configure the receiver creator receiver using the Kubernetes observer:
extensions:
k8s_observer:
auth_type: serviceAccount
# Can be set to the node name to limit discovered endpoints
# The value can be obtained using the downward API
node: ${env:K8S_NODE_NAME}
observe_pods: true
observe_nodes: true
receivers:
receiver_creator:
watch_observers: [k8s_observer]
receivers:
kubeletstats:
rule: type == "k8s.node"
config:
auth_type: serviceAccount
collection_interval: 10s
endpoint: "`endpoint`:`kubelet_endpoint_port`"
extra_metadata_labels:
- container.id
metric_groups:
- container
- pod
- node
Rules to create new receivers 🔗
You can use this receiver to dynamically create new receivers based on rules. Each rule must start with type == ("pod"|"port"|"hostport"|"container"|"k8s.node") &&
such that the rule matches only one endpoint type.
For a list of variables available to each endpoint type, see Rules expressions on GitHub.
設定 🔗
The following table shows the configuration options for the Receiver creator receiver:
トラブルシューティング 🔗
Splunk Observability Cloudをご利用のお客様で、Splunk Observability Cloudでデータを確認できない場合は、以下の方法でサポートを受けることができます。
Splunk Observability Cloudをご利用のお客様
Submit a case in the Splunk Support Portal .
Contact Splunk Support .
見込み客および無料トライアルユーザー様
Splunk Answers のコミュニティサポートで質問し、回答を得る
Join the Splunk #observability user group Slack channel to communicate with customers, partners, and Splunk employees worldwide. To join, see Chat groups in the Get Started with Splunk Community manual.