Every time request localhost:8001/metrics, kong-cp-kong-pod will prompt a license-related error
Is there an existing issue for this?
- [X] I have searched the existing issues
Kong version ($ kong version)
Kong Enterprise 3.4.3.8
Current Behavior
curl localhost:8001/metrics
root@kong-demo:~# kubectl logs -f -n kong kong-cp-kong-d589b9-r5xgv
...
2024/05/23 13:54:50 [error] 2397#0: *716 [kong] exporter.lua:118 cannot read kong.license when collecting license info, client: 10.1.23.100, server: kong_admin, request: "GET /metrics HTTP/1.1", host: "localhost:8001"
10.1.23.100 - - [23/May/2024:13:54:50 +0000] "GET /metrics HTTP/1.1" 200 9503 "-" "curl/8.5.0"
Expected Behavior
I would like to know what is causing the license related logs,Does this have any impact when using Kong? The version checked through kong version seems to be the Enterprise version. I deployed it according to this document Are the versions checked through kong version for both the community version and the enterprise version the Enterprise version?
Steps To Reproduce
No response
Anything else?
No response
@1473371932 The docker image kong/kong-gateway:3.4.3.8 is the enterprise version of the Kong Gateway, the community version doesn't check the enterprise license.
You can check out the community version from https://hub.docker.com/_/kong/.
@1473371932 The docker image
kong/kong-gateway:3.4.3.8is the enterprise version of the Kong Gateway, the community version doesn't check the enterprise license.You can check out the community version from https://hub.docker.com/_/kong/.
@ADD-SP Hello, with your help in the previous step, the version has now been switched back to the community version
kong@kong-cp-kong-66f54f4b67-xg595:/$ kong version
3.4.2
But in the Kong Grafana panel, there is no corresponding metrics, such as kong_upstream_target_health kong_http_requests_total kong_bandwidth_bytes.
Do I need to do any special configuration to enable these metrics? If so, can you provide a reference document?
curl -X POST http://10.1.23.100:8001/plugins/ \
--header "accept: application/json" \
--header "Content-Type: application/json" \
--data '
{
"name": "prometheus",
"config": {
"per_consumer": true,
"status_code_metrics": true,
"latency_metrics": true,
"bandwidth_metrics": true,
"upstream_health_metrics": true
}
}
'
root@kong-demo:~/kong# curl -s http://10.1.23.100:8001/plugins/ | jq
{
"next": null,
"data": [
{
"enabled": true,
"id": "00d66dd7-3b3f-4d0e-8004-8f0ad2cf5100",
"instance_name": null,
"config": {
"bandwidth_metrics": true,
"upstream_health_metrics": true,
"latency_metrics": true,
"per_consumer": true,
"status_code_metrics": true
},
"created_at": 1716472031,
"service": null,
"consumer": null,
"updated_at": 1716472031,
"tags": null,
"route": null,
"protocols": [
"grpc",
"grpcs",
"http",
"https"
],
"name": "prometheus"
}
]
}
Currently, only data related to Nginx Caching is displayed in the dashboard. Metrics from other panels are not present.
@1473371932 would you mind to change the title of this issue? now it is not related to license. Or you could open a new issue.
This issue is marked as stale because it has been open for 14 days with no activity.
Dear contributor,
We are automatically closing this issue because it has not seen any activity for three weeks. We're sorry that your issue could not be resolved. If any new information comes up that could help resolving it, please feel free to reopen it.
Your contribution is greatly appreciated!
Please have a look our pledge to the community for more information.
Sincerely, Your Kong Gateway team
@chronolaw I have the same question. My understanding is that the Prometheus plugin can be used on Kong Enterprise Free (i.e. without a paid license).
How would I turn off the unactionable logs?