Prometheus And Grafana Exercise App
First Steps
-
Move to home directory and run .sh file
./start.sh
-
Or run the following command
docker compose up -d
-
Wait until all the containers are up and running
-
Check the status of the containers
docker ps
-
Open the browser and go to http://localhost:9090 for Prometheus
-
Check "spring-boot-app" Target is UP in Prometheus
-
Open the browser and go to http://localhost:3000 for Grafana
-
Login with the following credentials
username: admin password:admin
-
Click on the
⚙
sign on the left side of the screen and selectData Sources
-
Click on
Add data source
and selectPrometheus
-
Enter the following details
URL: http://prometheus:9090 Timeout: 8 Scrap interval: 10s Query timeout: 10s Type: Prometheus Version: > 2.40.x
-
Click on
Save & Test
and you should see a green message sayingData source is working
-
Click on
Dashboards
on the left side of the screen and selectImport
-
Click on
Upload .json file
and select theTest-Dashboard.json
file from theenv
directory -
Click on
Import
and you should see a green message sayingImport successful
-
Click on
Home
on the left side of the screen and selectspring-boot-app
-
You should see the following dashboard
-
Enjoy!
Postman Collection
- Import the
prometheus-grafana-exercises.postman_collection.json
file from theenv
directory to Postman