Skip to content

Commit c55b918

Browse files
committed
fix message count calculation
1 parent ef365e9 commit c55b918

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

dashboards/Kafka.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
},
7474
"targets": [
7575
{
76-
"expr": "kafka_log_log_value{topic=\"customer\"}",
76+
"expr": "sum(kafka_log_log_value{ name=\"LogEndOffset\" , topic = \"customer\" }) - sum(kafka_log_log_value{ name=\"LogStartOffset\", topic = \"customer\" })",
7777
"intervalFactor": 2,
7878
"legendFormat": "",
7979
"metric": "",
@@ -154,7 +154,7 @@
154154
},
155155
"targets": [
156156
{
157-
"expr": "kafka_log_log_value{topic=\"audit\"}",
157+
"expr": "sum(kafka_log_log_value{ name=\"LogEndOffset\" , topic = \"audit\" }) - sum(kafka_log_log_value{ name=\"LogStartOffset\", topic = \"audit\" })",
158158
"intervalFactor": 2,
159159
"legendFormat": "",
160160
"metric": "",

prometheus-jmx-exporter/confd/templates/kafka.yml.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ rules:
1818
- pattern : kafka.cluster<type=Partition, name=UnderReplicated, topic=(.+), partition=(.+)><>Value
1919
- pattern : kafka.utils<type=Throttler, name=cleaner-io><>OneMinuteRate
2020
- pattern : kafka.log<type=Log, name=LogEndOffset, topic=(.+), partition=(.+)><>Value
21+
- pattern : kafka.log<type=Log, name=LogStartOffset, topic=(.+), partition=(.+)><>Value
2122
- pattern : java.lang<type=(.*)>

0 commit comments

Comments
 (0)