JMXTrans query filter on Kafka topics with wildcards and exclude some topics

20 views
Skip to first unread message

Chandrashekhar C Pawali

unread,
Nov 23, 2023, 12:55:08 AM11/23/23
to jmxtrans
Hello team,
i am using JMXTranse to get metrics fro. Kafka and write to InfluxDB
Here is my config file:
{
           "outputWriters": [
            {
              "@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
              "url": "http://localhost:19043/insert/3449067056/influx/",
              "database": "odpkafka_jmx", "createDatabase": true,
              "username": "xyz",
              "password": "xyz"
            }
           ],
           "obj": "kafka.connect.mirror:partition=*,target=clusterB,topic=clusterA.*,type=MirrorSourceConnector",
            "attr": [
              "record-count"
            ],
            "resultAlias": "kafka.connect.mirror"
        }

Here i want filter all topics prefixed with clusterA.* but excluding clusterA.heartbeats So is there any way to use achieve this.
I tried by using Regex topic=clusterA\.(?!heartbeats)\w+  none of the metrics picked up.

Reply all
Reply to author
Forward
0 new messages