Hours of battle with jmxtrans

88 views
Skip to first unread message

trider

unread,
Nov 12, 2018, 9:06:46 AM11/12/18
to jmxtrans
Hello dears!
I decided to try jmxtrans for the delivery of metrics in Graphite for Kafka monitoring.
I has studied documentation https://github.com/jmxtrans/jmxtrans and go install rpm package http://central.maven.org/maven2/org/jmxtrans/jmxtrans/270/jmxtrans-270.rpm to my Kafka server.
Everything was very simple, but it is a complete hoax!
/var/lib/jmxtrans/kafka.yaml
I put kafka.yaml in /var/lib/jmxtrans/. Content of kafka.yaml:
{
 
"servers" : [ {
   
"port" : "9393",
   
"host" : "127.0.0.1",
   
"queries" : [ {
     
"obj" : "java.lang:type=Memory",
     
"attr" : [ "HeapMemoryUsage", "NonHeapMemoryUsage" ],
     
"outputWriters" : [ {
       
"@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriterFactory",
       
"port" : 2003,
       
"host" : "10.255.12.2",
       
"rootPrefix": "portal.kafka.youla-mq1"
     
} ]
   
} ]
 
} ]
}
Then I changed loglevel to DEBUG in /usr/share/jmxtrans/etc/wrapper.conf.
Starting the agent:
# /etc/init.d/jmxtrans start /var/lib/jmxtrans/kafka.yaml
And nothing happens. I look in a log and I see messages:
2018-11-12 16:40:34 [jmxtrans-result-0] level com.googlecode.jmxtrans.model.output.GraphiteWriter2 [GraphiteWriter2.java:66] - Query result: Result(attributeName=HeapMemoryUsage, className=sun.management.MemoryImpl, objDomain=java.lang, typeName=type=Memory, valuePath=[co
mmitted
], value=5211684864, epoch=1542030034877, keyAlias=null)
2018-11-12 16:40:34 [jmxtrans-result-0] level com.googlecode.jmxtrans.model.output.GraphiteWriter2 [GraphiteWriter2.java:73] - Graphite Message: portal.kafka.youla-mq1.127_0_0_1_9393.sun_management_MemoryImpl.HeapMemoryUsage_committed 5211684864 1542030034
Dear developers of the jmxtrans, where are my messages in Graphite???
I'm starting tcpdump -A -s 0 'tcp port 2003 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' and I don't see that on the Graphite something went.
What do I need to do to get your jmxtrans to send messages to my Graphite?

Jonathan Krengel

unread,
Nov 12, 2018, 9:17:50 AM11/12/18
to jmxt...@googlegroups.com
When I used the Graphite Write last, a little over a year ago, we had not moved to using the GraphiteWriterFactory yet.  We had the same issue where it wasn't flushing the metrics.  Thankfully the older Graphite Writer was solid.

--
You received this message because you are subscribed to the Google Groups "jmxtrans" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmxtrans+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

trider

unread,
Nov 12, 2018, 9:50:43 AM11/12/18
to jmxtrans
Tnank you! I too just found examples in google. Witch class 'com.googlecode.jmxtrans.model.output.GraphiteWriter' all works. My YAML config:
{
 
"servers" : [ {
   
"port" : "9393",
   
"host" : "127.0.0.1",
   
"queries" : [ {
     
"obj" : "java.lang:type=Memory",
     
"attr" : [ "HeapMemoryUsage", "NonHeapMemoryUsage" ],
     
"outputWriters" : [ {

       
"@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriter",
       
"settings": {

           
"port" : 2003,
           
"host" : "10.255.12.2",
           
"rootPrefix": "portal.kafka.youla-mq1"
       
}
     
} ]
   
} ]
 
} ]
}



понедельник, 12 ноября 2018 г., 17:17:50 UTC+3 пользователь Jonathan Krengel написал:
Reply all
Reply to author
Forward
Message has been deleted
0 new messages