概要
Apache receiver は Apache Web Server メトリクスを収集します。
詳細については、Apache receiver に関する OpenTelemetry プロジェクトのドキュメントを参照してください。
セットアップ
この例では、OpenTelemetry Collector Contrib v0.154.0 のコンポーネント識別子を使用しています。他のバージョンやディストリビューションの場合は、そのディストリビューションがサポートする識別子を使用します。
Apache receiver は、サーバーの server-status?auto ページを読み取ります。開始する前に、Apache サーバーで mod_status を有効にします。ステータスページにはサーバーとそのリクエストに関する詳細が表示されるため、アクセスを localhost などに制限します。
Collector 構成に以下の行を追加し、endpoint をステータスページのアドレスに設定します。
receivers:
apache:
endpoint: http://localhost:8080/server-status?auto
構成のメトリクスパイプラインの receivers リストに apache を追加します。すでにそのパイプラインにあるプロセッサーはそのまま維持します。Datadog OTLP メトリクスインテークはデルタメトリクスのみを受け付けますが、このレシーバーは累積合計を生成するため、パイプラインには cumulativetodelta が必要です。推奨される Collector セットアップにはそれが含まれています。
すべての構成オプションについては、Apache receiver のドキュメントを参照してください。
収集データ
| OTEL | DESCRIPTION | FILTER |
|---|
| apache.cpu.load | Current load of the CPU. | |
| apache.current_connections | The number of active connections currently attached to the HTTP server. | |
| apache.requests | The number of requests serviced by the HTTP server per second. | |
| apache.scoreboard | The number of workers in each state. | state: waiting |
| apache.scoreboard | The number of workers in each state. | state: starting |
| apache.scoreboard | The number of workers in each state. | state: sending |
| apache.scoreboard | The number of workers in each state. | state: reading |
| apache.scoreboard | The number of workers in each state. | state: open |
| apache.scoreboard | The number of workers in each state. | state: logging |
| apache.scoreboard | The number of workers in each state. | state: keepalive |
| apache.scoreboard | The number of workers in each state. | state: idle_cleanup |
| apache.scoreboard | The number of workers in each state. | state: finishing |
| apache.scoreboard | The number of workers in each state. | state: dnslookup |
| apache.scoreboard | The number of workers in each state. | state: closing |
| apache.uptime | The amount of time that the server has been running in seconds. | |
| apache.workers | The number of workers currently attached to the HTTP server. | state: busy |
| apache.workers | The number of workers currently attached to the HTTP server. | state: idle |
OpenTelemetry と Datadog のメトリクス名の完全なマッピングについては、OpenTelemetry メトリクスマッピングを参照してください。
参考資料