Run/control External Processes
Last updated - 24 July, 2025
The most robust way to call external processes is to use the Groovy method waitForProcessOutput.
For example:
LogicMonitor acquires Catchpoint, adding Internet and digital experience insight to LM Envision.
Proactively manage modern hybrid environments with predictive insights, intelligent automation, and full-stack observability.
Explore solutionsExplore our resource library for IT pros. Get expert guides, observability strategies, and real-world insights to power smarter, AI-driven operations.
Explore resourcesOur observability platform proactively delivers the insights and automation CIOs need to accelerate innovation.
About LogicMonitorLast updated - 24 July, 2025
The most robust way to call external processes is to use the Groovy method waitForProcessOutput.
For example:
command="../bin/ipmiutil sensor -c -N " + hostname + " -U "+User+" -P " +Pass
def sout = new StringBuffer()
def serr = new StringBuffer()
def proc = command.execute()
proc.waitForProcessOutput(sout, serr)
if(proc.exitValue() == 0) {
output=sout.toString()
output.eachLine {
if (it =~ / Full /) {
elements=it.split(/ *\| */)
if ( elements[5]=="OK" ) { //only discover those reporting a status
println elements[0]+"##"+elements[4]+":"+elements[3]
}
}
}
else {
// error handling ...}