Get a DemoStart Free TrialSign In


Ship logs from Kong to Logstash

Follow this step by step guide to get 'logs' from your system to

Step 1 - Ensure Kong is Installed Correctly

This guide recommends using the TCP Log Kong plugin. Please see the TCP Log Documentation for more detailed information.

Please ensure that you have Kong installed and at least one Kong service setup before continuing.

Instructions on how to install Kong, as well as how to setup a Kong service, can be found in the Kong Documentation.

Step 2 - Installing

You can either configure the TCP Log plugin to work with a Kong Service, Route or Consumer:

To configure the plugin to work on a Service, use:

No TCP/TCP-SSL input available! Your stack is missing the required input for this data source Talk to support to add the input

Step 3 - Sending Logs

You can test sending a log from Kong by sending a request to the service url:

curl --url http://kong:8000/ --header 'Host:'

This will display a log in You can use your stack's Logstash filters to better structure incoming Kong logs.

Step 4 - Check for your logs

Now you should view your data:

View my data

If you don't see logs take a look at How to diagnose no data in Stack below for how to diagnose common issues.

Step 5 - how to diagnose no data in Stack

If you don't see data appearing in your Stack after following the steps, visit the Help Centre guide for steps to diagnose no data appearing in your Stack or Chat to support now.

Step 6 - Kong Logging Overview

Kong is an open source Lua app created on Nginx that is commonly used as an API gateway for microservices. The application is highly scalable & provides users with load balancing, authentication, and a variety of other useful functionality through the addition of plugins.

Kong is also known as an API middleware as it gives users a way to securely manage communication between clients and microservices. As well as being able to scale horizontally, Kong also benefits from being able to run across on premise, cloud & hybrid cloud environments.

The application generates a wide variety of logs with varying severities for further analysis & parsing including debug, info, warn, error, crit & general Kong access logs.

If we were to look at a few of the priority logging types we would want to focus on warning logs to spot any early issues we can get ahead of, error logs to observe at what rate they are being created & critical logs to discover why Kong may not be functioning as expected.

With all these log types it can be hard to know where to start to grasp a top level view of the overall health of your Kong services. Our Kong log analyser can centralise all of your Kong & any additional Nginx log data in a single platform for observability, reporting & reducing your mean time to resolution (MTTR). uses highly available tools including Logtstash, Kibana & Elasticsearch to help you make the most out of log analysis & container monitoring to make your business’s infrastructure fully scalable & ready for growth.

If you need any further help to analyse your Kong logs we're here to help. Feel free to reach out by contacting the support team via live chat & we'll respond shortly.

Return to Search
Sign Up

© 2023 Ltd, All rights reserved.