HTTPチェックレシーバー
HTTPチェックレシーバーを使用して、HTTPエンドポイントに対して合成チェックを実行します。
HTTPチェックレシーバーを使用して、HTTPエンドポイントに対して合成チェックを実行します。サポートされているパイプラインのタイプは metrics です。詳細については「パイプラインでデータを処理する」を参照してください。
レシーバーは、指定されたエンドポイントにリクエストを行い、HTTP レスポンスのステータスクラスごとに、ステータスコードがそのクラスに一致する場合に、1 の値を持つラベル付きのメトリクスを生成します。たとえば、エンドポイントが 200 を返した場合、レシーバーは以下のメトリクスを生成します。
-
httpcheck.status{http.status_class:1xx, http.status_code:200,...} = 0 -
httpcheck.status{http.status_class:2xx, http.status_code:200,...} = 1 -
httpcheck.status{http.status_class:3xx, http.status_code:200,...} = 0 -
httpcheck.status{http.status_class:4xx, http.status_code:200,...} = 0 -
httpcheck.status{http.status_class:5xx, http.status_code:200,...} = 0
はじめに
以下の手順に従って、コンポーネントの設定とアクティベーションを行ってください:
-
Splunk Distribution of the OpenTelemetry Collector をホストまたはコンテナプラットフォームにデプロイします:
-
次のセクションで説明するようにレシーバーを設定します。
-
Collector を再起動します。
サンプル構成
レシーバーをアクティブにするには、設定ファイルの httpcheck セクションに receivers を追加します:
receivers:
httpcheck:
設定を完了するには、設定ファイルの service セクションの metrics パイプラインに、レシーバーを含めます:
service:
pipelines:
metrics:
receivers: [httpcheck]
高度な設定
以下の構成設定オプションが利用可能です:
-
targetsします。必須。監視対象のターゲットのリスト。 -
collection_intervalします。オプション。デフォルトでは60sです。このレシーバーは、一定の間隔でメトリクスを収集します。有効な時間単位はns、us(µs)、ms、s、m、hです。 -
initial_delayします。オプション。デフォルトでは1sです。このレシーバーが開始するまでの待ち時間を定義します。
各ターゲットは以下のプロパティを持ちます:
-
endpointします。必須。監視する URL。 -
methodします。オプション。デフォルトではGETです。エンドポイントの呼び出しに使用される HTTP メソッド。
詳細については、「設定」を参照してください。さらに、ターゲットは GitHub の「HTTP config options for the Collector」にリストされている設定オプションもサポートしています。
設定例
次の例を参照してください:
receivers:
httpcheck:
targets:
- endpoint: http://endpoint:80
method: GET
- endpoint: http://localhost:8080/health
method: GET
- endpoint: http://localhost:8081/health
method: POST
headers:
test-header: "test-value"
collection_interval: 10s
メトリクス
以下のメトリクス、リソース属性、および属性が使用できます。
同梱
https://raw.githubusercontent.com/splunk/collector-config-tools/main/metric-metadata/httpcheckreceiver.yaml
特定のメトリクスをアクティブまたは非アクティブにする
各メトリクスの metrics セクションの enabled フィールドを設定することで、特定のメトリクスをアクティブまたは非アクティブにできます。例:
receivers:
samplereceiver:
metrics:
metric-one:
enabled: true
metric-two:
enabled: false
以下は、アクティブ化されたメトリクスを持つホスト・メトリクス・レシーバーの構成例です:
receivers:
hostmetrics:
scrapers:
process:
metrics:
process.cpu.utilization:
enabled: true
-
MTS ベースのサブスクリプションの場合、すべてのメトリックがメトリックの使用にカウントされます。
-
ホストベースのプランを使用している場合、このドキュメントでアクティブ(アクティブ:はい)としてリストされているメトリックはデフォルトと見なされ、無料で含まれています。
詳細については、「Infrastructure Monitoringのサブスクリプション使用状況(ホストとメトリクスのプラン)」を参照してください。
設定
以下の表に、HTTPチェックレシーバーの設定オプションを示します:
同梱
https://raw.githubusercontent.com/splunk/collector-config-tools/main/cfg-metadata/receiver/httpcheck.yaml
トラブルシューティング
If you are a Splunk Observability Cloud customer and are not able to see your data in Splunk Observability Cloud, you can get help in the following ways.
Available to Splunk Observability Cloud customers
-
Submit a case in the Splunk Support Portal.
-
Contact Splunk Support.
Available to prospective customers and free trial users
-
Ask a question and get answers through community support at Splunk Answers.
-
Join the Splunk community #observability Slack channel to communicate with customers, partners, and Splunk employees worldwide.