Supported OS Linux Windows Mac OS

インテグレーションバージョン2.6.0

概要

このチェックでは、Kubernetes の NGINX Ingress Controller を監視します。F5 NGINX Ingress Controller を監視するには、NGINX Prometheus Exporter が提供するリストから目的のメトリクスを監視するように Datadog Prometheus インテグレーションをセットアップしてください。

計画と使用

インフラストラクチャーリスト

nginx-ingress-controller チェックは Datadog Agent パッケージに含まれているため、サーバーに追加でインストールする必要はありません。

ブラウザトラブルシューティング

メトリクスベース SLO

Agent がホストで実行されている場合は、Agent のコンフィギュレーションディレクトリのルートにある conf.d/ フォルダーの nginx_ingress_controller.d/conf.yaml ファイルを編集します。使用可能なすべてのコンフィギュレーションオプションについては、サンプル nginx_ingress_controller.d/conf.yaml を参照してください。次に、Agent を再起動します。

コンテナ化

コンテナ環境の場合は、オートディスカバリーのインテグレーションテンプレートのガイドを参照して、次のパラメーターを適用してください。

メトリクスの収集

デフォルトでは、NGINX のメトリクスは nginx-ingress-controller チェックによって収集されますが、Ingress Controller に対して標準の nginx チェックを実行できると便利な場合があります。

これは、Agent から NGINX のステータスページに到達できるようにすることで実現できます。それには、コントローラーで nginx-status-ipv4-whitelist 設定を使用し、コントローラーポッドにオートディスカバリーアノテーションを追加します。

たとえば、以下のアノテーションは、nginx および nginx-ingress-controller のチェックとログ収集を共に有効にします。

パラメーター
<INTEGRATION_NAME>["nginx","nginx_ingress_controller"]
<INIT_CONFIG>[{},{}]
<INSTANCE_CONFIG>[{"nginx_status_url": "http://%%host%%:18080/nginx_status"},{"prometheus_url": "http://%%host%%:10254/metrics"}]

使用可能なすべての構成オプションの詳細については、sample nginx_ingress_controller.d/conf.yaml を参照してください。

: nginx-ingress-controller の 0.23.0 以降のバージョンでは、ポート18080 でリッスンしている nginx サーバーは削除されました。構成 ConfigMap に次の http-snippet を追加することで復元できます。

  http-snippet: |
    server {
      listen 18080;

      location /nginx_status {
        allow all;
        stub_status on;
      }

      location / {
        return 404;
      }
    }

収集データ

Agent バージョン 6.0 以降で利用可能

Datadog Agent で、ログの収集はデフォルトで無効になっています。有効にする方法については、Kubernetes ログ収集を参照してください。

パラメーター
<LOG_CONFIG>[{"service": "controller", "source": "nginx-ingress-controller"}]

検証

Agent の status サブコマンドを実行し、Checks セクションで nginx_ingress_controller を探します。

リアルユーザーモニタリング

データセキュリティ

nginx_ingress.controller.cpu.time
(count)
Cpu usage in seconds
Shown as second
nginx_ingress.controller.last.reload.success
(gauge)
Whether the last configuration reload attempt was successful
nginx_ingress.controller.mem.resident
(gauge)
Resident memory size in bytes
Shown as byte
nginx_ingress.controller.mem.virtual
(gauge)
Virtual memory size in bytes
Shown as byte
nginx_ingress.controller.reload.success
(count)
Cumulative number of Ingress controller reload operations
nginx_ingress.controller.request.duration.count
(gauge)
The count of request processing time
nginx_ingress.controller.request.duration.sum
(gauge)
The sum of request processing time
Shown as millisecond
nginx_ingress.controller.requests
(count)
The total number of client requests
Shown as request
nginx_ingress.controller.response.duration.count
(gauge)
Count of response duration per Ingress
nginx_ingress.controller.response.duration.sum
(gauge)
Sum of response duration per Ingress
Shown as second
nginx_ingress.controller.upstream.latency.count
(gauge)
Count of upstream service latency per Ingress
nginx_ingress.controller.upstream.latency.quantile
(gauge)
Quantiles of upstream service latency per Ingress
Shown as second
nginx_ingress.controller.upstream.latency.sum
(gauge)
Sum of upstream service latency per Ingress
Shown as second
nginx_ingress.nginx.bytes.read
(count)
Number of bytes read
Shown as byte
nginx_ingress.nginx.bytes.write
(count)
Number of bytes written
Shown as byte
nginx_ingress.nginx.connections.current
(gauge)
Current number of client connections with state
Shown as connection
nginx_ingress.nginx.connections.total
(count)
Total number of connections with state
Shown as connection
nginx_ingress.nginx.cpu.time
(count)
Cpu usage in seconds
Shown as second
nginx_ingress.nginx.mem.resident
(gauge)
Resident memory size in bytes
Shown as byte
nginx_ingress.nginx.mem.virtual
(gauge)
Virtual memory size in bytes
Shown as byte
nginx_ingress.nginx.process.count
(gauge)
Number of nginx processes
Shown as process
nginx_ingress.nginx.requests.total
(count)
Total number of client requests
Shown as request

ヘルプ

NGINX Ingress Controller には、イベントは含まれません。

ヘルプ

NGINX Ingress Controller には、サービスのチェック機能は含まれません。

ヘルプ

ご不明な点は、Datadog のサポートチームまでお問合せください。