Skip to content

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.

  1. Open your Grafana UI and go to Dashboards > Import.
  2. Under "Import via grafana.com", enter the Dashboard ID: 25651.
  3. 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:

  1. Open your Grafana UI.
  2. In the sidebar, hover over the Dashboards icon and click Import.
  3. You can either:
    • Click Upload JSON file and select the grafana/dashboard.json file.
    • Or, open dashboard.json in a text editor, copy its contents, and paste it into the Import via panel json text box.
  4. Select your Prometheus data source from the dropdown.
  5. 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:

  1. A config file that tells Grafana where to find dashboards.
  2. The actual dashboard.json file.

Create a file named dashboard-provider.yaml:

yaml
apiVersion: 1
providers:
  - name: 'Synthetic Exporter'
    orgId: 1
    folder: ''
    type: file
    disableDeletion: false
    editable: true
    options:
      path: /var/lib/grafana/dashboards

Then, configure your docker-compose.yml to mount these files:

yaml
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:ro

When 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").

Released under the MIT License.