Limit decimal Inbound / outbound utilization

Hi,

I have a template with port utilization

Inbound Utilization: {{ (($value[‘ifInOctets_rate’]*8)/$value[‘ifSpeed’])*1000 }} Mb
Outbound Utilization: {{ (($value[‘ifOutOctets_rate’]*8)/$value[‘ifSpeed’])*1000 }} Mb

Show this:
Inbound Utilization: 8690.8608 Mb
Outbound Utilization: 110.648 Mb

Can i limit to show:
Inbound Utilization: 8690.86 Mb
Outbound Utilization: 110.64 Mb

Thanks!

1 Like

Whatever you have in the {{ and }} is PHP. So you can play with the “round” function :
https://www.w3schools.com/php/func_math_round.asp

1 Like