Формат файла конфигурации Kafka mirrormaker jmxtrans - PullRequest
0 голосов
/ 03 сентября 2018

Я использую 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"
                    }
                }]
            }
        ]
    }]
}

This is the kafka mirrormaker data information seen on jconsole

Я не могу получить данные от графана

...