我使用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"
}
}]
}
]
}]
}
我无法从格拉法纳那里得到数据
暂无答案!
目前还没有任何答案,快来回答吧!