Forum Discussion
Mike_Moniz
16 days agoProfessor
You can use the script type for Autodiscover (instead of snmp) and write code to set WildValue to what you want.
If it helps, here is one that I use for webservices that perhaps you can start with and modify as needed:
import com.santaba.agent.groovyapi.snmp.Snmp
def hostname = hostProps.get("system.hostname")
//Get list of processes from snmp
def OID_NAME = ".1.3.6.1.2.1.25.4.2.1.4"
def OID_PARAM = ".1.3.6.1.2.1.25.4.2.1.5"
def processPaths = Snmp.walkAsMap(hostname, OID_NAME, [:], 20000)
def processParams = Snmp.walkAsMap(hostname, OID_PARAM, [:], 20000)
//Get all unique processes
def webServices = []
processPaths.each { pid, name ->
if (name) {
webServices << name+"||"+processParams[pid]
}
}
webServices = webServices.unique()
//Report all processes found, use the FILTERS of the DataSource to only get what we want
webServices.each { entry ->
//AUTODISCOVER: WildValue_ID##WildAlias_Display##Description##WildValue2##auto.propertyhere=somevalue&auto.propertyhere2=somevalue2"
def (process,param) = entry.tokenize('||')
println entry+"##"+process //+"##"+process+" "+param (if you want to add full command in desc)
}
return 0
Related Content
- 5 months ago
- 5 months ago
- 8 months ago
- 2 years ago
- 12 months ago