I'm trying to use jmxtrans to collect JVM metrics and would need to input the data into InfluxDB. Though I was able to collect data, I'm not sure of the tags and syntax required to input the data into the DB.
I've tried the JSON tutorials as well as the method to write into influx DB:https://docs.influxdata.com/influxdb/v0.8/api/reading_and_writing_data/ but unable to find specific answers, hence the post.
Need help with modifying json files to input data into InfluxDB. Please advise. Example code to retrieve heapmemory usage of another server:
{
"servers" : [ {
"port" : "<PORT>",
"host" : "<IP>",
"queries" : [ {
"obj" : "java.lang:type=Memory",
"attr" : [ "HeapMemoryUsage", "NonHeapMemoryUsage" ],
"outputWriters" : [ {
"@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriter",
"settings" : {
"templateFile" : "heapmemory-rrd-template.xml",
"outputFile" : "target/heap.rrd",
"binaryPath" : "/opt/local/bin",
"debug" : true,
"generate" : true
}
} ]
} ]
} ]
}