Splunk HEC レシーバー
Splunk HEC レシーバーを使用すると、Splunk Distribution of OpenTelemetry Collector でログとメトリクスを Splunk HTTP Event Collector 形式で収集できます。
Splunk HTTP Event Collector(HEC)レシーバーを使用すると、Splunk Distribution of the OpenTelemetry Collector でイベントとログを Splunk HEC 形式で収集できます。サポートされるパイプラインタイプは、metrics と logs です。詳細については「パイプラインでデータを処理する」を参照してください。
レシーバーは、任意のパスで JSON HEC イベントとしてフォーマットされたデータ、または raw_path に送られた場合は行末で区切られたログ生データとして、フォーマットされたデータを受け入れます。詳しくは「Format events for HTTP Event Collector」を参照してください。
はじめに
以下の手順に従って、コンポーネントの設定とアクティベーションを行ってください:
-
Splunk Distribution of the OpenTelemetry Collector をホストまたはコンテナプラットフォームにデプロイします:
-
次のセクションで説明するように Splunk HEC レシーバーを設定します。
-
Collector を再起動します。
サンプル構成
Splunk HEC レシーバーを有効にするには、Collector 設定ファイルの receiversセクションに splunk_hec エントリを追加します:
receivers:
splunk_hec:
構成を完了するには、構成ファイルの service セクションの必須パイプラインにレシーバーを含めます。例:
service:
pipelines:
metrics:
receivers: [splunk_hec]
設定例
次の例では、Splunk HEC レシーバーが利用可能なすべての設定で構成されています:
receivers:
# ...
splunk_hec:
# Address and port the Splunk HEC receiver should bind to
endpoint: localhost:8088
# Whether to preserve incoming access token
access_token_passthrough: true
# Path accepting raw HEC events (logs only)
raw_path: "/foo"
# Path reporting health checks
health_path: "/bar"
# Define field mappings
hec_metadata_to_otel_attrs:
source: "file.name"
sourcetype: "foobar"
index: "myindex"
host: "myhostfield"
# Optional TLS settings
tls:
# Both cert_file and
# key_file are required
# for TLS connections
cert_file: /test.crt
key_file: /test.key
HTTPリクエストを認可する
レシーバーがクライアント拡張機能で動作するようにするには、Collectorサービスとパイプラインの構成に以下を追加します:
上級ユーザーは、open-telemetry auth Go パッケージと Configure TLS を使って、要件を満たす独自の認証拡張機能を実装できます。
設定
次の表は、Splunk HEC レシーバーの設定オプションを示しています:
同梱
https://raw.githubusercontent.com/splunk/collector-config-tools/main/cfg-metadata/receiver/splunk_hec.yaml
トラブルシューティング
__ ___ ___ _ ______ _____________ _____ ________ ___ ___ ___ ____ __ ___ ____ ____ __ ______ _____________ ______ ___ ___ ___ ____ __ ___ _________ _____
_________ __ ______ _____________ _____ _________
-
______ _ ____ __ ___ ______ _______ _______
-
_______ ______ ________
_________ __ ___________ _________ ___ ____ _____ _____
-
___ _ ________ ___ ___ _______ _______ _________ _______ __ ______ ________
-
____ ___ ______ ______________ ____ _____ _____ _______ __ ___________ ____ __________ _________ ___ ______ _________ __________ __ _____ ___ ____ _______