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