./gradlew build run
- Clone augustomarinho/docker-composes.git
git clone https://github.com/augustomarinho/docker-composes.git
- Run Prometheus
docker-compose -f ./prometheus/docker-compose.yml up -d --force-recreate
The Prometheus can be access in http://localhost:9000/
- Run Grafana
docker-compose -f ./grafana/docker-compose.yml up -d --force-recreate
The Grafana can be access in http://localhost:9001/
Follow these steps:
- In the login page fill
admin
for user andadmin
for password - Grafana will ask you to create a new password. Change the password
- Access Configuration/Data Sources
- Click on
Add data source
- Select Prometheus
- In field HTTP/ URL fill with
http://host.docker.internal:9000
- Click on Save & Test
After these steps, you'll see the popup message Data source is working
Timer Metrics
curl -X GET "http://localhost:8084/v1/api/metrics/timer?name=augusto"
DistributionSummary
curl -X GET "http://localhost:8084/v1/api/metrics/histogram?name=augusto"
Counter
curl -X GET "http://localhost:8084/v1/api/metrics/counter?name=augusto"