Datadog-Kong Integration

Overview

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

Setup

Installation

The Kong check is packaged with the Agent, so simply install the Agent on your Kong servers. If you need the newest version of the check, install the dd-check-kong package.

Configuration

Create a kong.yaml in the Datadog Agent’s conf.d directory. See the sample kong.yaml for all available configuration options:

init_config:

instances:
# Each instance needs a `kong_status_url`. Tags are optional.
-   kong_status_url: http://example.com:8001/status/
    tags:
    - instance:foo
#-   kong_status_url: http://example2.com:8001/status/
#    tags:
#    - instance:bar

Restart the Agent to begin sending Kong metrics to Datadog.

Validation

Run the Agent’s info subcommand and look for kong under the Checks section:

  Checks
  ======
    [...]

    kong
    -------
      - instance #0 [OK]
      - Collected 26 metrics, 0 events & 1 service check

    [...]

Compatibility

The kong check is compatible with all major platforms.

Data Collected

Metrics

kong.table.count
(gauge)
Total number of tables in the database.
shown as table
kong.table.items
(gauge)
Number of items in each table of the database.
shown as row
kong.connections_accepted
(gauge)
Total number of accepted client connections.
shown as connection
kong.connections_active
(gauge)
Current number of active client connections including Waiting connections.
shown as connection
kong.connections_handled
(gauge)
Total number of handled connections. (Same as accepts unless resource limits were reached).
shown as connection
kong.connections_reading
(gauge)
Current number of connections where Kong is reading the request header.
shown as connection
kong.connections_waiting
(gauge)
Current number of idle client connections waiting for a request.
shown as connection
kong.connections_writing
(gauge)
Current number of connections where nginx is writing the response back to the client.
shown as connection
kong.total_requests
(gauge)
Total number of client requests.
shown as request

Events

The Kong check does not include any event at this time.

Service Checks

kong.can_connect:

Returns CRITICAL if the Agent cannot connect to Kong to collect metrics, otherwise OK.

Troubleshooting

Need help? Contact Datadog Support.

Further Reading