how to connect Kong prometheus plugin to Grafana using docker?

1.5k Views Asked by At

I'm using Kong with KONGA as GUI and added Prometheus plugin for monitoring, however when I try to add the data source to Grafana using Kong endpoint http://host.docker.internal:8001/metrics I always get the below error

Error reading Prometheus: client_error: client error: 404.

How can I connect Grafana data source to localhost:8001/metrics?

1

There are 1 best solutions below

0
Matey Aryeh On

Ok, you have one missing piece in your architecture. You need to add Prometheus as well which will scrape the metrics from Kong. This is the architecture you should have:

Kong metrics (8001/metrics) -> Prometheus (9090) -> Grafana

The metrics from Kong will be ingested by Prometheus from time to time and used to create a series database of the metrics obtained.

You will then add Prometheus as a data source in Grafana which will then make all the metrics collected by Prometheus available to Grafana for viewing in a dashboard. Here is the official dashboard for Kong.