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