Grafana Dashboard
The exporter includes a Grafana dashboard that shows all your metrics.
⭐ Quick Start: Official Grafana.com Dashboard
The easiest way to start is to import our official dashboard from the Grafana library.
- Open your Grafana UI and go to Dashboards > Import.
- Under "Import via grafana.com", enter the Dashboard ID:
25651. - Click Load, select your Prometheus data source, and you're done!
You can also find the raw grafana/dashboard.json file in the repository if you want to import it yourself.
1. Manual Import from File (UI)
To add the dashboard manually:
- Open your Grafana UI.
- In the sidebar, hover over the Dashboards icon and click Import.
- You can either:
- Click Upload JSON file and select the
grafana/dashboard.jsonfile. - Or, open
dashboard.jsonin a text editor, copy its contents, and paste it into the Import via panel json text box.
- Click Upload JSON file and select the
- Select your Prometheus data source from the dropdown.
- Click Import.
2. Automatic Provisioning (Environment Variables & Volumes)
For production (like Docker Compose or Kubernetes), you can provision the dashboard automatically.
You can use Grafana Provisioning to load the dashboard.
Docker Compose Example
You need to mount two things to your Grafana container:
- A config file that tells Grafana where to find dashboards.
- The actual
dashboard.jsonfile.
Create a file named dashboard-provider.yaml:
apiVersion: 1
providers:
- name: 'Synthetic Exporter'
orgId: 1
folder: ''
type: file
disableDeletion: false
editable: true
options:
path: /var/lib/grafana/dashboardsThen, configure your docker-compose.yml to mount these files:
services:
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
volumes:
# 1. Mount the provisioning configuration
- ./dashboard-provider.yaml:/etc/grafana/provisioning/dashboards/provider.yaml:ro
# 2. Mount the dashboard JSON into the path specified in the provider
- ./grafana/dashboard.json:/var/lib/grafana/dashboards/synthetic-exporter.json:roWhen Grafana starts, it reads the config, checks the /var/lib/grafana/dashboards directory, and loads the dashboard.
TIP
If you use Kubernetes, you can store dashboard.json in a ConfigMap and mount it to your Grafana pod. You can also use the Grafana sidecar to find ConfigMaps with a specific label (like grafana_dashboard: "1").
