Adding Groovy Libraries

Last updated on 20 March, 2023

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 library folder in the Collector installation (you may have to create the folder):
    • Default library path on Windows – C:\Program Files\LogicMonitor\agent\custom
    • 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. For more information on editing the Collector config file, see Editing the Collector Config Files.
  3. In the wrapper.conf file, you’ll see lines like this:*.jar
  4. Being sure to increment the number, add a line for your jar:*.jar
  5. Save the config and restart the Collector.