Forum Discussion

David_Bond's avatar
David_Bond
Icon for Professor rankProfessor
31 days ago

Enhanced Script NetScans continually overwrites Resource Groups?

We have an Enhanced Script Netscan set up for a customer, set to run once an hour.  It works as expected, adding the discovered Resources to the assigned Resource Group.

We then manually add it to other Resource Groups and the next time the Netscan runs, it has removed that and simply placed it back into the discovery Resource Group.

Our code IS setting the Group Name array, so I believe that's what's doing it.

sql.eachRow(query) { row ->
    def host = [
        hostname   : row.IpAddress,
      displayname: row.LogicMonitorDisplayName,
        hostProps  : [
        "propertyX"      : row.ValueX,
        "propertyY"      : row.ValueY,
        "system.categories" : "NoPing",
        ],
      groupName  : ["Devices by Type/Custom Device Type"],
        collectorId: lmCreds.collectorId
    ]
    hosts << host
}

However, the Netscan is set to exclude any existing Resources:

Seems like a bug to me?

Customer is unhappy and wants a fix!  Any advice?

1 Reply

  • One thought is that "Enhanced Netscans" are more "Resource Management" scripts and are overwriting Group Membership by design.  This would actually be a very cool feature, but needs an extra Dropdown option on the "Exclude ip addresses" dialog e.g. "Overwrite existing Resource".