Skip to content

Commit e581fe6

Browse files
committed
Update telemetry dashboards and Grafana configuration
- Updated `docker-compose.yml` to include additional environment variables for MQTT and PostgreSQL configuration. - Modified `datasources.yaml` to set unique IDs for MQTT and PostgreSQL datasources and adjusted connection settings.
1 parent b1cce80 commit e581fe6

9 files changed

Lines changed: 862 additions & 1474 deletions

README.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,9 @@ This allows real-time monitoring of vehicle performance, with Discord serving as
7979
- Enter the topic you want to subscribe to (e.g., `packet`).
8080
- Click on **Run Query** to see the telemetry data.
8181

82-
1. **Import Dashboard**:
83-
84-
- Navigate to **Dashboards** > **Manage**.
85-
- Click on **Import**.
86-
- Upload the JSON file for the dashboard or paste the JSON content directly.
87-
88-
1. **Select Data Source**:
89-
90-
- When prompted, select the MQTT data source you configured earlier.
91-
9282
1. **View Dashboard**:
93-
- Navigate to the dashboard you imported to view the telemetry data.
83+
- Navigate to **Dashboards** to view the telemetry dashboards. Dashboards are automatically synced from `grafana/dashboards/` in this repository via Grafana Git Sync.
84+
- To update a dashboard, see [grafana/DASHBOARD_WORKFLOW.md](grafana/DASHBOARD_WORKFLOW.md).
9485

9586
### Helpful Commands
9687

grafana/.env.example

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
MQTT_PASSWORD=yourpassword
21
MQTT_USERNAME=yourusername
2+
MQTT_PASSWORD=yourpassword
3+
MQTT_HOST=yourhost:1883
4+
35
POSTGRES_USERNAME=yourusername
46
POSTGRES_PASSWORD=yourpassword
5-
POSTGRES_HOST=yourhost
7+
POSTGRES_HOST=yourhost
8+
POSTGRES_SSLMODE=disable

grafana/DASHBOARD_WORKFLOW.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Dashboard Update Workflow
2+
3+
Edit dashboards locally, commit to `main`, and Grafana Cloud updates automatically via Git Sync.
4+
You can also edit dashboards directly in Grafana Cloud — changes are committed back to this repo automatically.
5+
6+
## Updating a dashboard from local
7+
8+
### 1. Start local Grafana
9+
10+
```bash
11+
cd grafana
12+
docker compose up -d
13+
```
14+
15+
Open http://localhost:3000 (admin / admin).
16+
17+
### 2. Edit the dashboard locally
18+
19+
Make your changes in local Grafana as usual.
20+
21+
### 3. Export the dashboard JSON
22+
23+
Save the dashboard in Grafana first (Ctrl+S), then export — this ensures the
24+
exported JSON reflects your latest changes.
25+
26+
1. Open the dashboard in local Grafana
27+
2. Click the **Share icon** (top right)
28+
3. Select the **Export** tab
29+
4. Click **Copy to clipboard**
30+
31+
### 4. Replace the file in git
32+
33+
Open the corresponding file in `grafana/dashboards/` and paste the clipboard
34+
content, replacing the entire file contents. The filename should stay the same.
35+
36+
### 5. Commit and push to `main`
37+
38+
Grafana Cloud syncs from the `main` branch every 60 seconds and picks up the changes automatically.
39+
40+
---
41+
42+
## Editing directly in Grafana Cloud
43+
44+
1. Edit the dashboard in Grafana Cloud as usual
45+
2. When saving, choose **Open pull request** to create a PR, or commit directly to `main`
46+
3. The change is reflected in the repo automatically
47+
48+
---
49+
50+
## Common mistakes
51+
52+
| Mistake | Result |
53+
| --- | --- |
54+
| Using "Share externally" instead of "Export" | Creates a public URL link — not what you want |
55+
| Editing a dashboard in Grafana Cloud without Git Sync active | Changes may be overwritten on next sync |

0 commit comments

Comments
 (0)