Optional Service - Observability stack with Prometheus and Grafana.
- Prometheus: Collects metrics from cAdvisor (containers) and Node Exporter (infrastructure).
- Grafana: Visualization and dashboards for metrics
Traefik must be running first as it's mandatory for all services.
-
Configure Environment Variables:
- Duplicate the
env.examplefile to.env - Fill in information in the environment file.
- Duplicate the
-
Launch the stack with Docker Compose:
docker compose up -d. -
Navigate to your Grafana URL (setted in the env file :
GRAFANA_DOMAIN. -
to connect, use the values specified in the env file :
GF_ADMIN_SECURITY_USERandGF_ADMIN_SECURITY_PASSWORD. -
Configure Data Source:
- In the Grafana sidebar, click on Configuration (gear icon) and then Data Sources.
- Click Add data source, choose Prometheus, and set the URL to
http://prometheus:9090. - Click Save & Test.
-
Dashboard Setup (Optional):
- Import pre-built dashboards by clicking the + icon on the left sidebar and selecting Import.
Tip
You can use dashboard IDs from the Grafana Dashboard Library
