Open JaapD opened 6 years ago
What do you mean by "does not work"? Do you have an error in logs? Are you using allowDottedKeys setting?
Nothing appears in Graphite, while other queries in the same configuration file get there output in Graphite. The logfiles have no errors for this outputWriter. Other queries have logging like: 2018-01-16 08:16:55,435 DEBUG [jmxtrans-query-1] model.Query - Executing queryName [Catalina:name="ajp-bio-8009",type=ThreadPool] from query [Query(objectName=Catalina:type=ThreadPool,name=*, keys=[], attr=[cur rentThreadCount, currentThreadsBusy], typeNames=[], resultAlias=connectors, useObjDomainAsKey=false, allowDottedKeys=false, useAllTypeNames=false, outputWriterInstances=[com.googlecode.jmxtrans.model.output.supp ort.ResultTransformerOutputWriter@2a889898])]
but not the AsyncEventQueue.web...
@JaapD Can you share your configuration or part of it?
This is the whole file:
{
"servers" : [ {
"port" : "2012",
"host" : "localhost",
"username" : "monitorRole",
"password" : "paasbrood",
"runPeriodSeconds" : 30,
"queries" : [
{
"outputWriters" : [ {
"@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriterFactory",
"port" : 2003,
"host" : "grafana.mgt.lan",
"flushStrategy" : "timeBased",
"flushDelayInSeconds" : "60",
"typeNames" : [ "name" ],
"rootPrefix":"jmx.pil.tmc34"
} ],
"obj" : "Catalina:type=ThreadPool,name=*",
"resultAlias": "connectors",
"attr" : [ "currentThreadCount", "currentThreadsBusy" ]
},
{
"outputWriters" : [ {
"@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriterFactory",
"port" : 2003,
"host" : "grafana.mgt.lan",
"flushStrategy" : "timeBased",
"flushDelayInSeconds" : "60",
"typeNames" : [ "name" ],
"rootPrefix":"jmx.pil.tmc34"
} ],
"obj" : "com.jamonapi.jmx:type=current,name=*",
"resultAlias": "jamon",
"attr" : [ "LastValue", "MaxActive", "Max" ]
},
{
"outputWriters" : [ {
"@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriterFactory",
"port" : 2003,
"host" : "grafana.mgt.lan",
"flushStrategy" : "timeBased",
"flushDelayInSeconds" : "60",
"typeNames" : [ "name" ],
"rootPrefix":"jmx.pil.tmc34"
} ],
"obj" : "java.lang:type=Threading",
"resultAlias": "threads",
"attr" : [ "DaemonThreadCount", "PeakThreadCount", "ThreadCount", "TotalStartedThreadCount" ]
},
{
"outputWriters" : [ {
"@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriterFactory",
"port" : 2003,
"host" : "grafana.mgt.lan",
"flushStrategy" : "timeBased",
"flushDelayInSeconds" : "60",
"typeNames" : [ "name" ],
"rootPrefix":"jmx.pil.tmc34"
} ],
"obj" : "solera.events:type=AsyncEventQueuefishWeb,name=*",
"resultAlias": "eventqueue",
"attr" : [ "QueueSize" ]
},
{
"outputWriters" : [ {
"@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriterFactory",
"port" : 2003,
"host" : "grafana.mgt.lan",
"flushStrategy" : "timeBased",
"flushDelayInSeconds" : "60",
"typeNames" : [ "name" ],
"rootPrefix":"jmx.pil.tmc34"
} ],
"obj" : "java.lang:type=Memory",
"resultAlias": "mem",
"attr" : [ "FreeNonHeapMemoryUsage", "HeapMemoryUsage" ]
} ],
"numQueryThreads" : 2
} ]
}
Side note: you could move the outputwriters definitions to the server and not duplicate them for each query.
I tried, I hate duplication, but it did not work. Do you know where to find an example?
We have an JMX entry: xx.events. In that entry lives a jmxbean with the name "AsyncEventQueue.web" and attribute QueueSize.
In the jason config the following sniplet does not work:
Is it not possible to have a dot in the name of an jmxbean? JConsole shows the attribute without any problem.