Search code examples
prometheusgrafanaeclipse-dittoeclipse-ioteclipse-digital-twin

Eclipse Ditto - Prometheus not installing by default


As per the instructions in the link - https://www.eclipse.org/ditto/installation-operating.html each Ditto service opens a HTTP endpoint, where it provides the Prometheus metrics on port 9095.Ditto will automatically publish gathered metrics at the endpoint http://container-host-or-ip:9095/.

Eclipse ditto is successfully installed in my machine. But prometheus endpoint is not available.

I installed ditto using the docker images. In docker-compose.yml file , I cannot find any information regarding the installation of prometheus.

Please let me know if I am missing something.


Solution

  • That's right, as https://www.eclipse.org/ditto/installation-operating.html#configuring states, Ditto opens a port 9095 and publishes it metrics - on http://<container-host-or-ip>:9095/metrics (/metrics is the default expected path by Prometheus scraper) as mentioned in the comments to your question already. The port 9095 is however not exposed via Docker, so you will only be able to access it inside the Docker network.

    If you want to use Prometheus, you have to add it yourself to the docker-compose.yml or let it join the existing Docker network in which Ditto is running. Then configure Prometheus to scrape data from all Ditto containers on http://<container-host-or-ip>:9095/metrics. Here you can find more on how to configure Prometheus: https://prometheus.io/docs/introduction/first_steps/#configuring-prometheus

    When you use Kubernetes, you might benefit from a special Prometheus config for that: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config