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.
- Copy the jar file to the custom library folder in the collector installation (you may have to make 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.
- 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.
- In the wrapper.conf file, you’ll see lines like this:
- Being sure to increment the number, add a line for your jar:
- Save the config and restart the collector.