0

我是 jmxtrans 的新手

我使用此博客为 kafka 设置 jmxtrans 监控:http: //blogs.impetus.com/big_data/big_data_technologies/kafka-monitoring-using-jmx-jmxtrans.do

但我收到以下错误。在最底部是我的 json 文件

[

20 Nov 2013 09:44:18] [ServerScheduler_Worker-6] 300560 DEBUG (com.googlecode.jmxtrans.util.JmxUtils:102) - ----- Creating 1 query threads
[20 Nov 2013 09:44:18] [pool-6-thread-1] 300573 DEBUG (com.googlecode.jmxtrans.util.JmxUtils:195) - Executing queryName: kafka:type=kafka.SocketServerStats from query: Query [obj=kafka:type=kafka.SocketServerStats, resultAlias=kafka.socketServerStats, attr=[AvgFetchRequestMs, AvgProduceRequestMs, BytesReadPerSecond, BytesWrittenPerSecond, FetchRequestsPerSecond, MaxFetchRequestMs, MaxProduceRequestMs, NumFetchRequests, NumProduceRequests, ProduceRequestsPerSecond, TotalBytesRead, TotalBytesWritten, TotalFetchRequestMs, TotalProduceRequestMs]]
[20 Nov 2013 09:44:21] [pool-5-thread-1] 303976 ERROR (com.googlecode.jmxtrans.util.JmxUtils$ProcessQueryThread:163) - Error executing query
java.net.ConnectException: Connection timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:579)
    at java.net.Socket.connect(Socket.java:528)
    at java.net.Socket.<init>(Socket.java:425)
    at java.net.Socket.<init>(Socket.java:208)
    at com.googlecode.jmxtrans.util.SocketFactory.makeObject(SocketFactory.java:28)
    at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1212)
    at com.googlecode.jmxtrans.model.output.GraphiteWriter.doWrite(GraphiteWriter.java:105)
    at com.googlecode.jmxtrans.util.JmxUtils.runOutputWritersForQuery(JmxUtils.java:336)
    at com.googlecode.jmxtrans.util.JmxUtils.processQuery(JmxUtils.java:206)
    at com.googlecode.jmxtrans.util.JmxUtils$ProcessQueryThread.run(JmxUtils.java:161)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)
[20 Nov 2013 09:44:21] [ServerScheduler_Worker-5] 303989 DEBUG (com.googlecode.jmxtrans.jobs.ServerJob:50) - +++++ Finished server job: Server [host=127.0.0.1, port=9999, url=service:jmx:rmi:///jndi/rmi://127.0.0.1:9999/jmxrmi, cronExpression=null, numQueryThreads=2]


{
  "servers" : [ {
    "host" : "127.0.0.1",
    "port" : "9999",
    "alias" : "<%=node.name%>",
    "queries" : [
 {
         "obj" : "kafka:type=kafka.SocketServerStats",
          "resultAlias": "kafka.socketServerStats",
          "attr" : [ "AvgFetchRequestMs", "AvgProduceRequestMs", "BytesReadPerSecond", "BytesWrittenPerSecond", "FetchRequestsPerSecond", "MaxFetchRequestMs", "MaxProduceRequestMs" , "NumFetchRequests" , "NumProduceRequests" , "ProduceRequestsPerSecond", "TotalBytesRead", "TotalBytesWritten", "TotalFetchRequestMs", "TotalProduceRequestMs" ],
     "outputWriters" : [ {
          "@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriter",
          "settings" : {
            "host" : "<%=@monitor_host%>",
            "port" : "2003"
          }
        } ]
      }
    ],
    "numQueryThreads": "2"
  } ]
}
4

0 回答 0