Loading full navigation.

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.

When you manually run a DiagnosticSource from the Resource or Alert page, you can provide execution parameters to target a specific process or activity for diagnosis. You can define parameters that override configured values in the script at run time. For example, if you have configured a generic script to provide information about network interfaces and configurations on a Windows system, you can define execution parameters to control which network interface or configuration details the script retrieves or operates on. For subsequent runs, you can change the parameter values to perform a different task.

Note: Automated Diagnostics continues using the default values of execution parameters because you cannot override the values during automated execution.

In a Groovy or PowerShell diagnostics script, you can specify execution parameters and test whether the script works as expected.

You can also import the following LogicMonitor-supported out-of-the-box Windows and Linux DiagnosticSource packages:

  • Linux SSH Trace Route—Provides information about the route packets take to reach a network host on a Linux system.
  • Linux SSH Top CPU and Memory—Provides information about executing processes on a Linux system.
  • Linux SSH IP Link—Provides information about network interfaces on a Linux system.
  • Microsoft SQLServer Queries—Returns the top longest-running cached queries by total execution time.
  • Microsoft SQLServer Blocked Processes—Returns blocking sessions in a Microsoft SQL Server instance.
  • Microsoft Powershell – Network Interfaces—Provides information about network interfaces and their configuration on a Windows system.
  • Microsoft Powershell – Top CPU and Memory—Provides information about executing processes with highest CPU and memory usage on a Windows system.
  • Microsoft Powershell – Top Event Logs—Displays the ten most recent critical and error events from the Windows Security, System, and Application Event logs for comprehensive system monitoring.
  • Microsoft Powershell – User Privilege Change—Monitors and reports all user privilege escalations and security-related changes from the Windows Security Event logs over the last seven days for audit and compliance purposes.

For more information, see Importing a Module.

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. For more information, see Adding Collector. 
  • To set execution parameters, your machine must have EA Collector 41.200 or later.
  • 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 the Execution Param tab, and do the following:
    1. Select or Add an Execution Param.
      The Add Execution Param form displays in the panel.
    2. In the Param Name field, enter a unique name for the execution parameter.
    3. (Optional) In the Description field, enter details about the parameter’s purpose.
    4. Select “Text”, “Number”, or “Enum” from the Type dropdown menu.
    5. Based on the selected parameter type, do one of the following:
      • For Number, enter the minimum and maximum allowed values in the Min Range and Max Range fields.
      • For Enum, enter the allowed values in the Allowed Values field.

Note: The Text type does not require validation values.

  1. In the Default Value field, enter one of the allowed values as the default value.
  2. Select True or False from Overriding Enabled to enable or disable overriding configured values.
  3. Select Save icon Save.
    The execution parameter is added to the configuration.
    Execution Param tab for DiagnosticSource
  1. Select Save.

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