Hello dears!
I decided to try jmxtrans for the delivery of metrics in Graphite for Kafka monitoring.
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?