Thanks to Fabian Sanglier we can enjoy the awesome New Relic APM functionalities (you know I love those data nerds!) applied to our great Terracotta Server memory fabric.

That means, we can add our Terracotta servers to the existing monitoring infrastructure, like any other server we are already monitoring. The Terracotta-New Relic plugin will send the metrics to your New Relic account. So far so good.


Ok, it’s easy, the plugin package (tar.gz) has everything needed, documentation, sources and distribution. I have used the tar:tc-nr-plugin-2.0.0 in order to instrument Terracotta BigMemory Max 4.2.0.  Just modify the conf\application.properties to set up the NewRelic license key and the TMC (Terracotta Management Console) ip/port and run the start-terracotta-newrelic-plugin.sh after Terracotta servers and TMC are up&running. Of course you need a New Relic user account license key.


After running check at the /log do a tail -f tc-nr-plugin.out and every nr.executor.fixedDelay.milliseconds (.properties file) the plugin will publish metrics to NewRelic. Because it’s a TC related plug-in I deployed inside my terracotta folder structure, so I can keep all software related together.

18:18:59.979 [pool-2-thread-1] INFO  c.t.nrplugin.rest.nr.MetricReporter - Attempting to report stats to NewRelic...
18:19:00.386 [pool-2-thread-1] INFO  c.t.nrplugin.rest.nr.MetricReporter - New Relic Response code: 200
18:19:00.386 [pool-2-thread-1] INFO  c.t.nrplugin.rest.nr.MetricReporter - Done reporting to NewRelic.
18:19:34.181 [pool-2-thread-1] INFO  c.t.nrplugin.cache.MetricCacher - Starting to cache all stats...
18:19:34.350 [pool-2-thread-1] INFO  c.t.nrplugin.cache.MetricCacher - Parsed metrics into JSONArrays...
18:19:34.352 [pool-2-thread-1] INFO  c.t.nrplugin.cache.MetricCacher - Starting to cache Ratio Metrics...
18:19:34.354 [pool-2-thread-1] INFO  c.t.nrplugin.cache.MetricCacher - Done caching stats.

The plug-in obtain metric from the TMC RESTful API. Previous plug-in versions were using JMX instead. The plug-in makes use of New Relic’s v1.0 RESTful metric publishing API (available at https://platform-api.newrelic.com/platform/v1/metrics) to push metrics from a running Terracotta Server Array (TSA). Therefore it uses the console REST API for fetching all the metrics that will be found on your New Relic App dashboard, such us, doGet(“/api/agents/statistics/clients/”…), doGet(“/api/agents/cacheManagers/caches”…)


In brief, just download the Terracotta instrument plug-in for NewRelic and enjoy to have TC servers in control and monitoring 24×7!

  1. Screen Shot 2014-12-02 at 16.40.09Donwload NR plug-in
  2. Donwload source code
  3. Download Terracotta