Forum Discussion
Hi Josh,
It's been a while since your request, sorry I didnt spot this a couple of months ago. We have propertysources now, a simple groovy script will do this for you.
def hostname = hostProps.get("system.hostname")
def OID_contact = "1.3.6.1.2.1.1.4.0" // the OID we want
def contact = Snmp.get(hostname, OID_contact);
println "contact=" + contact
def OID_system_name = "1.3.6.1.2.1.1.5.0" // the OID we want
def system_name = Snmp.get(hostname, OID_system_name);
split_name=system_name.tokenize( '.' )
println "system_name=" + split_name[0]
def OID_location = "1.3.6.1.2.1.1.6.0" // the OID we want
def location = Snmp.get(hostname, OID_location);
println "location=" + location
return 0
If you need any further pointers hop onto chat,
David
Related Content
- 2 years ago