LogicMonitor seeks to disrupt AI landscape with $800M strategic investment at $2.4B valuation to revolutionize data centers.

Learn More

Custom Module Groovy Migration Validation

Last updated on 18 September, 2024

LogicMonitor supports embedded scripting using the Groovy programming language. The release of LogicMonitor EA Collector 34.500 provides support for Apache Groovy 4 in addition to Apache Groovy 2. For more information about the EA Collector release, see the EA Collector 34.500 Release Notes.

Note: LogicMonitor is releasing updates to official LogicMonitor-provided modules to ensure LogicModules are compatible with Apache Groovy 4.

If your environment leverages customized or community-provided modules, you must test your modules to ensure compatibility and make updates as needed. Validating your customized module involves testing the Groovy script with Groovy 2, testing the script with Groovy 4, and then comparing the output from both tests. If the outputs align, the module is considered compatible for the LogicMonitor Collector version that contains both Groovy 2 and Groovy 4. You can use My Module Toolbox to identify the modules that require this validation.

Requirements for Validating Customized Modules

To test the customized modules in your portal, you need the Collector 34.500 or later installed.

For more information, see the EA Collector 34.500 Release Notes.

Identifying Modules for Validation

The following steps will outline how to locate customized, custom, community, and deprecated modules, which require validation. 

  1. Navigate to Modules > My Module Toolbox
    For more information on filtering, see Modules Overview – Module Filtering.
  2. From the Add Filter menu, do one of the following depending on the type of module you want to identify:
  • To identify customized modules, do the following: 

a. From the Add Filter menu, select Customized. 

Customized option in add filter page

b. From Customized, select Yes
All customized modules will populate.  

Support filter for My Module toolbox page
  • To identify custom modules, do the following: 

a. From the Add Filter menu, select Support.

Support option fiter for My Module toolbox page

b. From the Support menu, select Blank
All custom modules will populate.

blank option for My Module toolbox page
  • To identify community modules, do the following:

a. Select Support.

support options for My Module toolbox page

b. From the Support menu, select Community
All community modules will populate. 

community option for My Module toolbox page
  • To identify Deprecated modules, do the following:

a. Select Support.

b. From the Support menu, select Deprecated
All deprecated modules will populate. 

deprecated option for My Module toolbox page

Recommendation: You can combine filters to search for multiple modules at once. For example, you can select customized, custom, community, and deprecated to display modules in My Module Toolbox.

If your environment leverages any non-LogicMonitor provided modules, you must validate your modules to ensure compatibility. 

Note: This applies to all custom, customized, deprecated, or community provided modules.

Validating a Customized Module

  1. Navigate to Modules > My Module Toolbox and select the module you want to validate.
  2. From the Details panel, select Edit.
  3. Do the following to test the module with Groovy 2:
    1. In the module editor, select the Collection tab, and add the following comment to the Embedded Groovy Script as the first line:
//!/lib-groovy/v2
println "version=" + GroovySystem.version
  1. Select Test Script run Test script icon.
    test script page
  2. In the Search Resources field, of the Test Collection Script dialog, enter or search for a resource to test the script.
    test collection script modal
  3. Select Run Test.
    The test results display in he Test Collection Script dialog.

Recommendation: Take note of the test results before closing the dialog, as these results are compared to the output of the test for Groovy 4. Alternatively, you can open a new tab to test the module with Groovy 4.

  1. Do the following to test the module with Groovy 4:
    1. In the module editor, select the Collection tab, and add the following comment as the first line in the Groovy script:
//!/lib-groovy/v4
println "version=" + GroovySystem.version
  1. Select Test Script .
  2. In the Search Resources field, of the Test Collection Script dialog, enter or search for a resource to test the script.
  3. Select Run Test.
    The test results display in the Test Collection Script dialog.

Compare the test results with Groovy 2 and Groovy 4. If the output matches, the module is valid and can continue to be used for monitoring while using LogicMonitor Collector version 34.500 or later.

In This Article