Skip to content

Commit fb79358

Browse files
committed
Add cAdvisor Docker Insights dashboard for monitoring container metrics
- Introduced a new Grafana dashboard JSON file for cAdvisor Docker Insights. - Configured data source to use Prometheus for metrics collection. - Included panels for monitoring running containers, CPU usage, memory usage, I/O operations, and network traffic. - Added a heatmap panel to visualize container restarts over time. - Set refresh interval to 5 seconds and default time range to the last 3 hours. - Provided a description for the dashboard to enhance usability.
1 parent 0829fea commit fb79358

6 files changed

+713
-98
lines changed

grafana/Loki Overview.json renamed to grafana/Kubernetes Logs from Loki_18494_rev1.json

Lines changed: 123 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"__inputs": [
33
{
4-
"name": "DS_LOKI",
5-
"label": "loki",
4+
"name": "DS_GRAFANACLOUD-SS3RG3-LOGS",
5+
"label": "grafanacloud-ss3rg3-logs",
66
"description": "",
77
"type": "datasource",
88
"pluginId": "loki",
@@ -15,7 +15,7 @@
1515
"type": "grafana",
1616
"id": "grafana",
1717
"name": "Grafana",
18-
"version": "11.3.1"
18+
"version": "9.5.0-cloud.2.f143d34"
1919
},
2020
{
2121
"type": "panel",
@@ -39,11 +39,10 @@
3939
"annotations": {
4040
"list": [
4141
{
42-
"$$hashKey": "object:75",
4342
"builtIn": 1,
4443
"datasource": {
45-
"type": "datasource",
46-
"uid": "grafana"
44+
"type": "grafana",
45+
"uid": "-- Grafana --"
4746
},
4847
"enable": true,
4948
"hide": true,
@@ -53,68 +52,45 @@
5352
}
5453
]
5554
},
56-
"description": "Log Viewer Dashboard for Loki",
55+
"description": "Basic dashboard for Kubernetes Logs from Loki. You will need to make your own customizations.",
5756
"editable": true,
5857
"fiscalYearStartMonth": 0,
5958
"graphTooltip": 0,
6059
"id": null,
61-
"links": [
62-
{
63-
"$$hashKey": "object:59",
64-
"icon": "bolt",
65-
"includeVars": true,
66-
"keepTime": true,
67-
"tags": [],
68-
"targetBlank": true,
69-
"title": "View In Explore",
70-
"type": "link",
71-
"url": "/explore?orgId=1&left=[\"now-1h\",\"now\",\"Loki\",{\"expr\":\"{service_name=\\\"$service_name\\\"}\"},{\"ui\":[true,true,true,\"none\"]}]"
72-
},
73-
{
74-
"$$hashKey": "object:61",
75-
"icon": "external link",
76-
"tags": [],
77-
"targetBlank": true,
78-
"title": "Learn LogQL",
79-
"type": "link",
80-
"url": "https://grafana.com/docs/loki/latest/logql/"
81-
}
82-
],
60+
"links": [],
61+
"liveNow": true,
8362
"panels": [
8463
{
8564
"datasource": {
8665
"type": "loki",
87-
"uid": "${DS_LOKI}"
66+
"uid": "${DS_GRAFANACLOUD-SS3RG3-LOGS}"
8867
},
8968
"fieldConfig": {
9069
"defaults": {
9170
"color": {
9271
"mode": "palette-classic"
9372
},
9473
"custom": {
95-
"axisBorderShow": false,
9674
"axisCenteredZero": false,
9775
"axisColorMode": "text",
9876
"axisLabel": "",
99-
"axisPlacement": "hidden",
77+
"axisPlacement": "auto",
10078
"barAlignment": 0,
101-
"barWidthFactor": 0.6,
102-
"drawStyle": "bars",
103-
"fillOpacity": 100,
79+
"drawStyle": "line",
80+
"fillOpacity": 0,
10481
"gradientMode": "none",
10582
"hideFrom": {
10683
"legend": false,
10784
"tooltip": false,
10885
"viz": false
10986
},
110-
"insertNulls": false,
11187
"lineInterpolation": "linear",
11288
"lineWidth": 1,
11389
"pointSize": 5,
11490
"scaleDistribution": {
11591
"type": "linear"
11692
},
117-
"showPoints": "never",
93+
"showPoints": "auto",
11894
"spanNulls": false,
11995
"stacking": {
12096
"group": "A",
@@ -124,53 +100,47 @@
124100
"mode": "off"
125101
}
126102
},
127-
"links": [],
128103
"mappings": [],
129104
"thresholds": {
130105
"mode": "absolute",
131106
"steps": [
132107
{
133108
"color": "green",
134109
"value": null
135-
},
136-
{
137-
"color": "red",
138-
"value": 80
139110
}
140111
]
141-
},
142-
"unit": "short"
112+
}
143113
},
144114
"overrides": []
145115
},
146116
"gridPos": {
147-
"h": 3,
117+
"h": 5,
148118
"w": 24,
149119
"x": 0,
150120
"y": 0
151121
},
152-
"id": 6,
122+
"id": 2,
153123
"options": {
154124
"legend": {
155125
"calcs": [],
156126
"displayMode": "list",
157127
"placement": "bottom",
158-
"showLegend": false
128+
"showLegend": true
159129
},
160130
"tooltip": {
161-
"mode": "multi",
131+
"mode": "single",
162132
"sort": "none"
163133
}
164134
},
165-
"pluginVersion": "11.3.1",
166135
"targets": [
167136
{
168137
"datasource": {
169138
"type": "loki",
170-
"uid": "${DS_LOKI}"
139+
"uid": "${DS_GRAFANACLOUD-SS3RG3-LOGS}"
171140
},
172-
"expr": "sum(count_over_time({service_name=\"$service_name\"} |= \"$search\" [$__interval]))",
173-
"legendFormat": "",
141+
"editorMode": "code",
142+
"expr": "sum(count_over_time({namespace=~\"$namespace\", pod=~\"$pod\"} |~ \"$search\"[$__interval]))",
143+
"queryType": "range",
174144
"refId": "A"
175145
}
176146
],
@@ -179,108 +149,163 @@
179149
{
180150
"datasource": {
181151
"type": "loki",
182-
"uid": "${DS_LOKI}"
152+
"uid": "${DS_GRAFANACLOUD-SS3RG3-LOGS}"
183153
},
184154
"gridPos": {
185-
"h": 25,
155+
"h": 16,
186156
"w": 24,
187157
"x": 0,
188-
"y": 3
158+
"y": 5
189159
},
190-
"id": 2,
191-
"maxDataPoints": "",
160+
"id": 3,
192161
"options": {
193-
"dedupStrategy": "none",
162+
"dedupStrategy": "exact",
194163
"enableLogDetails": true,
195164
"prettifyLogMessage": false,
196165
"showCommonLabels": false,
197-
"showLabels": false,
166+
"showLabels": true,
198167
"showTime": true,
199168
"sortOrder": "Descending",
200-
"wrapLogMessage": false
169+
"wrapLogMessage": true
201170
},
202-
"pluginVersion": "11.3.1",
203171
"targets": [
204172
{
205173
"datasource": {
206174
"type": "loki",
207-
"uid": "${DS_LOKI}"
175+
"uid": "${DS_GRAFANACLOUD-SS3RG3-LOGS}"
208176
},
209-
"expr": "{service_name=\"$service_name\"} |= \"$search\" | logfmt",
210-
"hide": false,
211-
"legendFormat": "",
177+
"editorMode": "code",
178+
"expr": "{namespace=~\"$namespace\", pod=~\"$pod\"} |~ \"(?i)$search\"",
179+
"queryType": "range",
212180
"refId": "A"
213181
}
214182
],
215-
"transparent": true,
183+
"title": "Logs Panel",
216184
"type": "logs"
217185
}
218186
],
219-
"refresh": false,
220-
"schemaVersion": 40,
187+
"refresh": "10s",
188+
"schemaVersion": 38,
189+
"style": "dark",
221190
"tags": [],
222191
"templating": {
223192
"list": [
224193
{
194+
"allValue": ".+",
225195
"current": {},
226196
"datasource": {
227197
"type": "loki",
228-
"uid": "${DS_LOKI}"
198+
"uid": "${DS_GRAFANACLOUD-SS3RG3-LOGS}"
229199
},
230200
"definition": "",
231-
"includeAll": false,
232-
"label": "Service Name",
233-
"name": "service_name",
201+
"hide": 0,
202+
"includeAll": true,
203+
"label": "Namespace",
204+
"multi": false,
205+
"name": "namespace",
206+
"options": [],
207+
"query": {
208+
"label": "namespace",
209+
"refId": "LokiVariableQueryEditor-VariableQuery",
210+
"stream": "",
211+
"type": 1
212+
},
213+
"refresh": 1,
214+
"regex": "",
215+
"skipUrlSync": false,
216+
"sort": 0,
217+
"type": "query"
218+
},
219+
{
220+
"allValue": ".+",
221+
"current": {},
222+
"datasource": {
223+
"type": "loki",
224+
"uid": "${DS_GRAFANACLOUD-SS3RG3-LOGS}"
225+
},
226+
"definition": "",
227+
"hide": 0,
228+
"includeAll": true,
229+
"label": "Pod",
230+
"multi": false,
231+
"name": "pod",
234232
"options": [],
235233
"query": {
236-
"label": "service_name",
234+
"label": "pod",
237235
"refId": "LokiVariableQueryEditor-VariableQuery",
238236
"stream": "",
239237
"type": 1
240238
},
241239
"refresh": 1,
242240
"regex": "",
241+
"skipUrlSync": false,
242+
"sort": 0,
243243
"type": "query"
244244
},
245245
{
246246
"current": {
247-
"text": "",
248-
"value": ""
247+
"selected": true,
248+
"text": "error|fatal",
249+
"value": "error|fatal"
249250
},
250-
"label": "String Match",
251+
"hide": 0,
252+
"includeAll": false,
253+
"label": "Search Term",
254+
"multi": false,
251255
"name": "search",
252256
"options": [
253257
{
254258
"selected": true,
255-
"text": "",
256-
"value": ""
259+
"text": "error|fatal",
260+
"value": "error|fatal"
261+
},
262+
{
263+
"selected": false,
264+
"text": "warn|error|fatal",
265+
"value": "warn|error|fatal"
266+
},
267+
{
268+
"selected": false,
269+
"text": "fatal",
270+
"value": "fatal"
271+
},
272+
{
273+
"selected": false,
274+
"text": "error",
275+
"value": "error"
276+
},
277+
{
278+
"selected": false,
279+
"text": "warn",
280+
"value": "warn"
281+
},
282+
{
283+
"selected": false,
284+
"text": "info",
285+
"value": "info"
286+
},
287+
{
288+
"selected": false,
289+
"text": ".+",
290+
"value": ".+"
257291
}
258292
],
259-
"query": "",
260-
"type": "textbox"
293+
"query": "error|fatal,warn|error|fatal,fatal,error,warn,info,.+",
294+
"queryValue": "",
295+
"skipUrlSync": false,
296+
"type": "custom"
261297
}
262298
]
263299
},
264300
"time": {
265-
"from": "now-1h",
301+
"from": "now-6h",
266302
"to": "now"
267303
},
268-
"timepicker": {
269-
"refresh_intervals": [
270-
"10s",
271-
"30s",
272-
"1m",
273-
"5m",
274-
"15m",
275-
"30m",
276-
"1h",
277-
"2h",
278-
"1d"
279-
]
280-
},
304+
"timepicker": {},
281305
"timezone": "",
282-
"title": "Logs / App",
283-
"uid": "sadlil-loki-apps-dashboard",
284-
"version": 7,
285-
"weekStart": ""
306+
"title": "Kubernetes Logs from Loki",
307+
"uid": "ae3ec2c4-1c19-4450-9403-226270fe0c4f",
308+
"version": 8,
309+
"weekStart": "",
310+
"gnetId": 18494
286311
}

0 commit comments

Comments
 (0)