Page 1 of 1

how to "memorize" a snmp-function-result

Posted: Wed Oct 09, 2019 8:05 pm
by floaty
Hello Forum,

I am looking for a way to save the result of a function ... "somewhere".

My problem: inside my devicelabels the snmp-device-name is dynamically displayed from a function.
In case the device isn't responding any longer, I'm loosing the device-name in the label (but I won't !)

So what are my options ?
.
up-down.png
###################################
##### appearance ##################

[Device.Name]

[snmp_name_raw()]
[snmp_descript_short()]
[Device.ServicesDown]

###################################
##### [snmp_name_raw()] ###########

if (string_size(oid("iso.org.dod.internet.mgmt.mib-2.system.sysName.0")), 
concatenate("", oid("iso.org.dod.internet.mgmt.mib-2.system.sysName.0"), "
"), "")

##### [snmp_descript_short()] #####

if (string_size(oid("iso.org.dod.internet.mgmt.mib-2.system.sysDescr.0")), 
concatenate("", string_substring(oid("iso.org.dod.internet.mgmt.mib-2.system.sysDescr.0"),0,23), "
"), "")