Collect Metrics with Datadog

You can use Kong Gateway and the Prometheus plugin to collect metrics in Datadog.

Prerequisites

Connect the Prometheus plugin to Datadog

Using Datadog Agent 6, you can connect Datadog to the Prometheus endpoint to start collecting metrics.

After enabling the Prometheus plugin for Kong Gateway, create a Datadog Agent openmetrics.d configuration at /etc/datadog-agent/conf.d/openmetrics.d/conf.yaml. This tells the agent to begin scraping metrics from Kong Gateway.

The following is an example configuration for pulling all the kong_ prefixed metrics:

  1. instances:
  2. - prometheus_url: http://localhost:8001/metrics
  3. namespace: "kong"
  4. metrics:
  5. - kong_*

For more information about collecting metrics using Prometheus and the Datadog Agent, see Prometheus and OpenMetrics metrics collection from a host.