Skip to content

Commit 4ecc564

Browse files
authored
CL Nodes Errors Dashboard, Workflow Engine dashboard, allow nil for *testing.T in Load[T] (#1738)
* embed node errors dashboard * changelog * allow nil for *testing.T in Load[T] * add Workflow Engine dashboard + links * changelog
1 parent e9eee46 commit 4ecc564

File tree

7 files changed

+3159
-17
lines changed

7 files changed

+3159
-17
lines changed

framework/.changeset/v0.6.4.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- Embed the default Node errors dashboard
2+
- Embed the default Workflow Platform dashboard
3+
- Allow nil for testing.T in Load function
4+
- Do not fail if there is no Docker daemon present when we run CRIB

framework/cmd/main.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ import (
1919
var embeddedObservabilityFiles embed.FS
2020

2121
const (
22-
LocalLogsURL = "http://localhost:3000/explore?panes=%7B%22qZw%22:%7B%22datasource%22:%22P8E80F9AEF21F6940%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22P8E80F9AEF21F6940%22%7D%7D%5D,%22range%22:%7B%22from%22:%22now-6h%22,%22to%22:%22now%22%7D%7D%7D&schemaVersion=1&orgId=1"
23-
LocalPrometheusURL = "http://localhost:3000/explore?panes=%7B%22qZw%22:%7B%22datasource%22:%22PBFA97CFB590B2093%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%22,%22range%22:true,%22datasource%22:%7B%22type%22:%22prometheus%22,%22uid%22:%22PBFA97CFB590B2093%22%7D%7D%5D,%22range%22:%7B%22from%22:%22now-6h%22,%22to%22:%22now%22%7D%7D%7D&schemaVersion=1&orgId=1"
24-
LocalPostgresDebugURL = "http://localhost:3000/d/000000039/postgresql-database?orgId=1&refresh=10s&var-DS_PROMETHEUS=PBFA97CFB590B2093&var-interval=$__auto_interval_interval&var-namespace=&var-release=&var-instance=postgres_exporter_0:9187&var-datname=All&var-mode=All&from=now-5m&to=now"
25-
LocalPyroScopeURL = "http://localhost:4040"
22+
LocalCLNodeErrorsURL = "http://localhost:3000/d/a7de535b-3e0f-4066-bed7-d505b6ec9ef1/cl-node-errors?orgId=1"
23+
LocalWorkflowEngineURL = "http://localhost:3000/d/c0c948cc-a1d8-4a3f-a75a-f70403f5e40e/workflows?orgId=1&refresh=30s&from=now-30m&to=now"
24+
LocalLogsURL = "http://localhost:3000/explore?panes=%7B%22qZw%22:%7B%22datasource%22:%22P8E80F9AEF21F6940%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22P8E80F9AEF21F6940%22%7D%7D%5D,%22range%22:%7B%22from%22:%22now-6h%22,%22to%22:%22now%22%7D%7D%7D&schemaVersion=1&orgId=1"
25+
LocalPrometheusURL = "http://localhost:3000/explore?panes=%7B%22qZw%22:%7B%22datasource%22:%22PBFA97CFB590B2093%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%22,%22range%22:true,%22datasource%22:%7B%22type%22:%22prometheus%22,%22uid%22:%22PBFA97CFB590B2093%22%7D%7D%5D,%22range%22:%7B%22from%22:%22now-6h%22,%22to%22:%22now%22%7D%7D%7D&schemaVersion=1&orgId=1"
26+
LocalPostgresDebugURL = "http://localhost:3000/d/000000039/postgresql-database?orgId=1&refresh=10s&var-DS_PROMETHEUS=PBFA97CFB590B2093&var-interval=$__auto_interval_interval&var-namespace=&var-release=&var-instance=postgres_exporter_0:9187&var-datname=All&var-mode=All&from=now-5m&to=now"
27+
LocalPyroScopeURL = "http://localhost:4040"
2628
)
2729

2830
func main() {

framework/cmd/observability.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ func observabilityUp() error {
6464
framework.L.Info().Msgf("Prometheus: %s", LocalPrometheusURL)
6565
framework.L.Info().Msgf("PostgreSQL: %s", LocalPostgresDebugURL)
6666
framework.L.Info().Msgf("Pyroscope: %s", LocalPyroScopeURL)
67+
framework.L.Info().Msgf("CL Node Errors: %s", LocalCLNodeErrorsURL)
68+
framework.L.Info().Msgf("Workflow Engine: %s", LocalWorkflowEngineURL)
6769
return nil
6870
}
6971

Lines changed: 300 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,300 @@
1+
{
2+
"annotations": {
3+
"list": [
4+
{
5+
"builtIn": 1,
6+
"datasource": {
7+
"type": "grafana",
8+
"uid": "-- Grafana --"
9+
},
10+
"enable": true,
11+
"hide": true,
12+
"iconColor": "rgba(0, 211, 255, 1)",
13+
"name": "Annotations & Alerts",
14+
"type": "dashboard"
15+
}
16+
]
17+
},
18+
"editable": true,
19+
"fiscalYearStartMonth": 0,
20+
"graphTooltip": 0,
21+
"id": 4,
22+
"links": [],
23+
"liveNow": false,
24+
"panels": [
25+
{
26+
"datasource": {
27+
"type": "loki"
28+
},
29+
"description": "Err/Wrn Count",
30+
"fieldConfig": {
31+
"defaults": {
32+
"color": {
33+
"mode": "palette-classic"
34+
},
35+
"custom": {
36+
"axisCenteredZero": false,
37+
"axisColorMode": "text",
38+
"axisLabel": "",
39+
"axisPlacement": "auto",
40+
"barAlignment": 0,
41+
"drawStyle": "line",
42+
"fillOpacity": 0,
43+
"gradientMode": "none",
44+
"hideFrom": {
45+
"legend": false,
46+
"tooltip": false,
47+
"viz": false
48+
},
49+
"insertNulls": false,
50+
"lineInterpolation": "linear",
51+
"lineWidth": 1,
52+
"pointSize": 5,
53+
"scaleDistribution": {
54+
"type": "linear"
55+
},
56+
"showPoints": "auto",
57+
"spanNulls": false,
58+
"stacking": {
59+
"group": "A",
60+
"mode": "none"
61+
},
62+
"thresholdsStyle": {
63+
"mode": "off"
64+
}
65+
},
66+
"mappings": [],
67+
"thresholds": {
68+
"mode": "absolute",
69+
"steps": [
70+
{
71+
"color": "green",
72+
"value": null
73+
},
74+
{
75+
"color": "red",
76+
"value": 80
77+
}
78+
]
79+
}
80+
},
81+
"overrides": []
82+
},
83+
"gridPos": {
84+
"h": 10,
85+
"w": 13,
86+
"x": 0,
87+
"y": 0
88+
},
89+
"id": 2,
90+
"options": {
91+
"legend": {
92+
"calcs": [],
93+
"displayMode": "table",
94+
"placement": "right",
95+
"showLegend": true
96+
},
97+
"tooltip": {
98+
"mode": "single",
99+
"sort": "none"
100+
}
101+
},
102+
"targets": [
103+
{
104+
"datasource": {
105+
"type": "loki"
106+
},
107+
"editorMode": "code",
108+
"expr": "sum(count_over_time({job=\"ctf\", container=~\".*node.*\"} \n | json \n | level=\"error\" [$__interval])) by (logger)",
109+
"legendFormat": "ERR {{logger}}",
110+
"queryType": "range",
111+
"refId": "A"
112+
},
113+
{
114+
"datasource": {
115+
"type": "loki"
116+
},
117+
"editorMode": "code",
118+
"expr": "sum(count_over_time({job=\"ctf\", container=~\".*node.*\"} \n | json \n | level=\"warn\" [$__interval])) by (logger)",
119+
"hide": false,
120+
"legendFormat": "WRN {{logger}}",
121+
"queryType": "range",
122+
"refId": "B"
123+
}
124+
],
125+
"title": "Err/Wrn Count",
126+
"transparent": true,
127+
"type": "timeseries"
128+
},
129+
{
130+
"datasource": {
131+
"type": "loki"
132+
},
133+
"description": "Err/Wrn Distribution",
134+
"fieldConfig": {
135+
"defaults": {
136+
"color": {
137+
"mode": "palette-classic"
138+
},
139+
"custom": {
140+
"hideFrom": {
141+
"legend": false,
142+
"tooltip": false,
143+
"viz": false
144+
}
145+
},
146+
"mappings": []
147+
},
148+
"overrides": []
149+
},
150+
"gridPos": {
151+
"h": 10,
152+
"w": 10,
153+
"x": 14,
154+
"y": 0
155+
},
156+
"id": 4,
157+
"options": {
158+
"legend": {
159+
"displayMode": "list",
160+
"placement": "right",
161+
"showLegend": true
162+
},
163+
"pieType": "donut",
164+
"reduceOptions": {
165+
"calcs": [
166+
"lastNotNull"
167+
],
168+
"fields": "",
169+
"values": false
170+
},
171+
"tooltip": {
172+
"mode": "single",
173+
"sort": "none"
174+
}
175+
},
176+
"targets": [
177+
{
178+
"datasource": {
179+
"type": "loki"
180+
},
181+
"editorMode": "code",
182+
"expr": "sum(count_over_time({job=\"ctf\", container=~\".*node.*\"} \n | json \n | level=\"error\" [$__interval])) by (logger)",
183+
"legendFormat": "ERR {{logger}}",
184+
"queryType": "range",
185+
"refId": "A"
186+
},
187+
{
188+
"datasource": {
189+
"type": "loki"
190+
},
191+
"editorMode": "code",
192+
"expr": "sum(count_over_time({job=\"ctf\", container=~\".*node.*\"} \n | json \n | level=\"warn\" [$__interval])) by (logger)",
193+
"hide": false,
194+
"legendFormat": "WRN {{logger}}",
195+
"queryType": "range",
196+
"refId": "B"
197+
}
198+
],
199+
"title": "Err/Wrn Distribution",
200+
"transparent": true,
201+
"type": "piechart"
202+
},
203+
{
204+
"datasource": {
205+
"type": "loki"
206+
},
207+
"description": "Node Errors",
208+
"gridPos": {
209+
"h": 7,
210+
"w": 24,
211+
"x": 0,
212+
"y": 10
213+
},
214+
"id": 1,
215+
"options": {
216+
"dedupStrategy": "none",
217+
"enableLogDetails": true,
218+
"prettifyLogMessage": false,
219+
"showCommonLabels": false,
220+
"showLabels": false,
221+
"showTime": false,
222+
"sortOrder": "Descending",
223+
"wrapLogMessage": false
224+
},
225+
"pluginVersion": "10.2.6",
226+
"targets": [
227+
{
228+
"datasource": {
229+
"type": "loki"
230+
},
231+
"editorMode": "code",
232+
"expr": "{job=\"ctf\", container=~\".*node.*\"}\n | json \n | level=\"error\" \n | logfmt \n | line_format \"{{.container }} {{.logger }} {{.msg }} {{.err}}\"",
233+
"legendFormat": "",
234+
"queryType": "range",
235+
"refId": "A"
236+
}
237+
],
238+
"title": "Node Errors",
239+
"transformations": [],
240+
"transparent": true,
241+
"type": "logs"
242+
},
243+
{
244+
"datasource": {
245+
"type": "loki"
246+
},
247+
"description": "Node Warnings",
248+
"gridPos": {
249+
"h": 6,
250+
"w": 24,
251+
"x": 0,
252+
"y": 17
253+
},
254+
"id": 3,
255+
"options": {
256+
"dedupStrategy": "none",
257+
"enableLogDetails": true,
258+
"prettifyLogMessage": false,
259+
"showCommonLabels": false,
260+
"showLabels": false,
261+
"showTime": false,
262+
"sortOrder": "Descending",
263+
"wrapLogMessage": false
264+
},
265+
"pluginVersion": "10.2.6",
266+
"targets": [
267+
{
268+
"datasource": {
269+
"type": "loki"
270+
},
271+
"editorMode": "code",
272+
"expr": "{job=\"ctf\", container=~\".*node.*\"} \n | json \n | level=\"warn\" \n | logfmt \n | line_format \"{{.container }} {{.logger }} {{.msg }} {{.err}}\"",
273+
"queryType": "range",
274+
"refId": "A"
275+
}
276+
],
277+
"title": "Node Warnings",
278+
"transformations": [],
279+
"transparent": true,
280+
"type": "logs"
281+
}
282+
],
283+
"refresh": "",
284+
"schemaVersion": 38,
285+
"style": "dark",
286+
"tags": [],
287+
"templating": {
288+
"list": []
289+
},
290+
"time": {
291+
"from": "now-15m",
292+
"to": "now"
293+
},
294+
"timepicker": {},
295+
"timezone": "",
296+
"title": "CL Node Errors",
297+
"uid": "a7de535b-3e0f-4066-bed7-d505b6ec9ef1",
298+
"version": 1,
299+
"weekStart": ""
300+
}

0 commit comments

Comments
 (0)