1
0
Fork 0
mirror of https://github.com/monitoring-mixins/website.git synced 2024-12-14 11:37:31 +00:00
monitoring-mixins-website/assets/kafka/dashboards/kafka-topic-dashboard.json
2024-12-12 03:42:29 +00:00

776 lines
24 KiB
JSON

{
"links": [
{
"asDropdown": false,
"includeVars": true,
"keepTime": true,
"tags": [
"kafka-integration"
],
"title": "All Kafka dashboards",
"type": "dashboards"
}
],
"panels": [
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 0,
"x": 0,
"y": 0
},
"panels": [ ],
"title": "Topics",
"type": "row"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Mixed --"
},
"description": "Kafka active topics overview. ",
"fieldConfig": {
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Topic start offset"
},
"properties": [
{
"id": "unit",
"value": "none"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Topic end offset"
},
"properties": [
{
"id": "unit",
"value": "none"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Messages in per second"
},
"properties": [
{
"id": "unit",
"value": "mps"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Topic log size"
},
"properties": [
{
"id": "unit",
"value": "decbytes"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 1
},
"pluginVersion": "v11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "max by (job,kafka_cluster,topic,partition) (\n kafka_log_log_logstartoffset{topic!=\"__consumer_offsets\",job=\"integrations/kafka\",job=~\"$job\",kafka_cluster=~\"$kafka_cluster\",topic=~\"$topic\"}\n)",
"format": "time_series",
"instant": false,
"legendFormat": "{{ topic }}",
"refId": "Topic start offset"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "max by (job,kafka_cluster,topic,partition) (\n kafka_log_log_logendoffset{topic!=\"__consumer_offsets\",job=\"integrations/kafka\",job=~\"$job\",kafka_cluster=~\"$kafka_cluster\",topic=~\"$topic\"}\n)",
"format": "time_series",
"instant": false,
"legendFormat": "{{ topic }}",
"refId": "Topic end offset"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "sum by (job,kafka_cluster,topic,partition) (\n rate(kafka_topic_partition_current_offset{topic!=\"__consumer_offsets\",job=\"integrations/kafka\",job=~\"$job\",kafka_cluster=~\"$kafka_cluster\",topic=~\"$topic\"}[$__rate_interval])\n)",
"format": "time_series",
"instant": false,
"legendFormat": "{{ topic }}",
"refId": "Messages in per second"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "max by (job,kafka_cluster,topic,partition) (\n kafka_log_log_size{topic!=\"__consumer_offsets\",job=\"integrations/kafka\",job=~\"$job\",kafka_cluster=~\"$kafka_cluster\",topic=~\"$topic\"}\n)",
"format": "time_series",
"instant": false,
"legendFormat": "{{ topic }}",
"refId": "Topic log size"
}
],
"title": "Topic overview",
"transformations": [
{
"id": "timeSeriesTable"
},
{
"id": "merge"
},
{
"id": "renameByRegex",
"options": {
"regex": "Trend #(.*)",
"renamePattern": "$1"
}
},
{
"id": "filterByValue",
"options": {
"filters": [
{
"config": {
"id": "isNull",
"options": { }
},
"fieldName": "Messages in per second"
}
],
"match": "all",
"type": "exclude"
}
}
],
"type": "table"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "Messages in per second.",
"fieldConfig": {
"defaults": {
"custom": {
"fillOpacity": 30,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"showPoints": "never"
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Messages in per second"
},
"properties": [
{
"id": "unit",
"value": "mps"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 9
},
"options": {
"legend": {
"calcs": [ ],
"displayMode": "list"
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"pluginVersion": "v11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "sum by (job,kafka_cluster,topic) (\n rate(kafka_topic_partition_current_offset{topic!=\"__consumer_offsets\",job=\"integrations/kafka\",job=~\"$job\",kafka_cluster=~\"$kafka_cluster\",topic=~\"$topic\"}[$__rate_interval])\n)",
"format": "time_series",
"instant": false,
"legendFormat": "{{ topic }}",
"refId": "Messages in per second"
}
],
"title": "Messages in per second",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "Topic bytes in rate.",
"fieldConfig": {
"defaults": {
"custom": {
"fillOpacity": 30,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"showPoints": "never"
},
"decimals": 1,
"unit": "bps"
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Topic bytes in"
},
"properties": [
{
"id": "unit",
"value": "Bps"
}
]
}
]
},
"gridPos": {
"h": 6,
"w": 12,
"x": 0,
"y": 15
},
"options": {
"legend": {
"calcs": [ ],
"displayMode": "list"
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"pluginVersion": "v11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "sum by (job,kafka_cluster,topic) (\n rate(kafka_server_brokertopicmetrics_bytesinpersec{topic!=\"__consumer_offsets\",job=\"integrations/kafka\",job=~\"$job\",kafka_cluster=~\"$kafka_cluster\",topic=~\"$topic\"}[$__rate_interval])\n)",
"format": "time_series",
"instant": false,
"legendFormat": "{{ topic }}",
"refId": "Topic bytes in"
}
],
"title": "Topic bytes in",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "Topic bytes out rate.",
"fieldConfig": {
"defaults": {
"custom": {
"fillOpacity": 30,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"showPoints": "never"
},
"decimals": 1,
"unit": "bps"
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Topic bytes out"
},
"properties": [
{
"id": "unit",
"value": "Bps"
}
]
}
]
},
"gridPos": {
"h": 6,
"w": 12,
"x": 12,
"y": 15
},
"options": {
"legend": {
"calcs": [ ],
"displayMode": "list"
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"pluginVersion": "v11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "sum by (job,kafka_cluster,topic) (\n rate(kafka_server_brokertopicmetrics_bytesoutpersec{topic!=\"__consumer_offsets\",job=\"integrations/kafka\",job=~\"$job\",kafka_cluster=~\"$kafka_cluster\",topic=~\"$topic\"}[$__rate_interval])\n)",
"format": "time_series",
"instant": false,
"legendFormat": "{{ topic }}",
"refId": "Topic bytes out"
}
],
"title": "Topic bytes out",
"type": "timeseries"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 0,
"x": 0,
"y": 23
},
"panels": [ ],
"title": "Consumer groups",
"type": "row"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Mixed --"
},
"fieldConfig": {
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Consumer group consume rate"
},
"properties": [
{
"id": "unit",
"value": "mps"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Consumer group lag"
},
"properties": [
{
"id": "unit",
"value": "short"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Consumer group lag in ms"
},
"properties": [
{
"id": "unit",
"value": "ms"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 24
},
"pluginVersion": "v11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "avg by (job,kafka_cluster,consumergroup,topic) (\n rate(kafka_consumergroup_current_offset{topic!=\"__consumer_offsets\",consumergroup!=\"\",job=\"integrations/kafka\",job=~\"$job\",kafka_cluster=~\"$kafka_cluster\",topic=~\"$topic\",consumergroup=~\"$consumergroup\"}[$__rate_interval])\n)",
"format": "time_series",
"instant": false,
"legendFormat": "{{ consumergroup }} ({{ topic }})",
"refId": "Consumer group consume rate"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "sum by (job,kafka_cluster,consumergroup,topic) (\n kafka_consumergroup_uncommitted_offsets{topic!=\"__consumer_offsets\",consumergroup!=\"\",job=\"integrations/kafka\",job=~\"$job\",kafka_cluster=~\"$kafka_cluster\",topic=~\"$topic\",consumergroup=~\"$consumergroup\"}\n)",
"format": "time_series",
"instant": false,
"legendFormat": "{{ consumergroup }} ({{ topic }})",
"refId": "Consumer group lag"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "avg by (job,kafka_cluster,consumergroup,topic) (\n kafka_consumer_lag_millis{topic!=\"__consumer_offsets\",consumergroup!=\"\",job=\"integrations/kafka\",job=~\"$job\",kafka_cluster=~\"$kafka_cluster\",topic=~\"$topic\",consumergroup=~\"$consumergroup\"}\n)",
"format": "time_series",
"instant": false,
"legendFormat": "{{ consumergroup }} ({{ topic }})",
"refId": "Consumer group lag in ms"
}
],
"title": "Consumer group overview",
"transformations": [
{
"id": "timeSeriesTable"
},
{
"id": "merge"
},
{
"id": "renameByRegex",
"options": {
"regex": "Trend #(.*)",
"renamePattern": "$1"
}
},
{
"id": "filterByValue",
"options": {
"filters": [
{
"config": {
"id": "isNotNull",
"options": { }
},
"fieldName": "Consumer group consume rate"
}
],
"match": "all",
"type": "include"
}
}
],
"type": "table"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "Consumer group consume rate.",
"fieldConfig": {
"defaults": {
"custom": {
"fillOpacity": 30,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"showPoints": "never"
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Consumer group consume rate"
},
"properties": [
{
"id": "unit",
"value": "mps"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 8,
"x": 0,
"y": 32
},
"options": {
"legend": {
"calcs": [ ],
"displayMode": "list"
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"pluginVersion": "v11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "avg by (job,kafka_cluster,consumergroup,topic) (\n rate(kafka_consumergroup_current_offset{topic!=\"__consumer_offsets\",consumergroup!=\"\",job=\"integrations/kafka\",job=~\"$job\",kafka_cluster=~\"$kafka_cluster\",topic=~\"$topic\",consumergroup=~\"$consumergroup\"}[$__rate_interval])\n)",
"format": "time_series",
"instant": false,
"legendFormat": "{{ consumergroup }} ({{ topic }})",
"refId": "Consumer group consume rate"
}
],
"title": "Consumer group consume rate",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "Current approximate lag of a ConsumerGroup at Topic/Partition.",
"fieldConfig": {
"defaults": {
"custom": {
"fillOpacity": 30,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"showPoints": "never"
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Consumer group lag"
},
"properties": [
{
"id": "unit",
"value": "short"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 8,
"x": 8,
"y": 32
},
"options": {
"legend": {
"calcs": [ ],
"displayMode": "list"
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"pluginVersion": "v11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "sum by (job,kafka_cluster,consumergroup,topic) (\n kafka_consumergroup_uncommitted_offsets{topic!=\"__consumer_offsets\",consumergroup!=\"\",job=\"integrations/kafka\",job=~\"$job\",kafka_cluster=~\"$kafka_cluster\",topic=~\"$topic\",consumergroup=~\"$consumergroup\"}\n)",
"format": "time_series",
"instant": false,
"legendFormat": "{{ consumergroup }} ({{ topic }})",
"refId": "Consumer group lag"
}
],
"title": "Consumer group lag",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "Current approximate lag of a ConsumerGroup at Topic/Partition.",
"fieldConfig": {
"defaults": {
"custom": {
"fillOpacity": 30,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"showPoints": "never"
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Consumer group lag in ms"
},
"properties": [
{
"id": "unit",
"value": "ms"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 8,
"x": 16,
"y": 32
},
"options": {
"legend": {
"calcs": [ ],
"displayMode": "list"
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"pluginVersion": "v11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "avg by (job,kafka_cluster,consumergroup,topic) (\n kafka_consumer_lag_millis{topic!=\"__consumer_offsets\",consumergroup!=\"\",job=\"integrations/kafka\",job=~\"$job\",kafka_cluster=~\"$kafka_cluster\",topic=~\"$topic\",consumergroup=~\"$consumergroup\"}\n)",
"format": "time_series",
"instant": false,
"legendFormat": "{{ consumergroup }} ({{ topic }})",
"refId": "Consumer group lag in ms"
}
],
"title": "Consumer group lag in ms",
"type": "timeseries"
}
],
"schemaVersion": 39,
"tags": [
"kafka-integration"
],
"templating": {
"list": [
{
"label": "Data source",
"name": "datasource",
"query": "prometheus",
"regex": "",
"type": "datasource"
},
{
"allValue": ".+",
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"includeAll": true,
"label": "Job",
"multi": true,
"name": "job",
"query": "label_values(kafka_log_log_logstartoffset{topic!=\"__consumer_offsets\",job=\"integrations/kafka\"}, job)",
"refresh": 2,
"sort": 1,
"type": "query"
},
{
"allValue": ".+",
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"includeAll": true,
"label": "Kafka_cluster",
"multi": true,
"name": "kafka_cluster",
"query": "label_values(kafka_log_log_logstartoffset{topic!=\"__consumer_offsets\",job=\"integrations/kafka\",job=~\"$job\"}, kafka_cluster)",
"refresh": 2,
"sort": 1,
"type": "query"
},
{
"allValue": ".+",
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"includeAll": true,
"label": "Topic",
"multi": true,
"name": "topic",
"query": "label_values(kafka_log_log_logstartoffset{topic!=\"__consumer_offsets\",job=\"integrations/kafka\",job=~\"$job\",kafka_cluster=~\"$kafka_cluster\"}, topic)",
"refresh": 2,
"sort": 1,
"type": "query"
},
{
"allValue": ".+",
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"includeAll": true,
"label": "Consumergroup",
"multi": true,
"name": "consumergroup",
"query": "label_values(kafka_consumergroup_uncommitted_offsets{topic!=\"__consumer_offsets\",consumergroup!=\"\",job=\"integrations/kafka\",job=~\"$job\",kafka_cluster=~\"$kafka_cluster\",topic=~\"$topic\"}, consumergroup)",
"refresh": 2,
"sort": 1,
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timezone": "utc",
"title": "Kafka topic overview",
"uid": "kafka-kafka-topic-dashboard"
}