Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,9 @@ This allows real-time monitoring of vehicle performance, with Discord serving as
- Enter the topic you want to subscribe to (e.g., `packet`).
- Click on **Run Query** to see the telemetry data.

1. **Import Dashboard**:

- Navigate to **Dashboards** > **Manage**.
- Click on **Import**.
- Upload the JSON file for the dashboard or paste the JSON content directly.

1. **Select Data Source**:

- When prompted, select the MQTT data source you configured earlier.

1. **View Dashboard**:
- Navigate to the dashboard you imported to view the telemetry data.
- Navigate to **Dashboards** to view the telemetry dashboards. Dashboards are automatically synced from `grafana/dashboards/` in this repository via Grafana Git Sync.
- To update a dashboard, see [grafana/DASHBOARD_WORKFLOW.md](grafana/DASHBOARD_WORKFLOW.md).

### Helpful Commands

Expand Down
7 changes: 5 additions & 2 deletions grafana/.env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
MQTT_PASSWORD=yourpassword
MQTT_USERNAME=yourusername
MQTT_PASSWORD=yourpassword
MQTT_HOST=host.docker.internal:1883

POSTGRES_USERNAME=yourusername
POSTGRES_PASSWORD=yourpassword
POSTGRES_HOST=yourhost
POSTGRES_HOST=host.docker.internal:5432
POSTGRES_SSLMODE=disable
55 changes: 55 additions & 0 deletions grafana/DASHBOARD_WORKFLOW.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Dashboard Update Workflow

Edit dashboards locally, commit to `main`, and Grafana Cloud updates automatically via Git Sync.
You can also edit dashboards directly in Grafana Cloud — changes are committed back to this repo automatically.

## Updating a dashboard from local

### 1. Start local Grafana

```bash
cd grafana
docker compose up -d
```

Open http://localhost:3000 (admin / admin).

### 2. Edit the dashboard locally

Make your changes in local Grafana as usual.

### 3. Export the dashboard JSON

Save the dashboard in Grafana first (Ctrl+S), then export — this ensures the
exported JSON reflects your latest changes.

1. Open the dashboard in local Grafana
2. Click the **Share icon** (top right)
3. Select the **Export** tab
4. Click **Copy to clipboard**

### 4. Replace the file in git

Open the corresponding file in `grafana/dashboards/` and paste the clipboard
content, replacing the entire file contents. The filename should stay the same.

### 5. Commit and push to `main`

Grafana Cloud syncs from the `main` branch every 60 seconds and picks up the changes automatically.

---

## Editing directly in Grafana Cloud

1. Edit the dashboard in Grafana Cloud as usual
2. When saving, choose **Open pull request** to create a PR, or commit directly to `main`
3. The change is reflected in the repo automatically

---

## Common mistakes

| Mistake | Result |
| --- | --- |
| Using "Share externally" instead of "Export" | Creates a public URL link — not what you want |
| Editing a dashboard in Grafana Cloud without Git Sync active | Changes may be overwritten on next sync |
Loading
Loading