1 # Copyright 2019 Minsait - Indra S.A.
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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)
21 app: prometheus-kafka-exporter-grafana
22 grafana_dashboard: "1"
24 name: osm-monitoring-prometheus-kafka-exporter-grafana
26 k8s-sidecar-target-directory: "/tmp/dashboards/OSM Third Party Modules"
28 kafka-exporter-dashboard.json: |-
34 "datasource": "-- Grafana --",
37 "iconColor": "rgba(0, 211, 255, 1)",
38 "name": "Annotations & Alerts",
43 "description": "Kafka resource usage and throughput",
48 "iteration": 1569330292834,
56 "datasource": "Prometheus",
83 "nullPointMode": "connected",
91 "seriesOverrides": [],
97 "expr": "sum(rate(kafka_topic_partition_current_offset{instance=\"$instance\", topic=~\"$topic\"}[1m])) by (topic)",
98 "format": "time_series",
100 "legendFormat": "{{topic}}",
108 "title": "Message in per second",
112 "value_type": "individual"
150 "datasource": "Prometheus",
161 "alignAsTable": true,
176 "nullPointMode": "connected",
184 "seriesOverrides": [],
187 "steppedLine": false,
190 "expr": "sum(kafka_consumergroup_lag{instance=\"$instance\",topic=~\"$topic\"}) by (consumergroup, topic) ",
191 "format": "time_series",
195 "legendFormat": "{{consumergroup}} (topic: {{topic}})",
203 "title": "Lag by Consumer Group",
207 "value_type": "individual"
245 "datasource": "Prometheus",
256 "alignAsTable": true,
270 "nullPointMode": "connected",
278 "seriesOverrides": [],
281 "steppedLine": false,
284 "expr": "sum(delta(kafka_topic_partition_current_offset{instance=~'$instance', topic=~\"$topic\"}[5m])/5) by (topic)",
285 "format": "time_series",
287 "legendFormat": "{{topic}}",
295 "title": "Message in per minute",
299 "value_type": "individual"
337 "datasource": "Prometheus",
348 "alignAsTable": true,
364 "nullPointMode": "connected",
372 "seriesOverrides": [],
375 "steppedLine": false,
378 "expr": "sum(delta(kafka_consumergroup_current_offset{instance=~'$instance',topic=~\"$topic\"}[5m])/5) by (consumergroup, topic)",
379 "format": "time_series",
381 "legendFormat": "{{consumergroup}} (topic: {{topic}})",
389 "title": "Message consume per minute",
393 "value_type": "individual"
431 "datasource": "Prometheus",
442 "alignAsTable": true,
456 "nullPointMode": "null",
464 "seriesOverrides": [],
467 "steppedLine": false,
470 "expr": "sum by(topic) (kafka_topic_partitions{instance=\"$instance\",topic=~\"$topic\"})",
471 "format": "time_series",
473 "legendFormat": "{{topic}}",
481 "title": "Partitions per Topic",
485 "value_type": "individual"
533 "text": "osm-kafka-exporter-service",
534 "value": "osm-kafka-exporter-service"
536 "datasource": "Prometheus",
544 "query": "label_values(kafka_consumergroup_current_offset, job)",
547 "skipUrlSync": false,
549 "tagValuesQuery": "",
559 "text": "10.244.0.87:9092",
560 "value": "10.244.0.87:9092"
562 "datasource": "Prometheus",
570 "query": "label_values(kafka_consumergroup_current_offset{job=~\"$job\"}, instance)",
573 "skipUrlSync": false,
575 "tagValuesQuery": "",
589 "datasource": "Prometheus",
597 "query": "label_values(kafka_topic_partition_current_offset{instance='$instance',topic!='__consumer_offsets',topic!='--kafka'}, topic)",
600 "skipUrlSync": false,
602 "tagValuesQuery": "",
604 "tagsQuery": "topic",
615 "refresh_intervals": [
639 "timezone": "browser",
640 "title": "Kafka Exporter Overview",