Kong / kong-plugin-prometheus

Prometheus plugin for Kong - this plugin has been moved into https://github.com/Kong/kong, please open issues and PRs in that repo
Apache License 2.0
119 stars 57 forks source link

Not able to get prometheus metrics from kong #102

Closed srajput1991 closed 3 years ago

srajput1991 commented 3 years ago

2020/10/08 03:41:32 [error] 27#0: *640010028 lua entry thread aborted: runtime error: ...cal/share/lua/5.1/kong/plugins/prometheus/prometheus.lua:620: attempt to index field '_counter' (a nil value) stack traceback: coroutine 0: ...cal/share/lua/5.1/kong/plugins/prometheus/prometheus.lua: in function 'metric_data' ...cal/share/lua/5.1/kong/plugins/prometheus/prometheus.lua:666: in function 'collect' ...local/share/lua/5.1/kong/plugins/prometheus/exporter.lua:239: in function 'collect' content_by_lua(servers.conf:12):3: in main chunk, client: xxxxx, server: kong_prometheus_exporter, request: "GET /metrics HTTP/1.1", host: "xxxxxx:9542"

hbagdi commented 3 years ago

This happens because of an older bug in Kong. What is the version of kong you are using?

srajput1991 commented 3 years ago

it is 2.1.0 version.

hbagdi commented 3 years ago

Can you please upgrade to 2.1.4?

srajput1991 commented 3 years ago

Yeah we can try it. Is it a bug in 2.1.0??

kikito commented 3 years ago

Kong 2.2.0 was just released, you could try it now instead.

fffonion commented 3 years ago

Closing for inactivity, please reopen if needed.