I want to monitor solr, and have the jmxtrans config:
{
"servers":[
{
"port":"8099",
"host":"localhost",
"queries":[
{
"obj":"solr/*:type=/select,id=org.apache.solr.handler.component.SearchHandler",
"resultAlias":"solr",
"attr":[
"requests","errors","avgRequestsPerSecond","avgTimePerRequest","95thPcRequestTime"
],
"outputWriters":[
{
"@class":"com.googlecode.jmxtrans.model.output.KeyOutWriter",
"settings":{
"outputFile" : "/tmp/jmx.log",
"maxLogFileSize" : "10MB",
"maxLogBackupFiles" : 2,
"debug" : true
}
}
]
}
]
}
]
}
I have configure the wildcard domain name
"obj":"solr/*:type=/select,id=org.apache.solr.handler.component.SearchHandler"
but I get the following result without domain name:
localhost_8099.solr.errors 0 1446715240625
localhost_8099.solr.avgRequestsPerSecond 0.00883917964270778 1446715240625
localhost_8099.solr.avgTimePerRequest 1.99831994970047 1446715240625
localhost_8099.solr.95thPcRequestTime 3.8249146499999997 1446715240625
localhost_8099.solr.requests 717419 1446715241205
localhost_8099.solr.errors 0 1446715241205
I tried typeNames: https://code.google.com/p/jmxtrans/wiki/Queries But it seems doesn't support domain.
I found the answer, add the following configuration:
...
"obj":"solr/*:type=/select,id=org.apache.solr.handler.component.SearchHandler",
"useObjDomainAsKey":true,
...