nginx-ingress-controller

Supported OS Linux Windows Mac OS

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

To find out if this integration is available in your organization, see your Datadog Integrations page or ask your organization administrator.

To initiate an exception request to enable this integration for your organization, email [email protected].

概要

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

セットアップ

インストール

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

構成

ホスト

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.connect.duration.count
(gauge)
Count of upstream connection time per Ingress
nginx_ingress.controller.connect.duration.sum
(gauge)
Sum of upstream connection time per Ingress
Shown as second
nginx_ingress.controller.cpu.time
(count)
Cpu usage in seconds
Shown as second
nginx_ingress.controller.header.duration.count
(gauge)
Count of time to receive the response header from the upstream server per Ingress
nginx_ingress.controller.header.duration.sum
(gauge)
Sum of time to receive the response header from the upstream server per Ingress
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.request.size.count
(gauge)
The count of request size
nginx_ingress.controller.request.size.sum
(gauge)
The sum of request size
Shown as byte
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.response.size.count
(gauge)
Count of response size per Ingress
nginx_ingress.controller.response.size.sum
(gauge)
Sum of response size per Ingress
Shown as byte
nginx_ingress.controller.upstream.latency.count
(gauge)
[Deprecated] Count of upstream service latency per Ingress
nginx_ingress.controller.upstream.latency.quantile
(gauge)
[Deprecated] Quantiles of upstream service latency per Ingress
Shown as second
nginx_ingress.controller.upstream.latency.sum
(gauge)
[Deprecated] 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 のサポートチームまでお問い合わせください。