Skip to content

Commit d00ef13

Browse files
Merge pull request #231 from numtide/improve-grafana-dashboards
feat(monitoring): add stat panels and cross-links to dashboards
2 parents f7f6425 + 4927d64 commit d00ef13

File tree

3 files changed

+958
-99
lines changed

3 files changed

+958
-99
lines changed

config/monitoring/grafana-dashboard-cluster.json

Lines changed: 269 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,24 @@
66
"editable": true,
77
"fiscalYearStartMonth": 0,
88
"graphTooltip": 1,
9-
"links": [],
9+
"links": [
10+
{
11+
"asDropdown": false,
12+
"icon": "external link",
13+
"tags": [],
14+
"title": "Operator Overview",
15+
"type": "link",
16+
"url": "/d/multigres-operator-overview"
17+
},
18+
{
19+
"asDropdown": false,
20+
"icon": "external link",
21+
"tags": [],
22+
"title": "Data Plane",
23+
"type": "link",
24+
"url": "/d/multigres-data-plane"
25+
}
26+
],
1027
"panels": [
1128
{
1229
"collapsed": false,
@@ -16,6 +33,247 @@
1633
"x": 0,
1734
"y": 0
1835
},
36+
"id": 50,
37+
"title": "At a Glance",
38+
"type": "row"
39+
},
40+
{
41+
"datasource": {
42+
"type": "prometheus",
43+
"uid": "prometheus-uid"
44+
},
45+
"description": "Number of MultigresCluster resources currently managed.",
46+
"fieldConfig": {
47+
"defaults": {
48+
"mappings": [],
49+
"thresholds": {
50+
"mode": "absolute",
51+
"steps": [
52+
{
53+
"color": "green",
54+
"value": null
55+
}
56+
]
57+
},
58+
"unit": "short"
59+
},
60+
"overrides": []
61+
},
62+
"gridPos": {
63+
"h": 4,
64+
"w": 6,
65+
"x": 0,
66+
"y": 1
67+
},
68+
"id": 51,
69+
"options": {
70+
"colorMode": "value",
71+
"graphMode": "none",
72+
"justifyMode": "auto",
73+
"orientation": "auto",
74+
"reduceOptions": {
75+
"calcs": [
76+
"lastNotNull"
77+
],
78+
"fields": "",
79+
"values": false
80+
},
81+
"textMode": "auto"
82+
},
83+
"targets": [
84+
{
85+
"datasource": {
86+
"type": "prometheus",
87+
"uid": "prometheus-uid"
88+
},
89+
"expr": "count(multigres_operator_cluster_info)",
90+
"legendFormat": "Clusters"
91+
}
92+
],
93+
"title": "Total Clusters",
94+
"type": "stat"
95+
},
96+
{
97+
"datasource": {
98+
"type": "prometheus",
99+
"uid": "prometheus-uid"
100+
},
101+
"description": "Total number of cells across all clusters.",
102+
"fieldConfig": {
103+
"defaults": {
104+
"mappings": [],
105+
"thresholds": {
106+
"mode": "absolute",
107+
"steps": [
108+
{
109+
"color": "green",
110+
"value": null
111+
}
112+
]
113+
},
114+
"unit": "short"
115+
},
116+
"overrides": []
117+
},
118+
"gridPos": {
119+
"h": 4,
120+
"w": 6,
121+
"x": 6,
122+
"y": 1
123+
},
124+
"id": 52,
125+
"options": {
126+
"colorMode": "value",
127+
"graphMode": "none",
128+
"justifyMode": "auto",
129+
"orientation": "auto",
130+
"reduceOptions": {
131+
"calcs": [
132+
"lastNotNull"
133+
],
134+
"fields": "",
135+
"values": false
136+
},
137+
"textMode": "auto"
138+
},
139+
"targets": [
140+
{
141+
"datasource": {
142+
"type": "prometheus",
143+
"uid": "prometheus-uid"
144+
},
145+
"expr": "sum(multigres_operator_cluster_cells_total)",
146+
"legendFormat": "Cells"
147+
}
148+
],
149+
"title": "Total Cells",
150+
"type": "stat"
151+
},
152+
{
153+
"datasource": {
154+
"type": "prometheus",
155+
"uid": "prometheus-uid"
156+
},
157+
"description": "Total number of shards across all clusters.",
158+
"fieldConfig": {
159+
"defaults": {
160+
"mappings": [],
161+
"thresholds": {
162+
"mode": "absolute",
163+
"steps": [
164+
{
165+
"color": "green",
166+
"value": null
167+
}
168+
]
169+
},
170+
"unit": "short"
171+
},
172+
"overrides": []
173+
},
174+
"gridPos": {
175+
"h": 4,
176+
"w": 6,
177+
"x": 12,
178+
"y": 1
179+
},
180+
"id": 53,
181+
"options": {
182+
"colorMode": "value",
183+
"graphMode": "none",
184+
"justifyMode": "auto",
185+
"orientation": "auto",
186+
"reduceOptions": {
187+
"calcs": [
188+
"lastNotNull"
189+
],
190+
"fields": "",
191+
"values": false
192+
},
193+
"textMode": "auto"
194+
},
195+
"targets": [
196+
{
197+
"datasource": {
198+
"type": "prometheus",
199+
"uid": "prometheus-uid"
200+
},
201+
"expr": "sum(multigres_operator_cluster_shards_total)",
202+
"legendFormat": "Shards"
203+
}
204+
],
205+
"title": "Total Shards",
206+
"type": "stat"
207+
},
208+
{
209+
"datasource": {
210+
"type": "prometheus",
211+
"uid": "prometheus-uid"
212+
},
213+
"description": "Number of clusters currently in Error phase.",
214+
"fieldConfig": {
215+
"defaults": {
216+
"mappings": [],
217+
"noValue": "0",
218+
"thresholds": {
219+
"mode": "absolute",
220+
"steps": [
221+
{
222+
"color": "green",
223+
"value": null
224+
},
225+
{
226+
"color": "red",
227+
"value": 1
228+
}
229+
]
230+
},
231+
"unit": "short"
232+
},
233+
"overrides": []
234+
},
235+
"gridPos": {
236+
"h": 4,
237+
"w": 6,
238+
"x": 18,
239+
"y": 1
240+
},
241+
"id": 54,
242+
"options": {
243+
"colorMode": "value",
244+
"graphMode": "none",
245+
"justifyMode": "auto",
246+
"orientation": "auto",
247+
"reduceOptions": {
248+
"calcs": [
249+
"lastNotNull"
250+
],
251+
"fields": "",
252+
"values": false
253+
},
254+
"textMode": "auto"
255+
},
256+
"targets": [
257+
{
258+
"datasource": {
259+
"type": "prometheus",
260+
"uid": "prometheus-uid"
261+
},
262+
"expr": "count(multigres_operator_cluster_info{phase=\"Error\"}) or vector(0)",
263+
"legendFormat": "Errors"
264+
}
265+
],
266+
"title": "Clusters in Error",
267+
"type": "stat"
268+
},
269+
{
270+
"collapsed": false,
271+
"gridPos": {
272+
"h": 1,
273+
"w": 24,
274+
"x": 0,
275+
"y": 5
276+
},
19277
"id": 100,
20278
"title": "Cluster Overview",
21279
"type": "row"
@@ -107,7 +365,7 @@
107365
"h": 6,
108366
"w": 24,
109367
"x": 0,
110-
"y": 1
368+
"y": 6
111369
},
112370
"id": 1,
113371
"options": {
@@ -177,7 +435,7 @@
177435
"h": 8,
178436
"w": 12,
179437
"x": 0,
180-
"y": 7
438+
"y": 12
181439
},
182440
"id": 2,
183441
"options": {
@@ -237,7 +495,7 @@
237495
"h": 8,
238496
"w": 12,
239497
"x": 12,
240-
"y": 7
498+
"y": 12
241499
},
242500
"id": 3,
243501
"options": {
@@ -272,7 +530,7 @@
272530
"h": 1,
273531
"w": 24,
274532
"x": 0,
275-
"y": 15
533+
"y": 20
276534
},
277535
"id": 101,
278536
"title": "Cell Gateways",
@@ -329,7 +587,7 @@
329587
"h": 8,
330588
"w": 24,
331589
"x": 0,
332-
"y": 16
590+
"y": 21
333591
},
334592
"id": 4,
335593
"options": {
@@ -372,7 +630,7 @@
372630
"h": 1,
373631
"w": 24,
374632
"x": 0,
375-
"y": 24
633+
"y": 29
376634
},
377635
"id": 102,
378636
"title": "Shard Pools",
@@ -429,7 +687,7 @@
429687
"h": 8,
430688
"w": 24,
431689
"x": 0,
432-
"y": 25
690+
"y": 30
433691
},
434692
"id": 5,
435693
"options": {
@@ -472,7 +730,7 @@
472730
"h": 1,
473731
"w": 24,
474732
"x": 0,
475-
"y": 33
733+
"y": 38
476734
},
477735
"id": 103,
478736
"title": "TopoServer",
@@ -529,7 +787,7 @@
529787
"h": 8,
530788
"w": 24,
531789
"x": 0,
532-
"y": 34
790+
"y": 39
533791
},
534792
"id": 6,
535793
"options": {
@@ -567,6 +825,7 @@
567825
]
568826
}
569827
],
828+
"refresh": "10s",
570829
"schemaVersion": 39,
571830
"tags": [
572831
"multigres",

config/monitoring/grafana-dashboard-data-plane.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,24 @@
66
"fiscalYearStartMonth": 0,
77
"graphTooltip": 1,
88
"id": null,
9-
"links": [],
9+
"links": [
10+
{
11+
"asDropdown": false,
12+
"icon": "external link",
13+
"tags": [],
14+
"title": "Operator Overview",
15+
"type": "link",
16+
"url": "/d/multigres-operator-overview"
17+
},
18+
{
19+
"asDropdown": false,
20+
"icon": "external link",
21+
"tags": [],
22+
"title": "Cluster Health",
23+
"type": "link",
24+
"url": "/d/multigres-cluster-health"
25+
}
26+
],
1027
"panels": [
1128
{
1229
"collapsed": false,

0 commit comments

Comments
 (0)