kafka mirrormaker jmxtrans配置文件格式

jogvjijk  于 2021-06-06  发布在  Kafka
关注(0)|答案(0)|浏览(260)

我使用jmxtrans来监视kafka mirrormaker,但是我的json格式似乎有问题,数据无法显示
如何编写这个json文件,谢谢

{
    "servers": [{
        "port": "5448",
        "host": "10.10.21.10",
        "queries": [{
                "obj": "kafka.consumer:type=ConsumerTopicMetrics,name=BytesInPerSec,topic=mirror_group-*",
                "attr": ["Count", "MeanRate", "OneMinuteRate"],
                "resultAlias": "mirror_group-*",
                "outputWriters": [{
                    "@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
                    "url": "http://10.10.21.10:8086",
                    "username": "root",
                    "password": "123",
                    "database": "jmxDB",
                    "tags": {
                        "application": "BytesInPerSec"
                    }
                }]
            },
            {
                "obj": "kafka.consumer:type=ConsumerTopicMetrics,name=MessagesInPerSec,topic=mirror_group-*",
                "attr": ["Count", "MeanRate", "OneMinuteRate"],
                "resultAlias": "mirror_group-*",
                "outputWriters": [{
                    "@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
                    "url": "http://10.10.21.10:8086",
                    "username": "root",
                    "password": "123",
                    "database": "jmxDB",
                    "tags": {
                        "application": "MessagesInPerSec"
                    }
                }]
            },
            {
                "obj": "kafka.producer:type=ProducerRequestMetrics,name=ProducerRequestRateAndTimeMs,topic=mirror_group-*",
                "attr": ["Count", "Max", "Min", "50thPercentile", "75thPercentile", "95thPercentile"],
                "resultAlias": "mirror_group-*",
                "outputWriters": [{
                    "@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
                    "url": "http://10.10.21.10:8086",
                    "username": "root",
                    "password": "123",
                    "database": "jmxDB",
                    "tags": {
                        "application": "ProducerRequestRateAndTimeMs"
                    }
                }]
            },
            {
                "obj": "kafka.producer:type=ProducerRequestMetrics,name=ProducerRequestSize,topic=mirror_group-*",
                "attr": ["Count", "Max", "Min", "50thPercentile", "75thPercentile", "95thPercentile"],
                "resultAlias": "mirror_group-*",
                "outputWriters": [{
                    "@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
                    "url": "http://10.10.21.10:8086",
                    "username": "root",
                    "password": "123",
                    "database": "jmxDB",
                    "tags": {
                        "application": "ProducerRequestSize"
                    }
                }]
            }
        ]
    }]
}


我无法从格拉法纳那里得到数据

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题