Docs » Splunk Distribution of the OpenTelemetry Collector の利用開始 » Automatic discovery of apps and services » Automatic discovery and zero-code instrumentation for Kubernetes » Automatic discovery for third-party services in Kubernetes

Automatic discovery for third-party services in Kubernetes 🔗

You can use automatic discovery to find third-party applications (such as databases and web servers) running in your Kubernetes environment. Automatic discovery gathers telemetry data from these applications and sends it to Splunk Observability Cloud.

注釈

Collector をバージョン 0.94.0 以上に更新して、自動サービスディスカバリーを有効にします。

If you’re using the Collector version 0.109.0 or higher, log in to Splunk Observability Cloud and go to the Discovered services tab in the Data Management menu to see which of your services and third-party applications the Collector has detected and can monitor automatically. See Deploy the Collector with automatic discovery for more details.

How automatic discovery works 🔗

When you run the Collector with automatic discovery, it tests built-in configurations for supported metric receivers against endpoints discovered on your platform by observer extensions. This happens before starting the Collector service.

成功基準に一致するメトリクスを取得する、動的にインスタンス化されたすべてのレシーバーについて、Collector はディスカバリー構成を、必要なオブザーバー拡張と同様に、既知の作業ルールを持つレシーバークリエーターインスタンスに変換します。詳細については、レシーバークリエーターレシーバー を参照してください。同時に、Collector は実行時に構成を metrics パイプラインに追加します。

サービスとの接続は確立できるが、期待されるメトリクスを受信できないレシーバーに対して、ディスカバリーモードは、どのプロパティを設定すべきか、またはどの拡張機能または設定をサービス上で構成して、正常にテレメトリを取得すべきかを提案します。ディスカバリー・プロセスを調整するために、ディスカバリー・プロパティを使用して、認証情報など、必要なターゲット固有の構成値を定義できます。

Kubernetesで実行する場合、ディスカバリーモードは k8s_observer オブザーバーによって発見されたエンドポイントに対して、バンドルされたメトリクスレシーバーの設定をテストします。ー発見されたインスタンスはー成功したインスタンスはー既存のー既存サービス構成に組み込まれます。

Deploy the Collector with automatic discovery 🔗

You can configure the DaemonSet from the Splunk Distribution of the OpenTelemetry Collector for Kubernetes to run in discovery mode. Edit the properties to add required credentials or service-specific information.

注釈

If you’re using the Collector version 0.109.0 or higher, activate auto-discovery in the UI using featureGates: splunk.continuousDiscovery.

次の例では、Helmチャートでディスカバリーモードを有効にし、PostgreSQLサービスディスカバリー用の認証プロパティを追加する方法を示します:

agent:

  #...

  discovery:
    enabled: true # Turned off by default
    properties:
      extensions:
        k8s_observer:
          config:
            auth_type: serviceAccount  # Default auth_type value
      receivers:
        postgres:
          config:
            # Environment variables populated by secret data
            username: '${env:POSTGRES_USER}'
            password: '${env:POSTGRES_PASSWORD}'
            tls:
              insecure: true
  # Activates auto discovery in UI. Only available for the Collector version 0.109.0 or higher
  featureGates: splunk.continuousDiscovery

# ...

extraEnvs:
   # Environment variables using a manually created secret
   - name: POSTGRES_USER
     valueFrom:
       secretKeyRef:
         name: postgres-monitoring
         key: username
   - name: POSTGRES_PASSWORD
     valueFrom:
       secretKeyRef:
         name: postgres-monitoring
         key: password

ディスカバリーの進行状況とステートメントの評価を確認するには、エージェントの起動ログを参照するか、kubectlを使用します。例:

$ kubectl -n monitoring logs splunk-otel-collector-agent | grep -i disco
Discovering for next 10s...
Successfully discovered "postgresql" using "k8s_observer" endpoint "k8s_observer/e8a10f52-4f2a-468c-be7b-7f3c673b1c8e/(5432)".
Discovery complete.

注釈

デフォルトでは、docker_observerhost_observer の拡張子は、Helmチャートでのディスカバリーではオフになっています。

このページは 2025年02月10日 に最終更新されました。