- 重要な情報
- はじめに
- 用語集
- ガイド
- エージェント
- インテグレーション
- OpenTelemetry
- 開発者
- API
- CoScreen
- アプリ内
- Service Management
- インフラストラクチャー
- アプリケーションパフォーマンス
- 継続的インテグレーション
- ログ管理
- セキュリティ
- UX モニタリング
- 管理
Supported OS
Agent の Kong チェックは、合計リクエスト数、応答コード数、クライアント接続数などを追跡します。
また、Kong の Datadog プラグインを使用すると、DogStatsD を使用して Datadog Agent を通じて Datadog に API、接続、データベースメトリクスを送信することができます。詳しくは、Datadog インテグレーションによる Kong の監視のブログ投稿をお読みください。
Kong チェックは Datadog Agent パッケージに含まれています。Kong サーバーに追加でインストールする必要はありません。
ホストで実行中の Agent に対してこのチェックを構成するには:
Prometheus プラグインを有効にすることで、OpenMetrics のメトリクスが Kong サービスで公開されることを確認します。これは、Agent が Kong のメトリクスを収集する前に、最初に構成する必要があります。
Kong メトリクスの収集を開始するには、Agent の構成ディレクトリのルートにある conf.d/
フォルダーの kong.d/conf.yaml
ファイルにこの構成ブロックを追加します。使用可能なすべての構成オプションについては、サンプル kong.d/conf.yaml を参照してください。
init_config:
instances:
## @param openmetrics_endpoint - 文字列 - 必須
## OpenMetrics 形式のメトリクスを公開するURL。
#
- openmetrics_endpoint: http://localhost:8001/metrics
注: 現在のバージョンのチェック (1.17.0+) は、メトリクスの収集に OpenMetrics を使用しており、これは Python 3 を必要とします。Python 3 を使用できないホスト、またはこのチェックのレガシーバージョンを使用する場合は、次の構成を参照してください。
Agent バージョン 6.0 以降で利用可能
Kong アクセスログは NGINX によって生成されます。したがって、デフォルトの場所は NGINX ファイルと同じです。
Datadog Agent で、ログの収集はデフォルトで無効になっています。以下のように、datadog.yaml
ファイルでこれを有効にします。
logs_enabled: true
Kong のログの収集を開始するには、次の構成ブロックを kong.d/conf.yaml
ファイルに追加します。
logs:
- type: file
path: /var/log/nginx/access.log
service: '<SERVICE>'
source: kong
- type: file
path: /var/log/nginx/error.log
service: '<SERVICE>'
source: kong
path
パラメーターと service
パラメーターの値を変更し、環境に合わせて構成してください。使用可能なすべての構成オプションの詳細については、サンプル kong.d/conf.yaml を参照してください。
Prometheus プラグインを有効にすることで、OpenMetrics のメトリクスが Kong サービスで公開されることを確認します。これは、Agent が Kong のメトリクスを収集する前に、最初に構成する必要があります。 コンテナ環境では、オートディスカバリーインテグレーションテンプレートを参照して、以下のパラメーターを適用するためのガイダンスを確認してください。
パラメーター | 値 |
---|---|
<インテグレーション名> | kong |
<初期コンフィギュレーション> | 空白または {} |
<インスタンスコンフィギュレーション> | {"openmetrics_endpoint": "http://%%host%%:8001/metrics"} |
Agent バージョン 6.0 以降で利用可能
Datadog Agent で、ログの収集はデフォルトで無効になっています。有効にする方法については、Kubernetes ログ収集のドキュメントを参照してください。
パラメーター | 値 |
---|---|
<LOG_CONFIG> | {"source": "kong", "service": "<サービス名>"} |
Agent の status サブコマンドを実行し、Checks セクションで kong
を探します。
kong.bandwidth.count (count) | [OpenMetrics V2] (Kong < 3) The total bandwidth in bytes consumed per service/route in Kong Shown as byte |
kong.bandwidth.bytes.count (count) | [OpenMetrics V2] (Kong v3+) The total bandwidth in bytes consumed per service/route in Kong Shown as byte |
kong.http.consumer.status.count (count) | [OpenMetrics V2] (Kong < 3) HTTP status codes for customer per service/route in Kong Shown as request |
kong.http.status (count) | [OpenMetrics V2] (Kong < 3) HTTP status codes per service/route in Kong Shown as request |
kong.request.latency.ms.count (count) | [OpenMetrics V2] (Kong v3+) The latency added by Kong to requests Shown as millisecond |
kong.request.latency.ms.bucket (count) | [OpenMetrics V2] (Kong v3+) The latency added by Kong to requests Shown as millisecond |
kong.request.latency.ms.sum (count) | [OpenMetrics V2] (Kong v3+) The latency added by Kong to requests Shown as millisecond |
kong.upstream.latency.ms.count (count) | [OpenMetrics V2] (Kong v3+) The upstream latency added by Kong Shown as millisecond |
kong.upstream.latency.ms.bucket (count) | [OpenMetrics V2] (Kong v3+) The upstream latency added by Kong Shown as millisecond |
kong.upstream.latency.ms.sum (count) | [OpenMetrics V2] (Kong v3+) The upstream latency added by Kong Shown as millisecond |
kong.kong.latency.ms.count (count) | [OpenMetrics V2] (Kong v3+) The latency of Kong specifically Shown as millisecond |
kong.kong.latency.ms.bucket (count) | [OpenMetrics V2] (Kong v3+) The latency of Kong specificially Shown as millisecond |
kong.kong.latency.ms.sum (count) | [OpenMetrics V2] (Kong v3+) The latency of Kong specifically Shown as millisecond |
kong.session.duration.ms (count) | [OpenMetrics V2] (Kong v3+) The duration of a Kong stream Shown as millisecond |
kong.http.requests.count (count) | [OpenMetrics V2] (Kong v3+) Http Status codes per service/route in Kong Shown as request |
kong.latency.bucket (count) | [OpenMetrics V2] (Kong < 3) The latency added by Kong, total request time and upstream latency for each service/route in Kong Shown as millisecond |
kong.latency.count (count) | [OpenMetrics V2] (Kong < 3) The latency added by Kong, total request time and upstream latency for each service/route in Kong Shown as millisecond |
kong.latency.sum (count) | [OpenMetrics V2] (Kong < 3) The latency added by Kong, total request time and upstream latency for each service/route in Kong Shown as millisecond |
kong.memory.lua.shared_dict.bytes (gauge) | [OpenMetrics V2] The allocated slabs in bytes in a shared_dict Shown as byte |
kong.memory.lua.shared_dict.total_bytes (gauge) | [OpenMetrics V2] The total capacity in bytes of a shared_dict Shown as byte |
kong.memory.workers.lua.vms.bytes (gauge) | [OpenMetrics V2] The allocated bytes in worker Lua VM Shown as byte |
kong.nginx.http.current_connections (gauge) | [OpenMetrics V2] (Kong < 3) The number of HTTP connections Shown as connection |
kong.nginx.stream.current_connections (gauge) | [OpenMetrics V2] (Kong < 3) The number of stream connections Shown as connection |
kong.nginx.connections.total (gauge) | [OpenMetrics V2] (Kong v3+) The number of HTTP and stream connections Shown as connection |
kong.nginx.requests.total (gauge) | [OpenMetrics V2] (Kong v3+) The number of total Nginx connections Shown as request |
kong.stream.status.count (count) | [OpenMetrics V2] The stream status codes per service/route in Kong Shown as request |
kong.nginx.timers (gauge) | [OpenMetrics v2] (Kong v2.8+) Total number of Nginx timers in Running or Pending state. Shown as item |
kong.connections_accepted (gauge) | [Legacy] Total number of accepted client connections. Shown as connection |
kong.connections_active (gauge) | [Legacy] Current number of active client connections including Waiting connections. Shown as connection |
kong.connections_handled (gauge) | [Legacy] Total number of handled connections. (Same as accepts unless resource limits were reached). Shown as connection |
kong.connections_reading (gauge) | [Legacy] Current number of connections where Kong is reading the request header. Shown as connection |
kong.connections_waiting (gauge) | [Legacy] Current number of idle client connections waiting for a request. Shown as connection |
kong.connections_writing (gauge) | [Legacy] Current number of connections where nginx is writing the response back to the client. Shown as connection |
kong.total_requests (gauge) | [Legacy] Total number of client requests. Shown as request |
Kong チェックには、イベントは含まれません。
kong.can_connect
Agent が Kong インスタンスに接続できない場合は、CRITICAL
を返します。それ以外の場合は、OK
を返します。
Statuses: ok, クリティカル
ご不明な点は、Datadog のサポートチームまでお問合せください。