Skip to content

Context Selection

Before running scripts, configure your execution context: which portal to use, which collector to run on, and optionally which device to target.

Click the Context button in the toolbar to open the selection dropdown:

Context dropdown showing Portal, Collector, and Device sections
ComponentDescription
PortalYour LogicMonitor account. Select from detected active sessions.
CollectorWhere scripts execute. Only online collectors can run code.
DeviceTarget for property access. Optional but needed for hostProps.

LMDA Composer automatically finds your LogicMonitor sessions:

  1. Scans open browser tabs for *.logicmonitor.com URLs
  2. Groups tabs by portal hostname
  3. Validates active authentication sessions
  4. Displays available portals in the dropdown
Portal status indicators
StatusDescription
Connected Active session, ready to use
Disconnected Session expired or logged out
Warning Connection issue detected
  1. Open the Context dropdown
  2. Select a different portal from the list
  3. Collector and device lists refresh automatically

If your LogicMonitor session expires:

  1. The portal shows a red Disconnected indicator
  2. Script execution fails with authentication errors
  3. Log in again in another browser tab
  4. Click Refresh in the Context dropdown to detect the new session

After selecting a portal, the collector list populates:

  • Grouped by collector group
  • Shows collector description and hostname
  • Indicates online/offline status with color badges
StatusCan Execute?Description
OnlineYesCollector is connected and ready
OfflineNoCollector is not responding
WarningCheckCollector health issues
  1. Click the Collector field in the Context dropdown
  2. Search by name, description, or hostname
  3. Click to select your target collector
  4. Device list refreshes for the selected collector

Collectors are organized by their assigned groups:

  • Ungrouped collectors appear first
  • Groups display in alphabetical order
  • Expand/collapse groups for easier navigation in large environments

Selecting a device enables:

  • Host Properties — Access hostProps.get("property.name") in your scripts
  • Token Substitution — PowerShell ##TOKEN## patterns resolve to device properties
  • Instance Properties — Collection modes can access instance-specific data

The device dropdown shows devices assigned to the selected collector:

  • Search by display name or system hostname
  • Shows both display name and system.hostname
  • Limited to devices monitored by the selected collector
  1. Ensure a collector is selected first
  2. Click the Device field
  3. Search or browse the device list
  4. Click to select your target device

Click the × button to clear the device selection. Useful when:

  • Running freeform scripts without device context
  • Testing scripts that should work without device properties
  • Switching between device-specific and general tests

LMDA Composer remembers your selections across sessions:

SettingPersisted?Scope
PortalYesGlobal (last used)
CollectorYesPer portal
DeviceYesPer session

When you return to the composer, your last portal and collector are automatically restored.


Each tab can have different context settings:

  • Tab Memory — Tabs remember their execution context. Switching tabs may update the toolbar display.
  • Portal Binding — Tabs opened from LogicModules are “bound” to their source portal.

When you open a script from a LogicModule:

  • The tab is bound to that portal
  • A link icon appears on the tab
  • Commit operations use the bound portal
  • A warning appears if the active portal doesn’t match

Click the refresh icon in the portal section to:

  • Rescan for open LogicMonitor tabs
  • Update session status indicators
  • Detect newly opened portals

Press Ctrl+R or click refresh to:

  • Reload the collector list from the portal
  • Update online/offline status
  • Reflect collector configuration changes

Device lists refresh automatically when:

  • Collector selection changes
  • You manually trigger a refresh with the button