Introduction :
Every application that is deployed on production needs some kind of monitoring to see how the application is performing. This will give you some insights on whether the application is performing as expected or if you would need to take some action in order to obtain the desired level of performance. In the modern world, this data is called Application Performance Metrics (APM).
Today we will be looking at two open-source tools called Grafana and Prometheus. Prometheus gathers and stores metrics data in a time series format while Grafana uses Prometheus as a data source to visualize the data on dashboards.
Prerequisite :
https://www.docker.com/products/docker-desktop/
Prometheus Configuration :
docker pull prom/prometheus
https://www.mediafire.com/file/zabiamfbv8viuyt/prometheus.yaml/file
You will find file like below snapshot
Replace endpoint to your service endpoint like http://192.168.29.155:8080/
docker run -p 9090:9090 -v <replace with your downloaded prometheus.yaml file path>/prometheus.yml prom/prometheus
Select any metric and click on execute
Grafana Configuration :
docker run -d -p 3000:3000 grafana/grafana-enterprise
Add Datasource
Move the cursor over the Prometheus Time series database
Enter the endpoint url of the prometheus server in the URL text box below. And click on Save & test
Create new dashboard
Select any metric from list and click Run queries
Share: