Skip to content

Commit 18c764c

Browse files
aledbfroboquat
authored andcommitted
Add dashboard for swap utilization per cluster and node
1 parent 931b8eb commit 18c764c

File tree

2 files changed

+234
-0
lines changed

2 files changed

+234
-0
lines changed

operations/observability/mixins/workspace/dashboards.libsonnet

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
'gitpod-component-ws-proxy.json': (import 'dashboards/components/ws-proxy.json'),
1818
'gitpod-workspace-success-criteria.json': (import 'dashboards/success-criteria.json'),
1919
'gitpod-workspace-coredns.json': (import 'dashboards/coredns.json'),
20+
'gitpod-node-swap.json': (import 'dashboards/node-swap.json'),
2021
},
2122
}
Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
{
2+
"annotations": {
3+
"list": [
4+
{
5+
"builtIn": 1,
6+
"datasource": {
7+
"type": "datasource",
8+
"uid": "grafana"
9+
},
10+
"enable": true,
11+
"hide": true,
12+
"iconColor": "rgba(0, 211, 255, 1)",
13+
"name": "Annotations & Alerts",
14+
"target": {
15+
"limit": 100,
16+
"matchAny": false,
17+
"tags": [],
18+
"type": "dashboard"
19+
},
20+
"type": "dashboard"
21+
}
22+
]
23+
},
24+
"editable": true,
25+
"fiscalYearStartMonth": 0,
26+
"graphTooltip": 0,
27+
"iteration": 1658268783887,
28+
"links": [],
29+
"liveNow": false,
30+
"panels": [
31+
{
32+
"datasource": {
33+
"type": "prometheus",
34+
"uid": "${datasource}"
35+
},
36+
"fieldConfig": {
37+
"defaults": {
38+
"color": {
39+
"mode": "palette-classic"
40+
},
41+
"custom": {
42+
"axisLabel": "",
43+
"axisPlacement": "auto",
44+
"barAlignment": 0,
45+
"drawStyle": "line",
46+
"fillOpacity": 0,
47+
"gradientMode": "none",
48+
"hideFrom": {
49+
"legend": false,
50+
"tooltip": false,
51+
"viz": false
52+
},
53+
"lineInterpolation": "smooth",
54+
"lineStyle": {
55+
"fill": "solid"
56+
},
57+
"lineWidth": 1,
58+
"pointSize": 5,
59+
"scaleDistribution": {
60+
"type": "linear"
61+
},
62+
"showPoints": "auto",
63+
"spanNulls": false,
64+
"stacking": {
65+
"group": "A",
66+
"mode": "none"
67+
},
68+
"thresholdsStyle": {
69+
"mode": "off"
70+
}
71+
},
72+
"mappings": [],
73+
"thresholds": {
74+
"mode": "absolute",
75+
"steps": [
76+
{
77+
"color": "green",
78+
"value": null
79+
},
80+
{
81+
"color": "red",
82+
"value": 80
83+
}
84+
]
85+
},
86+
"unit": "percentunit"
87+
},
88+
"overrides": []
89+
},
90+
"gridPos": {
91+
"h": 13,
92+
"w": 24,
93+
"x": 0,
94+
"y": 0
95+
},
96+
"id": 2,
97+
"options": {
98+
"legend": {
99+
"calcs": [],
100+
"displayMode": "list",
101+
"placement": "bottom"
102+
},
103+
"tooltip": {
104+
"mode": "single",
105+
"sort": "none"
106+
}
107+
},
108+
"targets": [
109+
{
110+
"datasource": {
111+
"type": "prometheus",
112+
"uid": "${datasource}"
113+
},
114+
"editorMode": "code",
115+
"expr": "((node_memory_SwapTotal_bytes{cluster=~\"$cluster\", node=~\"$node\"} - node_memory_SwapFree_bytes{cluster=~\"$cluster\", node=~\"$node\"}) / node_memory_SwapTotal_bytes{cluster=~\"$cluster\", node=~\"$node\"})",
116+
"legendFormat": "{{instance}}",
117+
"range": true,
118+
"refId": "A"
119+
}
120+
],
121+
"title": "Swap utilization",
122+
"type": "timeseries"
123+
}
124+
],
125+
"refresh": "1m",
126+
"schemaVersion": 36,
127+
"style": "dark",
128+
"tags": [
129+
"gitpod-mixin"
130+
],
131+
"templating": {
132+
"list": [
133+
{
134+
"current": {
135+
"selected": true,
136+
"text": [
137+
"us54"
138+
],
139+
"value": [
140+
"us54"
141+
]
142+
},
143+
"datasource": {
144+
"type": "prometheus",
145+
"uid": "$datasource"
146+
},
147+
"definition": "label_values(up{job=\"ws-daemon\"}, cluster)",
148+
"hide": 0,
149+
"includeAll": true,
150+
"label": "Cluster",
151+
"multi": true,
152+
"name": "cluster",
153+
"options": [],
154+
"query": {
155+
"query": "label_values(up{job=\"ws-daemon\"}, cluster)",
156+
"refId": "StandardVariableQuery"
157+
},
158+
"refresh": 2,
159+
"regex": "",
160+
"skipUrlSync": false,
161+
"sort": 0,
162+
"tagValuesQuery": "",
163+
"tagsQuery": "",
164+
"type": "query",
165+
"useTags": false
166+
},
167+
{
168+
"current": {},
169+
"datasource": {
170+
"type": "prometheus",
171+
"uid": "$datasource"
172+
},
173+
"definition": "label_values(container_cpu_usage_seconds_total{cluster=~\"$cluster\", pod=~\"ws-daemon.*\"}, node)",
174+
"hide": 0,
175+
"includeAll": true,
176+
"label": "Node",
177+
"multi": true,
178+
"name": "node",
179+
"options": [],
180+
"query": {
181+
"query": "label_values(container_cpu_usage_seconds_total{cluster=~\"$cluster\", pod=~\"ws-daemon.*\"}, node)",
182+
"refId": "StandardVariableQuery"
183+
},
184+
"refresh": 2,
185+
"regex": "",
186+
"skipUrlSync": false,
187+
"sort": 0,
188+
"tagValuesQuery": "",
189+
"tagsQuery": "",
190+
"type": "query",
191+
"useTags": false
192+
},
193+
{
194+
"current": {
195+
"selected": false,
196+
"text": "VictoriaMetrics",
197+
"value": "VictoriaMetrics"
198+
},
199+
"hide": 2,
200+
"includeAll": false,
201+
"multi": false,
202+
"name": "datasource",
203+
"options": [],
204+
"query": "prometheus",
205+
"refresh": 2,
206+
"regex": "",
207+
"skipUrlSync": false,
208+
"type": "datasource"
209+
}
210+
]
211+
},
212+
"time": {
213+
"from": "now-6h",
214+
"to": "now"
215+
},
216+
"timepicker": {
217+
"refresh_intervals": [
218+
"30s",
219+
"1m",
220+
"5m",
221+
"15m",
222+
"30m",
223+
"1h",
224+
"2h",
225+
"1d"
226+
]
227+
},
228+
"timezone": "utc",
229+
"title": "Gitpod / Node / Swap",
230+
"uid": "node-swap",
231+
"version": 3,
232+
"weekStart": ""
233+
}

0 commit comments

Comments
 (0)