Multi-panel build ยท Variables ยท Assignment 3 guidance
| Time | Segment | Activity |
|---|---|---|
| 0โ10 min | Setup Check | Verify Grafana running, producer running, data flowing |
| 10โ20 min | Design Principles | What makes a dashboard useful vs pretty |
| 20โ50 min | Lab Part 1 | Build stock monitor dashboard (4 panels) |
| 50โ65 min | Lab Part 2 | Add variable dropdown + alert summary panel |
| 65โ75 min | Transactions Dashboard | Quick build from L10 transactions-topic data |
| 75โ85 min | Design Review | Student dashboards โ what works, what doesn't |
| 85โ90 min | A3 Guidance | Assignment 3 requirements and tips |
The most common mistake: Building a dashboard that answers "What data do I have?" โ instead of "What decision does this dashboard support?"
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ Stock Monitor [Symbol: INFY โผ] [Last 30 min โผ] โ โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ Current โ Open โ โ โ Price โ Alerts โ INFY Price (30 min) โ โ (Stat) โ (Stat) โ (Time Series) โ โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโค โ โ Price Change from โโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ Last Batch (%) โ Alert Log (Table) โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค Latest 5 alerts โ โ Min / Max Bar Gauge โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Query: stock_prices collection, match symbol=INFY, sort by _saved_at desc, limit 1, project price
{
"collection": "stock_prices",
"aggregate": [
{ "$match": { "symbol": "INFY" } },
{ "$sort": { "_saved_at": -1 } },
{ "$limit": 1 },
{ "$project": { "_id": 0, "price": 1 } }
]
}
Settings: Visualisation = Stat | Unit = โน | Thresholds = none (price level is neutral)
{
"collection": "stock_alerts",
"aggregate": [
{ "$match": { "status": "open" } },
{ "$count": "value" }
]
}
Thresholds: 0โ2 = green | 3โ5 = amber | 6+ = red
Discussion: Ask students โ "What threshold makes sense for your Assignment 3 dataset?" There is no universal answer; the business context determines urgency.
{
"collection": "stock_prices",
"aggregate": [
{ "$match": { "symbol": "INFY", "_saved_at": { "$gte": "$__from" } } },
{ "$sort": { "_saved_at": 1 } },
{ "$project": { "_id": 0, "time": "$_saved_at", "price": 1 } }
]
}
Settings: Line width = 2 | Fill opacity = 10 | Unit = โน | Tooltip = All
{
"collection": "stock_alerts",
"aggregate": [
{ "$sort": { "alert_at": -1 } },
{ "$limit": 5 },
{ "$project": {
"_id": 0, "symbol": 1,
"mean_price": "$stats.mean",
"min": "$stats.min", "max": "$stats.max",
"reason": { "$arrayElemAt": ["$alert_reasons", 0] },
"time": "$alert_at"
}}
]
}
Settings: Visualisation = Table | Sort by Time descending
Variables make dashboards reusable โ one dashboard works for INFY and TCS instead of building two.
symbol | Type: Custom | Values: INFY, TCS | Default: INFY"symbol": "INFY" with "symbol": "$symbol" in all panel queries.The dropdown now filters all panels simultaneously โ one click switches the entire dashboard from INFY to TCS.
Quick build using the transactions-topic data from Lecture 10. Use as a second pattern reference for Assignment 3.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ Transaction Monitor [City: All โผ] [1h โผ] โ โโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ Total Txns โ Transaction Volume โ โ Last Hour โ Time Series โ count per min โ โ (Stat) โ โ โโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ Avg Amount per Minute โ Top Cities โ โ (Time Series) โ (Bar Chart) โ โโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโ
Queries follow the same pattern as stock panels โ change collection to transactions and field names to match your L10 schema (amount, city, timestamp).
For each dashboard, evaluate:
| Question | What to Look For |
|---|---|
| Does it answer a clear business question? | "Who is the user? What decision are they making?" โ one sentence |
| Is colour usage consistent? | Red = alert/bad, Green = normal. No decorative red on neutral data. |
| Is the refresh rate appropriate? | 30s is fine for demos; 5s for live risk monitoring |
| Are axes labelled with units? | Always: โน, count, %, minutes โ never raw numbers without context |
| Is the time range visible? | Users should always know what window of data they are looking at |
Due: 1 October | 15 marks
Create a dashboard for the analysis of your consumed data (the domain from A1, streamed in A2).
| Requirement | Detail |
|---|---|
| Minimum 4 panels | At least 1 time series, 1 stat/KPI, 1 table |
| Real data | Connected to your Kafka consumer data (MongoDB or InfluxDB) |
| 1 variable/filter | Makes the dashboard interactive |
| Colour thresholds | Reflect actual business logic โ not default colours |
| Explanation | 200-word write-up: what business question each panel answers |
Submission: Export dashboard JSON (Dashboard โ Share โ Export JSON) + screenshots. Upload to GitHub with tag [A3][SDA-1], [A3][SDA-2], or [A3][SDA-G].
Quality signal: Write this before building: "As a [role] at [company type], I want to see [metric] so that I can [decision]." Students who write this user story first consistently produce better dashboards.
Configure Grafana alert rules on your dashboards, route notifications to email or Slack, and design an alerting strategy that creates action โ not noise.