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