Skip to content

Commit dbca774

Browse files
Baptiste NoleauBaboulinet-33
authored andcommitted
add dashboard log + replace dashboard system
1 parent e349a3d commit dbca774

File tree

9 files changed

+5257
-1986
lines changed

9 files changed

+5257
-1986
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Helm chart automated files
22
/charts/*/charts
3+
**/Chart.lock

charts/dso-grafana/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: dso-grafana
33
description: This Helm chart deploy Grafana instances and default dashboards for each projects read from values file.
44
type: application
5-
version: 1.1.0
5+
version: 1.2.0
66
dependencies:
77
- name: grafana-operator
88
repository: oci://ghcr.io/grafana/helm-charts

charts/dso-grafana/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# dso-grafana
22

3-
![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
3+
![Version: 1.2.0](https://img.shields.io/badge/Version-1.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
44

55
This Helm chart deploy Grafana instances and default dashboards for each projects read from values file.
66

@@ -21,7 +21,7 @@ This Helm chart deploy Grafana instances and default dashboards for each project
2121

2222
| Key | Type | Default | Description |
2323
|-----|------|---------|-------------|
24-
| dashboard.default | bool | `true` | Enable default dashboard creation |
24+
| dashboards | list | `["k8s-logs.json","k8s-resources-namespace.json"]` | Select default dashboard creation among available json files |
2525
| default | object | `{"name":"console"}` | Default instance to create (default mandatory project) |
2626
| global | object | `{"projects":[]}` | Global list of projects. One Grafana instance is created for each item. This list is provided dynamically by the Console webapp. |
2727
| grafana | object | `{"isOpenShift":false,"observatorium_url":"http://observatorium-api.svc:8080"}` | Grafana instances configuration |
Lines changed: 267 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,267 @@
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+
"description": "Logs collected from Kubernetes, stored in Loki",
25+
"editable": true,
26+
"fiscalYearStartMonth": 0,
27+
"gnetId": 15141,
28+
"graphTooltip": 0,
29+
"id": 8,
30+
"links": [],
31+
"panels": [
32+
{
33+
"datasource": {
34+
"type": "loki",
35+
"uid": "${datasource}"
36+
},
37+
"description": "",
38+
"fieldConfig": {
39+
"defaults": {
40+
"color": {
41+
"mode": "palette-classic"
42+
},
43+
"custom": {
44+
"axisBorderShow": false,
45+
"axisCenteredZero": false,
46+
"axisColorMode": "text",
47+
"axisLabel": "",
48+
"axisPlacement": "auto",
49+
"barAlignment": 0,
50+
"drawStyle": "bars",
51+
"fillOpacity": 0,
52+
"gradientMode": "none",
53+
"hideFrom": {
54+
"legend": false,
55+
"tooltip": false,
56+
"viz": false
57+
},
58+
"insertNulls": false,
59+
"lineInterpolation": "linear",
60+
"lineWidth": 1,
61+
"pointSize": 5,
62+
"scaleDistribution": {
63+
"type": "linear"
64+
},
65+
"showPoints": "auto",
66+
"spanNulls": false,
67+
"stacking": {
68+
"group": "A",
69+
"mode": "none"
70+
},
71+
"thresholdsStyle": {
72+
"mode": "off"
73+
}
74+
},
75+
"mappings": [],
76+
"thresholds": {
77+
"mode": "absolute",
78+
"steps": [
79+
{
80+
"color": "green",
81+
"value": null
82+
},
83+
{
84+
"color": "red",
85+
"value": 80
86+
}
87+
]
88+
}
89+
},
90+
"overrides": []
91+
},
92+
"gridPos": {
93+
"h": 4,
94+
"w": 24,
95+
"x": 0,
96+
"y": 0
97+
},
98+
"id": 4,
99+
"options": {
100+
"legend": {
101+
"calcs": [],
102+
"displayMode": "list",
103+
"placement": "bottom",
104+
"showLegend": false
105+
},
106+
"tooltip": {
107+
"mode": "single",
108+
"sort": "none"
109+
}
110+
},
111+
"targets": [
112+
{
113+
"datasource": {
114+
"type": "loki",
115+
"uid": "${datasource}"
116+
},
117+
"editorMode": "code",
118+
"expr": "sum(count_over_time({namespace=~\"$namespace\", container =~\"$container\"} |= \"$query\" [$__interval]))",
119+
"instant": false,
120+
"legendFormat": "Log count",
121+
"queryType": "range",
122+
"range": true,
123+
"refId": "A"
124+
}
125+
],
126+
"type": "timeseries"
127+
},
128+
{
129+
"datasource": {
130+
"type": "loki",
131+
"uid": "${datasource}"
132+
},
133+
"description": "Logs from services running in Kubernetes",
134+
"gridPos": {
135+
"h": 25,
136+
"w": 24,
137+
"x": 0,
138+
"y": 4
139+
},
140+
"id": 2,
141+
"options": {
142+
"dedupStrategy": "none",
143+
"enableLogDetails": true,
144+
"prettifyLogMessage": false,
145+
"showCommonLabels": false,
146+
"showLabels": false,
147+
"showTime": false,
148+
"sortOrder": "Descending",
149+
"wrapLogMessage": false
150+
},
151+
"targets": [
152+
{
153+
"datasource": {
154+
"type": "loki",
155+
"uid": "${datasource}"
156+
},
157+
"editorMode": "code",
158+
"expr": "{namespace=~\"$namespace\", container =~\"$container\"} |= \"$query\"",
159+
"queryType": "range",
160+
"refId": "A"
161+
}
162+
],
163+
"type": "logs"
164+
}
165+
],
166+
"refresh": false,
167+
"schemaVersion": 39,
168+
"tags": [],
169+
"templating": {
170+
"list": [
171+
{
172+
"current": {},
173+
"hide": 0,
174+
"includeAll": false,
175+
"multi": false,
176+
"name": "datasource",
177+
"options": [],
178+
"query": "loki",
179+
"queryValue": "",
180+
"refresh": 1,
181+
"regex": "",
182+
"skipUrlSync": false,
183+
"type": "datasource"
184+
},
185+
{
186+
"current": {
187+
"selected": false,
188+
"text": "",
189+
"value": ""
190+
},
191+
"description": "String to search for",
192+
"hide": 0,
193+
"label": "Search Query",
194+
"name": "query",
195+
"options": [
196+
{
197+
"selected": true,
198+
"text": "",
199+
"value": ""
200+
}
201+
],
202+
"query": "",
203+
"skipUrlSync": false,
204+
"type": "textbox"
205+
},
206+
{
207+
"allValue": ".+",
208+
"current": {},
209+
"datasource": {
210+
"type": "loki",
211+
"uid": "$datasource"
212+
},
213+
"definition": "",
214+
"hide": 0,
215+
"includeAll": false,
216+
"multi": false,
217+
"name": "namespace",
218+
"options": [],
219+
"query": {
220+
"label": "namespace",
221+
"refId": "LokiVariableQueryEditor-VariableQuery",
222+
"stream": "",
223+
"type": 1
224+
},
225+
"refresh": 1,
226+
"regex": "",
227+
"skipUrlSync": false,
228+
"sort": 0,
229+
"type": "query"
230+
},
231+
{
232+
"allValue": ".+",
233+
"current": {
234+
"selected": false,
235+
"text": [],
236+
"value": []
237+
},
238+
"datasource": {
239+
"type": "loki",
240+
"uid": "$datasource"
241+
},
242+
"definition": "label_values(container)",
243+
"hide": 0,
244+
"includeAll": false,
245+
"multi": true,
246+
"name": "container",
247+
"options": [],
248+
"query": "label_values(container)",
249+
"refresh": 1,
250+
"regex": "",
251+
"skipUrlSync": false,
252+
"sort": 0,
253+
"type": "query"
254+
}
255+
]
256+
},
257+
"time": {
258+
"from": "now-15m",
259+
"to": "now"
260+
},
261+
"timepicker": {},
262+
"timezone": "",
263+
"title": "Loki Kubernetes Logs",
264+
"uid": "lokik8slogsexploitteam",
265+
"version": 6,
266+
"weekStart": ""
267+
}

0 commit comments

Comments
 (0)