Skip to content

Latest commit

 

History

History

kong

Kong Integration

Overview

The Agent's Kong check tracks total requests, response codes, client connections, and more.

Setup

Installation

The Kong check is included in the Datadog Agent package, so you don't need to install anything else on your Kong servers.

Configuration

Host

Follow the instructions below to configure this check for an Agent running on a host. For containerized environments, see the Containerized section.

Metric collection
  1. Add this configuration block to your kong.d/conf.yaml file in the conf.d/ folder at the root of your Agent's configuration directory to start gathering your Kong Metrics. See the sample kong.d/conf.yaml for all available configuration options.

    init_config:
    
    instances:
      ## @param kong_status_url - string - required
      ## URL where Kong exposes its status.
      #
      - kong_status_url: http://localhost:8001/status/
  2. Restart the Agent.

Log collection

Available for Agent versions >6.0

Kong access logs are generated by NGINX, so the default location is the same as for NGINX files.

  1. Collecting logs is disabled by default in the Datadog Agent, enable it in your datadog.yaml file:

    logs_enabled: true
  2. Add this configuration block to your kong.d/conf.yaml file to start collecting your Kong Logs:

    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

    Change the path and service parameter values and configure them for your environment. See the sample kong.d/conf.yaml for all available configuration options.

  3. Restart the Agent.

Containerized

For containerized environments, see the Autodiscovery Integration Templates for guidance on applying the parameters below.

Metric collection
Parameter Value
<INTEGRATION_NAME> kong
<INIT_CONFIG> blank or {}
<INSTANCE_CONFIG> {"kong_status_url": "http://%%host%%:8001/status/"}
Log collection

Available for Agent versions >6.0

Collecting logs is disabled by default in the Datadog Agent. To enable it, see Kubernetes log collection documentation.

Parameter Value
<LOG_CONFIG> {"source": "kong", "service": "<SERVICE_NAME>"}

Validation

Run the Agent's status subcommand and look for kong under the Checks section.

Data Collected

Metrics

See metadata.csv for a list of metrics provided by this integration.

Events

The Kong check does not include any events.

Service Checks

kong.can_connect:
Returns CRITICAL if the Agent cannot connect to Kong to collect metrics, otherwise returns OK.

Troubleshooting

Need help? Contact Datadog support.

Further Reading