customizations for first time user

41 views
Skip to first unread message

allen chan

unread,
Mar 10, 2018, 1:53:51 AM3/10/18
to jmxtrans
Hello folks,

I just started testing jmxtrans today. Amazing product that was very quick to install and get running. 
Now i am trying to do the harder part of customization..

It seems like jmxtrans is splitting each query block into separate docs. Is it possible to configure jmxtrans to put all the query outputs into one json doc?

The format that i want seems to be reflected very well in this comment https://github.com/jmxtrans/jmxtrans/issues/346#issuecomment-234476612
When i specify this in the outputWriters block "@class": "com.googlecode.jmxtrans.model.output.kafka.KafkaWriter2  
jmxtrans errors out  with 
Caused by: java.lang.IllegalArgumentException: Class com.googlecode.jmxtrans.model.output.kafka.KafkaWriter2 not subtype of [simple type, class com.googlecode.jmxtrans.model.output.ResultSerializer]

Am i missing a crucial part?

Thanks,
Allen Chan

allen chan

unread,
Mar 10, 2018, 1:58:16 AM3/10/18
to jmxtrans
My apologies. I copied and pasted the wrong jmxtrans error

Caused by: java.lang.IllegalArgumentException: Class com.googlecode.jmxtrans.model.output.kafka.KafkaWriter2 not subtype of [simple type, class com.googlecode.jmxtrans.model.OutputWriterFactory]

Attached my config in case that is the first question asked.
config.rtf

allen chan

unread,
Mar 11, 2018, 1:56:13 AM3/11/18
to jmxtrans
Ok so i spent a few hours going through tickets and this forum with not much progress.
I know now that the ticket relates to a pull  request that was not merged.

In this comment, it seems like the reason the change was not merged because ResultSerializer has similar abilities to what was proposed in the PR.

I looked through the code and docs and dont see how i can use the current included Serializers to print the results in this format
{
  "host":"myhost.mydomain.fr",
  "what":"OperatingSystem",
  "device":"",
  "timestamp":1469116051,
  "MaxFileDescriptorCount":65536,
  "FreeSwapSpaceSize":2048532480,
  "SystemLoadAverage":0.21,
  "TotalSwapSpaceSize":2147479552,
  "AvailableProcessors":2,
  "OpenFileDescriptorCount":420,
  "FreePhysicalMemorySize":182149120,
  "TotalPhysicalMemorySize":3976212480,
  "meta":{
    "issuer":"jmxtrans"
  }
}

On Friday, March 9, 2018 at 10:53:51 PM UTC-8, allen chan wrote:
Reply all
Reply to author
Forward
0 new messages