# Kong's Prometheus plugin not returning all metrics

**URL:** <https://discuss.konghq.com/t/kongs-prometheus-plugin-not-returning-all-metrics/4477>\
**Category:** Questions\
**Created:** [September 23, 2019, 6:13pm UTC](https://discuss.konghq.com/t/kongs-prometheus-plugin-not-returning-all-metrics/4477 "2019-09-23T18:13:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![reloaded](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@reloaded](https://discuss.konghq.com/u/reloaded)\
**Post date:** [September 23, 2019, 6:13pm UTC](https://discuss.konghq.com/t/kongs-prometheus-plugin-not-returning-all-metrics/4477/1 "2019-09-23T18:13:03Z")

</div>

Hello,

I followed the documentation for the [Prometheus Kong plugin](https://github.com/Kong/kong-plugin-prometheus) and setup was a breeze, but Kong isn’t returning all the metric data. Comparing my metrics with the sample output in Kong’s Prometheus repository reveals my setup is missing a lot of metrics. As expected loading the Kong Grafana dashboard only shows 3-4 charts populated with data while all the others report no data.

```auto
jharris@jharris-XPS-15-9570:~/Repository/helm.kong$ curl http://192.168.99.103:32449/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"} 183
kong_nginx_http_current_connections{state="active"} 2
kong_nginx_http_current_connections{state="handled"} 183
kong_nginx_http_current_connections{state="reading"} 0
kong_nginx_http_current_connections{state="total"} 1153
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

```

```auto
jharris@jharris-XPS-15-9570:~/Repository/helm.kong$ minikube service list
|---------------|-----------------------------------------------|--------------------------------|
| NAMESPACE | NAME | URL |
|---------------|-----------------------------------------------|--------------------------------|
| kong | kong-kong-admin | http://192.168.99.103:32449 |
| kong | kong-kong-proxy | http://192.168.99.103:30263 |
| | | http://192.168.99.103:30986 |
|---------------|-----------------------------------------------|--------------------------------|

```

Kong’s helm chart version: 0.17.0  
Kong version: 1.3.0

```auto
jharris@jharris-XPS-15-9570:~/Repository/helm.kong$ kubectl logs kong-kong-57fc5b995d-cmlfd -n kong -c ingress-controller
-------------------------------------------------------------------------------
Kong Ingress controller
  Release: 0.5.0
  Build: 922ae26b
  Repository: git@github.com:Kong/kubernetes-ingress-controller.git
  Go: go1.12.6
-------------------------------------------------------------------------------

I0923 17:58:16.533105 1 main.go:303] Creating API client for https://10.96.0.1:443
I0923 17:58:16.541224 1 main.go:347] Running in Kubernetes Cluster version v1.15 (v1.15.2) - git (clean) commit f6278300bebbb750328ac16ee6dd3aa7d3549568 - platform linux/amd64
I0923 17:58:16.658425 1 main.go:148] kong version: 1.3.0
I0923 17:58:16.658448 1 main.go:151] Kong datastore: off
I0923 17:58:16.778408 1 controller.go:235] starting Ingress controller
I0923 17:58:16.781372 1 status.go:199] new leader elected: kong-kong-57fc5b995d-lx68w
I0923 17:58:16.827690 1 controller.go:128] successfully synced configuration to Kong
I0923 17:58:53.758971 1 controller.go:128] successfully synced configuration to Kong
I0923 17:58:56.292814 1 controller.go:128] successfully synced configuration to Kong
I0923 17:58:59.614192 1 controller.go:128] successfully synced configuration to Kong

```

Here’s my helm chart config:

```auto
replicaCount: 3

postgresql:
  enabled: false

cassandra:
  enabled: false

ingressController:
  enabled: true
  replicaCount: 3

admin:
  useTLS: false
  annotations:
    prometheus.io/scrape: "true"
    prometheus.io/port: 8444

readinessProbe:
  httpGet:
    scheme: HTTP

livenessProbe:
  httpGet:
    scheme: HTTP

env:
  database: "off"

dblessConfig:
  config:
    _format_version: "1.1"
    plugins:
    - name: prometheus

```

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [September 24, 2019, 3:43pm UTC](https://discuss.konghq.com/t/kongs-prometheus-plugin-not-returning-all-metrics/4477/2 "2019-09-24T15:43:17Z")

</div>

> [@reloaded](#):
>
> e, but Kong isn’t returning all the metric data. Comparing my metrics with the sample output in Kong’s Prometheus repository reveals my setup is missing a lot of metrics. As expected loading the Kong Grafana dashboard only shows 3-4 charts populated with data while all the others

You shouldn’t be using Ingress Controller and dbless configuration at the same time.  
The DB-less configuration (`dblessConfig`) will be replaced by Kong Ingress Controller.

Please create a CRD KongPlugin with name and plugin set to `Prometheus`.

Have a look at the following guide:  
[https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/guides/prometheus-grafana.md](https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/guides/prometheus-grafana.md)

---

<div class="post-metadata">

**Author:** ![valiantljk](https://avatars.discourse-cdn.com/v4/letter/v/87869e/32.png) [@valiantljk](https://discuss.konghq.com/u/valiantljk)\
**Post date:** [April 20, 2020, 9:36pm UTC](https://discuss.konghq.com/t/kongs-prometheus-plugin-not-returning-all-metrics/4477/4 "2020-04-20T21:36:01Z")

</div>

I followed the guide, but still can not see the metrics on prometheus

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [April 22, 2020, 6:32pm UTC](https://discuss.konghq.com/t/kongs-prometheus-plugin-not-returning-all-metrics/4477/5 "2020-04-22T18:32:04Z")

</div>

Do you see Kong listed in the targets page in prometheus?

---

<div class="post-metadata">

**Author:** ![avirupnandi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/avirupnandi/32/2821_2.png) [@avirupnandi](https://discuss.konghq.com/u/avirupnandi)\
**Post date:** [October 1, 2021, 12:35pm UTC](https://discuss.konghq.com/t/kongs-prometheus-plugin-not-returning-all-metrics/4477/6 "2021-10-01T12:35:02Z")

</div>

Hi, I am also facing the same issue, I used ServiceMonitor initially which gave me list of matrices:  
kong\_memory\_lua\_shared\_dict\_bytes  
kong\_memory\_lua\_shared\_dict\_total\_bytes  
kong\_datastore\_reachable  
kong\_memory\_workers\_lua\_vms\_bytes  
kong\_nginx\_http\_current\_connections  
kong\_nginx\_metric\_errors\_total  
kong\_upstream\_target\_health

But after installing global plugin [Prometheus plugin | Kong Docs](https://docs.konghq.com/hub/kong-inc/prometheus/#enable-the-plugin-globally), I did not get any extra matrices. Also added below annotations to pod:

[prometheus.io/scrape:](http://prometheus.io/scrape:) “true”  
[prometheus.io/port:](http://prometheus.io/port:) 8100

But did not help.

What could be the reason?

---

<div class="post-metadata">

**Author:** ![Hamza\_Ismaeel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hamza_ismaeel/32/4748_2.png) [@Hamza\_Ismaeel](https://discuss.konghq.com/u/Hamza_Ismaeel)\
**Post date:** [November 20, 2024, 7:45am UTC](https://discuss.konghq.com/t/kongs-prometheus-plugin-not-returning-all-metrics/4477/7 "2024-11-20T07:45:00Z")

</div>

I have also tried multiple ways but still facing the same issue, I can only get few metrics in Prometheus, I have followed this documentation:

[Using Prometheus and Grafana - Kong Ingress Controller | Kong Docs](https://docs.konghq.com/kubernetes-ingress-controller/latest/production/observability/prometheus-grafana/)

if anyone knows the solution please share with us.

Thank you!

---

<div class="post-metadata">

**Author:** ![Javin\_Bach](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/javin_bach/32/4889_2.png) [@Javin\_Bach](https://discuss.konghq.com/u/Javin_Bach)\
**Post date:** [April 21, 2025, 9:52pm UTC](https://discuss.konghq.com/t/kongs-prometheus-plugin-not-returning-all-metrics/4477/8 "2025-04-21T21:52:23Z")

</div>

I was facing the same issue. FYI the metrics that you are getting aren’t coming from the kong prometheus plugin but simply basic metrics exposed by the ingress-controller. To actually get the proxy metrics i.e. kong\_request\_latency\_ms\_bucket; you need to ensure the prometheus plugin that you installed was picked up by Kong which can be verified by checking the /plugins endpoint of the kong-admin-api i.e. `curl -k https://<kong-admin-api-url>:<kong-admin-api-port>/plugins | jq`
