Maybe also set:

 -Dcom.sun.management.jmxremote.port=9999

?


> On Dec 2, 2014, at 02:59, David Montgomery <davidmontgom...@gmail.com> wrote:
> 
> Hi,
> 
> I am having a very difficult time trying to report kafka 8 metrics to
> Graphite.  Nothing is listening on 9999 and and no data in graphite.  If
> this method of graphite reporting is know to not work is there an
> alternative to jmxtrans to get data to graphite?
> 
> I am using the deb file to install jmxtrans on ubuntu 12.04
> 
> And I use the below to modify kafka scripts
> 
> echo 'KAFKA_JMX_OPTS="-Dcom.sun.management.jmxremote=true
> -Dcom.sun.management.jmxremote.authenticate=false
> -Dcom.sun.management.jmxremote.ssl=false"' | tee -a
> /var/kafka/bin/kafka-run-class.sh
> echo 'export JMX_PORT=${JMX_PORT:-9999}' | tee -a
> /var/kafka/bin/kafka-server-start.sh
> 
> {
>  "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"
>  } ]
> }

Reply via email to