ConfigSource Configuration

Last updated on 22 April, 2023

ConfigSources are embedded Groovy or PowerShell scripts to access, collect, and alert on resource configuration files and monitor changes. You can use settings in your LogicMonitor portal to configure your own custom ConfigSource.

Config files are available on the Resources page until the LMES data view period. If you want to view the config files later, you must use the API tokens to download the config files within the LMES data storage period. For assistance, contact customer success.

Warning: Monitored configuration files cannot exceed 3MiB in size per individual file.

Note: If the ability to monitor an alert on configuration files is not currently available in your LogicMonitor platform and you would like to learn more, contact customer success.

Requirements for Configuring a ConfigSource

To collect ConfigSource data for cloud resources, you must enable monitoring with a local collector. For more information, see Enable Monitoring via Local Collector.

Configuring a ConfigSource

  1. In the LogicMonitor navigation sidebar, select Modules.
  2. From My Module Toolbox, select Add.
  3. In the Add window, select ConfigSource.
    The Add New ConfigSource window displays and contains tabs for Info, AppliesTo, Collection, and Config Check.
  1. On the Info tab, enter the following information:
    1. Name: Enter a unique name for the ConfigSource. Specify the platform or application and, if necessary, a specific component of the platform.
    2. (Optional) Description: Provide enough detail to ensure that the ConfigSource’s purpose can be determined.
    3. Resource Label: Tag the ConfigSource with keywords (related to its name, purpose, scope, and so on) that will facilitate a search for it.
    4. (Optional) Group: Specify the group to which the ConfigSource will be added. If this field is left empty, the ConfigSource is added to the default “@ungrouped” group. If you enter text that does not match an existing ConfigSource group, LogicMonitor creates a new group.
    5. (Optional) Technical Notes Preview: Enter any notes or technical information using markdown.
    6. Collection schedule: Select 1 hour (default), 4 hours, 8 hours, or 1 day interval for collecting data.
    7. (Optional) Multi-instance: Toggle this option on to make the ConfigSource multi-instance and enable the Active Directory tab (for more information, see What is Active Discovery?):
      Multi-instance means there are multiple occurrences of a config file. For example, for multiple network surfaces on a Fortigate firewall, each containing its own config file.
      1. (Optional) Toggle on Disable Discovered Instances to automatically find a ConfigSource’s instances on your resource, determine their display names or aliases, and keep them up-to-date.
      2. Toggle on Automatically Delete instances to automatically delete ConfigSource instances that no longer exist.
      3. In the Delete Instance Data dropdown, select whether to delete instances immediately (default) or after 30 days.
      4. In the Script Type field, select Embedded Groovy Script (default) or Embedded PowerShell Script, and then modify or enter the script provided in the text field. For more information, see Collector Attributes.
      5. Select the Test Script icon, select a resource, and then select Run Test.
  2. On the AppliesTo Tab, do the following:
    1. Enter AppliesTo scripting.
      The AppliesTo field accepts LogicMonitor’s AppliesTo scripting as input to determine which resources are associated with this ConfigSource. For more information, see AppliesTo Scripting Overview.
    2. Select the Test Script icon, select a resource, and then select Run Test.
      This test returns a count of matching resources, and displays them in the AppliesTo Results panel.
  3. On the Collection tab, do the following:
    1. In the Script Type dropdown, select one of the following options:
      • Embedded Groovy Script (default)
        When accessing configs through SSH or Telnet, use an embedded Groovy script so you can take advantage of expect syntax. For more information, see Custom Groovy for ConfigSource and Groovy/Expect Text-Based Interaction. Prior to running the embedded Groovy script, you must set your SSH authentication credentials as properties on the resource(s) you want to implement config monitoring. For more information, see Defining authentication credentials.
      • Embedded PowerShell Script
      • Upload script file: Select Upload a Script, and then select the file, and then enter a script name/path and arguments. For more information, see External Scripting.
    2. Select the Test Script icon, select a resource, and then select Run Test.
  4. On the Config Check tab, add config checks to the ConfigSource. For more information, see Adding Config Checks to a ConfigSource.
  5. Select Save.
  6. (Optional) Select Commit Version to save this version of the module to roll back to at a later date, and then do the following:
    1. (Optional) In the Commit a Version window, enter any version notes.
    2. (Optional) Toggle on Make this version public to make this module available to all LogicMonitor users in LM Exchange.
    3. Select Commit Version.
In This Article