Groovy Script Module - secondary hostProps
I am attempting to create a Topology module to address ongoing topology issues.
Is there a way to target dataobjects (hosts) outside of the host that the module is targeting?
Example:
import org.json.JSONArray
import com.santaba.agent.groovyapi.snmp.Snmp
import com.santaba.agent.groovy.utils.GroovyScriptHelper as GSH
import com.logicmonitor.mod.SnippetsmodLoader = GSH.getInstance(GroovySystem.version).getScript("Snippets", Snippets.getLoader()).withBinding(getBinding())
lmtopo = modLoader.load("lm.topo", "0")
lmtopoSnmp = modLoader.load("lm.topo.snmp", "0")
lmtopoData = modLoader.load("lm.data.topo", "1").create()//Normal working host props:
def host = hostProps.get("system.hostname")//Secondary host??? -- made up method
def referenceHost = getHost.byName("ServerName")