A dashboard is a visual workspace for organizing related measurements, status information, and time-series visualizations. In Grafana, dashboards connect to data sources and can support alerts. section 6.1.1
A Grafana dashboard brings together:
- Data sources such as Prometheus, MySQL, Amazon CloudWatch, and Jaeger. section 6.1.1
- Related visualizations, including panels driven by parameterized PromQL queries. section 6.1.1
- Variables that let viewers change query parameters, such as an HTTP response-code filter. section 6.1.1
A practical Grafana dashboard
Run Grafana with Prometheus through Docker Compose, configure the Prometheus data source, and build a panel using rate(prometheus_http_requests_total{code="$test"}[5m]). A dashboard variable then changes the displayed response-code series without rewriting the panel. section 6.1.1
Listing 6.1 The Docker Compose configuration for the Grafana instance
version: "3.5"
services:
grafana:
image: grafana/grafana-oss:9.1.4
ports:
- "3000:3000"
volumes:
- ./grafana.ini:/etc/grafana/grafana.ini #1
- ./ds.yaml:/etc/grafana/provisioning/datasources/datasource.yaml #2
depends_on:
- prometheus
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- ./prom-config.yaml:/etc/prometheus/prometheus.yml
Use the Docker Compose configuration to launch Grafana and Prometheus together, expose their local ports, and provision configuration files. section 6.1.1














