根据link - https://www.eclipse.org/ditto/installation-operating.html中的说明,每个Ditto服务都会打开一个HTTP端点,它在端口9095上提供Prometheus指标。Ditto将自动在端点http://container-host-or-ip:9095/上发布收集的指标。
Eclipse ditto已成功安装到我的机器上。但是prometheus终结点不可用。
我使用docker镜像安装了同上版本。在docker-compose.yml文件中,我找不到任何有关安装prometheus的信息。
如果我遗漏了什么,请告诉我。
发布于 2019-08-30 14:06:00
没错,正如https://www.eclipse.org/ditto/installation-operating.html#configuring所说,Ditto打开了一个端口9095,并将其发布到http://<container-host-or-ip>:9095/metrics上(/metrics是普罗米修斯·斯克拉珀的默认预期路径),就像你的问题的评论中提到的那样。但是,端口9095不会通过Docker公开,因此您只能在Docker网络内访问它。
如果你想使用普罗米修斯,你必须自己将它添加到docker-compose.yml中,或者让它加入运行Ditto的现有Docker网络中。然后配置普罗米修斯从http://<container-host-or-ip>:9095/metrics上的所有Ditto容器中抓取数据。在这里你可以找到更多关于如何配置Prometheus的信息:https://prometheus.io/docs/introduction/first_steps/#configuring-prometheus
当您使用Kubernetes时,您可能会受益于一个特殊的Prometheus配置:https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config
https://stackoverflow.com/questions/57701516
复制相似问题