Monitoring with StatsD
This guide will help you setup a test Kong Gateway and StatsD service. Then you will generate sample requests to Kong Gateway and observe the collected monitoring data.
- is used to run StatsD and supporting services locally.
- curl is used to send requests to Kong Gateway. is pre-installed on most systems.
Install Kong Gateway:
Once the Kong Gateway is ready, you will see the following message:
✔ Kong is ready!
Run a StatsD container to capture monitoring data:
Install the StatsD Kong Gateway plugin, configuring the hostname and port of the listening StatsD service:
curl -X POST http://localhost:8001/plugins/ \
--data "config.port=8125"
Generate sample traffic to the mock service. This allows you to observe metrics generated from the StatsD plugin. The following command generates 60 requests over one minute. Run the following in a new terminal:
Query the StatsD management interface to see the collected metrics from Kong Gateway:
echo "counters" | nc localhost 8126
You should see a response similar to the following:
Once you are done experimenting with StatsD and Kong Gateway, you can use the following commands to stop and remove the software ran in this guide:
curl -Ls https://get.konghq.com/quickstart | bash -s -- -d
- See the for information about Kong Gateway’s tracing capabilities.