You can create multiple DiagnosticSource modules for a resource. You can create a DiagnosticSource that collects data to analyze root cause such as high CPU usage, memory leakage, network connectivity issues, and so on. Based on your business needs and system environment, you can create embedded Groovy or PowerShell diagnostic scripts to collect specific data and identify the issue.

Configuring a DiagnosticSource consists of associating resources and resource groups to which the DiagnosticSource is applied. It also involves specifying a Groovy or PowerShell diagnostics script to diagnose the issue and gather relevant data. Before saving the DiagnosticSource, you can test the diagnostics script on a few resources to verify if the script fetches the desired result. In case of an error, you can revise the script. This important measure ensures that your DiagnosticSource performs as designed when executed to diagnose actual issues. 

Requirements for Configuring DiagnosticSource

To configure DiagnosticSource modules, you need the following:

  • A LogicMonitor user with resource permissions for “Diagnostic Source” settings for the resource group. For more information, see Resources Role Permissions.
  • Local Collectors must monitor the resources including cloud resources that you want to apply the DiagnosticSource to.
    For more information, see Enable Monitoring via Local Collector.
  • LogicMonitor Collector installed on your machine must have EA Collector 38.400 or later version. For more information, see Adding Collector
  • To test the diagnostics script, enable the Enable Test Script switch on the Security settings page. For more information, see Security Settings.

Configuring a DiagnosticSource

  1. In LogicMonitor, navigate to Modules.
    The My Module Toolbox page displays.
  2. Select Add DiagnosticSource icon Add.
    The Add modal displays.
    Alternatively, to add a DiagnosticSource, you can import a DiagnosticSource or clone an existing DiagnosticSource. For more information, see Modules Management.
  3. Select DiagnosticSource.
    Add modal on My Module Toolbox page
    The Add DiagnosticSource page displays.
    Add DiagnosticSource page
  4. On the Info tab, do the following:
    1. In the Name field, enter a unique name for the DiagnosticSource.
      For example, you can specify the platform or application and, if necessary, a specific component of the platform.
    2. (Optional) In the Description field, enter enough details to ensure that the DiagnosticSource’s purpose can be determined.
    3. (Optional) In the Tags field, add tags to filter the module.
    4. (Optional) In the Group field, specify the group to which the DiagnosticSource is added.
    5. (Optional) In the Technical Notes field, enter any notes or technical information.
  5. Select the Access Groups tab and configure access groups as needed. 
    For more information, see Access Groups for Modules.
  6. Select the AppliesTo tab, and do the following:
    1. Enter the applies to criteria.
      The Applies to field accepts LogicMonitor’s AppliesTo scripting as input to determine which resources can be associated with the DiagnosticSource.
    2. Select Run Test AppliesTo icon Test AppliesTo
      This test returns a count of matching resources, and displays them in the AppliesTo Results panel.
  7. Select the Script Preview tab, and do the following:
    1. From the Collection Type dropdown menu, select the embedded script you want to use.
    2. Based on the selected collection type, enter a Groovy or PowerShell diagnostics script to gather data and identify the root cause of an issue.
    3. Select Run Test Script icon Test Script.
      The Test Collection Script window displays.
    4. In the Search Resources field, enter a value for a resource.
      LogicMonitor attempts to match values as you type.
    5. Select Run Test.
      The test result displays in the stdOutput.
      Test Collection Script window
      If the test script fails, details of the exception or error are displayed in the stdError. Close the Test Collection Script window to proceed.
  8. Select Save.

The DiagnosticSource is created and listed on the My Module Toolbox page.

14-day access to the full LogicMonitor platform