Kong 1.4 to 1.4.1 - Prometheus plugin compatibility/changes

Hi!

We have just upgraded Kong from 1.4 to 1.4.1 in a kubernetes environment. Installed with Helm from stable/kong-0-19.1.

At the moment everything is right except the Prometheus with the Kong plugin. With the 1.4 version was working perfectly and now it seems that admin API doesn’t support GET /metrics.

This is the error throw by the pod:

   2019-12-04 15:02:50
content_by_lua(nginx-kong.conf:198):2: in main chunk, client: 100.96.1.39, server: kong_admin, request: "GET /metrics HTTP/1.1", host: "100.96.2.66:8444"
2019-12-04 15:02:50
/usr/local/share/lua/5.1/kong/init.lua:1122: in function 'admin_content'
2019-12-04 15:02:50
/usr/local/share/lua/5.1/lapis/nginx.lua:230: in function 'serve'
2019-12-04 15:02:50
/usr/local/share/lua/5.1/lapis/application.lua:173: in function 'dispatch'
2019-12-04 15:02:50
[C]: in function 'xpcall'
2019-12-04 15:02:50
/usr/local/share/lua/5.1/lapis/application.lua:167: in function </usr/local/share/lua/5.1/lapis/application.lua:165>
2019-12-04 15:02:50
/usr/local/share/lua/5.1/lapis/application.lua:130: in function 'resolve'
2019-12-04 15:02:50
/usr/local/share/lua/5.1/lapis/application.lua:397: in function 'handler'
2019-12-04 15:02:50
100.96.1.39 - - [04/Dec/2019:14:02:50 +0000] "GET /metrics HTTP/1.1" 405 32 "-" "Prometheus/2.12.0"
2019-12-04 15:02:50
[C]: in function 'resume'
2019-12-04 15:02:50
coroutine 1:
2019-12-04 15:02:50
[C]: ?
2019-12-04 15:02:50
coroutine 0:
2019-12-04 15:02:50
stack traceback:
2019-12-04 15:02:50
2019/12/04 14:02:50 [error] 34#0: *1665871 lua coroutine: runtime error: don't know how to respond to GET

and this is the kongPlugin manifest:

apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"configuration.konghq.com/v1","kind":"KongPlugin","metadata":{"annotations":{},"labels":{"global":"true"},"name":"prometheus","namespace":"prod"},"plugin":"prometheus"}
  creationTimestamp: "2019-10-09T06:12:34Z"
  generation: 1
  labels:
    global: "false"
  name: prometheus
  namespace: prod
  resourceVersion: "2133"
  selfLink: /apis/configuration.konghq.com/v1/namespaces/prod/kongplugins/prometheus
  uid: c8cb74f8-ea5b-11e9-9c10-027d1765881c
plugin: prometheus

I’ve verified that this is indeed a bug:


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ