Eclipse Ditto-Prometheus默认情况下未安装

时间:2019-08-29 00:27:48

标签: grafana prometheus eclipse-ditto eclipse-iot digital-twin

按照链接中的说明-https://www.eclipse.org/ditto/installation-operating.html,每个Ditto服务都会打开一个HTTP端点,该端点在端口9095上提供Prometheus指标。Ditto将在端点http://container-host-or-ip:9095/上自动发布收集的指标。 / p>

Eclipse ditto已成功安装在我的计算机中。但是普罗米修斯端点不可用。

我使用docker镜像安装了ditto。 在docker-compose.yml文件中,我找不到有关prometheus安装的任何信息。

请让我知道我是否缺少任何东西。

1 个答案:

答案 0 :(得分:1)

是的,如https://www.eclipse.org/ditto/installation-operating.html#configuring所述,Ditto打开了端口9095并发布其度量标准-在注释中提到的http://<container-host-or-ip>:9095/metrics/metrics是Prometheus scraper的默认预期路径)上对你的问题已经。 但是,端口9095不会通过Docker公开,因此您只能在Docker网络内部访问它。

如果要使用Prometheus,则必须将其自己添加到docker-compose.yml或让它加入运行Ditto的现有Docker网络。 然后将Prometheus配置为从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