Skip to content

Commit bd31298

Browse files
committed
grafana: relay overview redesign + platform drill-down dashboard
Overview: branded host banner (logo, endpoints, hw/os/uptime/relay-time, version badge), ECharts CPU/RAM/Disk gauges, MoQ aggregate mini-cards with peak-over-range, Loss/drops + p95-RTT overload pair, app-level BW in/out, peer/namespace/track tables with namespace->track cascade scoping ($namespace/$track vars), overlaid subscriptions-per-track graph. New moqx-platform dashboard: host resource/network timeseries, load, event loop, logs placeholder (linked from gauge/BW panels). Known limit: template variables do not render on the PUBLIC (shared) dashboard URL — scoped panels are empty there until a var-free public variant is split out.
1 parent 2ed29c8 commit bd31298

3 files changed

Lines changed: 2735 additions & 210 deletions

File tree

docker/grafana/provisioning/dashboards/moqx-overview.json

Lines changed: 2342 additions & 210 deletions
Large diffs are not rendered by default.
Lines changed: 393 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,393 @@
1+
{
2+
"__comment": "Historical companion to tools/metrics-dashboard.html. Top host card (Business Text) | Platform | MoQ/tracks | Details. Provisioned read-only; edit via import-dashboards.sh --dev then export-dashboards.sh.",
3+
"__templating_note": "No template variables: Grafana public dashboards don't interpolate them (they cause panels/undefined/query errors), and the panels are query-driven (topk/sum). The interactive $namespace-scoped view belongs on a separate private/authed dashboard.",
4+
"annotations": {
5+
"list": []
6+
},
7+
"editable": true,
8+
"fiscalYearStartMonth": 0,
9+
"graphTooltip": 1,
10+
"links": [
11+
{
12+
"icon": "dashboard",
13+
"targetBlank": false,
14+
"title": "\u2190 relay overview",
15+
"type": "link",
16+
"url": "/grafana/d/moqx-overview"
17+
}
18+
],
19+
"panels": [
20+
{
21+
"datasource": {
22+
"type": "prometheus",
23+
"uid": "prometheus"
24+
},
25+
"fieldConfig": {
26+
"defaults": {
27+
"color": {
28+
"mode": "palette-classic"
29+
},
30+
"custom": {
31+
"drawStyle": "line",
32+
"fillOpacity": 10,
33+
"lineWidth": 1,
34+
"showPoints": "never",
35+
"spanNulls": true,
36+
"stacking": {
37+
"group": "A",
38+
"mode": "none"
39+
}
40+
},
41+
"mappings": [],
42+
"max": 100,
43+
"min": 0,
44+
"unit": "percent"
45+
},
46+
"overrides": []
47+
},
48+
"gridPos": {
49+
"h": 9,
50+
"w": 24,
51+
"x": 0,
52+
"y": 0
53+
},
54+
"id": 33,
55+
"options": {
56+
"legend": {
57+
"calcs": [
58+
"lastNotNull",
59+
"max"
60+
],
61+
"displayMode": "table",
62+
"placement": "bottom",
63+
"showLegend": true
64+
},
65+
"tooltip": {
66+
"mode": "multi",
67+
"sort": "desc"
68+
}
69+
},
70+
"targets": [
71+
{
72+
"datasource": {
73+
"type": "prometheus",
74+
"uid": "prometheus"
75+
},
76+
"expr": "100 * (1 - avg(rate(node_cpu_seconds_total{mode=\"idle\"}[$__rate_interval])))",
77+
"legendFormat": "CPU",
78+
"refId": "A"
79+
},
80+
{
81+
"datasource": {
82+
"type": "prometheus",
83+
"uid": "prometheus"
84+
},
85+
"expr": "100 * (1 - node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)",
86+
"legendFormat": "RAM",
87+
"refId": "B"
88+
},
89+
{
90+
"datasource": {
91+
"type": "prometheus",
92+
"uid": "prometheus"
93+
},
94+
"expr": "100 * (1 - node_filesystem_avail_bytes{mountpoint=\"/\",fstype!~\"tmpfs|overlay|squashfs|ramfs\"} / node_filesystem_size_bytes{mountpoint=\"/\",fstype!~\"tmpfs|overlay|squashfs|ramfs\"})",
95+
"legendFormat": "HD",
96+
"refId": "C"
97+
}
98+
],
99+
"title": "Resource utilization (CPU / RAM / HD)",
100+
"type": "timeseries"
101+
},
102+
{
103+
"datasource": {
104+
"type": "prometheus",
105+
"uid": "prometheus"
106+
},
107+
"fieldConfig": {
108+
"defaults": {
109+
"color": {
110+
"mode": "palette-classic"
111+
},
112+
"custom": {
113+
"drawStyle": "line",
114+
"fillOpacity": 10,
115+
"lineWidth": 1,
116+
"showPoints": "never",
117+
"spanNulls": true,
118+
"stacking": {
119+
"group": "A",
120+
"mode": "none"
121+
}
122+
},
123+
"mappings": [],
124+
"min": 0,
125+
"unit": "bps"
126+
},
127+
"overrides": []
128+
},
129+
"gridPos": {
130+
"h": 9,
131+
"w": 24,
132+
"x": 0,
133+
"y": 9
134+
},
135+
"id": 11,
136+
"options": {
137+
"legend": {
138+
"calcs": [
139+
"lastNotNull",
140+
"max"
141+
],
142+
"displayMode": "table",
143+
"placement": "bottom",
144+
"showLegend": true
145+
},
146+
"tooltip": {
147+
"mode": "multi",
148+
"sort": "desc"
149+
}
150+
},
151+
"targets": [
152+
{
153+
"datasource": {
154+
"type": "prometheus",
155+
"uid": "prometheus"
156+
},
157+
"expr": "sum(rate(node_network_receive_bytes_total{device=~\"eth[0-9]+|en[a-z0-9]+\"}[$__rate_interval])) * 8",
158+
"legendFormat": "NIC in",
159+
"refId": "A"
160+
},
161+
{
162+
"datasource": {
163+
"type": "prometheus",
164+
"uid": "prometheus"
165+
},
166+
"expr": "sum(rate(node_network_transmit_bytes_total{device=~\"eth[0-9]+|en[a-z0-9]+\"}[$__rate_interval])) * 8",
167+
"legendFormat": "NIC out",
168+
"refId": "B"
169+
},
170+
{
171+
"datasource": {
172+
"type": "prometheus",
173+
"uid": "prometheus"
174+
},
175+
"expr": "rate(moqx_quicBytesRead_total[$__rate_interval]) * 8",
176+
"legendFormat": "app in (QUIC)",
177+
"refId": "C"
178+
},
179+
{
180+
"datasource": {
181+
"type": "prometheus",
182+
"uid": "prometheus"
183+
},
184+
"expr": "rate(moqx_quicBytesWritten_total[$__rate_interval]) * 8",
185+
"legendFormat": "app out (QUIC)",
186+
"refId": "D"
187+
}
188+
],
189+
"title": "Network throughput in / out \u2014 platform NIC vs app (QUIC)",
190+
"type": "timeseries"
191+
},
192+
{
193+
"datasource": {
194+
"type": "prometheus",
195+
"uid": "prometheus"
196+
},
197+
"description": "Host 1/5/15-minute load average (16 vCPU host).",
198+
"fieldConfig": {
199+
"defaults": {
200+
"color": {
201+
"mode": "palette-classic"
202+
},
203+
"custom": {
204+
"drawStyle": "line",
205+
"fillOpacity": 10,
206+
"lineWidth": 1,
207+
"showPoints": "never",
208+
"spanNulls": true,
209+
"stacking": {
210+
"group": "A",
211+
"mode": "none"
212+
}
213+
},
214+
"mappings": [],
215+
"min": 0
216+
},
217+
"overrides": []
218+
},
219+
"gridPos": {
220+
"h": 7,
221+
"w": 12,
222+
"x": 0,
223+
"y": 18
224+
},
225+
"id": 70,
226+
"options": {
227+
"legend": {
228+
"calcs": [
229+
"lastNotNull",
230+
"max"
231+
],
232+
"displayMode": "table",
233+
"placement": "bottom",
234+
"showLegend": true
235+
},
236+
"tooltip": {
237+
"mode": "multi",
238+
"sort": "desc"
239+
}
240+
},
241+
"targets": [
242+
{
243+
"datasource": {
244+
"type": "prometheus",
245+
"uid": "prometheus"
246+
},
247+
"expr": "node_load1",
248+
"legendFormat": "1m",
249+
"refId": "A"
250+
},
251+
{
252+
"datasource": {
253+
"type": "prometheus",
254+
"uid": "prometheus"
255+
},
256+
"expr": "node_load5",
257+
"legendFormat": "5m",
258+
"refId": "B"
259+
},
260+
{
261+
"datasource": {
262+
"type": "prometheus",
263+
"uid": "prometheus"
264+
},
265+
"expr": "node_load15",
266+
"legendFormat": "15m",
267+
"refId": "C"
268+
}
269+
],
270+
"title": "Load average",
271+
"type": "timeseries"
272+
},
273+
{
274+
"datasource": {
275+
"type": "prometheus",
276+
"uid": "prometheus"
277+
},
278+
"fieldConfig": {
279+
"defaults": {
280+
"color": {
281+
"mode": "palette-classic"
282+
},
283+
"custom": {
284+
"drawStyle": "line",
285+
"fillOpacity": 10,
286+
"lineWidth": 1,
287+
"showPoints": "never",
288+
"spanNulls": true,
289+
"stacking": {
290+
"group": "A",
291+
"mode": "none"
292+
}
293+
},
294+
"mappings": [],
295+
"min": 0,
296+
"unit": "ms"
297+
},
298+
"overrides": []
299+
},
300+
"gridPos": {
301+
"h": 7,
302+
"w": 12,
303+
"x": 12,
304+
"y": 18
305+
},
306+
"id": 18,
307+
"options": {
308+
"legend": {
309+
"calcs": [
310+
"lastNotNull",
311+
"max"
312+
],
313+
"displayMode": "table",
314+
"placement": "bottom",
315+
"showLegend": true
316+
},
317+
"tooltip": {
318+
"mode": "multi",
319+
"sort": "desc"
320+
}
321+
},
322+
"targets": [
323+
{
324+
"datasource": {
325+
"type": "prometheus",
326+
"uid": "prometheus"
327+
},
328+
"expr": "histogram_quantile(0.99, sum by (le) (rate(moqx_evbLoopBusy_microseconds_bucket[$__rate_interval]))) / 1000",
329+
"legendFormat": "p99",
330+
"refId": "A"
331+
},
332+
{
333+
"datasource": {
334+
"type": "prometheus",
335+
"uid": "prometheus"
336+
},
337+
"expr": "histogram_quantile(0.50, sum by (le) (rate(moqx_evbLoopBusy_microseconds_bucket[$__rate_interval]))) / 1000",
338+
"legendFormat": "p50",
339+
"refId": "B"
340+
},
341+
{
342+
"datasource": {
343+
"type": "prometheus",
344+
"uid": "prometheus"
345+
},
346+
"expr": "(rate(moqx_evbLoopBusy_microseconds_sum[$__rate_interval]) / clamp_min(rate(moqx_evbLoopBusy_microseconds_count[$__rate_interval]), 1)) / 1000",
347+
"legendFormat": "mean",
348+
"refId": "C"
349+
}
350+
],
351+
"title": "Event-loop busy time / iteration",
352+
"type": "timeseries"
353+
},
354+
{
355+
"gridPos": {
356+
"h": 5,
357+
"w": 24,
358+
"x": 0,
359+
"y": 25
360+
},
361+
"id": 71,
362+
"options": {
363+
"code": {
364+
"language": "plaintext",
365+
"showLineNumbers": false,
366+
"showMiniMap": false
367+
},
368+
"content": "**Placeholder** \u2014 log browsing lands here.\n\nPlanned: relay + stack logs in-panel (Loki or journald datasource).\n\nUntil then: `ssh moqx-ci`, then `docker logs -f moqx` (relay) or the dozzle `logmon` container for a live web view.",
369+
"mode": "markdown"
370+
},
371+
"title": "Logs",
372+
"type": "text"
373+
}
374+
],
375+
"refresh": "10s",
376+
"schemaVersion": 39,
377+
"tags": [
378+
"moqx",
379+
"relay"
380+
],
381+
"templating": {
382+
"list": []
383+
},
384+
"time": {
385+
"from": "now-1h",
386+
"to": "now"
387+
},
388+
"timepicker": {},
389+
"timezone": "",
390+
"title": "moqx platform",
391+
"uid": "moqx-platform",
392+
"weekStart": ""
393+
}

docs/med-moqx-logo.png

85.2 KB
Loading

0 commit comments

Comments
 (0)