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: