This guide explains how to set up the local environment for grafana.
- Docker and Docker Compose
- WSL2 (for Windows users)
The easiest way to get started is using the given Docker Compose file:
sudo docker compose up -dThis will start:
- Grafana server
The application will be available at http://localhost:3000
Login with default credentials: Write Access:
- Username:
admin - Password:
admin
- Open Grafana in your web browser:
http://localhost:3000 - Log in with your credentials (default: admin/admin).
- Click on the "+" icon on the left sidebar and select "Dashboard".
- Click on "Import dashboard" to import the dashboard of this project.
- Upload the JSON file located in the
dashboardsfolder of this project.
- Grafana:
http://localhost:3000
# Stop all services
sudo docker compose downCheckout the OpenAPI Swagger UI: https://pegel-online.api.bund.dev/
Example request url to find closest Pegel to Weimar:
https://www.pegelonline.wsv.de/webservices/rest-api/v2/stations.json?includeTimeseries=false&includeCurrentMeasurement=false&includeCharacteristicValues=false&latitude=50.98314563623132&longitude=11.322992457260446&radius=100
Closest Pegel to Weimar is:
{
"uuid": "003200ab-d138-49d9-aa52-217817941f85",
"number": "166640",
"shortname": "ILMENAU",
"longname": "ILMENAU",
"km": 12,
"agency": "REGIONALSTELLE SUHL",
"longitude": 10.928842587394035,
"latitude": 50.680942368697885,
"water": {
"shortname": "ILM",
"longname": "ILM"
}
}Example request url to get water level data for ILMENAU Pegel:
https://www.pegelonline.wsv.de/webservices/rest-api/v2/stations/003200ab-d138-49d9-aa52-217817941f85/W/measurements.json?start=2022-02-06T09%3A00%3A00%2B01%3A00
Data will be returned in json format.
[
{
"timestamp": "2025-09-27T01:15:00+02:00",
"value": 15
},
...,
{
"timestamp": "2025-10-28T01:30:00+02:00",
"value": 15
},
]