Skip to content
Cyrille Le Clerc edited this page Aug 19, 2013 · 3 revisions

Locate the jmxtrans.json file you are using to to integrate jmxtrans with your webapp. In the "OutputWriters" array, add the following block to enable the CopperEggWriter:

{
    "@class": "org.jmxtrans.embedded.output.CopperEggWriter",
    "settings": {
        "source": "${CopperEgg.source:#hostname#}",
        "username": "${CopperEgg.username}",
        "token": "${CopperEgg.token}",
        "enabled": "${CopperEgg.enabled:true}"
    }
}

Where:

  • source: name of your server, optional, default value is #hostname#,
  • username: your CopperEgg username, mandatory. In this sample, it is injected with a embedded-jmxtrans Property Placeholder ${CopperEgg.username},
  • token: your CopperEgg API Key, mandatory. In this sample, it is injected with a embedded-jmxtrans Property Placeholder ${CopperEgg.token},
  • enabled: flag to enable/disable the writer, optional, default value is true.

Create a copperegg_config.json file

This file is used to define the metric groups that embedded-jmxtrans will monitor, as well as define two dashboards where the monitored metrics will be displayed.

If you are just starting with CopperEgg monitoring, just copy the copperegg_default_config.json to copperegg_config.json. copperegg_config.json should reside in the same directory as your jmxtrans.json file.

The copperegg_default_config.json file can be found here: https://github.com/CopperEgg/embedded-jmxtrans-samples/blob/master/embedded-jmxtrans-webapp-coktail/src/main/resources/copperegg_default_config.json