Collector Readiness Check
Before adding a new collector to an auto-balance group, verify it can reach all devices in that group. Once the collector joins, LM starts assigning devices to it automatically — devices it can’t reach will generate monitoring errors.
The standard workflow:
- Build the new collector and leave it outside any group.
- Discover devices and protocols using
tools/elm-collector-readiness.sh. - Generate the test script (stdout redirect or clipboard).
- Test reachability from the new collector in LM Collector Debug.
- Fix any failures before moving the collector into the group.
See also:
- collectors.md for health checks and auto-balance group queries
- Step 1 — Find the auto-balance group
- Step 2 — Discover devices and generate the test script
- Step 3 — Inject credentials (optional)
- Step 4 — Run the test from the new collector
- Interpreting results
- Mode C — LM API directly, no elm
- meta
Step 1 — Find the auto-balance group
Run with no arguments to list auto-balance groups:
tools/elm-collector-readiness.sh
Auto-balance groups:
id name collectors threshold
---- ------------------------ ---------- ---------
42 My Region Collectors 3 500
87 APAC Collectors 2 500
Note the ID of the group you are adding the new collector to.
Step 2 — Discover devices and generate the test script
The script always renders the Groovy test script to stdout. Redirect it to a file or pipe to clipboard.
By group ID — write to file:
tools/elm-collector-readiness.sh --id 42 > /tmp/check.groovy
By group name — write to file:
tools/elm-collector-readiness.sh --name "My Region Collectors" > /tmp/check.groovy
Copy directly to clipboard (macOS):
tools/elm-collector-readiness.sh --id 42 | pbcopy
With a non-default elm profile:
tools/elm-collector-readiness.sh --id 42 --profile prod > /tmp/check.groovy
--profile defaults to config (the same default as elm — reads config.ini).
Status messages go to stderr so they don’t pollute the redirected output:
Group: My Region Collectors (id=42)
Collectors: 3
AutoBalance: true
Fetching devices in group 42...
Devices found: 47
Device IP/Hostname Protocols
-------------------------------- ---------------------- ---------
server01 10.0.1.10 ping, snmp, tcp-22
windows-box 10.0.1.20 ping, tcp-135
api-device 10.0.1.30 ping, tcp-80, tcp-443
Protocol detection uses autoProperties set by LM Active Discovery on each device.
The IP/hostname used is the name field — the address LM uses to reach the device,
not displayName.
| autoProperty | Value | Test added |
|---|---|---|
auto.snmp.operational |
true |
SNMP probe (UDP 161) |
auto.network.listening_tcp_ports |
contains 22 |
TCP port 22 (SSH) |
auto.network.listening_tcp_ports |
contains 80 |
TCP port 80 (HTTP) |
auto.network.listening_tcp_ports |
contains 135 |
TCP port 135 (WMI/RPC) |
auto.network.listening_tcp_ports |
contains 443 |
TCP port 443 (HTTPS) |
| (always) | — | Ping (ICMP) |
If a device has no Active Discovery data yet (no auto.network.listening_tcp_ports),
only ping is tested. Run Active Discovery on the group in LM before using this tool
for best results.
Step 3 — Inject credentials (optional)
By default the rendered script has blank credential fields; you fill them in manually
in the LM debug console before running. If you want credentials pre-filled from elm’s
config, add --creds:
# Default elm profile (config.ini)
tools/elm-collector-readiness.sh --id 42 --creds | pbcopy
# Non-default profile
tools/elm-collector-readiness.sh --id 42 --creds --profile prod > /tmp/check.groovy
Note: the rendered script from
--credscontains your LM API credentials. Do not commit it to git or share it.
With credentials injected, the script can also call the LM API directly from the collector to re-discover the device list — useful if you want to verify without trusting the workstation-side output.
Step 4 — Run the test from the new collector
- Open the LM portal and navigate to the new collector’s device.
- Go to Collector Debug → Script tab.
- Paste the rendered Groovy (from file or clipboard) and run it.
Example output:
47 devices (pre-filled by elm)
Device IP/Hostname ping snmp tcp-22 tcp-135
-------------------------------- -------------------- --------- --------- --------- ---------
server01 10.0.1.10 PASS PASS PASS -
windows-box 10.0.1.20 PASS - - PASS
api-device 10.0.1.30 PASS - - -
unreachable-host 10.0.2.99 FAIL - FAIL -
FAILURES — investigate before adding this collector to the group:
- unreachable-host ping
- unreachable-host tcp-22
Interpreting results
| Result | Meaning |
|---|---|
PASS |
Connection succeeded |
FAIL |
Connection refused or timed out — routing or firewall issue |
TIMEOUT |
SNMP only: no UDP response within timeout |
- |
Protocol not expected for this device; skipped |
SNMP TIMEOUT
TIMEOUT on SNMP does not necessarily mean the device is unreachable. SNMP
agents that enforce community strings silently drop probes with unknown communities
instead of sending an error response. The probe uses community public; if the
device uses a different community, you will see TIMEOUT even though the agent is
running and the port is open.
If ping passes but snmp shows TIMEOUT, check the device’s snmp.community
property in LM and verify the collector can reach UDP 161 from the network level.
WMI (tcp-135)
TCP 135 is the WMI/DCOM endpoint mapper. A passing TCP-135 check means the Windows RPC endpoint is reachable from the new collector, which is the necessary precondition for WMI collection. It does not test WMI credentials.
Mode C — LM API directly, no elm
If elm is not available, open tools/lm-collector-reachability-check.groovy.j2 in an
editor, clear the `` placeholder (leave []), and
fill in the credentials block:
def ACCESS_ID = "your-access-id" // remove after use
def ACCESS_KEY = "your-access-key" // remove after use
def ACCOUNT_NAME = "acme"
def GROUP_ID = 42
// DEVICES_JSON stays as []
The script calls the LM API directly to discover devices. Remove the credentials from the script after use — the LM debug console history may retain them.
meta
Update the ToC on this page by running the following:
gh-md-toc --insert --no-backup --hide-footer --skip-header examples/collector-readiness.md