Forum Discussion

Cole_McDonald's avatar
Cole_McDonald
Icon for Professor rankProfessor
30 days ago
Solved

Building Dynamic Groups using Powershell Batchscript DataSources

I'm looking for a way to use the "Description" field I'm collecting when building instances from a batchscripted datasource.

current output I'm using in the active discovery writes WildAlias, WIldValue, Description:

$($proc.processname)##$($svcmatch.displayname)##$toolname

I want $toolname to drive instance grouping.  I see mechanisms for using the other two, but altering those doesn't fit the use case I need for these.  The Support Docs for instance grouping and for active discovery don't provide quite enough info to figure out what they're instructing without a bunch of experimentation (which is probably how I'll end up sorting this out if someone hasn't done this already).

For instance (pun!), This refers to Dynamic groups ( dynamicGroup="^(.d.)" )... but does it only evaluate the GREP based on wildalias?
Instance Groups | LogicMonitor

  • I've got it figured out.

    for output, the fifth slot in the ## separated output will fill in instance properties.  Here's the new output:

    write-output "$($proc.processname)##$($svcmatch.displayname)##$toolname####toolname=$toolname"

    This writes an instance property as auto.toolname and if you set the instance grouping in the active directory setting "Group Method" to "Instance Level Property" and set the "parameter" field to "auto.toolname"

1 Reply

  • I've got it figured out.

    for output, the fifth slot in the ## separated output will fill in instance properties.  Here's the new output:

    write-output "$($proc.processname)##$($svcmatch.displayname)##$toolname####toolname=$toolname"

    This writes an instance property as auto.toolname and if you set the instance grouping in the active directory setting "Group Method" to "Instance Level Property" and set the "parameter" field to "auto.toolname"