Skip to content

Configuration sample

Cyrille Le Clerc edited this page Jan 2, 2013 · 4 revisions

Detailed sample

{
 "queries": [
   {
     "objectName": "cocktail:type=CocktailManager,name=CocktailManager",
     "resultAlias": "cocktail.cocktailmanager",
     "attribute": "AddedCommentCount"
   },
   {
     "objectName": "java.lang:type=GarbageCollector,name=PS MarkSweep",
     "resultAlias": "jvm.gc.ps-marksweep",
     "attributes": ["CollectionCount", "CollectionTime"]
   },
   {
     "objectName": "java.lang:type=GarbageCollector,name=PS Scavenge",
     "resultAlias": "jvm.gc.ps-scavenge",
     "attributes": ["CollectionCount", "CollectionTime"]
   },
   {
     "objectName": "java.lang:type=Memory",
     "resultAlias": "jvm.memory",
     "attributes": [
       {
         "name": "HeapMemoryUsage",
         "keys": ["committed", "init", "max", "used"]
       },
       {
         "name": "NonHeapMemoryUsage",
         "keys": ["committed", "init", "max", "used"]
       }
     ]
   },
   {
     "objectName": "java.lang:type=Threading",
     "resultAlias": "jvm.thread",
     "attributes": ["ThreadCount", "TotalStartedThreadCount", "DaemonThreadCount"]
   },
   {
     "objectName": "java.lang:type=Runtime",
     "resultAlias": "jvm.runtime",
     "attribute": "Uptime"
   },
   {
     "objectName": "java.lang:type=OperatingSystem",
     "resultAlias": "jvm.operatingsystem",
     "attributes": ["SystemLoadAverage", "ProcessCpuTime", "FreePhysicalMemorySize", "FreeSwapSpaceSize"]
   }
 ],
 "outputWriters": [
   {
     "@class": "org.jmxtrans.embedded.output.Slf4jWriter"
   },
   {
     "@class": "org.jmxtrans.embedded.output.GraphiteWriter",
     "settings": {
       "host": "${graphite.host:localhost}",
       "port": "${graphite.port:2003}"
     }
   }
 ],
 "queryIntervalInSeconds": 15,
 "numQueryThreads": 1,
 "exportIntervalInSeconds": 30
}