Adding OSM Monitoring dashboards to Grafana charm
[osm/devops.git] / installers / charm / grafana / files / kafka_exporter_dashboard.yaml
1 # Copyright 2021 Canonical Ltd.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may
4 # not use this file except in compliance with the License. You may obtain
5 # a copy of the License at
6 #
7 #         http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations
13 # under the License.
14 #
15 # For those usages not covered by the Apache License, Version 2.0 please
16 # contact: legal@canonical.com
17 #
18 # To get in touch with the maintainers, please contact:
19 # osm-charmers@lists.launchpad.net
20 ##
21
22 ---
23 annotations:
24   list:
25     - builtIn: 1
26       datasource: '-- Grafana --'
27       enable: true
28       hide: true
29       iconColor: 'rgba(0, 211, 255, 1)'
30       name: Annotations & Alerts
31       type: dashboard
32 description: Kafka resource usage and throughput
33 editable: true
34 gnetId: 7589
35 graphTooltip: 0
36 id: 10
37 iteration: 1578848023483
38 links: []
39 panels:
40   - aliasColors: {}
41     bars: false
42     dashLength: 10
43     dashes: false
44     datasource: Prometheus
45     fill: 0
46     fillGradient: 0
47     gridPos:
48       h: 10
49       w: 10
50       x: 0
51       'y': 0
52     id: 14
53     legend:
54       alignAsTable: true
55       avg: false
56       current: true
57       max: true
58       min: false
59       rightSide: false
60       show: true
61       sideWidth: 480
62       sort: max
63       sortDesc: true
64       total: false
65       values: true
66     lines: true
67     linewidth: 1
68     links: []
69     nullPointMode: connected
70     options:
71       dataLinks: []
72     percentage: false
73     pointradius: 5
74     points: false
75     renderer: flot
76     seriesOverrides: []
77     spaceLength: 10
78     stack: false
79     steppedLine: false
80     targets:
81       - expr: >-
82           sum(kafka_topic_partition_current_offset -
83           kafka_topic_partition_oldest_offset{instance="$instance",
84           topic=~"$topic"}) by (topic)
85         format: time_series
86         intervalFactor: 1
87         legendFormat: '{{topic}}'
88         refId: B
89     thresholds: []
90     timeFrom: null
91     timeRegions: []
92     timeShift: null
93     title: Messages stored per topic
94     tooltip:
95       shared: true
96       sort: 0
97       value_type: individual
98     type: graph
99     xaxis:
100       buckets: null
101       mode: time
102       name: null
103       show: true
104       values: []
105     yaxes:
106       - format: short
107         label: null
108         logBase: 1
109         max: null
110         min: '0'
111         show: true
112       - format: short
113         label: null
114         logBase: 1
115         max: null
116         min: null
117         show: true
118     yaxis:
119       align: false
120       alignLevel: null
121   - aliasColors: {}
122     bars: false
123     dashLength: 10
124     dashes: false
125     datasource: Prometheus
126     fill: 0
127     fillGradient: 0
128     gridPos:
129       h: 10
130       w: 10
131       x: 10
132       'y': 0
133     id: 12
134     legend:
135       alignAsTable: true
136       avg: false
137       current: true
138       max: true
139       min: false
140       rightSide: false
141       show: true
142       sideWidth: 480
143       sort: max
144       sortDesc: true
145       total: false
146       values: true
147     lines: true
148     linewidth: 1
149     links: []
150     nullPointMode: connected
151     options:
152       dataLinks: []
153     percentage: false
154     pointradius: 5
155     points: false
156     renderer: flot
157     seriesOverrides: []
158     spaceLength: 10
159     stack: false
160     steppedLine: false
161     targets:
162       - expr: >-
163           sum(kafka_consumergroup_lag{instance="$instance",topic=~"$topic"}) by
164           (consumergroup, topic)
165         format: time_series
166         instant: false
167         interval: ''
168         intervalFactor: 1
169         legendFormat: ' {{topic}} ({{consumergroup}})'
170         refId: A
171     thresholds: []
172     timeFrom: null
173     timeRegions: []
174     timeShift: null
175     title: Lag by  Consumer Group
176     tooltip:
177       shared: true
178       sort: 2
179       value_type: individual
180     type: graph
181     xaxis:
182       buckets: null
183       mode: time
184       name: null
185       show: true
186       values: []
187     yaxes:
188       - format: short
189         label: ''
190         logBase: 1
191         max: null
192         min: '0'
193         show: true
194       - format: short
195         label: null
196         logBase: 1
197         max: null
198         min: null
199         show: true
200     yaxis:
201       align: false
202       alignLevel: null
203   - aliasColors: {}
204     bars: false
205     dashLength: 10
206     dashes: false
207     datasource: Prometheus
208     fill: 0
209     fillGradient: 0
210     gridPos:
211       h: 10
212       w: 10
213       x: 0
214       'y': 10
215     id: 16
216     legend:
217       alignAsTable: true
218       avg: false
219       current: true
220       max: true
221       min: false
222       rightSide: false
223       show: true
224       sideWidth: 480
225       total: false
226       values: true
227     lines: true
228     linewidth: 1
229     links: []
230     nullPointMode: connected
231     options:
232       dataLinks: []
233     percentage: false
234     pointradius: 5
235     points: false
236     renderer: flot
237     seriesOverrides: []
238     spaceLength: 10
239     stack: false
240     steppedLine: false
241     targets:
242       - expr: >-
243           sum(delta(kafka_topic_partition_current_offset{instance=~'$instance',
244           topic=~"$topic"}[5m])/5) by (topic)
245         format: time_series
246         intervalFactor: 1
247         legendFormat: '{{topic}}'
248         refId: A
249     thresholds: []
250     timeFrom: null
251     timeRegions: []
252     timeShift: null
253     title: Messages produced per minute
254     tooltip:
255       shared: true
256       sort: 0
257       value_type: individual
258     type: graph
259     xaxis:
260       buckets: null
261       mode: time
262       name: null
263       show: true
264       values: []
265     yaxes:
266       - format: short
267         label: null
268         logBase: 1
269         max: null
270         min: null
271         show: true
272       - format: short
273         label: null
274         logBase: 1
275         max: null
276         min: null
277         show: true
278     yaxis:
279       align: false
280       alignLevel: null
281   - aliasColors: {}
282     bars: false
283     dashLength: 10
284     dashes: false
285     datasource: Prometheus
286     fill: 0
287     fillGradient: 0
288     gridPos:
289       h: 10
290       w: 10
291       x: 10
292       'y': 10
293     id: 18
294     legend:
295       alignAsTable: true
296       avg: false
297       current: true
298       max: true
299       min: false
300       rightSide: false
301       show: true
302       sideWidth: 480
303       sort: current
304       sortDesc: true
305       total: false
306       values: true
307     lines: true
308     linewidth: 1
309     links: []
310     nullPointMode: connected
311     options:
312       dataLinks: []
313     percentage: false
314     pointradius: 5
315     points: false
316     renderer: flot
317     seriesOverrides: []
318     spaceLength: 10
319     stack: false
320     steppedLine: false
321     targets:
322       - expr: >-
323           sum(delta(kafka_consumergroup_current_offset{instance=~'$instance',topic=~"$topic"}[5m])/5)
324           by (consumergroup, topic)
325         format: time_series
326         intervalFactor: 1
327         legendFormat: ' {{topic}} ({{consumergroup}})'
328         refId: A
329     thresholds: []
330     timeFrom: null
331     timeRegions: []
332     timeShift: null
333     title: Messages consumed per minute
334     tooltip:
335       shared: true
336       sort: 0
337       value_type: individual
338     type: graph
339     xaxis:
340       buckets: null
341       mode: time
342       name: null
343       show: true
344       values: []
345     yaxes:
346       - format: short
347         label: null
348         logBase: 1
349         max: null
350         min: null
351         show: true
352       - format: short
353         label: null
354         logBase: 1
355         max: null
356         min: null
357         show: true
358     yaxis:
359       align: false
360       alignLevel: null
361   - aliasColors: {}
362     bars: true
363     dashLength: 10
364     dashes: false
365     datasource: Prometheus
366     fill: 1
367     fillGradient: 0
368     gridPos:
369       h: 7
370       w: 20
371       x: 0
372       'y': 20
373     id: 8
374     legend:
375       alignAsTable: true
376       avg: false
377       current: true
378       max: false
379       min: false
380       rightSide: true
381       show: true
382       sideWidth: 420
383       total: false
384       values: true
385     lines: false
386     linewidth: 1
387     links: []
388     nullPointMode: 'null'
389     options:
390       dataLinks: []
391     percentage: false
392     pointradius: 5
393     points: false
394     renderer: flot
395     seriesOverrides: []
396     spaceLength: 10
397     stack: false
398     steppedLine: false
399     targets:
400       - expr: >-
401           sum by(topic)
402           (kafka_topic_partitions{instance="$instance",topic=~"$topic"})
403         format: time_series
404         intervalFactor: 1
405         legendFormat: '{{topic}}'
406         refId: A
407     thresholds: []
408     timeFrom: null
409     timeRegions: []
410     timeShift: null
411     title: Partitions per Topic
412     tooltip:
413       shared: false
414       sort: 0
415       value_type: individual
416     type: graph
417     xaxis:
418       buckets: null
419       mode: series
420       name: null
421       show: false
422       values:
423         - current
424     yaxes:
425       - format: short
426         label: null
427         logBase: 1
428         max: null
429         min: null
430         show: true
431       - format: short
432         label: null
433         logBase: 1
434         max: null
435         min: null
436         show: true
437     yaxis:
438       align: false
439       alignLevel: null
440 refresh: 5s
441 schemaVersion: 19
442 style: dark
443 tags: []
444 templating:
445   list:
446     - allValue: null
447       current:
448         text: osm-kafka-exporter-service
449         value: osm-kafka-exporter-service
450       datasource: Prometheus
451       definition: ''
452       hide: 0
453       includeAll: false
454       label: Job
455       multi: false
456       name: job
457       options: []
458       query: 'label_values(kafka_consumergroup_current_offset, job)'
459       refresh: 1
460       regex: ''
461       skipUrlSync: false
462       sort: 0
463       tagValuesQuery: ''
464       tags: []
465       tagsQuery: ''
466       type: query
467       useTags: false
468     - allValue: null
469       datasource: Prometheus
470       definition: ''
471       hide: 0
472       includeAll: false
473       label: Instance
474       multi: false
475       name: instance
476       options: []
477       query: >-
478         'label_values(kafka_consumergroup_current_offset{job=~"$job"},'
479         'instance)'
480       refresh: 1
481       regex: ''
482       skipUrlSync: false
483       sort: 0
484       tagValuesQuery: ''
485       tags: []
486       tagsQuery: ''
487       type: query
488       useTags: false
489     - allValue: null
490       current:
491         tags: []
492         text: All
493         value:
494           - $__all
495       datasource: Prometheus
496       definition: ''
497       hide: 0
498       includeAll: true
499       label: Topic
500       multi: true
501       name: topic
502       options: []
503       query: >-
504         label_values(kafka_topic_partition_current_offset{instance='$instance',topic!='__consumer_offsets',topic!='--kafka'},
505         topic)
506       refresh: 1
507       regex: ''
508       skipUrlSync: false
509       sort: 1
510       tagValuesQuery: ''
511       tags: []
512       tagsQuery: topic
513       type: query
514       useTags: false
515 time:
516   from: now-1h
517   to: now
518 timepicker:
519   refresh_intervals:
520     - 5s
521     - 10s
522     - 30s
523     - 1m
524     - 5m
525     - 15m
526     - 30m
527     - 1h
528     - 2h
529     - 1d
530   time_options:
531     - 5m
532     - 15m
533     - 1h
534     - 6h
535     - 12h
536     - 24h
537     - 2d
538     - 7d
539     - 30d
540 timezone: browser
541 title: Kafka
542 uid: jwPKIsniz
543 version: 2