Kong's Prometheus plugin not returning all metrics - Docker

I have setup kong using docker. I followed the documentation for the setup but Kong isn’t returning all the metric data. Comparing my metrics with the sample output in Kong’s Prometheus repository shows I am missing a lot of metrics.

> curl http://localhost:8001/metrics
> # HELP kong_datastore_reachable Datastore reachable from Kong, 0 is unreachable
> # TYPE kong_datastore_reachable gauge
> kong_datastore_reachable 1
> # HELP kong_nginx_http_current_connections Number of HTTP connections
> # TYPE kong_nginx_http_current_connections gauge
> kong_nginx_http_current_connections{state="accepted"} 136
> kong_nginx_http_current_connections{state="active"} 2
> kong_nginx_http_current_connections{state="handled"} 136
> kong_nginx_http_current_connections{state="reading"} 0
> kong_nginx_http_current_connections{state="total"} 810
> kong_nginx_http_current_connections{state="waiting"} 1
> kong_nginx_http_current_connections{state="writing"} 1
> # HELP kong_nginx_metric_errors_total Number of nginx-lua-prometheus errors
> # TYPE kong_nginx_metric_errors_total counter
> kong_nginx_metric_errors_total 0

I have referred to this post. But it is a Kubernetes setup. Kong's Prometheus plugin not returning all metrics

I asked the same question and it’s only returning data when the routes are being hit buy a HTTP client :slight_smile:

I tried HTTP with no luck. I have tried enabling the plugin at both service and route level.

Kong is placed behind a load balancer if it helps. kong version = 1.3.0

Yes, this is how the plugin is intended to work. If you want metrics for a service, please ensure that it is receiving traffic.