Skip to content

Commit 19c5ddd

Browse files
authored
Merge pull request #286 from ahinvinith/main
Feat: Added postgreSQL datasource for grafana
2 parents 72f65b7 + fe9c3ce commit 19c5ddd

File tree

6 files changed

+1733
-1
lines changed

6 files changed

+1733
-1
lines changed

charts/monitoring/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ dependencies:
88
description: A Helm chart for Monitoring
99
name: monitoring
1010
type: application
11-
version: 0.1.23
11+
version: 0.1.24
Lines changed: 375 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,375 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ include "monitoring.fullname" . }}-controlplane-applications
5+
annotations:
6+
meta.helm.sh/release-namespace: {{ .Release.Namespace }}
7+
grafana_folder: "Capten"
8+
labels:
9+
grafana_dashboard: "1"
10+
data:
11+
capten.json: |-
12+
{
13+
"annotations": {
14+
"list": [
15+
{
16+
"builtIn": 1,
17+
"datasource": {
18+
"type": "grafana",
19+
"uid": "-- Grafana --"
20+
},
21+
"enable": true,
22+
"hide": true,
23+
"iconColor": "rgba(0, 211, 255, 1)",
24+
"name": "Annotations & Alerts",
25+
"type": "dashboard"
26+
}
27+
]
28+
},
29+
"editable": true,
30+
"fiscalYearStartMonth": 0,
31+
"graphTooltip": 0,
32+
"id": 78,
33+
"links": [],
34+
"liveNow": false,
35+
"panels": [
36+
{
37+
"datasource": {
38+
"type": "Capten",
39+
"uid": "Capten"
40+
},
41+
"fieldConfig": {
42+
"defaults": {
43+
"color": {
44+
"mode": "continuous-GrYlRd"
45+
},
46+
"mappings": [],
47+
"thresholds": {
48+
"mode": "absolute",
49+
"steps": [
50+
{
51+
"color": "green",
52+
"value": null
53+
},
54+
{
55+
"color": "red",
56+
"value": 80
57+
}
58+
]
59+
}
60+
},
61+
"overrides": []
62+
},
63+
"gridPos": {
64+
"h": 6,
65+
"w": 11,
66+
"x": 0,
67+
"y": 0
68+
},
69+
"id": 2,
70+
"options": {
71+
"displayMode": "lcd",
72+
"minVizHeight": 10,
73+
"minVizWidth": 0,
74+
"orientation": "horizontal",
75+
"reduceOptions": {
76+
"calcs": [
77+
"lastNotNull"
78+
],
79+
"fields": "",
80+
"values": false
81+
},
82+
"showUnfilled": true,
83+
"valueMode": "text"
84+
},
85+
"pluginVersion": "10.0.3",
86+
"targets": [
87+
{
88+
"datasource": {
89+
"type": "Capten",
90+
"uid": "Capten"
91+
},
92+
"editorMode": "code",
93+
"format": "table",
94+
"rawQuery": true,
95+
"rawSql": "SELECT count(app_name) FROM cluster_app_config",
96+
"refId": "A",
97+
"sql": {
98+
"columns": [
99+
{
100+
"parameters": [],
101+
"type": "function"
102+
}
103+
],
104+
"groupBy": [
105+
{
106+
"property": {
107+
"type": "string"
108+
},
109+
"type": "groupBy"
110+
}
111+
],
112+
"limit": 50
113+
}
114+
}
115+
],
116+
"title": "Count of Applications",
117+
"type": "bargauge"
118+
},
119+
{
120+
"datasource": {
121+
"type": "Capten",
122+
"uid": "Capten"
123+
},
124+
"fieldConfig": {
125+
"defaults": {
126+
"color": {
127+
"mode": "palette-classic"
128+
},
129+
"custom": {
130+
"hideFrom": {
131+
"legend": false,
132+
"tooltip": false,
133+
"viz": false
134+
}
135+
},
136+
"mappings": []
137+
},
138+
"overrides": []
139+
},
140+
"gridPos": {
141+
"h": 8,
142+
"w": 12,
143+
"x": 11,
144+
"y": 0
145+
},
146+
"id": 3,
147+
"options": {
148+
"displayLabels": [
149+
"percent"
150+
],
151+
"legend": {
152+
"displayMode": "list",
153+
"placement": "right",
154+
"showLegend": true,
155+
"values": []
156+
},
157+
"pieType": "pie",
158+
"reduceOptions": {
159+
"calcs": [
160+
"lastNotNull"
161+
],
162+
"fields": "",
163+
"values": true
164+
},
165+
"tooltip": {
166+
"mode": "single",
167+
"sort": "none"
168+
}
169+
},
170+
"targets": [
171+
{
172+
"datasource": {
173+
"type": "Capten",
174+
"uid": "Capten"
175+
},
176+
"editorMode": "code",
177+
"format": "table",
178+
"rawQuery": true,
179+
"rawSql": "SELECT namespace, count(app_name) AS Apps FROM cluster_app_config\nGROUP BY namespace\n",
180+
"refId": "A",
181+
"sql": {
182+
"columns": [
183+
{
184+
"parameters": [],
185+
"type": "function"
186+
}
187+
],
188+
"groupBy": [
189+
{
190+
"property": {
191+
"type": "string"
192+
},
193+
"type": "groupBy"
194+
}
195+
],
196+
"limit": 50
197+
}
198+
}
199+
],
200+
"title": "Counts of apps per namespace",
201+
"type": "piechart"
202+
},
203+
{
204+
"datasource": {
205+
"type": "Capten",
206+
"uid": "Capten"
207+
},
208+
"fieldConfig": {
209+
"defaults": {
210+
"custom": {
211+
"align": "auto",
212+
"cellOptions": {
213+
"type": "auto"
214+
},
215+
"filterable": true,
216+
"inspect": false
217+
},
218+
"mappings": [],
219+
"thresholds": {
220+
"mode": "absolute",
221+
"steps": [
222+
{
223+
"color": "green",
224+
"value": null
225+
},
226+
{
227+
"color": "red",
228+
"value": 80
229+
}
230+
]
231+
}
232+
},
233+
"overrides": [
234+
{
235+
"matcher": {
236+
"id": "byName",
237+
"options": "install_status"
238+
},
239+
"properties": [
240+
{
241+
"id": "custom.cellOptions",
242+
"value": {
243+
"type": "color-background"
244+
}
245+
},
246+
{
247+
"id": "mappings",
248+
"value": [
249+
{
250+
"options": {
251+
"Installation failed": {
252+
"color": "red",
253+
"index": 1
254+
},
255+
"Installed": {
256+
"color": "green",
257+
"index": 0
258+
},
259+
"Upgraded": {
260+
"color": "yellow",
261+
"index": 2
262+
}
263+
},
264+
"type": "value"
265+
}
266+
]
267+
}
268+
]
269+
}
270+
]
271+
},
272+
"gridPos": {
273+
"h": 16,
274+
"w": 24,
275+
"x": 0,
276+
"y": 8
277+
},
278+
"id": 1,
279+
"options": {
280+
"cellHeight": "sm",
281+
"footer": {
282+
"countRows": false,
283+
"fields": "",
284+
"reducer": [
285+
"sum"
286+
],
287+
"show": false
288+
},
289+
"showHeader": true
290+
},
291+
"pluginVersion": "10.0.3",
292+
"targets": [
293+
{
294+
"datasource": {
295+
"type": "Capten",
296+
"uid": "Capten"
297+
},
298+
"editorMode": "builder",
299+
"format": "table",
300+
"key": "Q-102e33bd-125e-4526-8a90-a4dc6b6b93d8-0",
301+
"rawSql": "SELECT * FROM cluster_app_config ",
302+
"refId": "A",
303+
"sql": {
304+
"columns": [
305+
{
306+
"parameters": [
307+
{
308+
"name": "*",
309+
"type": "functionParameter"
310+
}
311+
],
312+
"type": "function"
313+
}
314+
],
315+
"groupBy": [
316+
{
317+
"property": {
318+
"type": "string"
319+
},
320+
"type": "groupBy"
321+
}
322+
],
323+
"limit": 50
324+
},
325+
"table": "cluster_app_config"
326+
}
327+
],
328+
"title": "Cluster Applications",
329+
"transformations": [
330+
{
331+
"id": "organize",
332+
"options": {
333+
"excludeByName": {
334+
"api_endpoint": true,
335+
"default_app": true,
336+
"description": true,
337+
"icon": true,
338+
"install_status": false,
339+
"launch_ui_values": true,
340+
"override_values": true,
341+
"plugin_name": true,
342+
"plugin_store_type": true,
343+
"privileged_namespace": true,
344+
"repo_url": true,
345+
"template_values": true,
346+
"ui_endpoint": true,
347+
"ui_module_endpoint": true,
348+
"version": true
349+
},
350+
"indexByName": {},
351+
"renameByName": {}
352+
}
353+
}
354+
],
355+
"type": "table"
356+
}
357+
],
358+
"refresh": "",
359+
"schemaVersion": 38,
360+
"style": "dark",
361+
"tags": [],
362+
"templating": {
363+
"list": []
364+
},
365+
"time": {
366+
"from": "now-6h",
367+
"to": "now"
368+
},
369+
"timepicker": {},
370+
"timezone": "",
371+
"title": "Controlplane Applications",
372+
"uid": "b21dc765-36ff-4009-b99f-db8ecda80936",
373+
"version": 6,
374+
"weekStart": ""
375+
}

0 commit comments

Comments
 (0)