The Agent’s Kong check tracks total requests, response codes, client connections, and more.
Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the Autodiscovery Integration Templates for guidance on applying these instructions.
The Kong check is included in the Datadog Agent package, so you don’t need to install anything else on your Kong servers.
Edit the kong.d/conf.yaml
file, in the conf.d/
folder at the root of your Agent’s configuration directory.
Add this configuration block to your kong.d/conf.yaml
file to start gathering your Kong Metrics:
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
See the sample kong.d/conf.yaml for all available configuration options.
Available for Agent >6.0
Kong access logs are generated by NGINX, so the default location is the same as for NGINX files.
Collecting logs is disabled by default in the Datadog Agent, enable it in your datadog.yaml
file:
logs_enabled: true
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.
Run the Agent’s status subcommand and look for kong
under the Checks section.
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 |
The Kong check does not include any events.
kong.can_connect:
Returns CRITICAL
if the Agent cannot connect to Kong to collect metrics, otherwise returns OK
.
Need help? Contact Datadog support.
Mistake in the docs? Feel free to contribute!