简体   繁体   中英

How to expose metrics to Prometheus from springboot application CF cluster

I am developing an application from scratch using Springboot (Jhipster) and intend to deploy in a cloudfoundry with multiple nodes. Planning to setup prometheus server which can pull metrics from the cluster.

I am trying to understand how can I setup Prometheus to query individual nodes of the cluster. As the application is deployed in cloud foundry, it may not be possible to obtain the ip address of individual nodes.

As I am newbie with Prometheus, want to make sure I am solutioning appropriately.

I would recommend using Micrometer.io

You can use either service discovery (eg Netflix Eureka) or use the Pushgateway in some form. https://prometheus.io/docs/instrumenting/pushing/ https://prometheus.github.io/client_java/io/prometheus/client/exporter/PushGateway.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM