Posted Thu, 01 Jan 2015 06:00:00 GMT by Portal Admin

Q. I have some satellite devices that respond with numeric parameters in strings, e.g. "9.09" or simply "3456". I want to be able to make charts of these parameters. Can a custom SNMP probe convert strings into integers?

A. If the value you're receiving is a straight number, InterMapper should treat it as such, even if it's being sent as a string. Using the DEFAULT type in <snmp-device-variables>, InterMapper should automatically recognize a string of "3456" as an INTEGER. Or, if you know that something will be of a certain type, you can just specify that type directly. For example:

<snmp-device-variables>
var1, <your-oid-here>, DEFAULT, "<your-label-here>"
var2, <your-oid-here>, INTEGER, "<your-label-here>"
var3, <your-oid-here>, DOUBLE, "<your-label-here>"
</snmp-device-variables>


These should all work, even if the value is a STRING originally. To give a
value a chartable link on its status window, you can use the {chartable} macro in the <snmp-device-display> section, like this:

<snmp-device-display>
Variable: ${chartable: #.##: $var1}
</snmp-device-display>


The #.## indicates the number of decimal points to use, and $var1 is the
variable to chart. The InterMapper Developer Guide (Creating Custom Probes -> Custom SNMP Probes -> Probe Variables section) has a little more information, and a couple of examples.

You must be signed in to post in this forum.