Search code examples
elasticsearcheclipse-ditto

How to send Eclipse ditto metrics to ElasticSearch


I am running eclipse ditto on localhost:8080 and in every service, I have set

  environment:
  - SYSTEM_METRICS_ENABLED=true
  - PROMETHEUS_ENABLED=true
  - PROMETHEUS_HOSTNAME=0.0.0.0
  - PROMETHEUS_PORT=9095

also, I included Prometheus in same docker-compose.yml and prometheus.yml looks like

    global:
     scrape_interval: 30s
     scrape_configs:
       - job_name: 'ditto'
         scrape_interval: 5s
         scrape_timeout: 5s
         metrics_path: '/metrics'
         scheme: 'http'
         dns_sd_configs:
            - names:
                - 'things'
                - 'things-search'
                - 'policies'
                - 'connectivity'
                - 'gateway'
              type: 'A'
              port: 9095
       relabel_configs:
         - source_labels: [__meta_dns_name]
           target_label: instance

But now I want to send the metrics to ElasticSearch, given I have included it in the same docker-compose. So, how to do it?


Solution

  • Why would you want the metrics in Elasticsearch? You already have them in Prometheus, from there you can eg visualize them with Grafana.

    I understand elasticsearch used for operating Ditto as a logging backend as eg part of the ELK stack. Do you understand it differently?