HTTP統計プラグイン¶
このプラグインはすべての Traffic Server の統計情報にアクセスするための HTTP インターフェースを実装しています。返されるメトリクスは処理の行いやすい JSON 形式です。このプラグインは ATS 標準ビルド処理の一部となったので、インストールすれば利用可能なはずです。
Enabling Stats Over HTTP¶
To enable this plugin, add to the plugin.config
file:
stats_over_http.so
Traffic Server を開始すると、次のデフォルト URL で JSON 形式のメトリクスが利用可能になっています。
http://host:port/_stats
where host and port is the hostname/IP and port number of the server.
Plugin Options¶
-
--integer-counters
¶
This option causes the plugin to emit floating point and integral metric values as JSON numbers, rather then JSON strings. This can cause interoperability problems since integer metrics have a 64-bit unsigned range.
-
--wrap-counters
¶
This option wraps 64-bit unsigned values to the 64-bit signed range. This aids interoperability with Java, since prior to the Java SE 8 release, Java did not have a 64-bit unsigned type.
You can optionally modify the path to use, and this is highly recommended in a public facing server. For example:
stats_over_http.so 81c075bc0cca1435ea899ba4ad72766b
URL は例えば次のようになるでしょう。
https://host:port/81c075bc0cca1435ea899ba4ad72766b
不注意により秘密を平文で送った場合それが漏れる可能性があるので、これはせいぜい弱いセキュリティでしかありません。