Search code examples
loggingprometheusjhipstergrafanametrics

What are the metrics sent to Prometheus + Grafana in a generated jhipster project?


I running a gateway and a microservice using jhipster docker compose and i have chosen to generate metrics with prometheus but i couldn't visualize what's in the grafana because the gateway failed to run?

Can anyone tell me what application metrics are normally provided to prometheus+grafana? And does logs are also provided to prometheus?


Solution

  • Metrics are sent to Prometheus if this property is set to true:

    management:
      metrics:
        export:
          prometheus:
            enabled: true
    

    For more details check documentation for Spring Boot Actuator and Spring Metrics. You'll find the name of all metrics exported to Prometheus/Grafana.

    Logs and metrics are 2 different things, logs are not sent to Prometheus, logs are either written to file system or sent to Elasticsearch through Logstash.

    As of version 7, JHipster does not provide any ELK stack docker deployment and ready to use dashboards but the log export using logback logstash appender is still configured. So, you can either configure your own docker-compose ELK starting from an existing one or use one from a cloud provider (Elastic Cloud, AWS, Datadog, ....). It's not that difficult now that you have to deal only with logs, in the past JHipster used also ELK for metrics and this was a large part of the ELK dashboards they provided.