SNMP value to single decimal

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
Kris
Posts: 375
Joined: Wed May 12, 2010 3:22 am

SNMP value to single decimal

Post by Kris »

Hi guys,

I'm pretty sure this has been answered before, but I can't find it anywhere.

I have a SNMP test that returns a temperature in 3 digits.
It needs to be divided by 10 to get the actual value.
So far I came up with

Code: Select all

[%SuggestedReply_Integer% div 10]
However, this only returns the integer part, eg. 253 becomes 25 instead of 25.3

What am I missing here?

Thanks!
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

[%SuggestedReply_Integer% div 10].[%SuggestedReply_Integer% mod 10]

If decimal separator on your system is comma, then use comma
[%SuggestedReply_Integer% div 10],[%SuggestedReply_Integer% mod 10]


Regards
Alex
Kris
Posts: 375
Joined: Wed May 12, 2010 3:22 am

Post by Kris »

Awesome. Works like a charm. 8)

Thanks!
Post Reply