The Service Map for APM is here!

nginx-ingress-controller

Agent Check Agent Check

Supported OS: Linux Mac OS Windows

Overview

This check monitors the kubernetes NGINX Ingress Controller.

Setup

Installation

The nginx-ingress-controller check is included in the Datadog Agent package, so you do not need to install anything else on your server.

Configuration

Metric collection

  1. Edit the nginx_ingress_controller.d/conf.yaml file, in the conf.d/ folder at the root of your Agent’s configuration directory to start collecting your NGINX ingress controller metrics. See the sample nginx_ingress_controller.d/conf.yaml for all available configuration options.

  2. Restart the Agent.

Log Collection

Available for Agent >6.0

(...)
  env:
    (...)
    - name: DD_LOGS_ENABLED
        value: "true"
    - name: DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL
        value: "true"
(...)

Configuration of the nginx check (optional)

By default nginx metrics are collected by the nginx-ingress-controller check but for convenience you might want to run the regular nginx check on the ingress controller.

You achieve so by making the nginx status page reachable from the agent by using the nginx-status-ipv4-whitelist setting on the controller and adding autodiscovery annotations to the controller pod.

For example these annotations enable both the nginx and nginx-ingress-controller checks and the log collection:

ad.datadoghq.com/nginx-ingress-controller.check_names: '["nginx","nginx_ingress_controller"]'
ad.datadoghq.com/nginx-ingress-controller.init_configs: '[{},{}]'
ad.datadoghq.com/nginx-ingress-controller.instances: '[{"nginx_status_url": "http://%%host%%/nginx_status"},{"prometheus_url": "http://%%host%%:10254/metrics"}]'
ad.datadoghq.com/nginx-ingress-controller.logs: '[{"service": "controller", "source":"nginx-ingress-controller"}]'

Validation

Run the Agent’s status subcommand and look for nginx_ingress_controller under the Checks section.

Data Collected

Metrics

nginx_ingress.nginx.connections.current
(gauge)
Current number of client connections with state
shown as connection
nginx_ingress.nginx.connections.total
(counter)
Total number of connections with state
shown as connection
nginx_ingress.nginx.requests.total
(counter)
Total number of client requests
shown as request
nginx_ingress.nginx.process.count
(gauge)
Number of nginx processes
shown as process
nginx_ingress.nginx.bytes.read
(counter)
Number of bytes read
shown as byte
nginx_ingress.nginx.bytes.write
(counter)
Number of bytes written
shown as byte
nginx_ingress.nginx.cpu.time
(counter)
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.controller.reload.success
(counter)
Cumulative number of Ingress controller reload operations
nginx_ingress.controller.upstream.latency.count
(gauge)
Count of upstream service latency per Ingress
nginx_ingress.controller.upstream.latency.sum
(gauge)
Sum of upstream service latency per Ingress
shown as second
nginx_ingress.controller.upstream.latency.quantile
(gauge)
Quantiles of upstream service latency per Ingress
shown as second
nginx_ingress.controller.requests
(counter)
The total number of client requests
shown as request
nginx_ingress.controller.cpu.time
(counter)
Cpu usage in seconds
shown as second
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

Service Checks

nginx-ingress-controller does not include any service checks.

Events

nginx-ingress-controller does not include any events.

Troubleshooting

Need help? Contact Datadog support.


Mistake in the docs? Feel free to contribute!