1
votes

We are working on the Monitoring and Alerting mechanism for Spring boot application hosted on the physical server. After some research, decided to go with

Actuators - To monitor application in every aspects

Prometheus - Metric store

Grafana - For Dashboard visualization and alerting

Everything going well until Prometheus comes in to the picture. Am facing an issue in feeding the metrics to metric store.

prometheus.yml

scrape_configs: - job_name: 'spring-actuator' metrics_path: '/actuator/prometheus' scrape_interval: 5s static_configs: - targets: ['localhost:8080']

Prometheus server logs

level=info ts=2020-02-05T15:05:20.873Z caller=main.go:762 msg="Completed loading of configuration file" filename=prometheus.yml level=info ts=2020-02-05T15:05:20.873Z caller=main.go:617 msg="Server is ready to receive web requests."

Prometheus Dashboard showing no data to display.

Side Note, Spring Boot Services are up and it returning data when localhost:8080/actuator/prometheus is being hit. Disabled the sensitivity of Actuator endpoints.

actuator/prometheus endpoint result:

Spring Boot Micrometer Resp

1
is grafana actually running on the same host? Running in docker doesn't count as localhost in a docker image will keep the request within the instance.samael
Spring boot app, Prometheus, Grafana are all running on my local machine. No docker involved hereKrupa
could you add the whole output in txt? and second question - are you actually querying any Prometheus metrics in the dashboard?KompiKompi

1 Answers

0
votes

There is too little info to be able to answer this question, but whenever I saw the no data to display it had to do with metrics inconsistency, incorrectly set up gauges or bad queries.

You need to look for error/potential problems in your actuator/prometheus endpoint, there might be some information about this.

I will be glad to help if you submit the endpoint output.