Forum Discussion
Mike_Moniz
3 months 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
- 7 months ago
- 7 months ago
- 10 months ago
- 2 years ago
- 2 years ago