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

Q. I am using the chartable macro in my probe but the resulting values are not correctly formatted and instead are appended with .00. Here is the relevant part of my probe...


siteName, ., DEFAULT, "SiteName"
currentVal01, . , INTEGER, "Current01"
currentVal02, . , INTEGER, "Current02"



\B5\SNMP - Basic OID Results\0P\
\4\Site Name:\0\ ${siteName}
\4\Current 1:\0\ ${chartable: #.## : $currentVal01}
\4\Current 2:\0\ ${chartable: #.## : $currentVal02}


A. The newest InterMapper Developer Guide describes another way to format data with the ${chartable} macro, using sprintf specifiers. The relevant page is:

The format specifier #.## in the chartable macro is telling InterMapper to format the integer as a floating point number with two decimal places. Since integer values are chartable by default, you can use this to format the number as an integer:

${currentVal01} as opposed to:
${chartable: # : $currentVal01}.

The chartable macro is only needed to apply a custom format to integer or floating point values.


You must be signed in to post in this forum.