FastAPI Prometheus Grafana
docker compose up
http://127.0.0.1:8000/hello?name=Erdinc
Returns
{
"greeting": "Hello Erdinc!"
}
To post things
curl -X POST -H "Content-Type: application/json" -d '{"name": "Erdinc", "city": "London", "age": 25}' http://127.0.0.1:8000/things
Returns
{
"response": "Hello Erdinc! 25 years old from London."
}
You can access Prometheus at http://localhost:9090 and explore the metrics collected
You can access the Grafana board at http://localhost:3000 with default username and password (admin/admin)