Applying DataSources to Resources (New UI)
Last updated on 29 August, 2022Overview
LogicMonitor automatically applies relevant DataSources to any Resource that you make available for monitoring. This automated process consists of these four steps:
- Property assignment— When a Resource is added into monitoring, LogicMonitor runs a series of WMI and SNMP queries. The queries determine basic information about the Resource, and that information is stored as Resource properties.
- Evaluation of AppliesTo logic in the DataSource— The DataSource (
AppliesTo
field) evaluates the Resource properties. If theAppliesTo
expression is true, the DataSource is applied to the Resource. - Instance discovery— Once a DataSource is applied to a Resource, an instance or instances are discovered and data collection begins.
- Data collection— Data that is collected by a DataSource is viewable on the Resources page in raw or graph format.
DataSources define what numeric time-series data should be collected for the resources that you want to monitor. DataSources also define how that data is collected and what constitutes alert conditions. For more information, see Creating a DataSource.
Property Assignment
When a resource is added into monitoring, LogicMonitor immediately runs a series of queries using WMI and SNMP to determine basic system information about the resource, such as:
- Operating system version
- IP address
- sysOID
- Supported SNMP version
- System category
This information is stored as properties that are associated with the resource. For example, the system.ips
property stores the IP address.
Once basic system information has been determined and assigned to a resource, it’s likely that one or more PropertySources will assign further properties to the resource. PropertySources are LogicModules that auto-assign properties at the resource level based on the output of a Groovy or PowerShell script.
For example, if you’ve just added a resource into monitoring that is identified as having a Windows- or Linux-based operating system, the addCategory_MSSQL
PropertySource, which is configured to run for all Linux or Windows hosts, will query the resource to see if it is running Microsoft SQL Server and, if it is, assign a value of MSSQL
to the system.categories
property.
There can be up to a 24-hour delay before PropertySources are automatically matched to a newly-added resource. However, there are ways to manually initiate PropertySource association. For more information, see Creating PropertySources.
Properties can also be manually assigned to resources. For more information, see Resource and Instance Properties.
Evaluation of DataSource AppliesTo Logic
The properties assigned to the resource – as automatically set by LogicMonitor or manually set by you – are then used by DataSources to determine which DataSources are associated with the resource. Specifically, the Applies To
field found in DataSource definitions is evaluated. The expression in this field designates which properties the DataSource should evaluate; if the expression in this field evaluates to true, then the DataSource is applied to the resource. For example, continuing with the example in the previous section, the SQL Server Troubleshooter DataSource applies to any resource that has a value of MSSQL
in its system.categories
property.

The AppliesTo
logic is not unique to DataSources. Other LogicModules such as EventSources, ConfigSources, and PropertySources also use AppliesTo
expressions to determine which resources they are associated with. For more information, see AppliesTo Scripting Overview.
Evaluation of the AppliesTo
scripting expressions found in DataSources takes place whenever a resource’s properties are added or updated. LogicMonitor reevaluates all DataSources against the updated properties to see if any additional DataSources should be applied to the resource—or any existing DataSources should be removed from the resource. Similarly, if a DataSource’s AppliesTo
expression changes, LogicMonitor reevaluates all resources and their properties according to the new expression. This process is automated, but can be forced for a specific resource by manually initiating Active Discovery.
All DataSources applied to a resource that identify at least one instance to monitor are listed in the Resources tree as children of the resource. It’s possible to have DataSources that apply to a resource based on the resource’s properties, but that don’t actually locate an instance to monitor. In those cases, the DataSource does not display in the Resources tree.

All DataSources applied to a resource that identify at least one instance to monitor are listed in the Resources tree as children of the resource.
Note: You can also see all resources a DataSource applies to from the DataSource definition by going to Settings > LogicModules > DataSources > More > Show associated devices.
Instance Discovery
Once a DataSource applies to a resource, instance(s) are discovered for the resource and data collection begins. Some DataSources will only have one one instance to monitor per device (ping), while others may identify multiple instances (disks, server volumes, interfaces) to monitor per device.
For single-instance DataSources, the instance is automatically added and data collection begins immediately. For multi-instance DataSources, the Active Discovery process must be enabled and execute in order for all applicable instances to be identified for the resource. Or, as an alternative, instances need to be added manually. For more information see Active Discovery and Adding Instances.
Data Collection
Once instance(s) are identified, data collection begins. For multi-instance DataSources, you can see data on a per-instance basis as well as on an aggregated basis. Data that is collected by a DataSource can be viewed from the Resources page, in raw form or graph form, along with alerts that have been raised and other pertinent information. For more information, see Navigating the Resources Page.