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.Snippets modLoader = 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")99Views0likes0CommentsComplex datapoint - groovy script to calculate the value from the device property
Hi All, I have a case where I need to take AWS device property called ##system.aws.bandwidth## that can have values 1Gbps, 10Gbps or 50Gbps, convert it to bytes and return the value to the datapoint. I'm trying to use groovy script for complex datapoint but can't get it to work even with the most simple scripts: "Error Invalid enum value, must be EXPRESSION". Example script: if ('##system.aws.bandwidth##' == '1Gbps') { return 1000000000 } else if ('##system.aws.bandwidth##' == '10Gbps') { return 10000000000 } else if ('##system.aws.bandwidth##' == '50Gbps') { return 50000000000 } else { return 0 } Has anyone tried to create something similar? What I'm doing wrong? Thanks.152Views0likes8CommentsProcess Monitoring Batch Script
s there a way we can measure the performance of a Data Source or collectors? Repository: ProcessMonitoring @Stuart Weenig I presume I did not understand why monitoring lots of processes/services on Windows systems, with _Select Data Sources might not be the best approach. Aren’t both making a WMI call? Aren’t both going to bring all the Processes in one go? Can we see the query count from WMI Vs Batch Groovy?Solved184Views0likes7CommentsProcess Monitoring
Hi @Stuart Weenig Thank you for your awesome work! I was able to use the Win_Process_Stats_Groovy.xml file for creating data source for Process. https://github.com/sweenig/lm/tree/main/ProcessMonitoring I am able to see data in Discovery and Collector but under Raw Data in Devices > Data source I do not see any data , when I poll I do see data, am I missing something. My Applied To Wizard has the following query I removed the Win_Process_Stats.excludeRegEx & Win_Process_Stats.includeRegEx from “Applies To” isWindows() && system.displayname == "server001" or system.displayname == "server001"Solved325Views8likes10Comments