Terminology & Syntax

Adding Groovy Libraries

The LogicMonitor Collector ships with many useful libraries that you can use from within your Groovy scripts. However, you’ll occasionally need to use a Groovy or Java library that isn’t included with the LogicMonitor collector. Here's how to install additional JARs on your collector for additional functionality in your Groovy script LogicModule.

  1. Copy the jar file to the custom library folder in the collector installation (you may have to make the folder):
    1. Default library path on Windows - C:\Program Files\LogicMonitor\agent\custom
    2. Default path on Linux - /usr/local/logicmonitor/agent/custom

      **Previously, we directed users to put custom JARs in the lib directory with the included JARs. While this still works, we recommend putting your custom jars in the separate custom folder. 
  2. Now edit wrapper.conf so the collector will load the jar. You can edit the configuration file directly on the machine, or from within your LogicMonitor portal in a browser. You can read more about editing the collector config file on this page.
  3. In the wrapper.conf file, you’ll see lines like this:
wrapper.java.classpath.85=../lib/jackson-core-2.6.6.jar
wrapper.java.classpath.86=../lib/amazonlibs/*.jar
  1. Being sure to increment the number, add a line for your jar:
wrapper.java.classpath.85=../lib/jackson-core-2.6.6.jar
wrapper.java.classpath.86=../lib/amazonlibs/*.jar
wrapper.java.classpath.87=../custom/customlib-0.0.1.jar
  1. Save the config and restart the collector.