我使用普罗米修斯与Grafana通过启用Prometheus插件在孔上监控KongAPI网关。
我们的Kong架构使用专用的一台服务器用于控制平面,另一台服务器用于数据平面。
我需要在这三台服务器上启用Prometheus插件吗?
服务器的度量是否不同,因此我需要配置Prometheus,以便从所有服务器收集度量?
非常感谢您的支持。
发布于 2022-11-04 12:44:21
Do I need to enable Prometheus plugin on the three servers ?
由于您使用混合模式部署部署Kong,所以在控制平面上应用Prometheus插件(通过Admin API或Kong Manager)。将插件应用到控制平面后,数据平面将被配置为公开Prometheus端点。
然后,假设您在两个数据平面上禁用管理API,则可以使用status API对这些指标进行刮除。
# setting status listen in kong.conf to expose port 8100
(it can be configured as https endpoint the same way as proxy_listen)
status_listen = 0.0.0.0:8100
设置此公开端口8100,普罗米修斯将将其公开为:8100/度量
例如prometheus配置:
- job_name: kong
static_configs:
- targets:
- <CP-ip>:8100
- <DP1-ip>:8100
- <DP2-ip>:8100
Are Metrics of the servers different so that I need to configure Prometheus to collect the metrics from all servers ?
这些度量标准将“略有”不同(仅在DPs上使用e.g.proxy度量),但这些度量标准将包含实例IP:
例如:kong_memory_lua_shared_dict_bytes{instance="IP:8100", job="kong", kong_subsystem="http", shared_dict="kong"}
此外,Kong的Grafana仪表板已经考虑了多个实例,因此如果您使用上面的配置来刮取度量标准,Grafana将在图中绘制3行代码,每一行表示一个实例( 1CP +2 DPs)
https://stackoverflow.com/questions/74143892
复制相似问题